[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200903.150013.1684062443303428226.davem@davemloft.net>
Date: Thu, 03 Sep 2020 15:00:13 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: ecree@...arflare.com
Cc: kuba@...nel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] ethtool: fix error handling in ethtool_phys_id
From: Edward Cree <ecree@...arflare.com>
Date: Tue, 1 Sep 2020 18:52:32 +0100
> If ops->set_phys_id() returned an error, previously we would only break
> out of the inner loop, which neither stopped the outer loop nor returned
> the error to the user (since 'rc' would be overwritten on the next pass
> through the loop).
> Thus, rewrite it to use a single loop, so that the break does the right
> thing. Use u64 for 'count' and 'i' to prevent overflow in case of
> (unreasonably) large values of id.data and n.
>
> Signed-off-by: Edward Cree <ecree@...arflare.com>
Applied, thanks.
Powered by blists - more mailing lists