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 Feb 2008 21:17:14 +0100
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	petkovbb@...il.com
Cc:	linux-kernel@...r.kernel.org, linux-ide@...r.kernel.org
Subject: Re: [PATCH] ide-scsi: do non-atomic pc->flags testing

On Tuesday 12 February 2008, Borislav Petkov wrote:
> commit 272976f0f5754707f9e41da315717a6eb8d9d536
> Author: Borislav Petkov <petkovbb@...il.com>
> Date:   Tue Feb 12 16:22:44 2008 +0100
> 
>     ide-scsi: do non-atomic pc->flags testing
> 
>     Signed-off-by: Borislav Petkov <petkovbb@...il.com>
> 
> diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
> index 5ec421c..eb84cdc 100644
> --- a/drivers/scsi/ide-scsi.c
> +++ b/drivers/scsi/ide-scsi.c
> @@ -319,8 +319,10 @@ static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs)
>  		pc = opc;
>  		rq = pc->rq;
>  		pc->scsi_cmd->result = (CHECK_CONDITION << 1) |
> -					((test_bit(PC_TIMEDOUT, &pc->flags)?DID_TIME_OUT:DID_OK) << 16);
> -	} else if (test_bit(PC_TIMEDOUT, &pc->flags)) {
> +					(((pc->flags & PC_TIMEDOUT) ?
> +							  DID_TIME_OUT :
> +							  DID_OK) << 16);
> +	} else if (pc->flags & PC_TIMEDOUT) {

How's about renaming flag defines to PC_FLAG_* at the same time
(like it was done for other ATAPI drivers)?

Otherwise looks good.
--
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