diff options
author | 2023-07-01 15:28:37 +0800 | |
---|---|---|
committer | 2023-08-24 16:20:16 -0700 | |
commit | d51b68469bc7804c34622f7f3d4889628d37cfd6 (patch) | |
tree | cf23abb613ee3caa2990a647eac8e032390015f1 /mm/swap_state.c | |
parent | mm/memory.c: fix mismerge (diff) | |
download | wireguard-linux-d51b68469bc7804c34622f7f3d4889628d37cfd6.tar.xz wireguard-linux-d51b68469bc7804c34622f7f3d4889628d37cfd6.zip |
mm: memory-failure: fix potential page refcnt leak in memory_failure()
put_ref_page() is not called to drop extra refcnt when comes from madvise
in the case pfn is valid but pgmap is NULL leading to page refcnt leak.
Link: https://lkml.kernel.org/r/20230701072837.1994253-1-linmiaohe@huawei.com
Fixes: 1e8aaedb182d ("mm,memory_failure: always pin the page in madvise_inject_error")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/swap_state.c')
0 files changed, 0 insertions, 0 deletions