WSL2-Linux-Kernel/drivers/md
Anssi Hannula 44fa816bb7 dm cache: fix race affecting dirty block count
nr_dirty is updated without locking, causing it to drift so that it is
non-zero (either a small positive integer, or a very large one when an
underflow occurs) even when there are no actual dirty blocks.  This was
due to a race between the workqueue and map function accessing nr_dirty
in parallel without proper protection.

People were seeing under runs due to a race on increment/decrement of
nr_dirty, see: https://lkml.org/lkml/2014/6/3/648

Fix this by using an atomic_t for nr_dirty.

Reported-by: roma1390@gmail.com
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
2014-08-01 12:25:22 -04:00
..
bcache
persistent-data
Kconfig
Makefile
bitmap.c
bitmap.h
dm-bio-prison.c dm bio prison: implement per bucket locking in the dm_bio_prison hash table 2014-06-11 16:48:54 -04:00
dm-bio-prison.h dm thin: return ENOSPC instead of EIO when error_if_no_space enabled 2014-06-03 13:44:08 -04:00
dm-bio-record.h
dm-bufio.c dm bufio: fully initialize shrinker 2014-08-01 12:07:21 -04:00
dm-bufio.h
dm-builtin.c
dm-cache-block-types.h
dm-cache-metadata.c dm cache metadata: do not allow the data block size to change 2014-07-15 14:07:50 -04:00
dm-cache-metadata.h
dm-cache-policy-cleaner.c
dm-cache-policy-internal.h
dm-cache-policy-mq.c
dm-cache-policy.c
dm-cache-policy.h
dm-cache-target.c dm cache: fix race affecting dirty block count 2014-08-01 12:25:22 -04:00
dm-crypt.c dm crypt, dm zero: update author name following legal name change 2014-07-10 16:44:14 -04:00
dm-delay.c
dm-era-target.c dm era: check for a non-NULL metadata object before closing it 2014-06-03 13:44:08 -04:00
dm-exception-store.c
dm-exception-store.h
dm-flakey.c
dm-io.c dm io: fix a race condition in the wake up code for sync_io 2014-07-10 16:44:14 -04:00
dm-ioctl.c
dm-kcopyd.c
dm-linear.c
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log.c
dm-mpath.c dm mpath: fix IO hang due to logic bug in multipath_busy 2014-07-10 16:44:15 -04:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c
dm-raid1.c
dm-region-hash.c
dm-round-robin.c
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c . Add dm_accept_partial_bio interface to DM core to allow DM targets 2014-06-12 13:33:29 -07:00
dm-stats.c
dm-stats.h
dm-stripe.c
dm-switch.c
dm-sysfs.c
dm-table.c dm: remove symbol export for dm_set_device_limits 2014-06-04 09:46:34 -04:00
dm-target.c
dm-thin-metadata.c dm thin metadata: do not allow the data block size to change 2014-07-15 14:05:26 -04:00
dm-thin-metadata.h
dm-thin.c dm thin: update discard_granularity to reflect the thin-pool blocksize 2014-06-11 16:56:12 -04:00
dm-uevent.c
dm-uevent.h
dm-verity.c
dm-zero.c dm crypt, dm zero: update author name following legal name change 2014-07-10 16:44:14 -04:00
dm.c dm: allocate a special workqueue for deferred device removal 2014-07-10 16:44:13 -04:00
dm.h
faulty.c
linear.c
linear.h
md.c md: flush writes before starting a recovery. 2014-07-03 10:44:45 +10:00
md.h
multipath.c
multipath.h
raid0.c
raid0.h
raid1.c
raid1.h
raid5.c Assorted md fixes for 3.16 2014-06-11 08:33:41 -07:00
raid5.h
raid10.c
raid10.h