Skip to content
Commit 7ef37712 authored by Teng Qin's avatar Teng Qin Committed by Alexei Starovoitov
Browse files

bpf: Allow bpf_current_task_under_cgroup in interrupt



Currently, the bpf_current_task_under_cgroup helper has a check where if
the BPF program is running in_interrupt(), it will return -EINVAL. This
prevents the helper to be used in many useful scenarios, particularly
BPF programs attached to Perf Events.

This commit removes the check. Tested a few NMI (Perf Event) and some
softirq context, the helper returns the correct result.

Signed-off-by: default avatarTeng Qin <qinteng@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent fcf85729
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment