lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <966cad79-f5e2-7193-eb7d-e31ad117fbf0@gmail.com>
Date:   Mon, 25 Apr 2022 08:55:32 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Andrew Lunn <andrew@...n.ch>, cgel.zte@...il.com
Cc:     f.fainelli@...il.com, bcm-kernel-feedback-list@...adcom.com,
        hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
        kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Lv Ruyi <lv.ruyi@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] net: phy: fix error check return value of phy_read()



On 4/19/2022 5:07 AM, Andrew Lunn wrote:
> On Tue, Apr 19, 2022 at 01:44:39AM +0000, cgel.zte@...il.com wrote:
>> From: Lv Ruyi <lv.ruyi@....com.cn>
>>
>> phy_read() returns a negative number if there's an error, but the
>> error-checking code in the bcm87xx driver's config_intr function
>> triggers if phy_read() returns non-zero.  Correct that.
>>
>> Reported-by: Zeal Robot <zealci@....com.cn>
>> Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>
>> ---
>>   drivers/net/phy/bcm87xx.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/phy/bcm87xx.c b/drivers/net/phy/bcm87xx.c
>> index 313563482690..e62b53718010 100644
>> --- a/drivers/net/phy/bcm87xx.c
>> +++ b/drivers/net/phy/bcm87xx.c
>> @@ -146,7 +146,7 @@ static int bcm87xx_config_intr(struct phy_device *phydev)
>>   
>>   	if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
>>   		err = phy_read(phydev, BCM87XX_LASI_STATUS);
>> -		if (err)
>> +		if (err < 0)
>>   			return err;
> 
> This should probably have a Fixes: tag, and be for net, not next-next.
> Please read the netdev FAQ about the trees, and submittinng fixes for
> netdev.

Yes, it should be:

Fixes: 15772e4ddf3f ("net: phy: broadcom: remove use of ack_interrupt()")

Also, please subject this change properly with:

net: phy: bcm87xx: Added missing error checking

Thank you
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ