[merged] lib-bitmapc-fix-a-special-string-handling-bug-in-__bitmap_parselist.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: lib/bitmap.c: fix a special string handling bug in __bitmap_parselist
has been removed from the -mm tree.  Its filename was
     lib-bitmapc-fix-a-special-string-handling-bug-in-__bitmap_parselist.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Pan Xinhui <xinhuix.pan@xxxxxxxxx>
Subject: 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@xxxxxxxxx>
Cc: Yury Norov <yury.norov@xxxxxxxxx>
Cc: Chris Metcalf <cmetcalf@xxxxxxxxxx>
Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
Cc: Sudeep Holla <sudeep.holla@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/bitmap.c |    4 ++++
 1 file changed, 4 insertions(+)

diff -puN lib/bitmap.c~lib-bitmapc-fix-a-special-string-handling-bug-in-__bitmap_parselist lib/bitmap.c
--- a/lib/bitmap.c~lib-bitmapc-fix-a-special-string-handling-bug-in-__bitmap_parselist
+++ a/lib/bitmap.c
@@ -546,6 +546,7 @@ static int __bitmap_parselist(const char
 					return -EINVAL;
 				b = 0;
 				in_range = 1;
+				at_start = 1;
 				continue;
 			}
 
@@ -558,6 +559,9 @@ static int __bitmap_parselist(const char
 			at_start = 0;
 			totaldigits++;
 		}
+		/* if no digit is after '-', it's wrong*/
+		if (at_start && in_range)
+			return -EINVAL;
 		if (!(a <= b))
 			return -EINVAL;
 		if (b >= nmaskbits)
_

Patches currently in -mm which might be from xinhuix.pan@xxxxxxxxx are


--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux