public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+ee72b9a7aad1e5a77c5c@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [ext4?] possible deadlock in ext4_xattr_inode_iget (3)
Date: Wed,  3 Apr 2024 21:44:54 +0800	[thread overview]
Message-ID: <20240403134454.3792-1-hdanton@sina.com> (raw)
In-Reply-To: <000000000000163e1406152c6877@google.com>

On Wed, 03 Apr 2024 00:45:29 -0700
> syzbot found the following issue on:
> 
> HEAD commit:    fe46a7dd189e Merge tag 'sound-6.9-rc1' of git://git.kernel..
> git tree:       upstream
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=140d9db1180000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  fe46a7dd189e

--- x/fs/ext4/inode.c
+++ y/fs/ext4/inode.c
@@ -5414,6 +5414,7 @@ int ext4_setattr(struct mnt_idmap *idmap
 					(attr->ia_size > 0 ? attr->ia_size - 1 : 0) >>
 					inode->i_sb->s_blocksize_bits);
 
+			down_read(&EXT4_I(inode)->xattr_sem);
 			down_write(&EXT4_I(inode)->i_data_sem);
 			old_disksize = EXT4_I(inode)->i_disksize;
 			EXT4_I(inode)->i_disksize = attr->ia_size;
@@ -5430,6 +5431,7 @@ int ext4_setattr(struct mnt_idmap *idmap
 			else
 				EXT4_I(inode)->i_disksize = old_disksize;
 			up_write(&EXT4_I(inode)->i_data_sem);
+			up_read(&EXT4_I(inode)->xattr_sem);
 			ext4_journal_stop(handle);
 			if (error)
 				goto out_mmap_sem;
--

  reply	other threads:[~2024-04-03 13:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03  7:45 [syzbot] [ext4?] possible deadlock in ext4_xattr_inode_iget (3) syzbot
2024-04-03 13:44 ` Hillf Danton [this message]
2024-04-04  0:48   ` syzbot
2024-04-04  1:54 ` [PATCH] ext4: fix deadlock in ext4_xattr_inode_iget Edward Adam Davis
2024-06-20  3:10   ` Theodore Ts'o
2024-04-08 21:38 ` [syzbot] [ext4?] possible deadlock in ext4_xattr_inode_iget (3) Andreas Dilger
2024-11-02 22:58 ` syzbot
2024-11-07 17:14   ` Jan Kara

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=20240403134454.3792-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+ee72b9a7aad1e5a77c5c@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