From: Jakub Kicinski <kuba@kernel.org>
To: Chengfeng Ye <dg573847474@gmail.com>
Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/sched: use spin_lock_bh() on &gact->tcf_lock
Date: Wed, 4 Oct 2023 17:01:20 -0700 [thread overview]
Message-ID: <20231004170120.1c80b3b4@kernel.org> (raw)
In-Reply-To: <20230926182625.72475-1-dg573847474@gmail.com>
On Tue, 26 Sep 2023 18:26:25 +0000 Chengfeng Ye wrote:
> I find tcf_gate_act() acquires &gact->tcf_lock without disable
> bh explicitly, as gact->tcf_lock is acquired inside timer under
> softirq context, if tcf_gate_act() is not called with bh disable
> by default or under softirq context(which I am not sure as I cannot
> find corresponding documentation), then it could be the following
> deadlocks.
>
> tcf_gate_act()
> --> spin_loc(&gact->tcf_lock)
> <interrupt>
> --> gate_timer_func()
> --> spin_lock(&gact->tcf_lock)
This is a TC action, I don't think it can run without BH being already
disabled, can it?
--
pw-bot: cr
next prev parent reply other threads:[~2023-10-05 0:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 18:26 [PATCH] net/sched: use spin_lock_bh() on &gact->tcf_lock Chengfeng Ye
2023-10-01 17:54 ` Simon Horman
2023-10-01 18:32 ` Cong Wang
2023-10-01 18:53 ` Chengfeng Ye
2023-10-05 0:01 ` Jakub Kicinski [this message]
2023-10-05 9:01 ` Chengfeng Ye
2023-10-05 11:46 ` Jamal Hadi Salim
2023-10-05 12:15 ` Chengfeng Ye
2023-10-09 6:35 ` Horatiu Vultur
2023-10-09 15:52 ` Jamal Hadi Salim
2023-10-08 17:56 ` Cong Wang
2023-10-08 18:06 ` Chengfeng Ye
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=20231004170120.1c80b3b4@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=dg573847474@gmail.com \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).