public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org
Cc: xingwei lee <xrivendell7@gmail.com>,
	yuxin wang <wang1315768607@163.com>,
	Marius Fleischer <fleischermarius@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Rik van Riel <riel@surriel.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Peter Xu <peterx@redhat.com>,
	x86@kernel.org, Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [tip: x86/mm] x86/mm/pat: Fix VM_PAT handling when fork() fails in copy_page_range()
Date: Wed, 19 Mar 2025 09:15:25 +0100	[thread overview]
Message-ID: <fe0a67dc-d7cb-42ff-9b20-9527af7f6a94@redhat.com> (raw)
In-Reply-To: <174100624258.10177.4534865061014070904.tip-bot2@tip-bot2>

> +void untrack_pfn_copy(struct vm_area_struct *dst_vma,
> +		struct vm_area_struct *src_vma)
> +{
> +	resource_size_t paddr;
> +	unsigned long size;
> +
> +	if (!(dst_vma->vm_flags & VM_PAT))
> +		return;
> +
> +	/*
> +	 * As the page tables might not have been copied yet, the PAT
> +	 * information is obtained from the src VMA, just like during
> +	 * track_pfn_copy().
> +	 */
> +	if (get_pat_info(src_vma, &paddr, NULL)) {
> +		size = src_vma->vm_end - src_vma->vm_start;
> +		free_pfn_range(paddr, size);
>   	}
>   

@Ingo, can you drop this patch for now? It's supposed to be 
"!get_pat_info" here, and I want to re-verify now that a couple of 
months passed, whether it's all working as expected with that.

(we could actually complain if get_pat_info() would fail at this point, 
let me think about that)

I'll resend once I get to it. Thanks!

-- 
Cheers,

David / dhildenb


  reply	other threads:[~2025-03-19  8:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29 21:03 [PATCH v1] x86/mm/pat: fix VM_PAT handling when fork() fails in copy_page_range() David Hildenbrand
2024-10-30 21:32 ` Peter Xu
2024-10-31  9:47   ` David Hildenbrand
2024-11-07  8:43     ` mawupeng
2024-11-07  9:08       ` David Hildenbrand
2024-11-07  9:30         ` mawupeng
2025-04-07  8:43         ` Fedor Pchelkin
2025-04-07  8:46           ` David Hildenbrand
2025-03-03 12:50 ` [tip: x86/mm] x86/mm/pat: Fix " tip-bot2 for David Hildenbrand
2025-03-19  8:15   ` David Hildenbrand [this message]
2025-03-19  9:53     ` Borislav Petkov
2025-03-19 10:16       ` David Hildenbrand
2025-03-19 10:24         ` Borislav Petkov
2025-03-19 10:27           ` David Hildenbrand
2025-03-19 10:42             ` Borislav Petkov
2025-03-19 11:01     ` Ingo Molnar
2025-03-19 11:44       ` David Hildenbrand
2025-03-19 22:08         ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe0a67dc-d7cb-42ff-9b20-9527af7f6a94@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.carpenter@linaro.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=fleischermarius@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterx@redhat.com \
    --cc=peterz@infradead.org \
    --cc=riel@surriel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=wang1315768607@163.com \
    --cc=x86@kernel.org \
    --cc=xrivendell7@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox