aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAnssi Hannula <anssi.hannula@iki.fi>2014-08-01 11:55:47 -0400
committerMister Oyster <oysterized@gmail.com>2018-01-02 13:52:15 +0100
commitf0e25e0d5fa4c62c09e8657f72504c99e24f05fe (patch)
treee4e97c79a75a4cc1e69b3b6e1cfdbb5470ff306b /scripts
parent9c81c1120f4d3a1f5d2dd9b75dc851c130681531 (diff)
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 Signed-off-by: Joe Maples <joe@frap129.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions