diff options
author | mpp <mpp@FreeBSD.org> | 2007-03-02 00:10:11 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 2007-03-02 00:10:11 +0000 |
commit | 61cebfa89820922db6813f4e9286531f96fd6d0f (patch) | |
tree | 730f1882aefe85d44304233afa1fae41f8e5254e /sys/fs | |
parent | 554fb0a678acc072c137c8910be47babbdd30496 (diff) | |
download | FreeBSD-src-61cebfa89820922db6813f4e9286531f96fd6d0f.zip FreeBSD-src-61cebfa89820922db6813f4e9286531f96fd6d0f.tar.gz |
Change fifo_printinfo to check if the vnode v_fifoinfo pointer
is NULL and print a message to that effect to prevent a panic.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/fifofs/fifo_vnops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index 6947c47..9d9ee62 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/fifofs/fifo_vnops.c @@ -447,6 +447,10 @@ fifo_printinfo(vp) { register struct fifoinfo *fip = vp->v_fifoinfo; + if (fip == NULL){ + printf(", NULL v_fifoinfo"); + return (0); + } printf(", fifo with %ld readers and %ld writers", fip->fi_readers, fip->fi_writers); return (0); |