From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 5 11:00:43 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 152C316A422 for ; Mon, 5 Sep 2005 11:00:43 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A442F43D49 for ; Mon, 5 Sep 2005 11:00:42 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j85B0gdc075753 for ; Mon, 5 Sep 2005 11:00:42 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j85B0gO2075752; Mon, 5 Sep 2005 11:00:42 GMT (envelope-from gnats) Date: Mon, 5 Sep 2005 11:00:42 GMT Message-Id: <200509051100.j85B0gO2075752@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Dmitry Pryanishnikov Cc: Subject: Re: kern/85503: panic: wrong dirclust using msdosfs in RELENG_6 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitry Pryanishnikov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2005 11:00:43 -0000 The following reply was made to PR kern/85503; it has been noted by GNATS. From: Dmitry Pryanishnikov To: Poul-Henning Kamp Cc: freebsd-arch@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/85503: panic: wrong dirclust using msdosfs in RELENG_6 Date: Mon, 5 Sep 2005 13:50:01 +0300 (EEST) Hello! On Fri, 2 Sep 2005, Poul-Henning Kamp wrote: >> found the primary error (lack of casts leaded to 32-bit result), but then >> we should transfer this 64-bit "inode" number to vfs_hash_get(). Oops, >> it also limited to u_int (32 bits on i386). Finally, I see that the >> primary shortcoming here: in sys/vnode.h we have > > NFS has the same sort of problem, it has 16 or 32 *bytes* filehandles > that need to hash to 32 bit "inode numbers". > > If you look at vfs_hash_get calls in sys/nfsclient you can see that > it calculates a 32bit hash but then provides a "nfs_vncmpf" function > to do the actual comparison to resolve hash collisions. Indeed, I've missed last 2 arguments of vfs_hash_get(). Actually it seems that the only error here is missing cast. After application of the following patch: ftp://external.atlantis.dp.ua/FreeBSD/PR/85503/msdosfs.patch problem has gone away. Please, if possible, review and commit it. I think this patch is a good MFC candidate for RELENG_6 and RELENG_6_0, since it prevents panic in quite common environment. Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE