]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/io_uring.c
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)
committerJens Axboe <axboe@kernel.dk>
Wed, 4 Nov 2020 17:22:57 +0000 (10:22 -0700)
commit4b70cf9dea4cd239b425f3282fa56ce19e234c8a
tree9526725d90a8add9b5d5547a81100d01b2f1cb61
parentfdaf083cdfb556a45c422c8998268baf1ab26829
io_uring: ensure consistent view of original task ->mm from SQPOLL

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>
fs/io_uring.c