Messages in this thread Patch in this message | | | From | Hillf Danton <> | Subject | Re: [syzbot] [ext4?] WARNING: locking bug in ext4_xattr_inode_update_ref (3) | Date | Thu, 11 Apr 2024 19:39:39 +0800 |
| |
On Thu, 11 Apr 2024 02:48:27 -0700 > syzbot found the following issue on: > > HEAD commit: f2f80ac80987 Merge tag 'nfsd-6.9-2' of git://git.kernel.or.. > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1614c105180000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f2f80ac80987
--- x/fs/ext4/xattr.c +++ y/fs/ext4/xattr.c @@ -119,11 +119,12 @@ ext4_expand_inode_array(struct ext4_xatt struct inode *inode); #ifdef CONFIG_LOCKDEP +static struct lock_class_key ea_i_rwsem_key; void ext4_xattr_inode_set_class(struct inode *ea_inode) { struct ext4_inode_info *ei = EXT4_I(ea_inode); - lockdep_set_subclass(&ea_inode->i_rwsem, 1); + lockdep_set_class(&ea_inode->i_rwsem, &ea_i_rwsem_key); (void) ei; /* shut up clang warning if !CONFIG_LOCKDEP */ lockdep_set_subclass(&ei->i_data_sem, I_DATA_SEM_EA); } --
| |