[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211041229.F3B37C03@keescook>
Date: Fri, 4 Nov 2022 12:29:35 -0700
From: coverity-bot <keescook@...omium.org>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
Cc: Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
Russell King <linux@...linux.org.uk>,
Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Sergey Shtylyov <s.shtylyov@....ru>,
linux-renesas-soc@...r.kernel.org,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
linux-next@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Coverity: rswitch_gwca_queue_alloc_skb(): Control flow issues
Hello!
This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221104 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan
You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:
Wed Nov 2 12:38:53 2022 +0000
3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Coverity reported the following:
*** CID 1527147: Control flow issues (NO_EFFECT)
drivers/net/ethernet/renesas/rswitch.c:270 in rswitch_gwca_queue_alloc_skb()
264 goto err;
265 }
266
267 return 0;
268
269 err:
vvv CID 1527147: Control flow issues (NO_EFFECT)
vvv This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "i >= 0U".
270 for (i--; i >= 0; i--) {
271 index = (i + start_index) % gq->ring_size;
272 dev_kfree_skb(gq->skbs[index]);
273 gq->skbs[index] = NULL;
274 }
275
If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):
Reported-by: coverity-bot <keescook+coverity-bot@...omium.org>
Addresses-Coverity-ID: 1527147 ("Control flow issues")
Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Thanks for your attention!
--
Coverity-bot
Powered by blists - more mailing lists