All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libata-scsi: Fixup ata_gen_passthru_sense()
@ 2016-10-31 20:06 Hannes Reinecke
  2016-11-01 17:33 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2016-10-31 20:06 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Charles Machalow, linux-ide, Hannes Reinecke, Hannes Reinecke

There's a typo in ata_gen_passthru_sense(), where the first byte
would be overwritten incorrectly later on.

Reported-by: Charles Machalow <csm10495@gmail.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/ata/libata-scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 9cceb4a..c4eb4ae 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1088,7 +1088,7 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
 		desc[1] = tf->command; /* status */
 		desc[2] = tf->device;
 		desc[3] = tf->nsect;
-		desc[0] = 0;
+		desc[7] = 0;
 		if (tf->flags & ATA_TFLAG_LBA48)  {
 			desc[8] |= 0x80;
 			if (tf->hob_nsect)
-- 
2.6.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] libata-scsi: Fixup ata_gen_passthru_sense()
  2016-10-31 20:06 [PATCH] libata-scsi: Fixup ata_gen_passthru_sense() Hannes Reinecke
@ 2016-11-01 17:33 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2016-11-01 17:33 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Charles Machalow, linux-ide, Hannes Reinecke

On Mon, Oct 31, 2016 at 09:06:58PM +0100, Hannes Reinecke wrote:
> There's a typo in ata_gen_passthru_sense(), where the first byte
> would be overwritten incorrectly later on.
> 
> Reported-by: Charles Machalow <csm10495@gmail.com>
> Signed-off-by: Hannes Reinecke <hare@suse.com>

Applied to libata/for-4.9-fixes with stable cc'd.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-01 17:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-31 20:06 [PATCH] libata-scsi: Fixup ata_gen_passthru_sense() Hannes Reinecke
2016-11-01 17:33 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.