On Thu 30 Nov 08:46 PST 2017, Loic Pallardy wrote: > +static int rproc_release_carveout(struct rproc *rproc, struct rproc_mem_entry *mem) > +{ > + struct device *dev = &rproc->dev; > + > + /* clean up carveout allocations */ > + dma_free_coherent(dev->parent, mem->len, mem->va, mem->dma); > + list_del(&mem->node); The core is responsible for putting the node on a list, so let the cleanup take if off the list. > + kfree(mem); > + return 0; > +} > + [..] > @@ -319,12 +322,11 @@ struct rproc_mem_entry { > dma_addr_t dma; > int len; > u32 da; > + int (*release)(struct rproc *rproc, struct rproc_mem_entry *mem); The placement here seems random, please move it last in the struct. > void *priv; > struct list_head node; > }; > Regards, Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-remoteproc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html