diff options
| author | Jared Kangas <jkangas@redhat.com> | 2024-11-19 13:02:34 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-14 20:03:32 +0100 |
| commit | 835ca042dfcfc4b06b411c646bcf5b079b1c2668 (patch) | |
| tree | e3f02950916e3b13494d181f0e37bae44a970321 /scripts/objdiff | |
| parent | a71ddd5b87cda687efa28e049e85e923689bcef9 (diff) | |
| download | linux-835ca042dfcfc4b06b411c646bcf5b079b1c2668.tar.gz linux-835ca042dfcfc4b06b411c646bcf5b079b1c2668.tar.bz2 linux-835ca042dfcfc4b06b411c646bcf5b079b1c2668.zip | |
kasan: make report_lock a raw spinlock
commit e30a0361b8515d424c73c67de1a43e45a13b8ba2 upstream.
If PREEMPT_RT is enabled, report_lock is a sleeping spinlock and must not
be locked when IRQs are disabled. However, KASAN reports may be triggered
in such contexts. For example:
char *s = kzalloc(1, GFP_KERNEL);
kfree(s);
local_irq_disable();
char c = *s; /* KASAN report here leads to spin_lock() */
local_irq_enable();
Make report_spinlock a raw spinlock to prevent rescheduling when
PREEMPT_RT is enabled.
Link: https://lkml.kernel.org/r/20241119210234.1602529-1-jkangas@redhat.com
Fixes: 342a93247e08 ("locking/spinlock: Provide RT variant header: <linux/spinlock_rt.h>")
Signed-off-by: Jared Kangas <jkangas@redhat.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
