android_kernel_oneplus_msm8998/drivers/scsi/bnx2fc
Colin Ian King f80a35fcb9 scsi: bnx2fc: fix incorrect cast to u64 on shift operation
[ Upstream commit d0c0d902339249c75da85fd9257a86cbb98dfaa5 ]

Currently an int is being shifted and the result is being cast to a u64
which leads to undefined behaviour if the shift is more than 31 bits. Fix
this by casting the integer value 1 to u64 before the shift operation.

Addresses-Coverity: ("Bad shift operation")
Fixes: 7b59476912 ("[SCSI] bnx2fc: Handle REC_TOV error code from firmware")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-22 08:18:23 +02:00
..
57xx_hsi_bnx2fc.h
bnx2fc.h
bnx2fc_constants.h
bnx2fc_debug.c
bnx2fc_debug.h
bnx2fc_els.c
bnx2fc_fcoe.c scsi: bnx2fc: Fix NULL dereference in error handling 2019-01-13 10:05:31 +01:00
bnx2fc_hwi.c scsi: bnx2fc: fix incorrect cast to u64 on shift operation 2019-06-22 08:18:23 +02:00
bnx2fc_io.c
bnx2fc_tgt.c
Kconfig
Makefile