]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dmaengine: idxd: fix dma device lifetime
authorDave Jiang <dave.jiang@intel.com>
Thu, 15 Apr 2021 23:37:10 +0000 (16:37 -0700)
committerVinod Koul <vkoul@kernel.org>
Tue, 20 Apr 2021 11:13:52 +0000 (16:43 +0530)
commit397862855619271296e46d10f7dfa7bafe71eb81
tree14535be560b943d0ba47d788fbfcc303395e6cd5
parent63606522b9c28c2950cb9c418f0ba2270009d4ad
dmaengine: idxd: fix dma device lifetime

The devm managed lifetime is incompatible with 'struct device' objects that
resides in idxd context. This is one of the series that clean up the idxd
driver 'struct device' lifetime. Remove embedding of dma_device and dma_chan
in idxd since it's not the only interface that idxd will use. The freeing of
the dma_device will be managed by the ->release() function.

Reported-by: Jason Gunthorpe <jgg@nvidia.com>
Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/161852983001.2203940.14817017492384561719.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/device.c
drivers/dma/idxd/dma.c
drivers/dma/idxd/idxd.h