[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20241127172523.b12b82d150aad5069e024645@linux-foundation.org>
Date: Wed, 27 Nov 2024 17:25:23 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Marco Elver <elver@...gle.com>
Cc: Andrey Konovalov <andreyknvl@...il.com>, Alexander Potapenko
<glider@...gle.com>, Dmitry Vyukov <dvyukov@...gle.com>, Vlastimil Babka
<vbabka@...e.cz>, Oscar Salvador <osalvador@...e.de>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
kasan-dev@...glegroups.com, Sebastian Andrzej Siewior
<bigeasy@...utronix.de>
Subject: Re: [PATCH] stackdepot: fix stack_depot_save_flags() in NMI context
On Fri, 22 Nov 2024 16:39:47 +0100 Marco Elver <elver@...gle.com> wrote:
> Per documentation, stack_depot_save_flags() was meant to be usable from
> NMI context if STACK_DEPOT_FLAG_CAN_ALLOC is unset. However, it still
> would try to take the pool_lock in an attempt to save a stack trace in
> the current pool (if space is available).
>
> This could result in deadlock if an NMI is handled while pool_lock is
> already held. To avoid deadlock, only try to take the lock in NMI
> context and give up if unsuccessful.
Is it possible to trigger this deadlock in current kernels, or is this
a might-happen-in-the-future thing?
> The documentation is fixed to clearly convey this.
>
Powered by blists - more mailing lists