From: Hangbin Liu <liuhangbin@gmail.com>
To: Jeongjun Park <aha310510@gmail.com>
Cc: jiri@resnulli.us, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, nicolas.dichtel@6wind.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+44623300f057a28baf1e@syzkaller.appspotmail.com,
syzbot+b668da2bc4cb9670bf58@syzkaller.appspotmail.com
Subject: Re: [PATCH net,v2] rtnetlink: fix possible deadlock in team_port_change_check
Date: Thu, 1 Aug 2024 10:16:11 +0800 [thread overview]
Message-ID: <Zqrv64570Zp9HaxZ@Laptop-X1> (raw)
In-Reply-To: <20240731150940.14106-1-aha310510@gmail.com>
On Thu, Aug 01, 2024 at 12:09:40AM +0900, Jeongjun Park wrote:
> In do_setlink() , do_set_master() is called when dev->flags does not have
> the IFF_UP flag set, so 'team->lock' is acquired and dev_open() is called,
> which generates the NETDEV_UP event. This causes a deadlock as it tries to
> acquire 'team->lock' again.
>
> To solve this, we need to unlock 'team->lock' before calling dev_open()
> in team_port_add() and then reacquire the lock when dev_open() returns.
> Since the implementation acquires the lock in advance when the team
> structure is used inside dev_open(), data races will not occur even if it
> is briefly unlocked.
>
>
> Reported-by: syzbot+b668da2bc4cb9670bf58@syzkaller.appspotmail.com
> Fixes: ec4ffd100ffb ("Revert "net: rtnetlink: Enslave device before bringing it up"")
The fixes tag shouldn't be ec4ffd100ffb, as the issue exists before
ec4ffd100ffb. I think it should be
3d249d4ca7d0 ("net: introduce ethernet teaming device")
Jiri, what do you think?
Thanks
Hangbin
next prev parent reply other threads:[~2024-08-01 2:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 15:09 [PATCH net,v2] rtnetlink: fix possible deadlock in team_port_change_check Jeongjun Park
2024-08-01 2:16 ` Hangbin Liu [this message]
2024-08-01 6:28 ` Eric Dumazet
2024-08-01 11:04 ` Jeongjun Park
2024-08-01 14:31 ` Jiri Pirko
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=Zqrv64570Zp9HaxZ@Laptop-X1 \
--to=liuhangbin@gmail.com \
--cc=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=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.com \
--cc=syzbot+44623300f057a28baf1e@syzkaller.appspotmail.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