summaryrefslogtreecommitdiff
path: root/io_uring/kbuf.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-05-13 20:26:46 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-27 13:11:14 +0300
commitc58b577cf7576e1079d0b358db61832cbeb0dfca (patch)
treeaaef291b9ad153bf4c4d11f58caba1953cd56a6a /io_uring/kbuf.c
parentba789be63d9567e5ab5a168d49ccdfb6e0a5b72a (diff)
downloadlinux-c58b577cf7576e1079d0b358db61832cbeb0dfca.tar.xz
io_uring/kbuf: account ring io_buffer_list memory
commit 475a8d30371604a6363da8e304a608a5959afc40 upstream. Follow the non-ringed pbuf struct io_buffer_list allocations and account it against the memcg. There is low chance of that being an actual problem as ring provided buffer should either pin user memory or allocate it, which is already accounted. Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/3985218b50d341273cafff7234e1a7e6d0db9808.1747150490.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring/kbuf.c')
-rw-r--r--io_uring/kbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index 7a8c3a004800..94602d1f7e6f 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -728,7 +728,7 @@ int io_register_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg)
io_destroy_bl(ctx, bl);
}
- free_bl = bl = kzalloc(sizeof(*bl), GFP_KERNEL);
+ free_bl = bl = kzalloc(sizeof(*bl), GFP_KERNEL_ACCOUNT);
if (!bl)
return -ENOMEM;