lkml.org 
[lkml]   [2021]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] bnx2x: Fix potential infinite loop
From
From: Colin King <colin.king@canonical.com>
Date: Wed, 7 Apr 2021 15:28:02 +0100

> From: Colin Ian King <colin.king@canonical.com>
>
> The for_each_tx_queue loop iterates with a u8 loop counter i and
> compares this with the loop upper limit of bp->num_queues that
> is an int type. There is a potential infinite loop if bp->num_queues
> is larger than the u8 loop counter. Fix this by making the loop
> counter the same type as bp->num_queues.
>
> Addresses-Coverity: ("Infinite loop")
> Fixes: ad5afc89365e ("bnx2x: Separate VF and PF logic")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Please show how num_queues can take on a value larger than 255.

Thank you.

\
 
 \ /
  Last update: 2021-04-08 00:14    [W:0.052 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site