Skip to content
Commit 74d6a5d5 authored by Wang Hai's avatar Wang Hai Committed by Dominique Martinet
Browse files

9p/trans_fd: Fix concurrency del of req_list in p9_fd_cancelled/p9_read_work

p9_read_work and p9_fd_cancelled may be called concurrently.
In some cases, req->req_list may be deleted by both p9_read_work
and p9_fd_cancelled.

We can fix it by ignoring replies associated with a cancelled
request and ignoring cancelled request if message has been received
before lock.

Link: http://lkml.kernel.org/r/20200612090833.36149-1-wanghai38@huawei.com


Fixes: 60ff779c ("9p: client: remove unused code and any reference to "cancelled" function")
Cc: <stable@vger.kernel.org> # v3.12+
Reported-by: default avatar <syzbot+77a25acfa0382e06ab23@syzkaller.appspotmail.com>
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
parent a39c4606
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment