Message ID | 20240910021541.234300-1-wangkefeng.wang@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | mm: support poison recovery from do_cow_fault() fix | expand |
On 2024/9/10 10:15, Kefeng Wang wrote: > unlock/put vmf->page, per Miaohe > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> With this, this patch looks good to me. Reviewed-by: Miaohe Lin <linmiaohe@huawei.com> Thanks. .
diff --git a/mm/memory.c b/mm/memory.c index b84443e689a8..47c0202136c9 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5096,11 +5096,12 @@ static vm_fault_t do_cow_fault(struct vm_fault *vmf) if (copy_mc_user_highpage(vmf->cow_page, vmf->page, vmf->address, vma)) { ret = VM_FAULT_HWPOISON; - goto uncharge_out; + goto unlock; } __folio_mark_uptodate(folio); ret |= finish_fault(vmf); +unlock: unlock_page(vmf->page); put_page(vmf->page); if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY)))
unlock/put vmf->page, per Miaohe Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- mm/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)