[PATCH] fuse: return -EAGAIN if the connection has not been init'ed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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);
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux