* [PATCH 1/2] kernel/panic.c: Make oops_may_print() return bool
@ 2020-06-02 13:09 Tiezhu Yang
2020-06-02 13:09 ` [PATCH 2/2] lib/Kconfig.debug: Fix typo in the help text of CONFIG_PANIC_TIMEOUT Tiezhu Yang
2020-06-02 18:07 ` [PATCH 1/2] kernel/panic.c: Make oops_may_print() return bool Kees Cook
0 siblings, 2 replies; 4+ messages in thread
From: Tiezhu Yang @ 2020-06-02 13:09 UTC (permalink / raw)
To: Andrew Morton, Kees Cook; +Cc: linux-kernel, Xuefeng Li
The return value of oops_may_print() is true or false, so change its type
to reflect that.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
include/linux/kernel.h | 2 +-
kernel/panic.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 9b7a8d7..69c7fa4 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -322,7 +322,7 @@ void nmi_panic(struct pt_regs *regs, const char *msg);
extern void oops_enter(void);
extern void oops_exit(void);
void print_oops_end_marker(void);
-extern int oops_may_print(void);
+extern bool oops_may_print(void);
void do_exit(long error_code) __noreturn;
void complete_and_exit(struct completion *, long) __noreturn;
diff --git a/kernel/panic.c b/kernel/panic.c
index b69ee9e..064d80f 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -490,7 +490,7 @@ static void do_oops_enter_exit(void)
* Return true if the calling CPU is allowed to print oops-related info.
* This is a bit racy..
*/
-int oops_may_print(void)
+bool oops_may_print(void)
{
return pause_on_oops_flag == 0;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] lib/Kconfig.debug: Fix typo in the help text of CONFIG_PANIC_TIMEOUT
2020-06-02 13:09 [PATCH 1/2] kernel/panic.c: Make oops_may_print() return bool Tiezhu Yang
@ 2020-06-02 13:09 ` Tiezhu Yang
2020-06-02 18:07 ` Kees Cook
2020-06-02 18:07 ` [PATCH 1/2] kernel/panic.c: Make oops_may_print() return bool Kees Cook
1 sibling, 1 reply; 4+ messages in thread
From: Tiezhu Yang @ 2020-06-02 13:09 UTC (permalink / raw)
To: Andrew Morton, Kees Cook; +Cc: linux-kernel, Xuefeng Li
There exists duplicated "the" in the help text of CONFIG_PANIC_TIMEOUT,
remove it.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
lib/Kconfig.debug | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index b3b05ad..d33627a 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -824,7 +824,7 @@ config PANIC_TIMEOUT
int "panic timeout"
default 0
help
- Set the timeout value (in seconds) until a reboot occurs when the
+ Set the timeout value (in seconds) until a reboot occurs when
the kernel panics. If n = 0, then we wait forever. A timeout
value n > 0 will wait n seconds before rebooting, while a timeout
value n < 0 will reboot immediately.
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] kernel/panic.c: Make oops_may_print() return bool
2020-06-02 13:09 [PATCH 1/2] kernel/panic.c: Make oops_may_print() return bool Tiezhu Yang
2020-06-02 13:09 ` [PATCH 2/2] lib/Kconfig.debug: Fix typo in the help text of CONFIG_PANIC_TIMEOUT Tiezhu Yang
@ 2020-06-02 18:07 ` Kees Cook
1 sibling, 0 replies; 4+ messages in thread
From: Kees Cook @ 2020-06-02 18:07 UTC (permalink / raw)
To: Tiezhu Yang; +Cc: Andrew Morton, linux-kernel, Xuefeng Li
On Tue, Jun 02, 2020 at 09:09:17PM +0800, Tiezhu Yang wrote:
> The return value of oops_may_print() is true or false, so change its type
> to reflect that.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Sure, that looks fine. :)
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-02 18:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-02 13:09 [PATCH 1/2] kernel/panic.c: Make oops_may_print() return bool Tiezhu Yang
2020-06-02 13:09 ` [PATCH 2/2] lib/Kconfig.debug: Fix typo in the help text of CONFIG_PANIC_TIMEOUT Tiezhu Yang
2020-06-02 18:07 ` Kees Cook
2020-06-02 18:07 ` [PATCH 1/2] kernel/panic.c: Make oops_may_print() return bool Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox