diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2022-05-19 14:50:27 +0200 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-05-27 18:33:46 +0200 |
commit | 14a762dd1977cf811516fd97b0262b747cac88f7 (patch) | |
tree | e2f6d75dd452a200adfaf248cf9877f874769d11 /mm/madvise.c | |
parent | mm/swapfile: unuse_pte can map random data if swap read fails (diff) | |
download | linux-14a762dd1977cf811516fd97b0262b747cac88f7.tar.xz linux-14a762dd1977cf811516fd97b0262b747cac88f7.zip |
mm/swapfile: fix lost swap bits in unuse_pte()
This is observed by code review only but not any real report.
When we turn off swapping we could have lost the bits stored in the swap
ptes. The new rmap-exclusive bit is fine since that turned into a page
flag, but not for soft-dirty and uffd-wp. Add them.
Link: https://lkml.kernel.org/r/20220519125030.21486-3-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Suggested-by: Peter Xu <peterx@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/madvise.c')
0 files changed, 0 insertions, 0 deletions