Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Nov 2003 13:39:27 +0100
From:      Maxime Henrion <mux@freebsd.org>
To:        Christian Laursen <xi@borderworlds.dk>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Panic when trying to mount cd9660 as udf
Message-ID:  <20031123123927.GB8404@elvis.mu.org>
In-Reply-To: <86u14von9h.fsf@borg.borderworlds.dk>
References:  <86u14von9h.fsf@borg.borderworlds.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Christian Laursen wrote:
> By accident, I tried to mount a CD as UDF, and got the follwoing panic:
> 
> Fatal trap 12: page fault while in kernel mode
> cpuid = 0; apic id = 00
> fault virtual address   = 0x0
> fault code              = supervisor read, page not present
> instruction pointer     = 0x8:0xc06c2f6c
> stack pointer           = 0x10:0xcda4bac0
> frame pointer           = 0x10:0xcda4bacc
> code segment            = base 0x0, limit 0xfffff, type 0x1b
>                         = DPL 0, pres 1, def32 1, gran 1
> processor eflags        = interrupt enabled, resume, IOPL = 0
> current process         = 530 (mount_udf)
> 
> This seems to be easily reproducable. First I got it on my workstation
> running 5.2-BETA, and I then reproduced it on my test machine which runs
> -CURRENT from 4 days ago:
[...]

Can you try the attached patch and tell me if it fixes your problem?

Thanks,
Maxime

--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="vfs_mount.patch"

Index: vfs_mount.c
===================================================================
RCS file: /space2/ncvs/src/sys/kern/vfs_mount.c,v
retrieving revision 1.115
diff -u -p -r1.115 vfs_mount.c
--- vfs_mount.c	14 Nov 2003 05:27:41 -0000	1.115
+++ vfs_mount.c	23 Nov 2003 12:35:29 -0000
@@ -841,7 +841,8 @@ update:
 	 * Check if the fs implements the type VFS_[N]MOUNT()
 	 * function we are looking for.
 	 */
-	if ((compat == 0) == (mp->mnt_op->vfs_mount != NULL)) {
+	if ((compat && mp->mnt_op->vfs_mount == NULL) ||
+	    (!compat && mp->mnt_op->vfs_nmount == NULL)) {
 		printf("%s doesn't support the %s mount syscall\n",
 		    mp->mnt_vfc->vfc_name, compat? "old" : "new");
 		VI_LOCK(vp);

--J2SCkAp4GZ/dPZZf--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031123123927.GB8404>