diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-11-30 15:21:54 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-30 10:27:22 -0700 |
commit | c3bfb57ea7011e0c04e4b7f28cb357a551b1efb9 (patch) | |
tree | c77769f88806e45f8dd592d6780987ecd458e025 /io_uring | |
parent | 047b6aef0966f9863e1940b57c256ebbb465a6b5 (diff) | |
download | linux-next-c3bfb57ea7011e0c04e4b7f28cb357a551b1efb9.tar.gz |
io_uring: improve poll warning handling
Don't try to complete requests if their refs are broken and we've got
a warning, it's much better to drop them and potentially leaking than
double freeing.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/31edf9f96f05d03ab62c114508a231a2dce434cb.1669821213.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/poll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/poll.c b/io_uring/poll.c index ada0017e3d88..8f16d2a48ff8 100644 --- a/io_uring/poll.c +++ b/io_uring/poll.c @@ -249,7 +249,7 @@ static int io_poll_check_events(struct io_kiocb *req, bool *locked) if (unlikely(v != 1)) { /* tw should be the owner and so have some refs */ if (WARN_ON_ONCE(!(v & IO_POLL_REF_MASK))) - return IOU_POLL_DONE; + return IOU_POLL_NO_ACTION; if (v & IO_POLL_CANCEL_FLAG) return -ECANCELED; /* |