From 45cdcb7aab7d30e03016d22b9bab448ad3cf3058 Mon Sep 17 00:00:00 2001 From: Mike Pritchard Date: Fri, 2 Mar 2007 00:10:11 +0000 Subject: [PATCH] Change fifo_printinfo to check if the vnode v_fifoinfo pointer is NULL and print a message to that effect to prevent a panic. --- sys/fs/fifofs/fifo_vnops.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index 6947c472a64d..9d9ee62cfa03 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);