mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
fuse: fix leaked notify reply
fuse_request_send_notify_reply() may fail if the connection was reset for some reason (e.g. fs was unmounted). Don't leak request reference in this case. Besides leaking memory, this resulted in fc->num_waiting not being decremented and hence fuse_wait_aborted() left in a hanging and unkillable state. Fixes:2d45ba381a("fuse: add retrieve request") Fixes:b8f95e5d13("fuse: umount should wait for all requests") Reported-and-tested-by: [email protected] Signed-off-by: Miklos Szeredi <[email protected]> Cc: <[email protected]> #v2.6.36
This commit is contained in:
1 parent
651022382c
commit
7fabaf3034
1 file changed
+3
-1
+3
-1
@@ -1768,8 +1768,10 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode,
|
||||
req->in.args[1].size = total_len;
|
||||
|
||||
err = fuse_request_send_notify_reply(fc, req, outarg->notify_unique);
|
||||
if (err)
|
||||
if (err) {
|
||||
fuse_retrieve_end(fc, req);
|
||||
fuse_put_request(fc, req);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user