diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-03-16 01:12:51 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-10 17:36:02 +0300 |
commit | b392402d29ab50bfe2e958c71d66e1bc1ef15be4 (patch) | |
tree | 5234276c545f682c6ea629edf41a7e7481eee6dd /io_uring/kbuf.h | |
parent | 4c0a5da0e70e7055311a8a949b9759811fa7656d (diff) | |
download | linux-b392402d29ab50bfe2e958c71d66e1bc1ef15be4.tar.xz |
io_uring/kbuf: protect io_buffer_list teardown with a reference
commit 6b69c4ab4f685327d9e10caf0d84217ba23a8c4b upstream.
No functional changes in this patch, just in preparation for being able
to keep the buffer list alive outside of the ctx->uring_lock.
Cc: stable@vger.kernel.org # v6.4+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring/kbuf.h')
-rw-r--r-- | io_uring/kbuf.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/kbuf.h b/io_uring/kbuf.h index 94c030b4090f..b5c45b1d1486 100644 --- a/io_uring/kbuf.h +++ b/io_uring/kbuf.h @@ -25,6 +25,8 @@ struct io_buffer_list { __u16 head; __u16 mask; + atomic_t refs; + /* ring mapped provided buffers */ __u8 is_mapped; /* ring mapped provided buffers, but mmap'ed by application */ |