lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0811051149500.2187-100000@iolanthe.rowland.org>
Date:	Wed, 5 Nov 2008 11:51:41 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Luciano Rocha <luciano@...otux.com>
cc:	James Bottomley <James.Bottomley@...senPartnership.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Linux-Kernel <linux-kernel@...r.kernel.org>,
	USB list <linux-usb@...r.kernel.org>,
	SCSI development list <linux-scsi@...r.kernel.org>
Subject: Re: usb hdd problems with 2.6.27.2

On Wed, 5 Nov 2008, Luciano Rocha wrote:

> > Please rerun the A+B and A+B+C tests, but this time using the B' patch
> > below instead of B.
> 
> New test data in the bugzilla.

Sorry, dumb mistake on my part.  B'' is below.  It is the same as B' 
except for one character.

Alan Stern



Index: 2.6.27.4/drivers/scsi/scsi_lib.c
===================================================================
--- 2.6.27.4.orig/drivers/scsi/scsi_lib.c
+++ 2.6.27.4/drivers/scsi/scsi_lib.c
@@ -611,6 +611,11 @@ static void scsi_requeue_command(struct 
 	struct request *req = cmd->request;
 	unsigned long flags;
 
+	if (--req->retries < 0) {
+		blk_end_request(req, -EIO, blk_rq_bytes(req));
+		scsi_next_command(cmd);
+		return;
+	}
 	scsi_unprep_request(req);
 	spin_lock_irqsave(q->queue_lock, flags);
 	blk_requeue_request(q, req);
@@ -690,6 +695,8 @@ static struct scsi_cmnd *scsi_end_reques
 				 * leftovers in the front of the
 				 * queue, and goose the queue again.
 				 */
+				if (bytes > 0)		/* Made progress */
+					++req->retries;
 				scsi_requeue_command(q, cmd);
 				cmd = NULL;
 			}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ