linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Usama Arif <usama.arif@linux.dev>
To: Zi Yan <ziy@nvidia.com>
Cc: Usama Arif <usama.arif@linux.dev>,
	linux-mm@kvack.org, David Hildenbrand <david@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-erofs@lists.ozlabs.org, linux-block@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Jason Xing <kernelxing@tencent.com>,
	Yushan Zhou <katrinzhou@tencent.com>,
	"Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Subject: Re: [PATCH v1 01/11] relay: zero page->private when freeing pages
Date: Mon, 23 Feb 2026 06:45:06 -0800	[thread overview]
Message-ID: <20260223144507.3065618-1-usama.arif@linux.dev> (raw)
In-Reply-To: <20260223032641.1859381-2-ziy@nvidia.com>

On Sun, 22 Feb 2026 22:26:31 -0500 Zi Yan <ziy@nvidia.com> wrote:

> This prepares for upcoming page->private checks in page freeing path.
> 
> Signed-off-by: Zi Yan <ziy@nvidia.com>
> Cc: Jason Xing <kernelxing@tencent.com>
> Cc: Yushan Zhou <katrinzhou@tencent.com>
> Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
> ---
>  kernel/relay.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/relay.c b/kernel/relay.c
> index 5c665b729132..d16f9966817f 100644
> --- a/kernel/relay.c
> +++ b/kernel/relay.c
> @@ -131,8 +131,10 @@ static void *relay_alloc_buf(struct rchan_buf *buf, size_t *size)
>  	return mem;
>  
>  depopulate:
> -	for (j = 0; j < i; j++)
> +	for (j = 0; j < i; j++) {
> +		set_page_private(buf->page_array[i], 0);

Hi Zi,

Should the index into page_array be j and not i over here?

>  		__free_page(buf->page_array[j]);
> +	}
>  	relay_free_page_array(buf->page_array);
>  	return NULL;
>  }
> @@ -196,8 +198,10 @@ static void relay_destroy_buf(struct rchan_buf *buf)
>  
>  	if (likely(buf->start)) {
>  		vunmap(buf->start);
> -		for (i = 0; i < buf->page_count; i++)
> +		for (i = 0; i < buf->page_count; i++) {
> +			set_page_private(buf->page_array[i], 0);
>  			__free_page(buf->page_array[i]);
> +		}
>  		relay_free_page_array(buf->page_array);
>  	}
>  	*per_cpu_ptr(chan->buf, buf->cpu) = NULL;
> -- 
> 2.51.0
> 
> 


  reply	other threads:[~2026-02-23 14:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23  3:26 [PATCH v1 00/11] Zero " Zi Yan
2026-02-23  3:26 ` [PATCH v1 01/11] relay: zero " Zi Yan
2026-02-23 14:45   ` Usama Arif [this message]
2026-02-23  3:26 ` [PATCH v1 02/11] mm/slub: " Zi Yan
2026-02-23  3:26 ` [PATCH v1 03/11] drm/ttm: " Zi Yan
2026-02-23 10:43   ` Christian König
2026-02-23  3:26 ` [PATCH v1 04/11] blk-mq: " Zi Yan
2026-02-23  3:26 ` [PATCH v1 05/11] watch_queue: " Zi Yan
2026-02-23  3:26 ` [PATCH v1 06/11] binder: " Zi Yan
2026-02-23  3:26 ` [PATCH v1 07/11] null_blk: " Zi Yan
2026-02-23  3:26 ` [PATCH v1 08/11] percpu: " Zi Yan
2026-02-23  3:26 ` [PATCH v1 09/11] erofs: " Zi Yan
2026-02-23  3:26 ` [PATCH v1 10/11] mm/huge_memory: add page->private check back in __split_folio_to_order() Zi Yan
2026-02-23  3:26 ` [PATCH v1 11/11] mm/page_alloc: check page->private upon page free Zi Yan
2026-02-23  4:28 ` [PATCH v1 00/11] Zero page->private when freeing pages Matthew Wilcox
2026-02-23  9:36   ` David Hildenbrand (Arm)
2026-02-23  8:40 ` [syzbot ci] " syzbot ci
2026-02-23 13:46 ` [PATCH v1 00/11] " Christoph Hellwig
2026-02-23 14:00   ` Zi Yan
2026-02-23 14:03     ` Christoph Hellwig
2026-02-23 14:11       ` Zi Yan
2026-02-23 14:06   ` Christian König
2026-02-23 14:14     ` David Hildenbrand (Arm)
2026-02-23 15:22       ` Christian König
2026-02-23 15:27         ` David Hildenbrand (Arm)

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=20260223144507.3065618-1-usama.arif@linux.dev \
    --to=usama.arif@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=katrinzhou@tencent.com \
    --cc=kernelxing@tencent.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhiramat@kernel.org \
    --cc=ziy@nvidia.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