Source-Changes-HG archive

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

[src/trunk]: src/sys/nfs Make sure bp->b_proc is initialized. Should fix a d...



details:   https://anonhg.NetBSD.org/src/rev/5575c5dad9ed
branches:  trunk
changeset: 503052:5575c5dad9ed
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jan 30 03:47:11 2001 +0000

description:
Make sure bp->b_proc is initialized.  Should fix a deref-garbage-pointer
problem reported by msaitoh%netbsd.org@localhost.  NOTE: These are marked XXXUBC
since the code that allocates the bufs is new with UBC, but it may be
the case that bp->b_proc needs to be intialized to curproc (it's used
in a call to nfs_sigintr()).

diffstat:

 sys/nfs/nfs_bio.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r 36b9adeba76d -r 5575c5dad9ed sys/nfs/nfs_bio.c
--- a/sys/nfs/nfs_bio.c Tue Jan 30 03:19:10 2001 +0000
+++ b/sys/nfs/nfs_bio.c Tue Jan 30 03:47:11 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_bio.c,v 1.59 2001/01/07 05:54:41 enami Exp $       */
+/*     $NetBSD: nfs_bio.c,v 1.60 2001/01/30 03:47:11 thorpej Exp $     */
 
 /*
  * Copyright (c) 1989, 1993
@@ -1149,6 +1149,7 @@
        mbp->b_flags = B_BUSY|B_READ| (async ? B_CALL|B_ASYNC : 0);
        mbp->b_iodone = uvm_aio_biodone;
        mbp->b_vp = vp;
+       mbp->b_proc = NULL;             /* XXXUBC */
        LIST_INIT(&mbp->b_dep);
 
        /*
@@ -1225,6 +1226,7 @@
                        bp->b_flags = B_BUSY|B_READ|B_CALL|B_ASYNC;
                        bp->b_iodone = uvm_aio_biodone1;
                        bp->b_vp = vp;
+                       bp->b_proc = NULL;      /* XXXUBC */
                        LIST_INIT(&bp->b_dep);
                }
                bp->b_private = mbp;
@@ -1423,6 +1425,7 @@
                (curproc == uvm.pagedaemon_proc ? B_PDAEMON : 0);
        mbp->b_iodone = uvm_aio_biodone;
        mbp->b_vp = vp;
+       mbp->b_proc = NULL;             /* XXXUBC */
        LIST_INIT(&mbp->b_dep);
 
        for (offset = origoffset;
@@ -1457,6 +1460,7 @@
                        bp->b_flags = B_BUSY|B_WRITE|B_CALL|B_ASYNC;
                        bp->b_iodone = uvm_aio_biodone1;
                        bp->b_vp = vp;
+                       bp->b_proc = NULL;      /* XXXUBC */
                        LIST_INIT(&bp->b_dep);
                }
                bp->b_private = mbp;



Home | Main Index | Thread Index | Old Index