aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorClaudio Imbrenda <[email protected]>2023-04-28 09:27:53 +0000
committerClaudio Imbrenda <[email protected]>2023-05-04 16:26:27 +0000
commitc148dc8e2fa403be501612ee409db866eeed35c0 (patch)
tree7f2c58e528c596849603797177ba515c69bbacf3 /tools/perf/scripts/python
parentKVM: s390: pv: fix asynchronous teardown for small VMs (diff)
downloadkernel-c148dc8e2fa403be501612ee409db866eeed35c0.tar.gz
kernel-c148dc8e2fa403be501612ee409db866eeed35c0.zip
KVM: s390: fix race in gmap_make_secure()
Fix a potential race in gmap_make_secure() and remove the last user of follow_page() without FOLL_GET. The old code is locking something it doesn't have a reference to, and as explained by Jason and David in this discussion: https://lore.kernel.org/linux-mm/Y9J4P%[email protected]/ it can lead to all kind of bad things, including the page getting unmapped (MADV_DONTNEED), freed, reallocated as a larger folio and the unlock_page() would target the wrong bit. There is also another race with the FOLL_WRITE, which could race between the follow_page() and the get_locked_pte(). The main point is to remove the last use of follow_page() without FOLL_GET or FOLL_PIN, removing the races can be considered a nice bonus. Link: https://lore.kernel.org/linux-mm/Y9J4P%[email protected]/ Suggested-by: Jason Gunthorpe <[email protected]> Fixes: 214d9bbcd3a6 ("s390/mm: provide memory management functions for protected KVM guests") Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Claudio Imbrenda <[email protected]> Message-Id: <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions