]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
io_uring/zcrx: account niov arrays to cgroup
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 16 Sep 2025 14:28:03 +0000 (15:28 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Sep 2025 18:37:21 +0000 (12:37 -0600)
net_iov / freelist / etc. arrays can be quite long, make sure they're
accounted.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/zcrx.c

index 07a114f9a5424b66d1067a1d081e028ef67dd4af..6799b5f33c96dab0f6c70b38020ae13da6ad1654 100644 (file)
@@ -428,17 +428,17 @@ static int io_zcrx_create_area(struct io_zcrx_ifq *ifq,
 
        ret = -ENOMEM;
        area->nia.niovs = kvmalloc_array(nr_iovs, sizeof(area->nia.niovs[0]),
-                                        GFP_KERNEL | __GFP_ZERO);
+                                        GFP_KERNEL_ACCOUNT | __GFP_ZERO);
        if (!area->nia.niovs)
                goto err;
 
        area->freelist = kvmalloc_array(nr_iovs, sizeof(area->freelist[0]),
-                                       GFP_KERNEL | __GFP_ZERO);
+                                       GFP_KERNEL_ACCOUNT | __GFP_ZERO);
        if (!area->freelist)
                goto err;
 
        area->user_refs = kvmalloc_array(nr_iovs, sizeof(area->user_refs[0]),
-                                       GFP_KERNEL | __GFP_ZERO);
+                                       GFP_KERNEL_ACCOUNT | __GFP_ZERO);
        if (!area->user_refs)
                goto err;