Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern PR/25749: Peter Postma: Missing splx() in kernel.



details:   https://anonhg.NetBSD.org/src/rev/b392f5a32b8b
branches:  trunk
changeset: 571207:b392f5a32b8b
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Nov 13 19:16:18 2004 +0000

description:
PR/25749: Peter Postma: Missing splx() in kernel.

diffstat:

 sys/kern/tty_pty.c |  5 +++--
 sys/kern/vfs_bio.c |  7 +++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (67 lines):

diff -r a8771162af30 -r b392f5a32b8b sys/kern/tty_pty.c
--- a/sys/kern/tty_pty.c        Sat Nov 13 19:14:48 2004 +0000
+++ b/sys/kern/tty_pty.c        Sat Nov 13 19:16:18 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty_pty.c,v 1.81 2004/11/10 17:29:54 christos Exp $    */
+/*     $NetBSD: tty_pty.c,v 1.82 2004/11/13 19:16:18 christos Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.81 2004/11/10 17:29:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.82 2004/11/13 19:16:18 christos Exp $");
 
 #include "opt_compat_sunos.h"
 #include "opt_ptm.h"
@@ -418,6 +418,7 @@
                        }
                        error = ttysleep(tp, (caddr_t)&tp->t_canq,
                                         TTIPRI | PCATCH | PNORELOCK, ttyin, 0);
+                       splx(s);
                        if (error)
                                return (error);
                        goto again;
diff -r a8771162af30 -r b392f5a32b8b sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c        Sat Nov 13 19:14:48 2004 +0000
+++ b/sys/kern/vfs_bio.c        Sat Nov 13 19:16:18 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_bio.c,v 1.136 2004/10/04 01:24:18 enami Exp $      */
+/*     $NetBSD: vfs_bio.c,v 1.137 2004/11/13 19:16:18 christos Exp $   */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -81,7 +81,7 @@
 #include "opt_softdep.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.136 2004/10/04 01:24:18 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.137 2004/11/13 19:16:18 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1466,6 +1466,7 @@
                                bawrite(bp);
                                if (dcount-- <= 0) {
                                        printf("softdep ");
+                                       splx(s);
                                        goto fail;
                                }
                                simple_lock(&bqueue_slock);
@@ -1493,12 +1494,14 @@
 fail:;
 #if defined(DEBUG) || defined(DEBUG_HALT_BUSY)
                printf("giving up\nPrinting vnodes for busy buffers\n");
+               s = splbio();
                for (ihash = 0; ihash < bufhash+1; ihash++) {
                    LIST_FOREACH(bp, &bufhashtbl[ihash], b_hash) {
                        if ((bp->b_flags & (B_BUSY|B_INVAL|B_READ)) == B_BUSY)
                                vprint(NULL, bp->b_vp);
                    }
                }
+               splx(s);
 #endif
        }
 



Home | Main Index | Thread Index | Old Index