From: Jared Kangas <jkangas@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: ryabinin.a.a@gmail.com, glider@google.com, andreyknvl@gmail.com,
dvyukov@google.com, vincenzo.frascino@arm.com,
kasan-dev@googlegroups.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kasan: make report_lock a raw spinlock
Date: Fri, 22 Nov 2024 10:03:16 -0800 [thread overview]
Message-ID: <Z0DHZIEI5hobBUwn@jkangas-thinkpadp1gen3.rmtuswa.csb> (raw)
In-Reply-To: <20241121222809.4b53e070a943e100bb6f7ba0@linux-foundation.org>
On Thu, Nov 21, 2024 at 10:28:09PM -0800, Andrew Morton wrote:
> On Tue, 19 Nov 2024 13:02:34 -0800 Jared Kangas <jkangas@redhat.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?
Sorry for missing that; I think a backport of the patch would be
appropriate.
> If so, please help us identify a suitable Fixes: commit.
Fixes: 342a93247e08 ("locking/spinlock: Provide RT variant header: <linux/spinlock_rt.h>")
prev parent reply other threads:[~2024-11-22 18:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 21:02 Jared Kangas
2024-11-22 6:28 ` Andrew Morton
2024-11-22 18:03 ` Jared Kangas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z0DHZIEI5hobBUwn@jkangas-thinkpadp1gen3.rmtuswa.csb \
--to=jkangas@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryabinin.a.a@gmail.com \
--cc=vincenzo.frascino@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox