diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2026-05-19 14:44:27 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-05-26 19:42:00 +0300 |
| commit | 74fc9a9b50d43ed473ea2449682000da43e17175 (patch) | |
| tree | 1d7a7aeb386cc02f440f4b018ff3a830ac189ecd | |
| parent | 67ee1f021a9b74ef289934be5e7a474e20031add (diff) | |
| download | linux-74fc9a9b50d43ed473ea2449682000da43e17175.tar.xz | |
io_uring/zcrx: make scrubbing more reliable
Currently, scrubbing is done once before killing all recvzc requests.
It's fine as those are cancelled and don't return buffers afterwards,
but it'll be more reliable not to rely that much on cancellations.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/c4ea127023494cbbedebd21a2b7ae5ff0448eb95.1779189667.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | io_uring/zcrx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index 19837e0b5e91..a7eef37868cf 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -985,6 +985,12 @@ void io_unregister_zcrx(struct io_ring_ctx *ctx) } if (!ifq) break; + /* + * io_uring can run requests and return buffers to the user + * after termination, scrub it again. + */ + if (refcount_read(&ifq->user_refs) == 0) + io_zcrx_scrub(ifq); io_put_zcrx_ifq(ifq); } |
