mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
io_uring/zcrx: account niov arrays to cgroup
[ Upstream commit 31bf77dcc3 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5f41eb9b31
commit
0345c24b9b
@@ -426,17 +426,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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user