All of lore.kernel.org
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: "Liam R. Howlett (Google)" <liam@infradead.org>
Cc: SJ Park <sj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	Matthew Wilcox <willy@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools/testing/shared: catch a failed posix_memalign()
Date: Tue, 20 Oct 2026 17:12:07 -0700	[thread overview]
Message-ID: <20261021001208.93708-1-sj@kernel.org> (raw)
In-Reply-To: <20261020033128.1934349-1-liam@infradead.org>

On Mon, 19 Oct 2026 23:31:28 -0400 "Liam R. Howlett (Google)" <liam@infradead.org> wrote:

> posix_memalign() returns zero or a positive error number and never sets
> errno, so the checks for a negative return in kmem_cache_alloc_lru() and
> kmem_cache_alloc_bulk() is not possible.  A failed aligned allocation
> carries on with the pointer unset, into the constructor or the memset().
> 
> Test for any non-zero return.

Nice catch, makes sense to me.

> 
> Signed-off-by: Liam R. Howlett (Google) <liam@infradead.org>

Reviewed-by: SJ Park <sj@kernel.org>


Thanks,
SJ

[...]


      parent reply	other threads:[~2026-10-21  0:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20  3:31 [PATCH] tools/testing/shared: catch a failed posix_memalign() Liam R. Howlett (Google)
2026-10-20  9:05 ` Lorenzo Stoakes (ARM)
2026-10-20 15:10 ` Vishal Moola (Fractile)
2026-10-21  0:12 ` SJ Park [this message]

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=20261021001208.93708-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.