[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250325063307.15336182@kernel.org>
Date: Tue, 25 Mar 2025 06:33:07 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Qasim Ijaz <qasdev00@...il.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com, horms@...nel.org, linux-usb@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org, syzbot
<syzbot+3361c2d6f78a3e0892f9@...kaller.appspotmail.com>,
stable@...r.kernel.org
Subject: Re: [PATCH 1/4] net: fix uninitialised access in mii_nway_restart()
On Wed, 19 Mar 2025 11:21:53 +0000 Qasim Ijaz wrote:
> --- a/drivers/net/mii.c
> +++ b/drivers/net/mii.c
> @@ -464,6 +464,8 @@ int mii_nway_restart (struct mii_if_info *mii)
>
> /* if autoneg is off, it's an error */
> bmcr = mii->mdio_read(mii->dev, mii->phy_id, MII_BMCR);
> + if (bmcr < 0)
> + return bmcr;
>
> if (bmcr & BMCR_ANENABLE) {
> bmcr |= BMCR_ANRESTART;
We error check just one mdio_read() but there's a whole bunch of them
in this file. What's the expected behavior then? Are all of them buggy?
This patch should be split into core and driver parts.
--
pw-bot: cr
Powered by blists - more mailing lists