Files
android_kernel_xiaomi_sm8450/drivers/net/ethernet/intel/ice
Colin Ian King a2af8a0f38 ice: Fix potential infinite loop when using u8 loop counter
commit ef963ae427aa4669905e0a96b3bd9d44dc85db32 upstream.

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@canonical.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-21 13:00:55 +02:00
..
2020-05-22 22:02:34 -07:00
2020-05-22 22:02:34 -07:00
2021-04-14 08:41:59 +02:00
2020-07-29 08:38:54 -07:00
2020-07-29 08:38:55 -07:00
2020-07-29 08:38:54 -07:00
2019-11-08 12:02:14 -08:00
2021-02-03 23:28:48 +01:00
2020-05-22 21:44:48 -07:00
2020-10-09 13:14:19 -07:00
2020-10-09 13:14:19 -07:00
2020-05-21 22:10:04 -07:00
2020-05-21 22:10:04 -07:00
2020-08-01 08:44:04 -07:00
2020-08-01 08:44:04 -07:00
2020-08-01 08:44:04 -07:00
2020-08-01 08:44:04 -07:00