]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: ensure consistent view of original task ->mm from SQPOLL
authorJens Axboe <axboe@kernel.dk>
Mon, 2 Nov 2020 17:39:05 +0000 (10:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:06 +0000 (19:22 +0100)
commit9154aa2b65222a0c1d972b62b601e567120fb591
treea2a7b4e6f2297817840b1a005b3d4762c12b94e1
parent29cd2f610afe911bd9ad249479143a17aea4f065
io_uring: ensure consistent view of original task ->mm from SQPOLL

[ Upstream commit 4b70cf9dea4cd239b425f3282fa56ce19e234c8a ]

Ensure we get a valid view of the task mm, by using task_lock() when
attempting to grab the original task mm.

Reported-by: syzbot+b57abf7ee60829090495@syzkaller.appspotmail.com
Fixes: 2aede0e417db ("io_uring: stash ctx task reference for SQPOLL")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c