summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorJiang Liu <liuj97@gmail.com>2013-06-07 00:07:23 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-06 12:12:20 -0700
commit57ab048532c0d975538cebd4456491b5c34248f4 (patch)
tree45791b55f433298cf03fd587dee88fd8ded388e2 /tools/perf/scripts/python/syscall-counts.py
parent6030ea9b35971a4200062f010341ab832e878ac9 (diff)
zram: use zram->lock to protect zram_free_page() in swap free notify path
zram_slot_free_notify() is free-running without any protection from concurrent operations. So there are race conditions between zram_bvec_read()/zram_bvec_write() and zram_slot_free_notify(), and possible consequences include: 1) Trigger BUG_ON(!handle) on zram_bvec_write() side. 2) Access to freed pages on zram_bvec_read() side. 3) Break some fields (bad_compress, good_compress, pages_stored) in zram->stats if the swap layer makes concurrently call to zram_slot_free_notify(). So enhance zram_slot_free_notify() to acquire writer lock on zram->lock before calling zram_free_page(). Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions