From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>,
bpf@vger.kernel.org
Cc: Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>,
ast@kernel.org, andrii@kernel.org, daniel@iogearbox.net,
joannelkoong@gmail.com, brouer@redhat.com
Subject: Re: [PATCH] bpf: fix rq lock recursion issue
Date: Mon, 13 Jun 2022 11:22:20 +0200 [thread overview]
Message-ID: <87r13s2a0j.fsf@toke.dk> (raw)
In-Reply-To: <20220613025244.31595-1-quic_satyap@quicinc.com>
Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com> 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? Or do we need to review migrate_enable() vs
preempt_enable() for networking hooks as well?
-Toke
next prev parent reply other threads:[~2022-06-13 9:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 2:52 [PATCH] bpf: fix rq lock recursion issue Satya Durga Srinivasu Prabhala
2022-06-13 9:22 ` Toke Høiland-Jørgensen [this message]
2022-06-13 16:17 ` Satya Durga Srinivasu Prabhala
2022-06-13 16:35 ` Yonghong Song
2022-06-13 17:47 ` Satya Durga Srinivasu Prabhala
2022-06-13 21:01 ` Alexei Starovoitov
2022-06-13 21:35 ` Satya Durga Srinivasu Prabhala
2022-06-13 21:49 ` Alexei Starovoitov
2022-06-14 1:10 ` Satya Durga Srinivasu Prabhala
2022-06-14 6:09 ` Yonghong Song
2022-06-24 6:56 ` Satya Durga Srinivasu Prabhala
2022-06-24 16:46 ` Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r13s2a0j.fsf@toke.dk \
--to=toke@redhat.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=joannelkoong@gmail.com \
--cc=quic_satyap@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox