Re: [PATCH] staging: lustre: lustre: obdclass: lprocfs_status.c: Fix for possible null pointer dereference

From: Chris Rorvick
Date: Mon Dec 15 2014 - 23:40:34 EST


On Sun, Dec 14, 2014 at 4:52 PM, Rickard Strandqvist
<rickard_strandqvist@xxxxxxxxxxxxxxxxxx> wrote:
> units = 1;
...
> /* Specified units override the multiplier */
> if (units)

That doesn't make much sense. The conditional logic will always be
executed. Maybe this is what's intended?

/* Specified units override the multiplier */
- if (units)
+ if (units > 1)
mult = mult < 0 ? -units : units;

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/