All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mete Durlu" <meted@linux.ibm.com>
Cc: "Vasily Gorbik" <gor@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	linux-s390@vger.kernel.org, "Heiko Carstens" <hca@linux.ibm.com>
Subject: Re: [PATCH v3 2/3] s390: Implement arch_do_panic
Date: Thu, 30 Jul 2026 10:05:07 +0000	[thread overview]
Message-ID: <20260730100507.916EC1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730-arch_do_panic-v3-2-d5401e683cdb@linux.ibm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The `pr_warn()` call in `on_panic_store()` is missing a terminating newline (`\n`), which will cause garbled console output.
- [Low] The file `arch/s390/kernel/ipl.c` does not include `<linux/panic.h>`, leading to a missing prototype compiler warning for `arch_do_panic()`.
--

--- Patch [2]: [PATCH v3 2/3] s390: Implement arch_do_panic ---
commit fa5fa116f1eec4d70650b8cf3a838d2dff72e007
Author: Mete Durlu <meted@linux.ibm.com>

s390: Implement arch_do_panic

This commit replaces the s390 custom panic notifier handler with the
arch_do_panic() hook. This reordering allows the user-specified
panic_timeout value to be evaluated correctly in common code. The timeout
now takes precedence over user-defined on_panic behavior.

> diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
> index 3c346b02ceb95..6a5fa9213450f 100644
> --- a/arch/s390/kernel/ipl.c
> +++ b/arch/s390/kernel/ipl.c
> @@ -2111,11 +2111,15 @@ static ssize_t on_panic_store(struct kobject *kobj,
>  			      struct kobj_attribute *attr,
>  			      const char *buf, size_t len)
>  {
> +	if (panic_timeout) {
> +		pr_warn("on_panic action will be ignored in favor of panic timeout (panic=%d)",
> +			panic_timeout);

[Severity: Medium]
Will this result in garbled console output since there is no terminating
newline in the format string? Because printk does not automatically append
a newline, the next message printed to the kernel log might be appended to
this same line.

> +	}
>  	return set_trigger(buf, &on_panic_trigger, len);
>  }
>  static struct kobj_attribute on_panic_attr = __ATTR_RW(on_panic);
>  
> -static void do_panic(void)
> +void arch_do_panic(void)

[Severity: Low]
Does this trigger a missing prototype compiler warning? The global function
arch_do_panic() is defined here to override the weak definition, but its
declaration is in linux/panic.h which does not seem to be included in this
file.

>  {
>  	lgr_info_log();
>  	on_panic_trigger.action->fn(&on_panic_trigger);

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-arch_do_panic-v3-0-d5401e683cdb@linux.ibm.com?part=2

  reply	other threads:[~2026-07-30 10:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30  9:23 [PATCH v3 0/3] Introduce arch_do_panic Mete Durlu
2026-07-30  9:23 ` [PATCH v3 1/3] panic: " Mete Durlu
2026-07-30  9:45   ` sashiko-bot
2026-07-30 13:03   ` Bradley Morgan
2026-07-30  9:23 ` [PATCH v3 2/3] s390: Implement arch_do_panic Mete Durlu
2026-07-30 10:05   ` sashiko-bot [this message]
2026-07-30 11:54   ` Heiko Carstens
2026-07-30 13:15     ` Mete Durlu
2026-07-30 14:23       ` Heiko Carstens
2026-07-30  9:23 ` [PATCH v3 3/3] sparc: " Mete Durlu
2026-07-30 10:14   ` sashiko-bot

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=20260730100507.916EC1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=meted@linux.ibm.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.