* [PATCH] libata: fixup oops in ata_eh_link_report() @ 2015-01-19 12:00 Hannes Reinecke 2015-01-19 14:23 ` Tejun Heo 2015-01-19 14:37 ` Sergey Senozhatsky 0 siblings, 2 replies; 5+ messages in thread From: Hannes Reinecke @ 2015-01-19 12:00 UTC (permalink / raw) To: Tejun Heo; +Cc: linux-ide, linux-kernel, Sergey Senozhatsky, Hannes Reinecke We should only try to evaluate the cdb if this is an ATAPI device, for any other device the 'cdb' field and the cdb_len has no meaning. Signed-off-by: Hannes Reinecke <hare@suse.de> --- drivers/ata/libata-eh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 9179f11..584c6ae 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2481,8 +2481,6 @@ static void ata_eh_link_report(struct ata_link *link) for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); struct ata_taskfile *cmd = &qc->tf, *res = &qc->result_tf; - const u8 *cdb = qc->cdb; - size_t cdb_len = qc->dev->cdb_len; char data_buf[20] = ""; char cdb_buf[70] = ""; @@ -2510,6 +2508,9 @@ static void ata_eh_link_report(struct ata_link *link) } if (ata_is_atapi(qc->tf.protocol)) { + const u8 *cdb = qc->cdb; + size_t cdb_len = qd->dev->cdb_len; + if (qc->scsicmd) { cdb = qc->scsicmd->cmnd; cdb_len = qc->scsicmd->cmd_len; -- 1.8.5.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] libata: fixup oops in ata_eh_link_report() 2015-01-19 12:00 [PATCH] libata: fixup oops in ata_eh_link_report() Hannes Reinecke @ 2015-01-19 14:23 ` Tejun Heo 2015-01-19 14:37 ` Sergey Senozhatsky 1 sibling, 0 replies; 5+ messages in thread From: Tejun Heo @ 2015-01-19 14:23 UTC (permalink / raw) To: Hannes Reinecke; +Cc: linux-ide, linux-kernel, Sergey Senozhatsky On Mon, Jan 19, 2015 at 01:00:59PM +0100, Hannes Reinecke wrote: > We should only try to evaluate the cdb if this is an ATAPI > device, for any other device the 'cdb' field and the cdb_len > has no meaning. > > Signed-off-by: Hannes Reinecke <hare@suse.de> Acked-by: Tejun Heo <tj@kernel.org> But, can you please refer to the commit which broke it and what the result of the breakage was? I suppose this should go through the same tree that the offending commit went through, right? Thanks. -- tejun ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libata: fixup oops in ata_eh_link_report() 2015-01-19 12:00 [PATCH] libata: fixup oops in ata_eh_link_report() Hannes Reinecke 2015-01-19 14:23 ` Tejun Heo @ 2015-01-19 14:37 ` Sergey Senozhatsky 2015-01-19 14:53 ` Hannes Reinecke 1 sibling, 1 reply; 5+ messages in thread From: Sergey Senozhatsky @ 2015-01-19 14:37 UTC (permalink / raw) To: Hannes Reinecke; +Cc: Tejun Heo, linux-ide, linux-kernel, Sergey Senozhatsky On (01/19/15 13:00), Hannes Reinecke wrote: > Date: Mon, 19 Jan 2015 13:00:59 +0100 > From: Hannes Reinecke <hare@suse.de> > To: Tejun Heo <tj@kernel.org> > Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey > Senozhatsky <sergey.senozhatsky@gmail.com>, Hannes Reinecke <hare@suse.de> > Subject: [PATCH] libata: fixup oops in ata_eh_link_report() > X-Mailer: git-send-email 1.8.5.2 > > We should only try to evaluate the cdb if this is an ATAPI > device, for any other device the 'cdb' field and the cdb_len > has no meaning. > > Signed-off-by: Hannes Reinecke <hare@suse.de> > --- > drivers/ata/libata-eh.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c > index 9179f11..584c6ae 100644 > --- a/drivers/ata/libata-eh.c > +++ b/drivers/ata/libata-eh.c > @@ -2481,8 +2481,6 @@ static void ata_eh_link_report(struct ata_link *link) > for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { > struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); > struct ata_taskfile *cmd = &qc->tf, *res = &qc->result_tf; > - const u8 *cdb = qc->cdb; > - size_t cdb_len = qc->dev->cdb_len; > char data_buf[20] = ""; > char cdb_buf[70] = ""; > > @@ -2510,6 +2508,9 @@ static void ata_eh_link_report(struct ata_link *link) > } > > if (ata_is_atapi(qc->tf.protocol)) { > + const u8 *cdb = qc->cdb; > + size_t cdb_len = qd->dev->cdb_len; I think, it supposed to be qc, not qd. -ss > if (qc->scsicmd) { > cdb = qc->scsicmd->cmnd; > cdb_len = qc->scsicmd->cmd_len; > -- > 1.8.5.2 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libata: fixup oops in ata_eh_link_report() 2015-01-19 14:37 ` Sergey Senozhatsky @ 2015-01-19 14:53 ` Hannes Reinecke 2015-01-19 15:40 ` Sergey Senozhatsky 0 siblings, 1 reply; 5+ messages in thread From: Hannes Reinecke @ 2015-01-19 14:53 UTC (permalink / raw) To: Sergey Senozhatsky; +Cc: Tejun Heo, linux-ide, linux-kernel On 01/19/2015 03:37 PM, Sergey Senozhatsky wrote: > On (01/19/15 13:00), Hannes Reinecke wrote: >> Date: Mon, 19 Jan 2015 13:00:59 +0100 >> From: Hannes Reinecke <hare@suse.de> >> To: Tejun Heo <tj@kernel.org> >> Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey >> Senozhatsky <sergey.senozhatsky@gmail.com>, Hannes Reinecke <hare@suse.de> >> Subject: [PATCH] libata: fixup oops in ata_eh_link_report() >> X-Mailer: git-send-email 1.8.5.2 >> >> We should only try to evaluate the cdb if this is an ATAPI >> device, for any other device the 'cdb' field and the cdb_len >> has no meaning. >> >> Signed-off-by: Hannes Reinecke <hare@suse.de> >> --- >> drivers/ata/libata-eh.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c >> index 9179f11..584c6ae 100644 >> --- a/drivers/ata/libata-eh.c >> +++ b/drivers/ata/libata-eh.c >> @@ -2481,8 +2481,6 @@ static void ata_eh_link_report(struct ata_link *link) >> for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { >> struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); >> struct ata_taskfile *cmd = &qc->tf, *res = &qc->result_tf; >> - const u8 *cdb = qc->cdb; >> - size_t cdb_len = qc->dev->cdb_len; >> char data_buf[20] = ""; >> char cdb_buf[70] = ""; >> >> @@ -2510,6 +2508,9 @@ static void ata_eh_link_report(struct ata_link *link) >> } >> >> if (ata_is_atapi(qc->tf.protocol)) { >> + const u8 *cdb = qc->cdb; >> + size_t cdb_len = qd->dev->cdb_len; > > I think, it supposed to be qc, not qd. > Bzzt. Of course. I'll be redoing the patch, and will be adding the original commit id as indicated by Tejun. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libata: fixup oops in ata_eh_link_report() 2015-01-19 14:53 ` Hannes Reinecke @ 2015-01-19 15:40 ` Sergey Senozhatsky 0 siblings, 0 replies; 5+ messages in thread From: Sergey Senozhatsky @ 2015-01-19 15:40 UTC (permalink / raw) To: Hannes Reinecke; +Cc: Sergey Senozhatsky, Tejun Heo, linux-ide, linux-kernel On (01/19/15 15:53), Hannes Reinecke wrote: > >> We should only try to evaluate the cdb if this is an ATAPI > >> device, for any other device the 'cdb' field and the cdb_len > >> has no meaning. > >> > >> Signed-off-by: Hannes Reinecke <hare@suse.de> > >> --- > >> drivers/ata/libata-eh.c | 5 +++-- > >> 1 file changed, 3 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c > >> index 9179f11..584c6ae 100644 > >> --- a/drivers/ata/libata-eh.c > >> +++ b/drivers/ata/libata-eh.c > >> @@ -2481,8 +2481,6 @@ static void ata_eh_link_report(struct ata_link *link) > >> for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { > >> struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); > >> struct ata_taskfile *cmd = &qc->tf, *res = &qc->result_tf; > >> - const u8 *cdb = qc->cdb; > >> - size_t cdb_len = qc->dev->cdb_len; > >> char data_buf[20] = ""; > >> char cdb_buf[70] = ""; > >> > >> @@ -2510,6 +2508,9 @@ static void ata_eh_link_report(struct ata_link *link) > >> } > >> > >> if (ata_is_atapi(qc->tf.protocol)) { > >> + const u8 *cdb = qc->cdb; > >> + size_t cdb_len = qd->dev->cdb_len; > > > > I think, it supposed to be qc, not qd. > > > Bzzt. > > Of course. > > I'll be redoing the patch, and will be adding the original commit id > as indicated by Tejun. Reported-and-tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> -ss > Cheers, > > Hannes > -- > Dr. Hannes Reinecke zSeries & Storage > hare@suse.de +49 911 74053 688 > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton > HRB 21284 (AG Nürnberg) > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-19 15:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-01-19 12:00 [PATCH] libata: fixup oops in ata_eh_link_report() Hannes Reinecke 2015-01-19 14:23 ` Tejun Heo 2015-01-19 14:37 ` Sergey Senozhatsky 2015-01-19 14:53 ` Hannes Reinecke 2015-01-19 15:40 ` Sergey Senozhatsky
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).