2023-12-22 03:07:09

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] [reiserfs?] possible deadlock in chmod_common (2)

For archival purposes, forwarding an incoming command email to
[email protected].

***

Subject: [reiserfs?] possible deadlock in chmod_common (2)
Author: [email protected]

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git aafe7ad77b91

diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
index dd33f8cc6eda..cf219a998a89 100644
--- a/fs/reiserfs/ioctl.c
+++ b/fs/reiserfs/ioctl.c
@@ -100,7 +100,9 @@ long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
err = -EPERM;
break;
}
+ reiserfs_write_unlock(inode->i_sb);
err = mnt_want_write_file(filp);
+ reiserfs_write_lock(inode->i_sb);
if (err)
break;
if (get_user(inode->i_generation, (int __user *)arg)) {