LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] fuse: fix bug in control filesystem mount
@ 2007-01-29 19:47 Miklos Szeredi
  0 siblings, 0 replies; only message in thread
From: Miklos Szeredi @ 2007-01-29 19:47 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, linux-kernel

Linus, please apply before 2.6.20.  Thanks.


The BUG in fuse_ctl_add_dentry() could be triggered if the control
filesystem was unmounted and mounted again while one or more fuse
filesystems were present.

The fix is to reset the dentry counter in fuse_ctl_kill_sb().

Bug reported by Florent Mertens.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>

---
Index: linux/fs/fuse/control.c
===================================================================
--- linux.orig/fs/fuse/control.c	2007-01-29 20:40:50.000000000 +0100
+++ linux/fs/fuse/control.c	2007-01-29 20:40:52.000000000 +0100
@@ -193,8 +193,12 @@ static int fuse_ctl_get_sb(struct file_s
 
 static void fuse_ctl_kill_sb(struct super_block *sb)
 {
+	struct fuse_conn *fc;
+
 	mutex_lock(&fuse_mutex);
 	fuse_control_sb = NULL;
+	list_for_each_entry(fc, &fuse_conn_list, entry)
+		fc->ctl_ndents = 0;
 	mutex_unlock(&fuse_mutex);
 
 	kill_litter_super(sb);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-29 19:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-29 19:47 [PATCH] fuse: fix bug in control filesystem mount Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).