netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Taras Chornyi [C]" <tchornyi@marvell.com>
To: Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Kurt Kanzenbach <kurt@linutronix.de>,
	"Vadym Kochan [C]" <vkochan@marvell.com>,
	Ido Schimmel <idosch@nvidia.com>,
	"clang-built-linux@googlegroups.com" 
	<clang-built-linux@googlegroups.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"kbuild-all@lists.01.org" <kbuild-all@lists.01.org>
Subject: Re: [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add
Date: Thu, 14 Jan 2021 21:46:55 +0000	[thread overview]
Message-ID: <CO6PR18MB40835482AA82B3A34FCAA165C4A81@CO6PR18MB4083.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20210114083556.2274440-1-olteanv@gmail.com>



________________________________________
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>

  parent reply	other threads:[~2021-01-14 21:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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] [this message]
2021-01-15  0:50 ` patchwork-bot+netdevbpf

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=CO6PR18MB40835482AA82B3A34FCAA165C4A81@CO6PR18MB4083.namprd18.prod.outlook.com \
    --to=tchornyi@marvell.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@nvidia.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=linux-mm@kvack.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vkochan@marvell.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).