[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cf050db5d37f6e515cd25e26f4e8940960c12d0.camel@gmail.com>
Date: Tue, 17 Aug 2021 02:59:14 -0300
From: Leonardo Brás <leobras.c@...il.com>
To: Frederic Barrat <fbarrat@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Alexey Kardashevskiy <aik@...abs.ru>,
David Gibson <david@...son.dropbear.id.au>,
kernel test robot <lkp@...el.com>,
Nicolin Chen <nicoleotsuka@...il.com>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 06/11] powerpc/pseries/iommu: Add
ddw_property_create() and refactor enable_ddw()
Hello Fred, thanks for this feedback!
On Tue, 2021-07-20 at 19:49 +0200, Frederic Barrat wrote:
>
> > kfree(window);
> >
> > -out_clear_window:
> > - remove_ddw(pdn, true);
> > +out_del_prop:
> > + of_remove_property(pdn, win64);
> >
> > out_free_prop:
> > kfree(win64->name);
> > kfree(win64->value);
> > kfree(win64);
> >
> > +out_remove_win:
> > + remove_ddw(pdn, true);
>
>
> I believe there's a small problem here. We jump directly to
> out_remove_win if allocating the property failed. Yet, the first
> thing
> remove_ddw() does is look for the property. So it will never find it
> and
> the window is never removed by the hypervisor.
>
> Fred
That makes sense, thanks for catching this one!
What I intended here was just removing the DDW, so I think it should be
ok replacing remove_ddw() by a new helper that only does the rtas-call.
I will send a v6 with this change soon.
>
>
> > +
> > out_failed:
> > if (default_win_removed)
> > reset_dma_window(dev, pdn);
> >
Powered by blists - more mailing lists