From: Dan Carpenter Date: Thu, 29 May 2014 08:23:23 +0000 (+0300) Subject: dm raid: fix a couple integer overflows X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~100^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ca5a21a9c02bdebe2d95268482031f002efcf23;p=pandora-kernel.git dm raid: fix a couple integer overflows My static checker complains that if "num_raid_params" is UINT_MAX then the "if (num_raid_params + 1 > argc) {" check doesn't work as intended. The other change is that I moved the "if (argc != (num_raid_devs * 2))" condition forward a few lines so it was before the call to context_alloc(). If we had an integer overflow inside that function then it would lead to an immediate crash. Signed-off-by: Dan Carpenter Signed-off-by: Mike Snitzer --- Reading git-diff-tree failed