diff options
author | Pan Xinhui <xinhuix.pan@intel.com> | 2015-09-10 01:37:05 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-10 23:29:01 +0300 |
commit | d9282cb66353be502aae09aae75d05a6863eb979 (patch) | |
tree | 78ae23870c4f19225303b2d820cebd87aa1153ed /block/bsg-lib.c | |
parent | d21c3d4d1c6b2a0b85aeae5cc774b1bacc64e5b4 (diff) | |
download | linux-d9282cb66353be502aae09aae75d05a6863eb979.tar.xz |
lib/bitmap.c: fix a special string handling bug in __bitmap_parselist
If string end with '-', for exapmle, bitmap_parselist("1,0-",&mask,
nmaskbits), It is not in a valid pattern, so add a check after loop.
Return -EINVAL on such condition.
Signed-off-by: Pan Xinhui <xinhuix.pan@intel.com>
Cc: Yury Norov <yury.norov@gmail.com>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'block/bsg-lib.c')
0 files changed, 0 insertions, 0 deletions