kdb: include header in signal handling code
PATCH 1/1 kdb: include header in signal handling code
From: Arnd Bergmann <[email protected]>
kdb_send_sig() is defined in the signal code and called from kdb, but the declaration is part of the kdb internal code. Include this from signal.c as well to avoid the warning:
kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' [-Werror=missing-prototypes]
--- kernel/signal.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/signal.c +2 -0
@@ -4780,6 +4780,8 @@ void __init signals_init(void)#ifdef CONFIG_KGDB_KDB #include <linux/kdb.h> +#include "debug/kdb/kdb_private.h" +/* * kdb_send_sig - Allows kdb to send signals without exposing * signal internals. This function checks if the required locks are
Signature · 1 line
2.39.2
Hi,
Quoted 7 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
kdb_send_sig()is defined in the signal code and called from kdb, but the declaration is part of the kdb internal code. Include this fromsignal.cas well to avoid the warning:
Quoted 6 lines
kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' [-Werror=missing-prototypes]Signed-off-by Arnd Bergmann <[email protected]>--- kernel/signal.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 9 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
kdb_send_sig()is defined in the signal code and called from kdb, but the declaration is part of the kdb internal code. Include this fromsignal.cas well to avoid the warning:
kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' [-Werror=missing-prototypes]Signed-off-by Arnd Bergmann <[email protected]>
Signature · 1 line
Kees Cook
Quoted 9 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
kdb_send_sig()is defined in the signal code and called from kdb, but the declaration is part of the kdb internal code. Include this fromsignal.cas well to avoid the warning:
kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' [-Werror=missing-prototypes]Signed-off-by Arnd Bergmann <[email protected]>
Sorry to be so late with this feedback! I got as far as queuing this up for merge before the penny dropped...
Quoted 9 lines
--- kernel/signal.c | 2 ++ 1 file changed, 2 insertions(+)kernel/signal.c +0
-0
kernel/signal.c void __init signals_init(void) · line 4784
Quoted 5 lines
kernel/signal.c +2
-0@@ -4780,6 +4780,8 @@ void __init signals_init(void)#ifdef CONFIG_KGDB_KDB #include <linux/kdb.h> +#include "debug/kdb/kdb_private.h" +
Isn't is better to move the prototype for kdb_send_sig() into linux/kdb.h instead?
That's what other kdb helpers spread across the kernel do (kdb_walk_kallsyms() for example).
Daniel.
Quoted 15 lines · Daniel Thompson
kernel/signal.c void __init signals_init(void) · line 4784
Quoted 10 lines · Arnd Bergmann
kernel/signal.c +2
-0@@ -4780,6 +4780,8 @@ void __init signals_init(void)#ifdef CONFIG_KGDB_KDB #include <linux/kdb.h> +#include "debug/kdb/kdb_private.h" +Isn't is better to move the prototype for
kdb_send_sig()intolinux/kdb.hinstead?
Quoted 2 lines
That's what other kdb helpers spread across the kernel do (
kdb_walk_kallsyms()for example).
Right, that is probably better here. Not sure if it's worth reworking the branch if you already merged it, the difference seems rather minor.
Arnd
Quoted 16 lines · Arnd Bergmann
Quoted 15 lines · Daniel Thompson
kernel/signal.c void __init signals_init(void) · line 4784
Quoted 10 lines · Arnd Bergmann
kernel/signal.c +2
-0@@ -4780,6 +4780,8 @@ void __init signals_init(void)#ifdef CONFIG_KGDB_KDB #include <linux/kdb.h> +#include "debug/kdb/kdb_private.h" +Isn't is better to move the prototype for
kdb_send_sig()intolinux/kdb.hinstead?
Quoted 6 lines
Quoted 2 lines
That's what other kdb helpers spread across the kernel do (
kdb_walk_kallsyms()for example).Right, that is probably better here. Not sure if it's worth reworking the branch if you already merged it, the difference seems rather minor.
I figure it will take me as long to rework the branch as it will to write the covering letter on the pull-request to explain why kgdb/kdb is messing around in kernel/signal.c ;-) .
Daniel.