From owner-freebsd-current@FreeBSD.ORG Mon Nov 12 14:46:00 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F68216A417 for ; Mon, 12 Nov 2007 14:46:00 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 1A12013C480 for ; Mon, 12 Nov 2007 14:45:54 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id A4FD620A2; Mon, 12 Nov 2007 15:45:24 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.1/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 8FFA620A0; Mon, 12 Nov 2007 15:45:24 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 5918C84468; Mon, 12 Nov 2007 15:45:24 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Kostik Belousov References: <20070917194009.W84177@woozle.rinet.ru> <200709241223.52140.qpadla@gmail.com> <472561A7.60108@delphij.net> <200711121433.26356.qpadla@gmail.com> <20071112141959.GP37471@deviant.kiev.zoral.com.ua> Date: Mon, 12 Nov 2007 15:45:24 +0100 In-Reply-To: <20071112141959.GP37471@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon\, 12 Nov 2007 16\:19\:59 +0200") Message-ID: <86k5onwmij.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, delphij@freebsd.org, Dmitry Morozovsky Subject: Re: tmpfs on contemporary -current: panic: locked against myself X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 12 Nov 2007 14:46:00 -0000 Kostik Belousov writes: > The following patch fixed it for me. > > diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c > index 4a3cdec..55e9891 100644 > --- a/sys/fs/tmpfs/tmpfs_vfsops.c > +++ b/sys/fs/tmpfs/tmpfs_vfsops.c > @@ -201,7 +201,7 @@ tmpfs_mount(struct mount *mp, struct thread *td) > /* Root node attributes. */ > uid_t root_uid; > gid_t root_gid; > - mode_t root_mode; > + int root_mode; >=20=20 > struct vattr va; >=20=20 Alternatively: @@ -231,7 +231,7 @@ vfs_scanopt(mp->mnt_optnew, "uid", "%d", &root_uid) !=3D 1) root_uid =3D va.va_uid; if (mp->mnt_cred->cr_ruid !=3D 0 || - vfs_scanopt(mp->mnt_optnew, "mode", "%o", &root_mode) !=3D 1) + vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) !=3D 1) root_mode =3D va.va_mode; if(vfs_scanopt(mp->mnt_optnew, "inodes", "%d", &nodes_max) !=3D 1) nodes_max =3D 0; Incidentally, later edits to the tmpfs code have introduced a number of style(9) violations, one of which is visible in my patch. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no