From: Jeongjun Park <aha310510@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: edumazet@google.com, davem@davemloft.net, kuba@kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com,
syzbot+b668da2bc4cb9670bf58@syzkaller.appspotmail.com
Subject: Re: [PATCH net,v2] team: fix possible deadlock in team_port_change_check
Date: Sat, 3 Aug 2024 10:36:48 +0900 [thread overview]
Message-ID: <4E6F3146-AE8D-4C70-A068-A6EE8588F13D@gmail.com> (raw)
In-Reply-To: <Zq0akdhiSeoiOLsY@nanopsycho.orion>
> Jiri Pirko wrote:
>
> Fri, Aug 02, 2024 at 06:25:31PM CEST, aha310510@gmail.com wrote:
>> Eric Dumazet wrote:
>>>
>>>> On Fri, Aug 2, 2024 at 5:00 PM Jeongjun Park <aha310510@gmail.com> wrote:
>>>>>
>>
>> [..]
>>
>> @@ -2501,6 +2470,11 @@ int team_nl_options_get_doit(struct sk_buff *skb, struct genl_info *info)
>> int err;
>> LIST_HEAD(sel_opt_inst_list);
>>
>> + if (!rtnl_is_locked()) {
>
> This is completely wrong, other thread may hold the lock.
>
>
>> + rtnl_lock();
>
> NACK! I wrote it in the other thread. Don't take rtnl for get options
> command. It is used for repeated fetch of stats. It's read only. Should
> be converted to RCU.
>
I see. But, in the current, when called through the following path:
team_nl_send_event_options_get()->
team_nl_send_options_get()->
team_nl_fill_one_option_get()
, it was protected through rtnl. Does this mean that rcu should be
used instead of rtnl in this case as well?
> Why are you so obsessed by this hypothetical syzcaller bug? Are you
> hitting this in real? If not, please let it go. I will fix it myself
> when I find some spare cycles.
Sorry for the inconvenience, but I don't want to give up on this bug
so easily since it is a valid bug that we have started analyzing
anyway and the direction of how to fix it is clear. I hope you
understand and I will send you a patch that uses rcu instead
of rtnl soon.
Regards,
Jeongjun Park
next prev parent reply other threads:[~2024-08-03 1:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 14:59 [PATCH net,v2] team: fix possible deadlock in team_port_change_check Jeongjun Park
2024-08-02 15:08 ` Eric Dumazet
2024-08-02 16:25 ` Jeongjun Park
2024-08-02 17:42 ` Jiri Pirko
2024-08-03 1:36 ` Jeongjun Park [this message]
2024-08-03 6:58 ` Jiri Pirko
2024-08-03 11:51 ` Jeongjun Park
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=4E6F3146-AE8D-4C70-A068-A6EE8588F13D@gmail.com \
--to=aha310510@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+b668da2bc4cb9670bf58@syzkaller.appspotmail.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