]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
s390/pci: fix dma address calculation in map_sg
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Mon, 7 Nov 2016 14:06:03 +0000 (15:06 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 17 Nov 2016 06:09:53 +0000 (07:09 +0100)
commit6b7df3ce92ac82ec3f4a2953b6fed77da7b38aaa
tree3ca9763fe01871318555da05b988e81271a09cb3
parent191ce9d1fde84190f18cd3faf0ef8594f442b313
s390/pci: fix dma address calculation in map_sg

__s390_dma_map_sg maps a dma-contiguous area. Although we only map
whole pages we have to take into account that the area doesn't start
or stop at a page boundary because we use the dma address to loop
over the individual sg entries. Failing to do that might lead to an
access of the wrong sg entry.

Fixes: ee877b81c6b9 ("s390/pci_dma: improve map_sg")
Reported-and-tested-by: Christoph Raisch <raisch@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/pci/pci_dma.c