[PATCH kernel v8 21/31] powerpc/iommu: Split iommu_free_table into 2 helpers

David Gibson david at gibson.dropbear.id.au
Mon Apr 20 12:51:34 AEST 2015

On Fri, Apr 17, 2015 at 02:29:23AM +1000, Alexey Kardashevskiy wrote:
> On 04/16/2015 04:46 PM, David Gibson wrote:
> >On Fri, Apr 10, 2015 at 04:31:03PM +1000, Alexey Kardashevskiy wrote:
> >>The iommu_free_table helper release memory it is using (the TCE table and
> >>@it_map) and release the iommu_table struct as well. We might not want
> >>the very last step as we store iommu_table in parent structures.
> >
> >Yeah, as I commented on the earlier patch, freeing the surrounding
> >group from a function taking just the individual table is wrong.
> This is iommu tables created by the old code which stores these iommu_table
> struct pointers in device nodes. I believe there is a plan to get rid of
> iommu tables there and when this is done, this workaround will be
> gone.

Um.. what?  The connection of where pointers are stored to an
obvious error with object lifetime handling is not at all obvious.

David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20150420/2b691368/attachment-0001.sig>

More information about the Linuxppc-dev mailing list