]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: abort file assignment prior to assigning creds
authorJens Axboe <axboe@kernel.dk>
Fri, 15 Apr 2022 02:23:40 +0000 (20:23 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 15 Apr 2022 02:23:40 +0000 (20:23 -0600)
commit0875724c9d3f0623d3a8441e83e46f0af24d8269
treef5239bb814aee8a1b69d7b5b1402efdd5bf580fb
parent644c2719ca1fe141ebb4a38bb9287b384ce9c47f
io_uring: abort file assignment prior to assigning creds

We need to either restore creds properly if we fail on the file
assignment, or just do the file assignment first instead. Let's do
the latter as it's simpler, should make no difference here for
file assignment.

Link: https://lore.kernel.org/lkml/000000000000a7edb305dca75a50@google.com/
Reported-by: syzbot+60c52ca98513a8760a91@syzkaller.appspotmail.com
Fixes: fb187901eb95 ("io_uring: defer file assignment")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c