diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index ad514847b..d1d5189a6 100755 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -12582,7 +12582,7 @@ int bpf_check(struct bpf_prog **prog, union bpf_attr *attr, /* 'struct bpf_verifier_env' can be global, but since it's not small, * allocate/free it every time bpf_check() is called */ - env = kzalloc(sizeof(struct bpf_verifier_env), GFP_KERNEL); + env = kvzalloc(sizeof(struct bpf_verifier_env), GFP_KERNEL); if (!env) return -ENOMEM; log = &env->log; @@ -12773,6 +12773,6 @@ err_unlock: mutex_unlock(&bpf_verifier_lock); vfree(env->insn_aux_data); err_free_env: - kfree(env); + kvfree(env); return ret; }