- scsi_ioctl-sg_io-timeout-conversion-fix.patch removed from -mm tree

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

 



The patch titled
     scsi_ioctl: sg_io timeout conversion fix
has been removed from the -mm tree.  Its filename was
     scsi_ioctl-sg_io-timeout-conversion-fix.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: scsi_ioctl: sg_io timeout conversion fix
From: Mike Christie <michaelc@xxxxxxxxxxx>

The recent conversion to jiffies_to_msecs() was wrong - it should have been to
msecs_to_jiffies().  Include the overflow check which sg.c has.

Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 block/scsi_ioctl.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN block/scsi_ioctl.c~scsi_ioctl-sg_io-timeout-conversion-fix block/scsi_ioctl.c
--- a/block/scsi_ioctl.c~scsi_ioctl-sg_io-timeout-conversion-fix
+++ a/block/scsi_ioctl.c
@@ -224,6 +224,7 @@ static int sg_io(struct file *file, requ
 		struct gendisk *bd_disk, struct sg_io_hdr *hdr)
 {
 	unsigned long start_time;
+	unsigned long timeout;
 	int writing = 0, ret = 0;
 	struct request *rq;
 	char sense[SCSI_SENSE_BUFFERSIZE];
@@ -271,7 +272,8 @@ static int sg_io(struct file *file, requ
 
 	rq->cmd_type = REQ_TYPE_BLOCK_PC;
 
-	rq->timeout = jiffies_to_msecs(hdr->timeout);
+	timeout = msecs_to_jiffies(hdr->timeout);
+	rq->timeout = (timeout < INT_MAX) ? timeout : INT_MAX;
 	if (!rq->timeout)
 		rq->timeout = q->sg_timeout;
 	if (!rq->timeout)
_

Patches currently in -mm which might be from michaelc@xxxxxxxxxxx are

origin.patch

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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux