diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 589332936..2b3b1a687 100755 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -1287,6 +1287,9 @@ int generic_map_delete_batch(struct bpf_map *map, if (!max_count) return 0; + if (put_user(0, &uattr->batch.count)) + return -EFAULT; + key = kmalloc(map->key_size, GFP_USER | __GFP_NOWARN); if (!key) return -ENOMEM; @@ -1345,6 +1348,9 @@ int generic_map_update_batch(struct bpf_map *map, if (!max_count) return 0; + if (put_user(0, &uattr->batch.count)) + return -EFAULT; + key = kmalloc(map->key_size, GFP_USER | __GFP_NOWARN); if (!key) return -ENOMEM;