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:38:16 +0300 |
commit | da64e0edbb1bd6524b5287be834f31e074409986 (patch) | |
tree | e8f61cafd09279b6cb915e6d580b931b734031e7 /io_uring/kbuf.h | |
parent | 4ce585360581eef99dc0ad1717b740b250145b0b (diff) | |
download | linux-da64e0edbb1bd6524b5287be834f31e074409986.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 3722e44daf0b..55e1c888c3f9 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 */ |