[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <66f6ba76.050a0220.46d20.0019.GAE@google.com>
Date: Fri, 27 Sep 2024 07:00:22 -0700
From: syzbot <syzbot+1b2d1134e0b675176a15@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [keyrings?] [lsm?] [ext4?] possible deadlock in
keyring_clear (2)
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: Re: [keyrings?] [lsm?] [ext4?] possible deadlock in keyring_clear (2)
Author: lizhi.xu@...driver.com
tmp no use nofs
#syz test
diff --git a/init/main.c b/init/main.c
index c4778edae797..7e08a69fc432 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1261,12 +1261,15 @@ int __init_or_module do_one_initcall(initcall_t fn)
int count = preempt_count();
char msgbuf[64];
int ret;
+ unsigned int nofs_flag;
if (initcall_blacklisted(fn))
return -EPERM;
do_trace_initcall_start(fn);
+ nofs_flag = memalloc_nofs_save();
ret = fn();
+ memalloc_nofs_restore(nofs_flag);
do_trace_initcall_finish(fn, ret);
msgbuf[0] = 0;
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 1c77400bd88e..fa16932f799d 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -1623,7 +1623,12 @@ static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
- return __ext4_ioctl(filp, cmd, arg);
+ long ret;
+ unsigned int nofs_flag;
+ nofs_flag = memalloc_nofs_save();
+ ret = __ext4_ioctl(filp, cmd, arg);
+ memalloc_nofs_restore(nofs_flag);
+ return ret;
}
#ifdef CONFIG_COMPAT
Powered by blists - more mailing lists