summaryrefslogtreecommitdiff
path: root/drivers/dma/dw-axi-dmac
diff options
context:
space:
mode:
authorNikita Shubin <n.shubin@yadro.com>2024-05-28 09:09:25 +0300
committerVinod Koul <vkoul@kernel.org>2024-06-11 20:58:41 +0300
commit29b7cd255f3628e0d65be33a939d8b5bba10aa62 (patch)
tree01aa6661757114f95afba4afbf43ebc7ab6bef75 /drivers/dma/dw-axi-dmac
parentf0dc9fda2e0ee9e01496c2f5aca3a831131fad79 (diff)
downloadlinux-29b7cd255f3628e0d65be33a939d8b5bba10aa62.tar.xz
dmaengine: ioatdma: Fix kmemleak in ioat_pci_probe()
If probing fails we end up with leaking ioatdma_device and each allocated channel. Following kmemleak easy to reproduce by injecting an error in ioat_alloc_chan_resources() when doing ioat_dma_self_test(). unreferenced object 0xffff888014ad5800 (size 1024): [..] [<ffffffff827692ca>] kmemleak_alloc+0x4a/0x80 [<ffffffff81430600>] kmalloc_trace+0x270/0x2f0 [<ffffffffa000b7d1>] ioat_pci_probe+0xc1/0x1c0 [ioatdma] [..] repeated for each ioatdma channel: unreferenced object 0xffff8880148e5c00 (size 512): [..] [<ffffffff827692ca>] kmemleak_alloc+0x4a/0x80 [<ffffffff81430600>] kmalloc_trace+0x270/0x2f0 [<ffffffffa0009641>] ioat_enumerate_channels+0x101/0x2d0 [ioatdma] [<ffffffffa000b266>] ioat3_dma_probe+0x4d6/0x970 [ioatdma] [<ffffffffa000b891>] ioat_pci_probe+0x181/0x1c0 [ioatdma] [..] Fixes: bf453a0a18b2 ("dmaengine: ioat: Support in-use unbind") Signed-off-by: Nikita Shubin <n.shubin@yadro.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20240528-ioatdma-fixes-v2-3-a9f2fbe26ab1@yadro.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/dw-axi-dmac')
0 files changed, 0 insertions, 0 deletions