[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92b0588d-df0b-4f97-99db-d607de774728@sirena.org.uk>
Date: Mon, 10 Mar 2025 13:17:45 +0000
From: Mark Brown <broonie@...nel.org>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Woojung Huh <woojung.huh@...rochip.com>,
Andrew Lunn <andrew+netdev@...n.ch>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
UNGLinuxDriver@...rochip.com, Phil Elwell <phil@...pberrypi.org>
Subject: Re: [PATCH net v1 1/1] net: usb: lan78xx: Sanitize return values of
register read/write functions
On Fri, Mar 07, 2025 at 11:12:23AM +0100, Oleksij Rempel wrote:
> usb_control_msg() returns the number of transferred bytes or a negative
> error code. The current implementation propagates the transferred byte
> count, which is unintended. This affects code paths that assume a
> boolean success/failure check, such as the EEPROM detection logic.
>
> Fix this by ensuring lan78xx_read_reg() and lan78xx_write_reg() return
> only 0 on success and preserve negative error codes.
Tested-by: Mark Brown <broonie@...nel.org>
This fixes NFS boot on the Raspberry Pi 3+, it'd be good to get it into
v6.14.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists