kernel_samsung_a53x/drivers/md
Mikulas Patocka 5fed567365 Revert "dm: requeue IO if mapping table not yet available"
[ Upstream commit c8691cd0fc11197515ed148de0780d927bfca38b ]

This reverts commit fa247089de9936a46e290d4724cb5f0b845600f5.

The following sequence of commands causes a livelock - there will be
workqueue process looping and consuming 100% CPU:

dmsetup create --notable test
truncate -s 1MiB testdata
losetup /dev/loop0 testdata
dmsetup load test --table '0 2048 linear /dev/loop0 0'
dd if=/dev/zero of=/dev/dm-0 bs=16k count=1 conv=fdatasync

The livelock is caused by the commit fa247089de99. The commit claims that
it fixes a race condition, however, it is unknown what the actual race
condition is and what program is involved in the race condition.

When the inactive table is loaded, the nodes /dev/dm-0 and
/sys/block/dm-0 are created. /dev/dm-0 has zero size at this point. When
the device is suspended and resumed, the nodes /dev/mapper/test and
/dev/disk/* are created.

If some program opens a block device before it is created by dmsetup or
lvm, the program is buggy, so dm could just report an error as it used to
do before.

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: fa247089de99 ("dm: requeue IO if mapping table not yet available")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:21:28 +01:00
..
bcache bcache: fix variable length array abuse in btree_iter 2024-11-19 14:19:29 +01:00
persistent-data dm persistent data: fix memory allocation failure 2024-11-23 23:20:42 +01:00
alta_bigdata.c
dm-bio-prison-v1.c
dm-bio-prison-v1.h
dm-bio-prison-v2.c
dm-bio-prison-v2.h
dm-bio-record.h
dm-bow.c
dm-bufio.c
dm-builtin.c
dm-cache-background-tracker.c
dm-cache-background-tracker.h
dm-cache-block-types.h
dm-cache-metadata.c
dm-cache-metadata.h
dm-cache-policy-internal.h
dm-cache-policy-smq.c
dm-cache-policy.c
dm-cache-policy.h
dm-cache-target.c
dm-clone-metadata.c bitmap: introduce generic optimized bitmap_size() 2024-11-23 23:20:42 +01:00
dm-clone-metadata.h
dm-clone-target.c
dm-core.h dm: limit the number of targets and parameter size area 2024-11-18 12:13:40 +01:00
dm-crypt.c dm-verity, dm-crypt: align "struct bvec_iter" correctly 2024-11-19 08:44:36 +01:00
dm-default-key.c
dm-delay.c
dm-dust.c
dm-ebs-target.c
dm-era-target.c
dm-exception-store.c
dm-exception-store.h
dm-flakey.c
dm-historical-service-time.c
dm-init.c dm init: Handle minors larger than 255 2024-11-23 23:21:05 +01:00
dm-integrity.c dm integrity: fix out-of-range warning 2024-11-19 09:22:44 +01:00
dm-io.c
dm-ioctl.c dm resume: don't return EINVAL when signalled 2024-11-23 23:20:42 +01:00
dm-kcopyd.c
dm-linear.c
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log-writes.c
dm-log.c
dm-mpath.c
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c dm-raid: fix lockdep waring in "pers->hot_add_disk" 2024-11-19 09:22:33 +01:00
dm-raid1.c
dm-region-hash.c
dm-round-robin.c
dm-rq.c Revert "dm: requeue IO if mapping table not yet available" 2024-11-23 23:21:28 +01:00
dm-rq.h
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c dm snapshot: fix lockup in dm_exception_table_exit 2024-11-19 09:22:37 +01:00
dm-stats.c
dm-stats.h
dm-stripe.c
dm-switch.c
dm-sysfs.c
dm-table.c dm: limit the number of targets and parameter size area 2024-11-18 12:13:40 +01:00
dm-target.c
dm-thin-metadata.c
dm-thin-metadata.h
dm-thin.c
dm-uevent.c
dm-uevent.h
dm-unstripe.c
dm-user.c
dm-verity-debug.c
dm-verity-debug.h
dm-verity-fec.c
dm-verity-fec.h
dm-verity-target.c
dm-verity-verify-sig.c
dm-verity-verify-sig.h
dm-verity.h dm-verity, dm-crypt: align "struct bvec_iter" correctly 2024-11-19 08:44:36 +01:00
dm-writecache.c
dm-zero.c
dm-zoned-metadata.c
dm-zoned-reclaim.c
dm-zoned-target.c
dm-zoned.h
dm.c Revert "dm: requeue IO if mapping table not yet available" 2024-11-23 23:21:28 +01:00
dm.h
Kconfig
Makefile
md-autodetect.c
md-bitmap.c md: fix resync softlockup when bitmap size is less than array size 2024-11-19 12:26:53 +01:00
md-bitmap.h
md-cluster.c
md-cluster.h
md-faulty.c
md-linear.c
md-linear.h
md-multipath.c
md-multipath.h
md.c md: clean up invalid BUG_ON in md_ioctl 2024-11-23 23:20:45 +01:00
md.h
raid0.c
raid0.h
raid1-10.c
raid1.c
raid1.h
raid5-cache.c
raid5-log.h
raid5-ppl.c
raid5.c md/raid5: avoid BUG_ON() while continue reshape after reassembling 2024-11-23 23:20:23 +01:00
raid5.h
raid10.c
raid10.h