From owner-freebsd-current@FreeBSD.ORG Sun Nov 23 04:39:28 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7B6A16A4CE for ; Sun, 23 Nov 2003 04:39:28 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2572243F75 for ; Sun, 23 Nov 2003 04:39:28 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id F342F2ED44E; Sun, 23 Nov 2003 04:39:27 -0800 (PST) Date: Sun, 23 Nov 2003 13:39:27 +0100 From: Maxime Henrion To: Christian Laursen Message-ID: <20031123123927.GB8404@elvis.mu.org> References: <86u14von9h.fsf@borg.borderworlds.dk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="J2SCkAp4GZ/dPZZf" Content-Disposition: inline In-Reply-To: <86u14von9h.fsf@borg.borderworlds.dk> User-Agent: Mutt/1.4.1i cc: freebsd-current@freebsd.org Subject: Re: Panic when trying to mount cd9660 as udf X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2003 12:39:28 -0000 --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--