aboutsummaryrefslogtreecommitdiffstats
path: root/io_uring/kbuf.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-03-15 16:12:51 -0600
committerJens Axboe <axboe@kernel.dk>2024-04-02 19:03:26 -0600
commit6b69c4ab4f685327d9e10caf0d84217ba23a8c4b (patch)
tree23d7e9bba95a9bf4af42b3f46d1e428fb470b7e5 /io_uring/kbuf.h
parent3b80cff5a4d117c53d38ce805823084eaeffbde6 (diff)
downloadlinux-6b69c4ab4f685327d9e10caf0d84217ba23a8c4b.tar.gz
io_uring/kbuf: protect io_buffer_list teardown with a reference
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>
Diffstat (limited to 'io_uring/kbuf.h')
-rw-r--r--io_uring/kbuf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/kbuf.h b/io_uring/kbuf.h
index fdbb104495132..8b868a1744e2f 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_buf_ring;
/* ring mapped provided buffers, but mmap'ed by application */