tmpfs on contemporary -current: panic: locked against myself

Kostik Belousov kostikbel at gmail.com
Mon Nov 12 06:20:21 PST 2007


On Mon, Nov 12, 2007 at 02:33:22PM +0200, Nikolay Pavlov wrote:
> On Monday 29 October 2007 06:29:27 LI Xin wrote:
> > > Just want to be sure that no one lose this. Here is a PR:
> > > http://www.freebsd.org/cgi/query-pr.cgi?pr=116600
> >
> > Can not reproduce here.  Could you please confirm that this still
> > persists for latest RELENG_7?
> 
> Look like i've got it finally. The exact option the cause a panic for me is 
> a "mode=777". So that:
> mount -t tmpfs tmpfs /tmp  - works fine.  
> mount -t tmpfs -o mode=777 tmpfs /tmp - triggers a panic.
> A backtrace and a message are the same as in PR. 7.0-BETA2 is affected too.

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;
 
 	struct vattr	va;
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20071112/49931c71/attachment.pgp


More information about the freebsd-current mailing list