Thread (74 messages) 74 messages, 3 authors, 2015-04-22

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

From: David Gibson <hidden>
Date: 2015-04-20 06:02:56
Also in: lkml

On Fri, Apr 17, 2015 at 02:29:23AM +1000, Alexey Kardashevskiy wrote:
On 04/16/2015 04:46 PM, David Gibson wrote:
quoted
On Fri, Apr 10, 2015 at 04:31:03PM +1000, Alexey Kardashevskiy wrote:
quoted
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_!
http://www.ozlabs.org/~dgibson

Attachments

  • (unnamed) [application/pgp-signature] 819 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help