]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qla2xxx: Fix DMA unmap leak
authorHimanshu Madhani <hmadhani@marvell.com>
Fri, 26 Jul 2019 16:07:26 +0000 (09:07 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 30 Jul 2019 20:12:01 +0000 (16:12 -0400)
commitb89b07448f2cc405c99996da9936582ba7a53db4
tree3fe58c55079a6a00d8a1059eed936dc3390c01a2
parentba99ebd93fd6fc85d65b8694cd79223bd61b0454
scsi: qla2xxx: Fix DMA unmap leak

With debug kernel we see following wanings indicating memory leak.

[28809.523959] WARNING: CPU: 3 PID: 6790 at lib/dma-debug.c:978
dma_debug_device_change+0x166/0x1d0
[28809.523964] pci 0000:0c:00.6: DMA-API: device driver has pending DMA
allocations while released from device [count=5]
[28809.523964] One of leaked entries details: [device
address=0x00000002aefe4000] [size=8208 bytes] [mapped with DMA_BIDIRECTIONAL]
[mapped as coherent]

Fix this by unmapping DMA memory.

Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_bsg.c