svn commit: r188389 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
dev/cxgb fs/fifofs
Konstantin Belousov
kib at FreeBSD.org
Mon Feb 9 04:22:50 PST 2009
Author: kib
Date: Mon Feb 9 12:22:49 2009
New Revision: 188389
URL: http://svn.freebsd.org/changeset/base/188389
Log:
MFC r187715:
The kernel may do unbalanced calls to fifo_close() for fifo vnode,
without corresponding number of fifo_open(). This causes assertion
failure in fifo_close() due to vp->v_fifoinfo being NULL for kernel
with INVARIANTS, or NULL pointer dereference otherwise. In fact, we may
ignore excess calls to fifo_close() without bad consequences.
Turn KASSERT() into the return, and print warning for now.
Modified:
stable/7/sys/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
stable/7/sys/dev/ath/ath_hal/ (props changed)
stable/7/sys/dev/cxgb/ (props changed)
stable/7/sys/fs/fifofs/fifo_vnops.c
Modified: stable/7/sys/fs/fifofs/fifo_vnops.c
==============================================================================
--- stable/7/sys/fs/fifofs/fifo_vnops.c Mon Feb 9 11:42:23 2009 (r188388)
+++ stable/7/sys/fs/fifofs/fifo_vnops.c Mon Feb 9 12:22:49 2009 (r188389)
@@ -424,7 +424,10 @@ fifo_close(ap)
struct fifoinfo *fip = vp->v_fifoinfo;
ASSERT_VOP_LOCKED(vp, "fifo_close");
- KASSERT(fip != NULL, ("fifo_close: no v_fifoinfo"));
+ if (fip == NULL) {
+ printf("fifo_close: no v_fifoinfo %p\n", vp);
+ return (0);
+ }
if (ap->a_fflag & FREAD) {
fip->fi_readers--;
if (fip->fi_readers == 0)
More information about the svn-src-stable-7
mailing list