[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210912160149.2227137-5-linux@roeck-us.net>
Date: Sun, 12 Sep 2021 09:01:49 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>,
"James E . J . Bottomley" <James.Bottomley@...senPartnership.com>,
Helge Deller <deller@....de>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, linux-alpha@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org,
netdev@...r.kernel.org, linux-sparse@...r.kernel.org,
Guenter Roeck <linux@...ck-us.net>
Subject: [PATCH 4/4] alpha: Use absolute_pointer for strcmp on fixed memory location
alpha:allmodconfig fails to build with the following error
when using gcc 11.x.
arch/alpha/kernel/setup.c: In function 'setup_arch':
arch/alpha/kernel/setup.c:493:13: error:
'strcmp' reading 1 or more bytes from a region of size 0
Avoid the problem by using absolute_pointer() when providing a memory
address to strcmp().
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
---
arch/alpha/kernel/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index b4fbbba30aa2..aab477a76c30 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -490,7 +490,7 @@ setup_arch(char **cmdline_p)
/* Hack for Jensen... since we're restricted to 8 or 16 chars for
boot flags depending on the boot mode, we need some shorthand.
This should do for installation. */
- if (strcmp(COMMAND_LINE, "INSTALL") == 0) {
+ if (strcmp(absolute_pointer(COMMAND_LINE), "INSTALL") == 0) {
strlcpy(command_line, "root=/dev/fd0 load_ramdisk=1", sizeof command_line);
} else {
strlcpy(command_line, COMMAND_LINE, sizeof command_line);
--
2.33.0
Powered by blists - more mailing lists