linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	akpm@linux-foundation.org, david@redhat.com, osalvador@suse.de
Subject: Re: [PATCH 2/2] mm/memory_hotplug: remove head page reference in scan_movable_pages()
Date: Mon, 23 Jan 2023 20:39:16 +0000	[thread overview]
Message-ID: <Y87wdBlxBrYjzADJ@casper.infradead.org> (raw)
In-Reply-To: <20230123202347.317065-2-sidhartha.kumar@oracle.com>

On Mon, Jan 23, 2023 at 12:23:47PM -0800, Sidhartha Kumar wrote:
> -		if (!PageHuge(page))
> +		folio = page_folio(page);
> +		if (!folio_test_hugetlb(folio))
>  			continue;
> -		head = compound_head(page);
>  		/*
>  		 * This test is racy as we hold no reference or lock.  The
>  		 * hugetlb page could have been free'ed and head is no longer

Assuming the comment is correct, this patch is also unsafe.



  reply	other threads:[~2023-01-23 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 20:23 [PATCH 1/2] mm/memory_hotplug: remove head page reference in do_migrate_range Sidhartha Kumar
2023-01-23 20:23 ` [PATCH 2/2] mm/memory_hotplug: remove head page reference in scan_movable_pages() Sidhartha Kumar
2023-01-23 20:39   ` Matthew Wilcox [this message]
2023-01-23 20:37 ` [PATCH 1/2] mm/memory_hotplug: remove head page reference in do_migrate_range Matthew Wilcox
2023-01-23 21:08   ` Sidhartha Kumar
2023-01-24  2:32     ` Matthew Wilcox
2023-01-24 10:17   ` David Hildenbrand

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=Y87wdBlxBrYjzADJ@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=sidhartha.kumar@oracle.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