From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Miroslav Benes <mbenes@suse.cz>,
Luis Chamberlain <mcgrof@kernel.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.10.y 1/6] kernel/params.c: Use kstrtobool() instead of strtobool()
Date: Tue, 8 Sep 2026 14:28:40 -0400 [thread overview]
Message-ID: <20260908182845.219246-1-sashal@kernel.org> (raw)
In-Reply-To: <2026090333-barista-diagnosis-cdab@gregkh>
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[ Upstream commit def7b92efd868a6c78da86770704c1a03506016e ]
strtobool() is the same as kstrtobool().
However, the latter is more used within the kernel.
In order to remove strtobool() and slightly simplify kstrtox.h, switch to
the other function name.
While at it, include the corresponding header file (<linux/kstrtox.h>)
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Stable-dep-of: 3dfaae04243c ("params: fix charp corruption on allocation failure")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/params.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/params.c b/kernel/params.c
index 0df4a315760d5..9f0f059571a0a 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -4,6 +4,7 @@
*/
#include <linux/kernel.h>
+#include <linux/kstrtox.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/module.h>
@@ -310,7 +311,7 @@ int param_set_bool(const char *val, const struct kernel_param *kp)
if (!val) val = "1";
/* One of =[yYnN01] */
- return strtobool(val, kp->arg);
+ return kstrtobool(val, kp->arg);
}
EXPORT_SYMBOL(param_set_bool);
--
2.53.0
next prev parent reply other threads:[~2026-09-08 18:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 14:03 FAILED: patch "[PATCH] params: fix charp corruption on allocation failure" failed to apply to 5.10-stable tree gregkh
2026-09-08 18:28 ` Sasha Levin [this message]
2026-09-08 18:28 ` [PATCH 5.10.y 2/6] params: Do not go over the limit when getting the string length Sasha Levin
2026-09-08 18:28 ` [PATCH 5.10.y 3/6] params: Use size_add() for kmalloc() Sasha Levin
2026-09-08 18:28 ` [PATCH 5.10.y 4/6] params: Sort headers Sasha Levin
2026-09-08 18:28 ` [PATCH 5.10.y 5/6] params: Fix multi-line comment style Sasha Levin
2026-09-08 18:28 ` [PATCH 5.10.y 6/6] params: fix charp corruption on allocation failure Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260908182845.219246-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=mbenes@suse.cz \
--cc=mcgrof@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox