Messages in this thread | | | Subject | Re: [PATCH v5 06/11] powerpc/pseries/iommu: Add ddw_property_create() and refactor enable_ddw() | From | Leonardo Brás <> | Date | Tue, 17 Aug 2021 02:59:14 -0300 |
| |
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); > >
| |