diff options
Diffstat (limited to 'io_uring/register.c')
| -rw-r--r-- | io_uring/register.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/register.c b/io_uring/register.c index 594b1f2ce875..6015a3e9ce69 100644 --- a/io_uring/register.c +++ b/io_uring/register.c @@ -218,7 +218,7 @@ static int io_register_restrictions_task(void __user *arg, unsigned int nr_args) if (!mem_is_zero(tres.resv, sizeof(tres.resv))) return -EINVAL; - res = kzalloc(sizeof(*res), GFP_KERNEL_ACCOUNT); + res = kzalloc_obj(*res, GFP_KERNEL_ACCOUNT); if (!res) return -ENOMEM; @@ -250,7 +250,7 @@ static int io_register_bpf_filter_task(void __user *arg, unsigned int nr_args) /* If no task restrictions exist, setup a new set */ res = current->io_uring_restrict; if (!res) { - res = kzalloc(sizeof(*res), GFP_KERNEL_ACCOUNT); + res = kzalloc_obj(*res, GFP_KERNEL_ACCOUNT); if (!res) return -ENOMEM; } |
