All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Harry Yoo <harry@kernel.org>
Cc: "Christoph Hellwig" <hch@lst.de>,
	"Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Mark Brown" <broonie@kernel.org>, "Hao Li" <hao.li@linux.dev>,
	"Christoph Lameter" <cl@gentwo.org>,
	"David Rientjes" <rientjes@google.com>,
	"Roman Gushchin" <roman.gushchin@linux.dev>,
	"Jesper Dangaard Brouer" <hawk@kernel.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, io-uring@vger.kernel.org,
	kasan-dev@googlegroups.com, bpf@vger.kernel.org,
	netdev@vger.kernel.org,
	"Alexander Lobakin" <aleksander.lobakin@intel.com>,
	"Boris Brezillon" <boris.brezillon@collabora.com>,
	"Ŗob Clark" <robin.clark@oss.qualcomm.com>,
	"Dmitry Baryshkov" <lumag@kernel.org>,
	"Abhinav Kumar" <abhinav.kumar@linux.dev>,
	"Jessica Zhang" <jesszhan0024@gmail.com>,
	"Sean Paul" <sean@poorly.run>,
	"Marijn Suijten" <marijn.suijten@somainline.org>
Subject: msm_iommu_pagetable_prealloc_allocate, was: Re: [PATCH] mm/slab: improve kmem_cache_alloc_bulk
Date: Mon, 1 Jun 2026 09:56:39 +0200	[thread overview]
Message-ID: <20260601075639.GA8193@lst.de> (raw)
In-Reply-To: <5f3ba603-a6ad-4cf2-9a54-aebc10273c59@kernel.org>

On Mon, Jun 01, 2026 at 03:39:06PM +0900, Harry Yoo wrote:
> > Ok, thanks.  The two Sashiko complains also look like they had merrits,
> > but I won't get to looking into them until Monday.
> The review:
> https://sashiko.dev/#/patchset/20260528093437.2519248-2-hch%40lst.de
> 
> So there is a user who might call kmem_cache_alloc_bulk() with size = 0
> (although the comment says @size must be larger than 0!) and
> kmem_cache_alloc_bulk() returning 0 was considered a success in that case.
> 
> Either fixing kmem_cache_alloc_bulk() (and the comment) or fixing the
> user sounds fine to me.
> 
> And yeah freeing an object via kfree() allocated via kvmalloc is a bug...

I think the right fix here is to check p->count somewhere in the msm
code and never get here.  And the kfree/kvfree fix of course.

І.e. nothing to change in this patch, but a headsup for the MSM
maintainers.

  reply	other threads:[~2026-06-01  7:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28  9:34 improve the kmem_cache_alloc_bulk API v2 Christoph Hellwig
2026-05-28  9:34 ` [PATCH] mm/slab: improve kmem_cache_alloc_bulk Christoph Hellwig
2026-05-28 10:12   ` sashiko-bot
2026-05-29 11:54   ` Vlastimil Babka (SUSE)
2026-05-29 13:50     ` Christoph Hellwig
2026-06-01  6:39       ` Harry Yoo
2026-06-01  7:56         ` Christoph Hellwig [this message]
2026-06-01  8:16         ` Vlastimil Babka (SUSE)
2026-06-01 11:38           ` Christoph Hellwig
2026-06-01 12:50             ` Vlastimil Babka (SUSE)
2026-06-01 13:32               ` Rob Clark
2026-06-01 14:39                 ` Rob Clark
2026-06-03  9:17                   ` Vlastimil Babka (SUSE)
2026-06-03 11:13                     ` Rob Clark
2026-06-03 16:22                       ` Vlastimil Babka (SUSE)
2026-06-04  7:10                         ` Harry Yoo
2026-06-04  7:35                           ` Vlastimil Babka (SUSE)
2026-06-04  9:36                             ` Rob Clark
2026-06-01 11:39           ` Harry Yoo

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=20260601075639.GA8193@lst.de \
    --to=hch@lst.de \
    --cc=abhinav.kumar@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=boris.brezillon@collabora.com \
    --cc=bpf@vger.kernel.org \
    --cc=broonie@kernel.org \
    --cc=cl@gentwo.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=hao.li@linux.dev \
    --cc=harry@kernel.org \
    --cc=hawk@kernel.org \
    --cc=io-uring@vger.kernel.org \
    --cc=jesszhan0024@gmail.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=netdev@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=roman.gushchin@linux.dev \
    --cc=sean@poorly.run \
    --cc=vbabka@kernel.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.