Skip to contentSkip to conversation

init-replace-simple_strtoul-with-kstrtoul-to-improve-lpj_setup.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Nov 27, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: init: replace simple_strtoul with kstrtoul to improve lpj_setup
has been removed from the -mm tree. Its filename was
init-replace-simple_strtoul-with-kstrtoul-to-improve-lpj_setup.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Thorsten Blum <[email protected]>
Subject: init: replace simple_strtoul with kstrtoul to improve lpj_setup
Date: Sat, 22 Nov 2025 12:45:37 +0100

Replace simple_strtoul() with the recommended kstrtoul() for parsing the 'lpj=' boot parameter.

Check the return value of kstrtoul() and reject invalid values. This adds error handling while preserving existing behavior for valid values, and removes use of the deprecated simple_strtoul() helper.

---

 init/calibrate.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
init/calibrate.c renamed from init/calibrate.c~init-replace-simple_strtoul-with-kstrtoul-to-improve-lpj_setup +2 -2
@@ -14,10 +14,10 @@
 
 unsigned long lpj_fine;
 unsigned long preset_lpj;
+
 static int __init lpj_setup(char *str)
 {
-	preset_lpj = simple_strtoul(str,NULL,0);
-	return 1;
+	return kstrtoul(str, 0, &preset_lpj) == 0;
 }
 
 __setup("lpj=", lpj_setup);

_

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