Re: [PATCH bpf] bpf: fix NULL pointer dereference in bpf_task_from_vpid()

From: Sechang Lim

Date: Fri Jun 05 2026 - 15:03:13 EST


On Fri, Jun 05, 2026 at 09:59:49AM -0700, Yonghong Song wrote:
In softirq context, I think we should return NULL for this kfunc.
Your above fix solves crash problem. But even not crash, the
below task 'p' may not be user expected since the 'current' (and
its namespace) is random.

Maybe we can do:

+ if (in_interrupt())
+ return NULL;
+
rcu_read_lock();
...


Agreed. I'll send a v2 using this approach.

Thanks for the review.

Sechang