]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: don't attempt re-add of multishot poll request if racing
authorJens Axboe <axboe@kernel.dk>
Tue, 6 Apr 2021 15:49:31 +0000 (09:49 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Apr 2021 01:30:35 +0000 (19:30 -0600)
commita4caabcdc2eb8aa228ed66ee0a71945ab434efd2
treed05a2a97170a702d71d888fe929acef1567e59d6
parenta954aac17aa9daa5fbfbad0a806fa6de6865c10b
io_uring: don't attempt re-add of multishot poll request if racing

We currently allow racy updates to multishot requests, but we can end up
double adding the poll request if both completion and update does it.
Ensure that we skip re-add on the update side if someone else is
completing it.

Fixes: 45b62b2d8239 ("io_uring: allow events and user_data update of running poll requests")
Reported-by: Joakim Hassila <joj@mac.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c