]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: defer file table grabbing request cleanup for locked requests
authorJens Axboe <axboe@kernel.dk>
Mon, 10 Aug 2020 16:55:56 +0000 (10:55 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 10 Aug 2020 21:19:25 +0000 (15:19 -0600)
commit2ec46552eb4d6307e662b434cf09155ea64b3946
treefbfda9835f2911513296c0f11ad532b3ee2de599
parent1c68fa8f3413fda862d5d401a93c7483471d2e07
io_uring: defer file table grabbing request cleanup for locked requests

If we're in the error path failing links and we have a link that has
grabbed a reference to the fs_struct, then we cannot safely drop our
reference to the table if we already hold the completion lock. This
adds a hardirq dependency to the fs_struct->lock, which it currently
doesn't have.

Defer the final cleanup and free of such requests to avoid adding this
dependency.

Reported-by: syzbot+ef4b654b49ed7ff049bf@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c