[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e4a74f6-3a3b-478d-b09a-6fb29b0f8252@gmail.com>
Date: Fri, 9 Feb 2024 07:47:39 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
David Miller <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Russell King - ARM Linux <linux@...linux.org.uk>,
Andrew Lunn <andrew@...n.ch>, Pavan Chebbi <pavan.chebbi@...adcom.com>,
Michael Chan <mchan@...adcom.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Aithal, Srikanth" <sraithal@....com>
Subject: [PATCH net-next] tg3: fix bug caused by uninitialized variable
The reported bug is caused by using mii_eee_cap1_mod_linkmode_t()
with an uninitialized bitmap. Fix this by zero-initializing the
struct containing the bitmap.
Fixes: 9bc791341bc9a5c22b ("tg3: convert EEE handling to use linkmode bitmaps")
Reported-by: Srikanth Aithal <sraithal@....com>
Tested-by: Srikanth Aithal <sraithal@....com>
Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
---
drivers/net/ethernet/broadcom/tg3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 50f674031..7d0a2f5f3 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -4616,7 +4616,7 @@ static int tg3_init_5401phy_dsp(struct tg3 *tp)
static bool tg3_phy_eee_config_ok(struct tg3 *tp)
{
- struct ethtool_keee eee;
+ struct ethtool_keee eee = {};
if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
return true;
--
2.43.0
Powered by blists - more mailing lists