[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CO1PR11MB51053F26FD4F24B78969B0F3FA749@CO1PR11MB5105.namprd11.prod.outlook.com>
Date: Thu, 8 Apr 2021 19:44:08 +0000
From: "Brelinski, TonyX" <tonyx.brelinski@...el.com>
To: Colin King <colin.king@...onical.com>,
"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"David S . Miller" <davem@...emloft.net>,
"Jakub Kicinski" <kuba@...nel.org>,
"Cao, Chinh T" <chinh.t.cao@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [Intel-wired-lan] [PATCH][next] ice: Fix potential infinite loop
when using u8 loop counter
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Colin King
> Sent: Wednesday, March 31, 2021 7:46 AM
> To: Brandeburg, Jesse <jesse.brandeburg@...el.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; David S . Miller <davem@...emloft.net>;
> Jakub Kicinski <kuba@...nel.org>; Cao, Chinh T <chinh.t.cao@...el.com>;
> intel-wired-lan@...ts.osuosl.org; netdev@...r.kernel.org
> Cc: kernel-janitors@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [Intel-wired-lan] [PATCH][next] ice: Fix potential infinite loop when
> using u8 loop counter
>
> From: Colin Ian King <colin.king@...onical.com>
>
> A for-loop is using a u8 loop counter that is being compared to a u32
> cmp_dcbcfg->numapp to check for the end of the loop. If cmp_dcbcfg-
> >numapp is larger than 255 then the counter j will wrap around to zero and
> hence an infinite loop occurs. Fix this by making counter j the same type as
> cmp_dcbcfg->numapp.
>
> Addresses-Coverity: ("Infinite loop")
> Fixes: aeac8ce864d9 ("ice: Recognize 860 as iSCSI port in CEE mode")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> drivers/net/ethernet/intel/ice/ice_dcb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Tested-by: Tony Brelinski <tonyx.brelinski@...el.com> A Contingent Worker at Intel
Powered by blists - more mailing lists