summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-07-22 12:20:38 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2019-07-23 05:05:48 +0300
commit1b5d9a6e98350e0713b4faa1b04e8f239f63b581 (patch)
tree8433fa141ffb58e7d4343a1d18d4b3da9d1e3a05 /tools/perf/scripts/python/export-to-postgresql.py
parente70bdd81bfe230a1044eaa49f7d9c9450178d635 (diff)
downloadlinux-1b5d9a6e98350e0713b4faa1b04e8f239f63b581.tar.xz
scsi: core: fix the dma_max_mapping_size call
We should only call dma_max_mapping_size for devices that have a DMA mask set, otherwise we can run into a NULL pointer dereference that will crash the system. Also we need to do right shift to get the sectors from the size in bytes, not a left shift. Fixes: bdd17bdef7d8 ("scsi: core: take the DMA max mapping size into account") Reported-by: Bart Van Assche <bvanassche@acm.org> Reported-by: Ming Lei <tom.leiming@gmail.com> Tested-by: Guilherme G. Piccoli <gpiccoli@canonical.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions