Re: [PATCH 0/4] KVM: s390: replace page allocator calls with kzalloc()
From: Claudio Imbrenda
Date: Thu Sep 03 2026 - 09:39:16 EST
On Thu, 3 Sep 2026 11:04:44 +0300
Mike Rapoport <rppt@xxxxxxxxxx> wrote:
> Hi Claudio,
>
> On Wed, Sep 02, 2026 at 04:53:15PM +0200, Claudio Imbrenda wrote:
> > On Wed, 2 Sep 2026 16:17:03 +0300
> > Mike Rapoport <rppt@xxxxxxxxxx> wrote:
> >
> > > On Wed, Sep 02, 2026 at 01:06:12PM +0200, Claudio Imbrenda wrote:
> > > > On Wed, 02 Sep 2026 09:15:12 +0300
> > > > "Mike Rapoport (Microsoft)" <rppt@xxxxxxxxxx> wrote:
> > > >
> > > > > This is a (small) part of larger work of replacing page allocator calls
> > > > > with kmalloc.
> > > >
> > > > I have some objections to this series, but not because of what you are
> > > > trying to do (which is actually nice).
> > > >
> > > > I understand that you probably wanted to touch as little code as
> > > > possible,
> > >
> > > Yep :)
> > >
> > > > but now since you're rewriting the allocations to use
> > > > kmalloc.... I'd like them to be converted to use the __free(kvmalloc)
> > >
> > > You mean __free(kfree)? Sure, I can look into it.
> >
> > yep :)
>
> Well, I looked :)
>
> The only place where __free(kfree) is completely safe is handle_sthyi().
>
> In all the other functions using __free(kfree) creates a mix of of goto
> and cleanup helpers and cleanup docs advise against mixing them:
>
> https://docs.kernel.org/core-api/cleanup.html
>
> The cleanup paths are quite involved in these functions so using
it looked trivial when I gave it a cursory glance, hence the reason of
my original request, but...
> __free(kfree) there is really not trivial.
... yeah, it's actually not trivial at all.
maybe refactor the first patch, and leave the rest as it is :)