mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-21 04:33:49 +00:00
fuse: don't dereference req->args on finished request
Move the check for async request after check for the request being already finished and done with. Reported-by: syzbot+ae0bb7aae3de6b4594e2@syzkaller.appspotmail.com Fixes: d49937749fef ("fuse: stop copying args to fuse_req") Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
3f22c74671
commit
2b319d1f6f
@ -276,10 +276,12 @@ static void flush_bg_queue(struct fuse_conn *fc)
|
|||||||
void fuse_request_end(struct fuse_conn *fc, struct fuse_req *req)
|
void fuse_request_end(struct fuse_conn *fc, struct fuse_req *req)
|
||||||
{
|
{
|
||||||
struct fuse_iqueue *fiq = &fc->iq;
|
struct fuse_iqueue *fiq = &fc->iq;
|
||||||
bool async = req->args->end;
|
bool async;
|
||||||
|
|
||||||
if (test_and_set_bit(FR_FINISHED, &req->flags))
|
if (test_and_set_bit(FR_FINISHED, &req->flags))
|
||||||
goto put_request;
|
goto put_request;
|
||||||
|
|
||||||
|
async = req->args->end;
|
||||||
/*
|
/*
|
||||||
* test_and_set_bit() implies smp_mb() between bit
|
* test_and_set_bit() implies smp_mb() between bit
|
||||||
* changing and below intr_entry check. Pairs with
|
* changing and below intr_entry check. Pairs with
|
||||||
|
Loading…
x
Reference in New Issue
Block a user