lkml.org 
[lkml]   [2005]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] FUSE - fix race in interrupted request
From
Date
Hi Andrew,

This patch fixes a potential race between request_wait_answer()
calling background_request() and fuse_dev_writev() calling
request_end() if a request is interrupted. The race could cause
inodes and files to acquire an extra reference, making them
unfreeable.

Please apply.

Thanks,
Miklos

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

diff -rup linux-2.6.11-rc2-mm2/fs/fuse/dev.c linux-fuse/fs/fuse/dev.c
--- linux-2.6.11-rc2-mm2/fs/fuse/dev.c 2005-01-30 21:40:53.000000000 +0100
+++ linux-fuse/fs/fuse/dev.c 2005-02-02 12:44:26.000000000 +0100
@@ -233,7 +233,7 @@ static void request_wait_answer(struct f
if (!req->sent && !list_empty(&req->list)) {
list_del(&req->list);
__fuse_put_request(req);
- } else if (req->sent)
+ } else if (!req->finished && req->sent)
background_request(req);
}

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

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.263 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site