]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/hwpoison: fix potential pte_unmap_unlock pte error
authorMiaohe Lin <linmiaohe@huawei.com>
Mon, 23 Aug 2021 23:59:27 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:34:07 +0000 (09:34 +1000)
commit01da0ad257ab7c166716edda22deeee2a3830c2e
tree0b4fdfa9915643d3e023443cc5f40c99ae5fd0d0
parent0cda9b0410bebc97d36de9a3119a12868718ef28
mm/hwpoison: fix potential pte_unmap_unlock pte error

If the first pte is equal to poisoned_pfn, i.e.  check_hwpoisoned_entry()
return 1, the wrong ptep - 1 would be passed to pte_unmap_unlock().

Link: https://lkml.kernel.org/r/20210814105131.48814-3-linmiaohe@huawei.com
Fixes: ad9c59c24095 ("mm,hwpoison: send SIGBUS with error virutal address")
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>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/memory-failure.c