diff options
| author | Jan Kara <[email protected]> | 2012-02-10 10:03:01 +0000 |
|---|---|---|
| committer | Al Viro <[email protected]> | 2012-02-14 01:45:39 +0000 |
| commit | dcdbed853d9fbb0547b781ba676049b87f54129a (patch) | |
| tree | 6f8f2382e7aef99ec21ae9c4dfbfe18e47d4626c /lib/string_helpers.c | |
| parent | vfs: Provide function to get superblock and wait for it to thaw (diff) | |
| download | kernel-dcdbed853d9fbb0547b781ba676049b87f54129a.tar.gz kernel-dcdbed853d9fbb0547b781ba676049b87f54129a.zip | |
quota: Fix deadlock with suspend and quotas
This script causes a kernel deadlock:
set -e
DEVICE=/dev/vg1/linear
lvchange -ay $DEVICE
mkfs.ext3 $DEVICE
mount -t ext3 -o usrquota,grpquota $DEVICE /mnt/test
quotacheck -gu /mnt/test
umount /mnt/test
mount -t ext3 -o usrquota,grpquota $DEVICE /mnt/test
quotaon /mnt/test
dmsetup suspend $DEVICE
setquota -u root 1 2 3 4 /mnt/test &
sleep 1
dmsetup resume $DEVICE
setquota acquired semaphore s_umount for read and then tried to perform a
transaction (and waits because the device is suspended). dmsetup resume tries
to acquire s_umount for write before resuming the device (and waits for
setquota).
Fix the deadlock by grabbing a thawed superblock for quota commands which need
it.
Reported-by: Mikulas Patocka <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions
