summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2020-07-23 17:42:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-29 11:20:00 +0300
commita3ec4725ddedf2ffacfee233c90ad0c34dfce27c (patch)
tree671e73d6cb9734c2ae635beed0548909e226b9e7 /tools/perf/scripts/python/stackcollapse.py
parentaa34e471f5a6d26f98f63389ddf61d6bc45b66f7 (diff)
downloadlinux-a3ec4725ddedf2ffacfee233c90ad0c34dfce27c.tar.xz
dm integrity: fix integrity recalculation that is improperly skipped
commit 5df96f2b9f58a5d2dc1f30fe7de75e197f2c25f2 upstream. Commit adc0daad366b62ca1bce3e2958a40b0b71a8b8b3 ("dm: report suspended device during destroy") broke integrity recalculation. The problem is dm_suspended() returns true not only during suspend, but also during resume. So this race condition could occur: 1. dm_integrity_resume calls queue_work(ic->recalc_wq, &ic->recalc_work) 2. integrity_recalc (&ic->recalc_work) preempts the current thread 3. integrity_recalc calls if (unlikely(dm_suspended(ic->ti))) goto unlock_ret; 4. integrity_recalc exits and no recalculating is done. To fix this race condition, add a function dm_post_suspending that is only true during the postsuspend phase and use it instead of dm_suspended(). Signed-off-by: Mikulas Patocka <mpatocka redhat com> Fixes: adc0daad366b ("dm: report suspended device during destroy") Cc: stable vger kernel org # v4.18+ Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions