28 lines
901 B
Diff
28 lines
901 B
Diff
|
|
From 3044fc0bd953faf71bfa6ebd98f2084f6ae1772b Mon Sep 17 00:00:00 2001
|
||
|
|
From: Martin Wilck <mwilck@suse.com>
|
||
|
|
Date: Tue, 8 Jan 2019 23:54:04 +0100
|
||
|
|
Subject: [PATCH] libmultipath(coverity): fix int overflow in
|
||
|
|
sysfs_set_scsi_tmo
|
||
|
|
|
||
|
|
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||
|
|
---
|
||
|
|
libmultipath/discovery.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||
|
|
index 3fd79a36..1748eebb 100644
|
||
|
|
--- a/libmultipath/discovery.c
|
||
|
|
+++ b/libmultipath/discovery.c
|
||
|
|
@@ -711,7 +711,7 @@ sysfs_set_scsi_tmo (struct multipath *mpp, int checkint)
|
||
|
|
int dev_loss_tmo = mpp->dev_loss;
|
||
|
|
|
||
|
|
if (mpp->no_path_retry > 0) {
|
||
|
|
- uint64_t no_path_retry_tmo = mpp->no_path_retry * checkint;
|
||
|
|
+ uint64_t no_path_retry_tmo = (uint64_t)mpp->no_path_retry * checkint;
|
||
|
|
|
||
|
|
if (no_path_retry_tmo > MAX_DEV_LOSS_TMO)
|
||
|
|
no_path_retry_tmo = MAX_DEV_LOSS_TMO;
|
||
|
|
--
|
||
|
|
2.11.0
|
||
|
|
|