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]
Date:	Tue, 12 May 2009 18:38:40 +0400
From:	Sergei Shtylyov <sshtylyov@...mvista.com>
To:	Borislav Petkov <petkovbb@...glemail.com>
Cc:	bzolnier@...il.com, linux-ide@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/14] ide-atapi: switch to rq->resid_len

Hello.

Borislav Petkov wrote:

> Now that we have rq->resid_len, use it to account partial completion
> amount during the lifetime of an rq, decrementing it on each successful
> transfer. As a result, get rid of now unused pc->xferred.

> While at it, remove noisy debug call in ide_prep_sense.

> Signed-off-by: Borislav Petkov <petkovbb@...il.com>

> diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
> index cacffd4..1f2af8b 100644
> --- a/drivers/ide/ide-atapi.c
> +++ b/drivers/ide/ide-atapi.c

[...]

> @@ -633,8 +631,6 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
>  	} else {
>  		pc = drive->pc;
>  
> -		/* We haven't transferred any data yet */
> -		pc->xferred = 0;
>  
>  		valid_tf = IDE_VALID_DEVICE;
>  		bytes = blk_rq_bytes(rq);

    You forgot to kill the empty line too...

> @@ -643,6 +639,9 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
>  						     : min_t(unsigned int,
>  							     bytes, 63 * 1024));
>  
> +		/* We haven't transferred any data yet */
> +		rq->resid_len = bcount;
> +
>  		if (pc->flags & PC_FLAG_DMA_ERROR) {
>  			pc->flags &= ~PC_FLAG_DMA_ERROR;
>  			ide_dma_off(drive);

MBR, Sergei
--
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