[merged] cpumask-fix-double-string-traverse-in-cpumask_parse.patch removed from -mm tree

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

 



The patch titled
     Subject: include/linux/cpumask.h: fix double string traverse in cpumask_parse
has been removed from the -mm tree.  Its filename was
     cpumask-fix-double-string-traverse-in-cpumask_parse.patch

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

------------------------------------------------------
From: Yury Norov <ynorov@xxxxxxxxxxx>
Subject: include/linux/cpumask.h: fix double string traverse in cpumask_parse

cpumask_parse() finds first occurrence of either or strchr() and strlen().
We can do it better with a single call of strchrnul().

[akpm@xxxxxxxxxxxxxxxxxxxx: remove unneeded cast]
Link: http://lkml.kernel.org/r/20190409204208.12190-1-ynorov@xxxxxxxxxxx
Signed-off-by: Yury Norov <ynorov@xxxxxxxxxxx>
Acked-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/cpumask.h |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/include/linux/cpumask.h~cpumask-fix-double-string-traverse-in-cpumask_parse
+++ a/include/linux/cpumask.h
@@ -633,8 +633,7 @@ static inline int cpumask_parselist_user
  */
 static inline int cpumask_parse(const char *buf, struct cpumask *dstp)
 {
-	char *nl = strchr(buf, '\n');
-	unsigned int len = nl ? (unsigned int)(nl - buf) : strlen(buf);
+	unsigned int len = strchrnul(buf, '\n') - buf;
 
 	return bitmap_parse(buf, len, cpumask_bits(dstp), nr_cpumask_bits);
 }
_

Patches currently in -mm which might be from ynorov@xxxxxxxxxxx are





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

  Powered by Linux