On Fri, Aug 30, 2019 at 12:28:08PM -0700, syzbot wrote:
> Hello,
> 
> syzbot found the following crash on:
> 
> HEAD commit:    ed858b88 Add linux-next specific files for 20190826
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=121b506c600000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=ee8373cd9733e305
> dashboard link: https://syzkaller.appspot.com/bug?extid=5bda120b4032f831c57f
> compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> 
> Unfortunately, I don't have any reproducer for this crash yet.
> 
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+5bda120b4032f831c...@syzkaller.appspotmail.com
> 
> =============================
> WARNING: suspicious RCU usage
> 5.3.0-rc6-next-20190826 #73 Not tainted
> -----------------------------
> fs/ext4/block_validity.c:333 suspicious rcu_dereference_check() usage!
> 

#syz invalid

There was already a fix applied between ed858b88 and latest linux-next:

diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c
index 003dc1dc2da3..f7bc914a74df 100644
--- a/fs/ext4/block_validity.c
+++ b/fs/ext4/block_validity.c
@@ -330,11 +330,13 @@ void ext4_release_system_zone(struct super_block *sb)
 {
        struct ext4_system_blocks *system_blks;
 
+       rcu_read_lock();
        system_blks = rcu_dereference(EXT4_SB(sb)->system_blks);
        rcu_assign_pointer(EXT4_SB(sb)->system_blks, NULL);
 
        if (system_blks)
                call_rcu(&system_blks->rcu, ext4_destroy_system_zone);
+       rcu_read_unlock();
 }

Reply via email to