Skip to content

Commit 31bf77d

Browse files
isilenceaxboe
authored andcommitted
io_uring/zcrx: account niov arrays to cgroup
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>
1 parent 705d2ac commit 31bf77d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

io_uring/zcrx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,17 +428,17 @@ static int io_zcrx_create_area(struct io_zcrx_ifq *ifq,
428428

429429
ret = -ENOMEM;
430430
area->nia.niovs = kvmalloc_array(nr_iovs, sizeof(area->nia.niovs[0]),
431-
GFP_KERNEL | __GFP_ZERO);
431+
GFP_KERNEL_ACCOUNT | __GFP_ZERO);
432432
if (!area->nia.niovs)
433433
goto err;
434434

435435
area->freelist = kvmalloc_array(nr_iovs, sizeof(area->freelist[0]),
436-
GFP_KERNEL | __GFP_ZERO);
436+
GFP_KERNEL_ACCOUNT | __GFP_ZERO);
437437
if (!area->freelist)
438438
goto err;
439439

440440
area->user_refs = kvmalloc_array(nr_iovs, sizeof(area->user_refs[0]),
441-
GFP_KERNEL | __GFP_ZERO);
441+
GFP_KERNEL_ACCOUNT | __GFP_ZERO);
442442
if (!area->user_refs)
443443
goto err;
444444

0 commit comments

Comments
 (0)