From: Pavel Machek <pavel@denx.de>
To: Sasha Levin <sashal@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Stanislav Fomichev <sdf@fomichev.me>,
syzbot+b0c03d76056ef6cd12a6@syzkaller.appspotmail.com,
Simon Horman <horms@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
aleksander.lobakin@intel.com, kory.maincent@bootlin.com,
netdev@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 5.10 13/15] net: vlan: don't propagate flags on open
Date: Fri, 18 Apr 2025 19:01:25 +0200 [thread overview]
Message-ID: <aAKFZT6sPCZX63y6@duo.ucw.cz> (raw)
In-Reply-To: <20250403191002.2678588-13-sashal@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 2522 bytes --]
On Thu 2025-04-03 15:10:00, Sasha Levin wrote:
> From: Stanislav Fomichev <sdf@fomichev.me>
>
> [ Upstream commit 27b918007d96402aba10ed52a6af8015230f1793 ]
>
> With the device instance lock, there is now a possibility of a deadlock:
"now". Does the same problem exist in 5.10?
Best regards,
Pavel
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -272,17 +272,6 @@ static int vlan_dev_open(struct net_device *dev)
> goto out;
> }
>
> - if (dev->flags & IFF_ALLMULTI) {
> - err = dev_set_allmulti(real_dev, 1);
> - if (err < 0)
> - goto del_unicast;
> - }
> - if (dev->flags & IFF_PROMISC) {
> - err = dev_set_promiscuity(real_dev, 1);
> - if (err < 0)
> - goto clear_allmulti;
> - }
> -
> ether_addr_copy(vlan->real_dev_addr, real_dev->dev_addr);
>
> if (vlan->flags & VLAN_FLAG_GVRP)
> @@ -296,12 +285,6 @@ static int vlan_dev_open(struct net_device *dev)
> netif_carrier_on(dev);
> return 0;
>
> -clear_allmulti:
> - if (dev->flags & IFF_ALLMULTI)
> - dev_set_allmulti(real_dev, -1);
> -del_unicast:
> - if (!ether_addr_equal(dev->dev_addr, real_dev->dev_addr))
> - dev_uc_del(real_dev, dev->dev_addr);
> out:
> netif_carrier_off(dev);
> return err;
> @@ -314,10 +297,6 @@ static int vlan_dev_stop(struct net_device *dev)
>
> dev_mc_unsync(real_dev, dev);
> dev_uc_unsync(real_dev, dev);
> - if (dev->flags & IFF_ALLMULTI)
> - dev_set_allmulti(real_dev, -1);
> - if (dev->flags & IFF_PROMISC)
> - dev_set_promiscuity(real_dev, -1);
>
> if (!ether_addr_equal(dev->dev_addr, real_dev->dev_addr))
> dev_uc_del(real_dev, dev->dev_addr);
> @@ -474,12 +453,10 @@ static void vlan_dev_change_rx_flags(struct net_device *dev, int change)
> {
> struct net_device *real_dev = vlan_dev_priv(dev)->real_dev;
>
> - if (dev->flags & IFF_UP) {
> - if (change & IFF_ALLMULTI)
> - dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1);
> - if (change & IFF_PROMISC)
> - dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1);
> - }
> + if (change & IFF_ALLMULTI)
> + dev_set_allmulti(real_dev, dev->flags & IFF_ALLMULTI ? 1 : -1);
> + if (change & IFF_PROMISC)
> + dev_set_promiscuity(real_dev, dev->flags & IFF_PROMISC ? 1 : -1);
> }
>
> static void vlan_dev_set_rx_mode(struct net_device *vlan_dev)
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2025-04-18 17:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 19:09 [PATCH AUTOSEL 5.10 01/15] page_pool: avoid infinite loop to schedule delayed worker Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 02/15] fs/jfs: cast inactags to s64 to prevent potential overflow Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 03/15] fs/jfs: Prevent integer overflow in AG size calculation Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 04/15] jfs: Prevent copying of nlink with value 0 from disk inode Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 05/15] jfs: add sanity check for agwidth in dbMount Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 06/15] ata: libata-eh: Do not use ATAPI DMA for a device limited to PIO mode Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 07/15] f2fs: fix to avoid out-of-bounds access in f2fs_truncate_inode_blocks() Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 08/15] ahci: add PCI ID for Marvell 88SE9215 SATA Controller Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 09/15] ext4: protect ext4_release_dquot against freezing Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 10/15] ext4: ignore xattrs past end Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 11/15] scsi: st: Fix array overflow in st_setup() Sasha Levin
2025-04-03 19:09 ` [PATCH AUTOSEL 5.10 12/15] wifi: mt76: mt76x2u: add TP-Link TL-WDN6200 ID to device table Sasha Levin
2025-04-03 19:10 ` [PATCH AUTOSEL 5.10 13/15] net: vlan: don't propagate flags on open Sasha Levin
2025-04-18 17:01 ` Pavel Machek [this message]
2025-04-03 19:10 ` [PATCH AUTOSEL 5.10 14/15] tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER Sasha Levin
2025-04-03 19:10 ` [PATCH AUTOSEL 5.10 15/15] Bluetooth: hci_uart: fix race during initialization Sasha Levin
2025-04-18 17:03 ` Pavel Machek
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=aAKFZT6sPCZX63y6@duo.ucw.cz \
--to=pavel@denx.de \
--cc=aleksander.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashal@kernel.org \
--cc=sdf@fomichev.me \
--cc=stable@vger.kernel.org \
--cc=syzbot+b0c03d76056ef6cd12a6@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