[PATCH 02/17] fuse: fuse_copy_finish() order fix

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

 



fuse_copy_finish() must be called before request_end(), since the
later might sleep, and no sleeping is allowed between fuse_copy_one()
and fuse_copy_finish() because of kmap_atomic()/kunmap_atomic() used
in them.

Signed-off-by: Miklos Szeredi <[email protected]>

Index: linux/fs/fuse/dev.c
===================================================================
--- linux.orig/fs/fuse/dev.c	2006-01-13 21:52:16.000000000 +0100
+++ linux/fs/fuse/dev.c	2006-01-13 22:51:43.000000000 +0100
@@ -773,8 +773,10 @@ static ssize_t fuse_dev_writev(struct fi
 
 	list_del_init(&req->list);
 	if (req->interrupted) {
-		request_end(fc, req);
+		spin_unlock(&fuse_lock);
 		fuse_copy_finish(&cs);
+		spin_lock(&fuse_lock);
+		request_end(fc, req);
 		return -ENOENT;
 	}
 	req->out.h = oh;

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux