]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: never attempt iopoll reissue from release path
authorJens Axboe <axboe@kernel.dk>
Fri, 23 Jul 2021 17:49:29 +0000 (11:49 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 23 Jul 2021 22:32:48 +0000 (16:32 -0600)
commit6d7d85a4301c9f72597cbf42548ec14657101499
tree902e647af4228ab69e528555877c3919a79d0655
parent8ecd8b8e694408f826151a6ac83a9cefddc95bda
io_uring: never attempt iopoll reissue from release path

There are two reasons why this shouldn't be done:

1) Ring is exiting, and we're canceling requests anyway. Any request
   should be canceled anyway. In theory, this could iterate for a
   number of times if someone else is also driving the target block
   queue into request starvation, however the likelihood of this
   happening is miniscule.

2) If the original task decided to pass the ring to another task, then
   we don't want to be reissuing from this context as it may be an
   unrelated task or context. No assumptions should be made about
   the context in which ->release() is run. This can only happen for pure
   read/write, and we'll get -EFAULT on them anyway.

Link: https://lore.kernel.org/io-uring/YPr4OaHv0iv0KTOc@zeniv-ca.linux.org.uk/
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c