Thread (176 messages) 176 messages, 29 authors, 2022-05-24

Re: [PATCH 17/30] tracing: Improve panic/die notifiers

From: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
Date: 2022-05-17 15:34:38
Also in: kexec, linux-alpha, linux-edac, linux-hyperv, linux-leds, linux-mips, linux-pm, linux-remoteproc, linux-s390, linux-tegra, linux-um, lkml, netdev, rcu, sparclinux, xen-devel

On 11/05/2022 08:45, Petr Mladek wrote:
[...]
DIE_OOPS and PANIC_NOTIFIER are from different enum.
It feels like comparing apples with oranges here.

IMHO, the proper way to unify the two notifiers is
a check of the @self parameter. Something like:

static int trace_die_panic_handler(struct notifier_block *self,
				unsigned long ev, void *unused)
{
	if (self == trace_die_notifier && val != DIE_OOPS)
		goto out;

	ftrace_dump(ftrace_dump_on_oops);
out:
	return NOTIFY_DONE;
}

Best Regards,
Petr
OK Petr, thanks - will implement your suggestion in V2 (CC Steven)

Cheers!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help