[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241121222809.4b53e070a943e100bb6f7ba0@linux-foundation.org>
Date: Thu, 21 Nov 2024 22:28:09 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Jared Kangas <jkangas@...hat.com>
Cc: ryabinin.a.a@...il.com, glider@...gle.com, andreyknvl@...il.com,
dvyukov@...gle.com, vincenzo.frascino@....com, kasan-dev@...glegroups.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kasan: make report_lock a raw spinlock
On Tue, 19 Nov 2024 13:02:34 -0800 Jared Kangas <jkangas@...hat.com> wrote:
> 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.
So I assume we want this backported into 6.12.x?
If so, please help us identify a suitable Fixes: commit.
Powered by blists - more mailing lists