diff options
author | Jann Horn <[email protected]> | 2022-11-25 22:37:13 +0100 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2022-11-30 14:49:42 -0800 |
commit | 2ba99c5e08812494bc57f319fb562f527d9bacd8 (patch) | |
tree | 2a2cdaaa8a0bd83cc2e1a1feb93c6772a681a3cd /drivers/usb/cdns3 | |
parent | 8d3c106e19e8d251da31ff4cc7462e4565d65084 (diff) |
mm/khugepaged: fix GUP-fast interaction by sending IPI
Since commit 70cbc3cc78a99 ("mm: gup: fix the fast GUP race against THP
collapse"), the lockless_pages_from_mm() fastpath rechecks the pmd_t to
ensure that the page table was not removed by khugepaged in between.
However, lockless_pages_from_mm() still requires that the page table is
not concurrently freed. Fix it by sending IPIs (if the architecture uses
semi-RCU-style page table freeing) before freeing/reusing page tables.
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Fixes: ba76149f47d8 ("thp: khugepaged")
Signed-off-by: Jann Horn <[email protected]>
Reviewed-by: Yang Shi <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Cc: John Hubbard <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3')
0 files changed, 0 insertions, 0 deletions