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] [day] [month] [year] [list]
Message-ID: <20150119154042.GA971@swordfish>
Date:	Tue, 20 Jan 2015 00:40:42 +0900
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Hannes Reinecke <hare@...e.de>
Cc:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	Tejun Heo <tj@...nel.org>, linux-ide@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] libata: fixup oops in ata_eh_link_report()

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@...e.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@...il.com>

	-ss

> Cheers,
> 
> Hannes
> -- 
> Dr. Hannes Reinecke		               zSeries & Storage
> hare@...e.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)
> 
--
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