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 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-bio-prison-v1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-bio-prison-v1.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-bio-prison-v2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-bio-prison-v2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-bio-record.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-bow.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-bufio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-builtin.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-cache-background-tracker.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-cache-background-tracker.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-cache-block-types.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-cache-metadata.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-cache-metadata.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-cache-policy-internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-cache-policy-smq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-cache-policy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-cache-policy.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-cache-target.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-clone-metadata.c bitmap: introduce generic optimized bitmap_size() 2024-11-23 23:20:42 +01:00
dm-clone-metadata.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-clone-target.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
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 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-delay.c dm-delay: fix a race between delay_presuspend and delay_bio 2024-11-18 12:10:57 +01:00
dm-dust.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-ebs-target.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-era-target.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-exception-store.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-exception-store.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-flakey.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-historical-service-time.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
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 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-ioctl.c dm resume: don't return EINVAL when signalled 2024-11-23 23:20:42 +01:00
dm-kcopyd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-linear.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-log-userspace-base.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-log-userspace-transfer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-log-userspace-transfer.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-log-writes.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-log.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-mpath.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-mpath.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-path-selector.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-path-selector.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-queue-length.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-raid.c dm-raid: fix lockdep waring in "pers->hot_add_disk" 2024-11-19 09:22:33 +01:00
dm-raid1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-region-hash.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-round-robin.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-rq.c Revert "dm: requeue IO if mapping table not yet available" 2024-11-23 23:21:28 +01:00
dm-rq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-service-time.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-snap-persistent.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-snap-transient.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-snap.c dm snapshot: fix lockup in dm_exception_table_exit 2024-11-19 09:22:37 +01:00
dm-stats.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-stats.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-stripe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-switch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-table.c dm: limit the number of targets and parameter size area 2024-11-18 12:13:40 +01:00
dm-target.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-thin-metadata.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-thin-metadata.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-thin.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-uevent.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-uevent.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-unstripe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-user.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-verity-debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-verity-debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-verity-fec.c dm-verity: align struct dm_verity_fec_io properly 2024-11-18 12:11:08 +01:00
dm-verity-fec.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-verity-target.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-verity-verify-sig.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-verity-verify-sig.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-verity.h dm-verity, dm-crypt: align "struct bvec_iter" correctly 2024-11-19 08:44:36 +01:00
dm-writecache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-zero.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-zoned-metadata.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-zoned-reclaim.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-zoned-target.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm-zoned.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dm.c Revert "dm: requeue IO if mapping table not yet available" 2024-11-23 23:21:28 +01:00
dm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
md-autodetect.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
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 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
md-cluster.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
md-cluster.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
md-faulty.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
md-linear.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
md-linear.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
md-multipath.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
md-multipath.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
md.c md: clean up invalid BUG_ON in md_ioctl 2024-11-23 23:20:45 +01:00
md.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid0.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid0.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid1-10.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid1.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid5-cache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid5-log.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid5-ppl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid5.c md/raid5: avoid BUG_ON() while continue reshape after reassembling 2024-11-23 23:20:23 +01:00
raid5.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid10.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
raid10.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00