]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
scsi: qla2xxx: fix invalid DMA access after command aborts in PCI device remove
authorMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Mon, 7 Nov 2016 19:53:31 +0000 (17:53 -0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 9 Nov 2016 00:13:52 +0000 (19:13 -0500)
commit1535aa75a3d8320374f82d198e3900d5b0969d7e
treefff8c181111aadce7ac8ccc08b1e52b1a38cd339
parent04dfaa53a0b6e66b328a5bc549e3af8f8b6eac02
scsi: qla2xxx: fix invalid DMA access after command aborts in PCI device remove

If a command is aborted in the kernel but not in the adapter, it might be
considered complete and its DMA memory released, but it is still alive in
the adapter, which will trigger an invalid DMA access upon its completion
(in the DMA operations to deliver the command response to the driver).

On powerpc platforms with IOMMU/EEH capabilities, the problem is observed
during PCI device removal with ongoing IO requests -- which might trigger
an EEH event very often, pointing to a 'TCE Request Page Access Error'.

In that path, which is qla2x00_remove_one(), the commands are aborted in
qla2x00_abort_all_cmds(), which does not perform an abort in the adapter
as is done in qla2xxx_eh_abort() for example.

So, this patch changes qla2x00_abort_all_cmds() to abort commands in the
adapter too, with a call to qla2xxx_eh_abort(), which already implements
all the logic to submit abort requests and handle responses.

Reported-by: Naresh Bannoth <nbannoth@in.ibm.com>
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_os.c