Commit cef59d1
io_uring: clean rings on NO_MMAP alloc fail
We make a few cancellation judgements based on ctx->rings, so let's
zero it afer deallocation for IORING_SETUP_NO_MMAP just like it's
done with the mmap case. Likely, it's not a real problem, but zeroing
is safer and better tested.
Cc: stable@vger.kernel.org
Fixes: 03d89a2 ("io_uring: support for user allocated memory for rings/sqes")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/9ff6cdf91429b8a51699c210e1f6af6ea3f8bdcf.1710255382.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 0a3737d commit cef59d1
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2788 | 2788 | | |
2789 | 2789 | | |
2790 | 2790 | | |
2791 | | - | |
2792 | | - | |
2793 | 2791 | | |
2794 | 2792 | | |
2795 | 2793 | | |
2796 | 2794 | | |
2797 | 2795 | | |
2798 | 2796 | | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
2799 | 2800 | | |
2800 | 2801 | | |
2801 | 2802 | | |
| |||
0 commit comments