From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+27cc650ef45b379dfe5a@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] [erofs?] BUG: using smp_processor_id() in preemptible code in z_erofs_get_gbuf
Date: Tue, 9 Apr 2024 09:16:21 +0800 [thread overview]
Message-ID: <tencent_12296C83BC04535760577A26D4336AA36005@qq.com> (raw)
In-Reply-To: <00000000000084b9dd061599e789@google.com>
please test wrong context using smp_processor_id
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 2b3d5988ae2c
diff --git a/fs/erofs/zutil.c b/fs/erofs/zutil.c
index 9687cad8be96..0a3d9eecbf16 100644
--- a/fs/erofs/zutil.c
+++ b/fs/erofs/zutil.c
@@ -35,8 +35,11 @@ void *z_erofs_get_gbuf(unsigned int requiredpages)
__acquires(gbuf->lock)
{
struct z_erofs_gbuf *gbuf;
+ unsigned long flags;
+ local_irq_save(flags);
gbuf = &z_erofs_gbufpool[z_erofs_gbuf_id()];
+ local_irq_restore(flags);
spin_lock(&gbuf->lock);
/* check if the buffer is too small */
if (requiredpages > gbuf->nrpages) {
next prev parent reply other threads:[~2024-04-09 1:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 18:23 syzbot
2024-04-09 1:16 ` Edward Adam Davis [this message]
2024-04-10 0:36 ` syzbot
2024-04-09 1:47 ` Gao Xiang
2024-04-10 5:19 ` syzbot
2024-04-23 23:34 ` Gao Xiang
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=tencent_12296C83BC04535760577A26D4336AA36005@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+27cc650ef45b379dfe5a@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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
all inboxes | Powered by JetHome®