Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!metro!sequoia!ultima!kralizec.zeta.org.au!kralizec.zeta.org.au!not-for-mail From: bde@kralizec.zeta.org.au (Bruce Evans) Newsgroups: comp.os.386bsd.bugs Subject: Fix for panic in pcfs after failed mount (was Re: Kernel panics) Date: 19 Jul 1993 15:06:20 +1000 Organization: Kralizec Dialup Unix Sydney: +61-2-837-1183 V.32bis Lines: 41 Message-ID: <22da4cINNp01@kralizec.zeta.org.au> References: <21gh5j$rsa@news.cs.tu-berlin.de> NNTP-Posting-Host: kralizec.zeta.org.au Keywords: BUG VM KERNEL MOUNT In <21gh5j$rsa@news.cs.tu-berlin.de> klier@cs.tu-berlin.de (Jan Klier) writes: > I ran over a bug in 386bsd (with pk 2.4) that I don't have time to hunt >down, but wanted to post here, so that others who've enough time or are >familiar with the code can fix. > The problem occurs when you try to mount a dos floppy with > mount -t pcfs /dev/fd0a /mnt > without a floppy being in the drive. This operation aborts with an i/o >error message, just as one would expect that. > But if you then insert a dos floppy and repeat the command, the kernel >panics with the following message: > kernel panic: trap 12 > vm_fault(fe34c400,53e58000,1,0) -> 1 pcfs was freeing an unitialized pointer. gcc -Wall -W... warns about the problem, but the system headers are so krufty that it warns about 100's of other things so the warnings are usually turned off. *** /usr/src/sys.386bsd/pcfs/pcfs_vfsops.c~ Tue Apr 6 10:04:36 1993 --- /usr/src/sys.386bsd/pcfs/pcfs_vfsops.c Mon Jul 19 03:29:55 1993 *************** *** 197,201 **** dev_t dev = devvp->v_rdev; union bootsector *bsp; ! struct pcfsmount *pmp; struct buf *bp0 = NULL; struct byte_bpb33 *b33; --- 197,201 ---- dev_t dev = devvp->v_rdev; union bootsector *bsp; ! struct pcfsmount *pmp = NULL; struct buf *bp0 = NULL; struct byte_bpb33 *b33; -- Bruce Evans bde@kralizec.zeta.org.au