Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1659174

Re: [PATCH] net: stmmac: fix a broken u32 less than zero check

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] net: stmmac: fix a broken u32 less than zero check
Date 2017-06-06 22:30 +0200
Message-ID <tPtgZ-5bW-1@gated-at.bofh.it> (permalink)
References <tPmyR-S4-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin King <colin.king@canonical.com>
Date: Tue,  6 Jun 2017 14:10:49 +0100

> From: Colin Ian King <colin.king@canonical.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@canonical.com>

Applied, thanks Colin.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] net: stmmac: fix a broken u32 less than zero check Colin King <colin.king@canonical.com> - 2017-06-06 15:20 +0200
  Re: [PATCH] net: stmmac: fix a broken u32 less than zero check David Miller <davem@davemloft.net> - 2017-06-06 22:30 +0200

csiph-web