From: Yeoreum Yun <yeoreum.yun@arm.com>
To: Byungchul Park <byungchul@sk.com>
Cc: ryabinin.a.a@gmail.com, glider@google.com, andreyknvl@gmail.com,
dvyukov@google.com, vincenzo.frascino@arm.com,
kpm@linux-foundation.org, bigeasy@linutronix.de,
clrkwllms@kernel.org, rostedt@goodmis.org,
max.byungchul.park@gmail.com, kasan-dev@googlegroups.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-rt-devel@lists.linux.dev, nd@arm.com,
Yunseong Kim <ysk@kzalloc.com>,
kernel_team@skhynix.com
Subject: Re: [PATCH] kasan: don't call find_vm_area() in in_interrupt() for possible deadlock
Date: Wed, 2 Jul 2025 07:28:21 +0100 [thread overview]
Message-ID: <aGTRhaHrkjCNb2S4@e129823.arm.com> (raw)
In-Reply-To: <20250702060949.GB5358@system.software.com>
Hi Byungchul,
> > >
> > > CPU0 CPU1
> > > vmalloc();
> > > alloc_vmap_area();
> > > spin_lock(&vn->busy.lock)
> > ^
> > Here, it should be spin_lock_bh(&vn->busy.lock).
>
> spin_lock_irqsave(&vn->busy.lock) might be even better, assuming
> find_vm_area() could be called with a critcal section of *_irq() or
> something.
Agree for this change and I also thought about it.
But, I'm not sure changing to spin_lock_irqsave() is *better*
since it makes a unexpected schedule delay whenever
vmalloc_info_show() is called via proc.
Also, I think the find_vm_area() is designed for task context not
for atomic context. so it seems the misusage in the kasan.
Am I missing something?
Thanks.
--
Sincerely,
Yeoreum Yun
next prev parent reply other threads:[~2025-07-02 6:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 20:35 Yeoreum Yun
2025-07-02 6:01 ` Byungchul Park
2025-07-02 6:09 ` Byungchul Park
2025-07-02 6:28 ` Yeoreum Yun [this message]
2025-07-02 15:46 ` Andrey Ryabinin
2025-07-02 16:04 ` Yeoreum Yun
2025-07-03 17:10 ` Andrey Ryabinin
2025-07-03 18:07 ` Yeoreum Yun
2025-07-07 7:59 ` Sebastian Andrzej Siewior
2025-07-07 8:07 ` Yeoreum Yun
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=aGTRhaHrkjCNb2S4@e129823.arm.com \
--to=yeoreum.yun@arm.com \
--cc=andreyknvl@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=byungchul@sk.com \
--cc=clrkwllms@kernel.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kernel_team@skhynix.com \
--cc=kpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=max.byungchul.park@gmail.com \
--cc=nd@arm.com \
--cc=rostedt@goodmis.org \
--cc=ryabinin.a.a@gmail.com \
--cc=vincenzo.frascino@arm.com \
--cc=ysk@kzalloc.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