On Wed, 2015-30-09 at 01:58:07 UTC, Andrew Donnellan wrote: > When a context is created via the kernel API, ctx->mapping is allocated > within the kernel and thus needs to be freed when the context is freed. > reclaim_ctx() attempts to do this for contexts with the ctx->kernelapi flag > set, but afu_release() (which can be called from the kernel API through > cxl_fd_release()) sets ctx->mapping to NULL before calling > cxl_context_free() to free the context. > > Add a check to afu_release() so that the mappings in contexts created via > the kernel API are left alone so reclaim_ctx() can free them. > > Reported-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com> > Fixes: 6f7f0b3df6d4 ("cxl: Add AFU virtual PHB and kernel API") > Signed-off-by: Andrew Donnellan <andrew.donnel...@au1.ibm.com> > Acked-by: Ian Munsie <imun...@au1.ibm.com> > Reviewed-by: Matthew R. Ochs <mro...@linux.vnet.ibm.com>
Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/5f81b95fe2a2de4ec51d46ff cheers _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev