mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-16 22:39:48 +00:00
io_uring: fix fget/fput handling
This isn't a straight port of commit84c4e1f89ffor aio.c, since io_uring doesn't use files in exactly the same way. But it's pretty close. See the commit message for that commit. This essentially fixes a use-after-free with the poll command handling, but it takes cue from Linus's approach to just simplifying the file handling. We move the setup of the file into a higher level location, so the individual commands don't have to deal with it. And then we release the reference when we free the associated io_kiocb. Fixes:221c5eb233("io_uring: add support for IORING_OP_POLL") Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
d530a402a1
commit
09bb839434
1 changed files with 97 additions and 133 deletions
230
fs/io_uring.c
230
fs/io_uring.c
Loading…
Add table
Add a link
Reference in a new issue