mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] aoe: harmless underflow in minor_get_static()
@ 2017-05-19 21:28 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2017-05-19 21:28 UTC (permalink / raw)
  To: Ed L. Cashin; +Cc: linux-kernel, kernel-janitors

The "aoemin" comes from revalidate() in drivers/block/aoe/aoechr.c.  It
can be negative.  We cap the upper bound but not the lower bound so
that's an underflow bug.  But it doesn't matter because we check "n"
against N_DEVS so it all works out fine in the end.

Anyway, let's silence the static checker warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index ffd1947500c6..eddd0ecc9e0b 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -58,7 +58,7 @@ minor_get_dyn(ulong *sysminor)
 }
 
 static int
-minor_get_static(ulong *sysminor, ulong aoemaj, int aoemin)
+minor_get_static(ulong *sysminor, ulong aoemaj, unsigned int aoemin)
 {
 	ulong flags;
 	ulong n;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-19 21:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-19 21:28 [PATCH] aoe: harmless underflow in minor_get_static() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®