Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add
@ 2021-01-14  8:35 Vladimir Oltean
  2021-01-14 18:48 ` Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vladimir Oltean @ 2021-01-14  8:35 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, netdev
  Cc: Florian Fainelli, Kurt Kanzenbach, Vadym Kochan, Taras Chornyi,
	Ido Schimmel, clang-built-linux, linux-mm, kbuild-all

From: Vladimir Oltean <vladimir.oltean@nxp.com>

prestera_bridge_port_vlan_add should have been called with vlan->vid,
however this was masked by the presence of the local vid variable and I
did not notice the build warning.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: b7a9e0da2d1c ("net: switchdev: remove vid_begin -> vid_end range from VLAN objects")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/ethernet/marvell/prestera/prestera_switchdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
index beb6447fbe40..8c2b03151736 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
@@ -1007,7 +1007,6 @@ static int prestera_port_vlans_add(struct prestera_port *port,
 	struct prestera_bridge_port *br_port;
 	struct prestera_switch *sw = port->sw;
 	struct prestera_bridge *bridge;
-	u16 vid;
 
 	if (netif_is_bridge_master(dev))
 		return 0;
@@ -1021,7 +1020,7 @@ static int prestera_port_vlans_add(struct prestera_port *port,
 		return 0;
 
 	return prestera_bridge_port_vlan_add(port, br_port,
-					     vid, flag_untagged,
+					     vlan->vid, flag_untagged,
 					     flag_pvid, extack);
 }
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add
  2021-01-14  8:35 [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add Vladimir Oltean
@ 2021-01-14 18:48 ` Florian Fainelli
  2021-01-14 21:46 ` Taras Chornyi [C]
  2021-01-15  0:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2021-01-14 18:48 UTC (permalink / raw)
  To: Vladimir Oltean, David S. Miller, Jakub Kicinski, netdev
  Cc: Kurt Kanzenbach, Vadym Kochan, Taras Chornyi, Ido Schimmel,
	clang-built-linux, linux-mm, kbuild-all

On 1/14/21 12:35 AM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> prestera_bridge_port_vlan_add should have been called with vlan->vid,
> however this was masked by the presence of the local vid variable and I
> did not notice the build warning.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: b7a9e0da2d1c ("net: switchdev: remove vid_begin -> vid_end range from VLAN objects")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add
  2021-01-14  8:35 [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add Vladimir Oltean
  2021-01-14 18:48 ` Florian Fainelli
@ 2021-01-14 21:46 ` Taras Chornyi [C]
  2021-01-15  0:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Taras Chornyi [C] @ 2021-01-14 21:46 UTC (permalink / raw)
  To: Vladimir Oltean, David S. Miller, Jakub Kicinski, netdev
  Cc: Florian Fainelli, Kurt Kanzenbach, Vadym Kochan [C],
	Ido Schimmel, clang-built-linux, linux-mm, kbuild-all



________________________________________
From: Vladimir Oltean <olteanv@gmail.com>
Sent: Thursday, January 14, 2021 10:35 AM
To: David S. Miller; Jakub Kicinski; netdev@vger.kernel.org
Cc: Florian Fainelli; Kurt Kanzenbach; Vadym Kochan [C]; Taras Chornyi [C]; Ido Schimmel; clang-built-linux@googlegroups.com; linux-mm@kvack.org; kbuild-all@lists.01.org
Subject:  [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add
----------------------------------------------------------------------
From: Vladimir Oltean <vladimir.oltean@nxp.com>

prestera_bridge_port_vlan_add should have been called with vlan->vid,
however this was masked by the presence of the local vid variable and I
did not notice the build warning.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: b7a9e0da2d1c ("net: switchdev: remove vid_begin -> vid_end range from VLAN objects")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/ethernet/marvell/prestera/prestera_switchdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
index beb6447fbe40..8c2b03151736 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
@@ -1007,7 +1007,6 @@ static int prestera_port_vlans_add(struct prestera_port *port,
        struct prestera_bridge_port *br_port;
        struct prestera_switch *sw = port->sw;
        struct prestera_bridge *bridge;
-       u16 vid;

        if (netif_is_bridge_master(dev))
                return 0;
@@ -1021,7 +1020,7 @@ static int prestera_port_vlans_add(struct prestera_port *port,
                return 0;

        return prestera_bridge_port_vlan_add(port, br_port,
-                                            vid, flag_untagged,
+                                            vlan->vid, flag_untagged,
                                             flag_pvid, extack);
 }

--
2.25.1

Reviewed-by: Taras Chornyi <tchornyi@marvell.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add
  2021-01-14  8:35 [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add Vladimir Oltean
  2021-01-14 18:48 ` Florian Fainelli
  2021-01-14 21:46 ` Taras Chornyi [C]
@ 2021-01-15  0:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-15  0:50 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: davem, kuba, netdev, f.fainelli, kurt, vkochan, tchornyi, idosch,
	clang-built-linux, linux-mm, kbuild-all

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu, 14 Jan 2021 10:35:56 +0200 you wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> prestera_bridge_port_vlan_add should have been called with vlan->vid,
> however this was masked by the presence of the local vid variable and I
> did not notice the build warning.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: b7a9e0da2d1c ("net: switchdev: remove vid_begin -> vid_end range from VLAN objects")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add
    https://git.kernel.org/netdev/net-next/c/c612fe780803

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14  8:35 [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add Vladimir Oltean
2021-01-14 18:48 ` Florian Fainelli
2021-01-14 21:46 ` Taras Chornyi [C]
2021-01-15  0:50 ` patchwork-bot+netdevbpf

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git