Skip to contentSkip to conversation

arch-x86-mm-kmemcheck-kmemcheckc-use-kstrtoint-instead-of-sscanf.patch removed from -mm tree

merged [email protected] 1 participant 1 message Apr 9, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: [merged] arch-x86-mm-kmemcheck-kmemcheckc-use-kstrtoint-instead-of-sscanf.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 09 Apr 2014 10:55:35 -0700

The patch titled
Subject: arch/x86/mm/kmemcheck/kmemcheck.c: use kstrtoint() instead of sscanf()
has been removed from the -mm tree. Its filename was
arch-x86-mm-kmemcheck-kmemcheckc-use-kstrtoint-instead-of-sscanf.patch

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

------------------------------------------------------
From: David Rientjes <[email protected]>
Subject: arch/x86/mm/kmemcheck/kmemcheck.c: use kstrtoint() instead of sscanf()

Kmemcheck should use the preferred interface for parsing command line arguments, kstrto*(), rather than sscanf() itself. Use it appropriately.

---

 arch/x86/mm/kmemcheck/kmemcheck.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
arch/x86/mm/kmemcheck/kmemcheck.c renamed from arch/x86/mm/kmemcheck/kmemcheck.c~arch-x86-mm-kmemcheck-kmemcheckc-use-kstrtoint-instead-of-sscanf +7 -1
diff -puN arch/x86/mm/kmemcheck/kmemcheck.c~arch-x86-mm-kmemcheck-kmemcheckc-use-kstrtoint-instead-of-sscanf arch/x86/mm/kmemcheck/kmemcheck.c
@@ -78,10 +78,16 @@ early_initcall(kmemcheck_init);
  */
 static int __init param_kmemcheck(char *str)
 {
+	int val;
+	int ret;
+
 	if (!str)
 		return -EINVAL;
 
-	sscanf(str, "%d", &kmemcheck_enabled);
+	ret = kstrtoint(str, 0, &val);
+	if (ret)
+		return ret;
+	kmemcheck_enabled = val;
 	return 0;
 }
 

_

Patches currently in -mm which might be from [email protected] are

origin.patch mm-slab-slub-use-page-list-consistently-instead-of-page-lru.patch mm-utilc-add-kstrimdup.patch
linux-next.patch