From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Senozhatsky Subject: Re: [PATCH] libata: fixup oops in ata_eh_link_report() Date: Tue, 20 Jan 2015 00:40:42 +0900 Message-ID: <20150119154042.GA971@swordfish> References: <1421668859-4593-1-git-send-email-hare@suse.de> <20150119143738.GA979@swordfish> <54BD1A58.3000708@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-pa0-f42.google.com ([209.85.220.42]:56808 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880AbbASPkI (ORCPT ); Mon, 19 Jan 2015 10:40:08 -0500 Content-Disposition: inline In-Reply-To: <54BD1A58.3000708@suse.de> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Hannes Reinecke Cc: Sergey Senozhatsky , Tejun Heo , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org 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 > >> --- > >> 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_li= nk *link) > >> for (tag =3D 0; tag < ATA_MAX_QUEUE; tag++) { > >> struct ata_queued_cmd *qc =3D __ata_qc_from_tag(ap, tag); > >> struct ata_taskfile *cmd =3D &qc->tf, *res =3D &qc->result_tf; > >> - const u8 *cdb =3D qc->cdb; > >> - size_t cdb_len =3D qc->dev->cdb_len; > >> char data_buf[20] =3D ""; > >> char cdb_buf[70] =3D ""; > >> =20 > >> @@ -2510,6 +2508,9 @@ static void ata_eh_link_report(struct ata_li= nk *link) > >> } > >> =20 > >> if (ata_is_atapi(qc->tf.protocol)) { > >> + const u8 *cdb =3D qc->cdb; > >> + size_t cdb_len =3D qd->dev->cdb_len; > >=20 > > I think, it supposed to be qc, not qd. > >=20 > Bzzt. >=20 > Of course. >=20 > I'll be redoing the patch, and will be adding the original commit id > as indicated by Tejun. Reported-and-tested-by: Sergey Senozhatsky -ss > Cheers, >=20 > Hannes > --=20 > Dr. Hannes Reinecke zSeries & Storage > hare@suse.de +49 911 74053 688 > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N=FCrnberg > GF: F. Imend=F6rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton > HRB 21284 (AG N=FCrnberg) >=20