[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 06 Jun 2017 16:27:21 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: colin.king@...onical.com
Cc: peppe.cavallaro@...com, alexandre.torgue@...com,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: stmmac: fix a broken u32 less than zero check
From: Colin King <colin.king@...onical.com>
Date: Tue, 6 Jun 2017 14:10:49 +0100
> From: Colin Ian King <colin.king@...onical.com>
>
> The check that queue is less or equal to zero is always true
> because queue is a u32; queue is decremented and will wrap around
> and never go -ve. Fix this by making queue an int.
>
> Detected by CoverityScan, CID#1428988 ("Unsigned compared against 0")
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
Applied, thanks Colin.
Powered by blists - more mailing lists