[BUG] fs: super: possible ABBA deadlocks in do_thaw_all_callback() and freeze_bdev()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

My static analysis tool reports several possible ABBA deadlocks in Linux 5.10:

do_thaw_all_callback()
  down_write(&sb->s_umount); --> Line 1028 (Lock A)
  emergency_thaw_bdev()
    thaw_bdev()
      mutex_lock(&bdev->bd_fsfreeze_mutex); --> Line 602 (Lock B)

freeze_bdev()
  mutex_lock(&bdev->bd_fsfreeze_mutex); --> Line 556 (Lock B)
  freeze_super()
    down_write(&sb->s_umount); --> Line 1716 (Lock A)
    down_write(&sb->s_umount); --> Line 1738 (Lock A)
  deactivate_super()
    down_write(&s->s_umount); --> Line 365 (Lock A)

When do_thaw_all_callback() and freeze_bdev() are concurrently executed, the deadlocks can occur.

I am not quite sure whether these possible deadlocks are real and how to fix them if them are real.
Any feedback would be appreciated, thanks :)

Reported-by: TOTE Robot <oslab@xxxxxxxxxxxxxxx>


Best wishes,
Jia-Ju Bai



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux