aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/memory.c
diff options
context:
space:
mode:
authorHuang Ying <ying.huang@intel.com>2024-04-07 14:54:50 +0800
committerAndrew Morton <akpm@linux-foundation.org>2024-05-05 17:53:26 -0700
commitd4a34d7fb440d070553743d9cadef9a076e809d2 (patch)
tree8dba357fa8d5357594c9423d2ef63c0887c463e3 /mm/memory.c
parentmm/mmap: make accountable_mapping return bool (diff)
downloadwireguard-linux-d4a34d7fb440d070553743d9cadef9a076e809d2.tar.xz
wireguard-linux-d4a34d7fb440d070553743d9cadef9a076e809d2.zip
mm,swap: add document about RCU read lock and swapoff interaction
During reviewing a patch to fix the race condition between free_swap_and_cache() and swapoff() [1], it was found that the document about how to prevent racing with swapoff isn't clear enough. Especially RCU read lock can prevent swapoff from freeing data structures. So, the document is added as comments. [1] https://lore.kernel.org/linux-mm/c8fe62d0-78b8-527a-5bef-ee663ccdc37a@huawei.com/ Link: https://lkml.kernel.org/r/20240407065450.498821-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" <ying.huang@intel.com> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Miaohe Lin <linmiaohe@huawei.com> Cc: Hugh Dickins <hughd@google.com> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
0 files changed, 0 insertions, 0 deletions