mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/4] lib/dynamic_debug: add NULL check after kstrdup
@ 2026-06-29  9:30 Martin Weiss
  2026-06-29  9:30 ` [PATCH 2/4] selftests: filesystems: fix spelling mistake in statmount test Martin Weiss
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Martin Weiss @ 2026-06-29  9:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Martin Weiss, Andrew Morton, Jason Baron, Jim Cromie

kstrdup(saved_command_line, GFP_KERNEL) may return NULL under memory
pressure. Add a check to avoid NULL pointer dereference during boot-time
dynamic debug parameter parsing.

Signed-off-by: Martin Weiss <Martin.weiss2410@gmail.com>
---
 lib/dynamic_debug.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 18a71a9108d3..59a04057b509 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -1479,6 +1479,8 @@ static int __init dynamic_debug_init(void)
 	 * slightly noisy if verbose, but harmless.
 	 */
 	cmdline = kstrdup(saved_command_line, GFP_KERNEL);
+	if (!cmdline)
+		return 0; /* prevents a boot-time NULL deref */
 	parse_args("dyndbg params", cmdline, NULL,
 		   0, 0, 0, NULL, &ddebug_dyndbg_boot_param_cb);
 	kfree(cmdline);
-- 
2.54.0


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 1/4] scripts: fix spelling mistakes
@ 2026-06-29  8:28 Martin Weiss
  2026-06-29  8:28 ` [PATCH 2/4] selftests: filesystems: fix spelling mistake in statmount test Martin Weiss
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Weiss @ 2026-06-29  8:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Martin Weiss, Nathan Chancellor, Nicolas Schier, Ihor Solodrai,
	Alexei Starovoitov, Ard Biesheuvel, Alexey Gladkov,
	Josh Poimboeuf, Steven Rostedt, linux-kbuild

Signed-off-by: Martin Weiss <Martin.weiss2410@gmail.com>
---
 scripts/config          | 2 +-
 scripts/link-vmlinux.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/config b/scripts/config
index ea475c07de28..dfa78cfcba67 100755
--- a/scripts/config
+++ b/scripts/config
@@ -38,7 +38,7 @@ commands:
 
 options:
 	--file config-file   .config file to change (default .config)
-	--keep-case|-k       Keep next symbols' case (dont' upper-case it)
+	--keep-case|-k       Keep next symbols' case (don't upper-case it)
 
 $myname doesn't check the validity of the .config file. This is done at next
 make time.
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index f99e196abeea..c8f27e4175f9 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -38,7 +38,7 @@ is_enabled() {
 }
 
 # Nice output in kbuild format
-# Will be supressed by "make -s"
+# Will be suppressed by "make -s"
 info()
 {
 	printf "  %-7s %s\n" "${1}" "${2}"
-- 
2.54.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-29 23:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-29  9:30 [PATCH 1/4] lib/dynamic_debug: add NULL check after kstrdup Martin Weiss
2026-06-29  9:30 ` [PATCH 2/4] selftests: filesystems: fix spelling mistake in statmount test Martin Weiss
2026-06-29  9:30 ` [PATCH 3/4] selftests: powerpc: fix spelling mistake Martin Weiss
2026-06-29  9:30 ` [PATCH 4/4] tools/build: fix spelling mistake in documentation Martin Weiss
2026-06-29 23:51 ` [PATCH 1/4] lib/dynamic_debug: add NULL check after kstrdup Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2026-06-29  8:28 [PATCH 1/4] scripts: fix spelling mistakes Martin Weiss
2026-06-29  8:28 ` [PATCH 2/4] selftests: filesystems: fix spelling mistake in statmount test Martin Weiss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®