[PATCH 1/2 V2] mmc:block : Convert the cmd_timeou_ms to u64 to avoid overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Convert the cmd_timeou_ms to u64 to avoid overflow

Signed-off-by: Jerry Huang <Chang-Ming.Huang@xxxxxxxxxxxxx>
Signed-off-by: Haijun Zhang <Haijun.Zhang@xxxxxxxxxxxxx>
Reviewed-by: Anton Vorontsov <cbouatmailru@xxxxxxxxx>
CC: Chris Ball <cjb@xxxxxxxxxx>
---
 drivers/mmc/card/block.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 21056b9..29887b1 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -469,7 +469,8 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev,
 			 *     mrq.data = NULL;
 			 *     cmd.cmd_timeout = idata->ic.cmd_timeout_ms;
 			 */
-			data.timeout_ns = idata->ic.cmd_timeout_ms * 1000000;
+			data.timeout_ns = (u64)idata->ic.cmd_timeout_ms *
+					1000000;
 		}
 
 		mrq.data = &data;
-- 
1.7.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux