mm/swap: fix race when skipping swapcache
JIRA: https://issues.redhat.com/browse/RHEL-31646
CVE: CVE-2024-26759
The commit in Fixes introduces a way to skip the swapcache for
fast devices like zram, pmem and btt as a mean to reduce swap-in
latency. By doing so, however it introduces the race conditions
leading to the noted CVE.
Fixes: 0bcac06f ("mm,swap: skip swapcache for swapin of synchronous device")
Signed-off-by: Rafael Aquini aquini@redhat.com
Edited by Rafael Aquini