summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorBodo Stroesser <bstroesser@ts.fujitsu.com>2020-06-29 12:37:56 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-03 12:29:16 +0300
commitd7570375e9f2265c5b792bc9b8cd90ca0fb56d8a (patch)
treed674e415b84abd89ff51c63d6ab55d236d10fead /drivers/mfd
parent4b0badbe3c9166f9f5eb815f9934c7affc9a3c73 (diff)
downloadlinux-d7570375e9f2265c5b792bc9b8cd90ca0fb56d8a.tar.xz
scsi: target: tcmu: Fix crash on ARM during cmd completion
[ Upstream commit 5a0c256d96f020e4771f6fd5524b80f89a2d3132 ] If tcmu_handle_completions() has to process a padding shorter than sizeof(struct tcmu_cmd_entry), the current call to tcmu_flush_dcache_range() with sizeof(struct tcmu_cmd_entry) as length param is wrong and causes crashes on e.g. ARM, because tcmu_flush_dcache_range() in this case calls flush_dcache_page(vmalloc_to_page(start)); with start being an invalid address above the end of the vmalloc'ed area. The fix is to use the minimum of remaining ring space and sizeof(struct tcmu_cmd_entry) as the length param. The patch was tested on kernel 4.19.118. See https://bugzilla.kernel.org/show_bug.cgi?id=208045#c10 Link: https://lore.kernel.org/r/20200629093756.8947-1-bstroesser@ts.fujitsu.com Tested-by: JiangYu <lnsyyj@hotmail.com> Acked-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/mfd')
0 files changed, 0 insertions, 0 deletions