Date: Thu, 5 Apr 2001 16:25:08 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Terry Lambert <tlambert@primenet.com> Cc: "Matthew H. North" <ctsmhn@cts.com>, freebsd-fs@FreeBSD.ORG Subject: Re: Reproducible kernel panics in ffs_valloc: dup_alloc Message-ID: <Pine.BSF.4.21.0104051621010.45660-100000@besplex.bde.org> In-Reply-To: <200104050045.RAA03573@usr08.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 5 Apr 2001, Terry Lambert wrote: > > Thanks for the help. However, from my understanding of C, that patch does > > nothing (except add an extra instruction or two to the kernel). It simply > > adds an extra OR condition, that is always false, to an if statement. > > > > if CONDITION then > > do something > > > > is exactly the same as > > > > if FALSE or CONDITION then > > do something > > > > Perhaps I'm missing something. If so, please let me know. > > I think he meant "&&" instead of "||", which then dikes the code out. Yes. Oops. I actually use a 150 line version of the patch, with checks that vfs_bio_clrbuf() actually cleared the buffer and code to recover when it doesn't Corrected version of the quick fix: Index: vfs_bio.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_bio.c,v retrieving revision 1.273 diff -u -2 -r1.273 vfs_bio.c --- vfs_bio.c 2001/02/28 04:13:07 1.273 +++ vfs_bio.c 2001/04/05 06:24:29 @@ -3088,5 +3088,5 @@ int i, mask = 0; caddr_t sa, ea; - if ((bp->b_flags & (B_VMIO | B_MALLOC)) == B_VMIO) { + if (0 && (bp->b_flags & (B_VMIO | B_MALLOC)) == B_VMIO) { bp->b_flags &= ~B_INVAL; bp->b_ioflags &= ~BIO_ERROR; Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0104051621010.45660-100000>