um: Improve panic notifiers consistency and ordering
authorGuilherme G. Piccoli <gpiccoli@igalia.com>
Fri, 19 Aug 2022 22:17:24 +0000 (19:17 -0300)
committerRichard Weinberger <richard@nod.at>
Mon, 19 Sep 2022 21:04:54 +0000 (23:04 +0200)
commit758dfdb9185cf94160f20e85bbe05583e3cd4ff4
treecc5f8bdcd644bcf002aea4dbf23609e45296da04
parentc8b2c268b0b77cb6aad676bf215f49212d903b2a
um: Improve panic notifiers consistency and ordering

Currently the panic notifiers from user mode linux don't follow
the convention for most of the other notifiers present in the
kernel (indentation, priority setting, numeric return).
More important, the priorities could be improved, since it's a
special case (userspace), hence we could run the notifiers earlier;
user mode linux shouldn't care much with other panic notifiers but
the ordering among the mconsole and arch notifier is important,
given that the arch one effectively triggers a core dump.

Fix that by running the mconsole notifier as the first panic
notifier, followed by the architecture one (that coredumps).

Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Richard Weinberger <richard@nod.at>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
V3:
- No changes.

V2:
- Kept the notifier header to avoid implicit usage - thanks
Johannes for the suggestion!

Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/mconsole_kern.c
arch/um/kernel/um_arch.c