Re: [PATCH] bpf: fix rq lock recursion issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 6/13/22 2:22 AM, Toke Høiland-Jørgensen wrote:
Satya Durga Srinivasu Prabhala <quic_satyap@xxxxxxxxxxx> writes:

Below recursion is observed in a rare scenario where __schedule()
takes rq lock, at around same time task's affinity is being changed,
bpf function for tracing sched_switch calls migrate_enabled(),
checks for affinity change (cpus_ptr != cpus_mask) lands into
__set_cpus_allowed_ptr which tries acquire rq lock and causing the
recursion bug.
So this only affects tracing programs that attach to tasks that can have
their affinity changed?

That's right.

  Or do we need to review migrate_enable() vs
preempt_enable() for networking hooks as well?

I believe networking hooks won't take rq locks, so, we won't see the issue
with networking hooks as far as I can tell.


-Toke






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux