lkml.org 
[lkml]   [2023]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] exit: Detect and fix irq disabled state in oops
On Fri, Jan 20, 2023 at 11:18:20AM +1000, Nicholas Piggin wrote:
> If a task oopses with irqs disabled, this can cause various cascading
> problems in the oops path such as sleep-from-invalid warnings, and
> potentially worse.
>
> Since commit 0258b5fd7c712 ("coredump: Limit coredumps to a single
> thread group"), the unconditional irq enable in coredump_task_exit()
> will "fix" the irq state to be enabled early in do_exit(), so currently
> this may not be triggerable, but that is coincidental and fragile.
>
> Detect and fix the irqs_disabled() condition in the oops path before
> calling do_exit(), similarly to the way in_atomic() is handled.
>
> Link: https://lore.kernel.org/lkml/20221004094401.708299-1-npiggin@gmail.com/
> Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> Hi Peter,
>
> Would you consider taking this through the sched tree?

Yep, can do, let me go queue it.

\
 
 \ /
  Last update: 2023-03-26 23:49    [W:0.048 / U:1.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site