linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fuse: return -EAGAIN if the connection has not been init'ed
@ 2009-11-12 21:01 Josef Bacik
  2009-11-13  6:58 ` Miklos Szeredi
  0 siblings, 1 reply; 12+ messages in thread
From: Josef Bacik @ 2009-11-12 21:01 UTC (permalink / raw)
  To: miklos; +Cc: eparis, fuse-devel, linux-fsdevel

Hello,

There is a problem where if you have certain audit rules in place you can hang
on mount of a fuse filesystem.  If you follow the instructions here

https://bugzilla.redhat.com/show_bug.cgi?id=493565#c44

it is easy to reproduce.  The problem is after the mount request gets sent, the
mounting process gets stuck going off to read xattrs to satisfy audit's
curiosity, and then we get stuck because that tries to get a request, but can't
because the connection is blocked.  This patch fixes the problem, but I'm not
entirely sold on it, it's rather quick and dirty.  Basically if we haven't
finished the initialization of the connection just return -EAGAIN.  This fixes
the problem, audit seems to be ok with getting that as an error.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 6484eb7..04d92c1 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -100,6 +100,10 @@ struct fuse_req *fuse_get_req(struct fuse_conn *fc)
 	int intr;
 	int err;
 
+	err = -EAGAIN;
+	if (!fc->conn_init)
+		return ERR_PTR(err);
+
 	atomic_inc(&fc->num_waiting);
 	block_sigs(&oldset);
 	intr = wait_event_interruptible(fc->blocked_waitq, !fc->blocked);

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-12-16 14:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-12 21:01 [PATCH] fuse: return -EAGAIN if the connection has not been init'ed Josef Bacik
2009-11-13  6:58 ` Miklos Szeredi
2009-11-13 13:14   ` Eric Paris
2009-11-13 13:55     ` Miklos Szeredi
2009-11-13 14:26       ` Josef Bacik
2009-11-20 14:56       ` Josef Bacik
2009-11-20 16:16         ` Miklos Szeredi
2009-11-20 19:28           ` Karel Zak
2009-12-16 13:37             ` Miklos Szeredi
2009-12-16 14:04               ` Karel Zak
2009-11-13 16:51     ` [fuse-devel] " Goswin von Brederlow
2009-11-13 16:56       ` Josef Bacik

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).