diff options
| author | Anssi Hannula <[email protected]> | 2014-08-01 15:55:47 +0000 |
|---|---|---|
| committer | Mike Snitzer <[email protected]> | 2014-08-01 16:25:22 +0000 |
| commit | 44fa816bb778edbab6b6ddaaf24908dd6295937e (patch) | |
| tree | 2b67384ea2670780a7215c593b08e2ec92bd27e6 /lib/mpi/mpi-cmp.c | |
| parent | dm bufio: fully initialize shrinker (diff) | |
| download | kernel-44fa816bb778edbab6b6ddaaf24908dd6295937e.tar.gz kernel-44fa816bb778edbab6b6ddaaf24908dd6295937e.zip | |
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: [email protected]
Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Joe Thornber <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Cc: [email protected]
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions
