diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index a476bb319685..0323149803f5 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -18863,7 +18863,7 @@ skip_full_check: bpf_vlog_finalize(log); if (log->level && bpf_vlog_truncated(log)) ret = -ENOSPC; - if (log->level && !log->ubuf) { + if (log->level && log->level != BPF_LOG_KERNEL && !log->ubuf) { ret = -EFAULT; goto err_release_maps; }