From d9282cb66353be502aae09aae75d05a6863eb979 Mon Sep 17 00:00:00 2001 From: Pan Xinhui Date: Wed, 9 Sep 2015 15:37:05 -0700 Subject: [PATCH] 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 Cc: Yury Norov Cc: Chris Metcalf Cc: Rasmus Villemoes Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed