> On Wed, Feb 29, 2012 at 04:04:22PM +0100, Marek Szyprowski wrote:
> > +static int arm_iommu_mmap_attrs(struct device *dev, struct
> vm_area_struct *vma,
> > +               void *cpu_addr, dma_addr_t dma_addr, size_t size,
> > +               struct dma_attrs *attrs)
> > +{
> > +   struct arm_vmregion *c;
> > +
> > +   vma->vm_page_prot = __get_dma_pgprot(attrs, vma-
> >vm_page_prot);
> > +   c = arm_vmregion_find(&consistent_head, (unsigned
> long)cpu_addr);
> 
> What protects this against other insertions/removals from the list?

arm_vmregion_find uses a spin_lock internally before accessing consistent_head.
 So, it is protected.


-KR

--nvpublic


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to