msm_iommu_pagetable_prealloc_allocate, was: Re: [PATCH] mm/slab: improve kmem_cache_alloc_bulk
Christoph Hellwig <[email protected]>
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.bpf,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.netdev,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
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.