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] [thread-next>] [day] [month] [year] [list]
Message-Id: <200809152019.02395.bzolnier@gmail.com>
Date:	Mon, 15 Sep 2008 20:19:01 +0200
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	Borislav Petkov <petkovbb@...glemail.com>
Cc:	linux-kernel@...r.kernel.org, linux-ide@...r.kernel.org,
	Borislav Petkov <petkovbb@...il.com>
Subject: Re: [PATCH 06/10] ide-atapi: add a DEV_IS_IDECD macro

On Sunday 14 September 2008 13:35:54 Borislav Petkov wrote:
> This is a short-term-use one and will be removed later - it is added to solely
> improve readability.
> 
> There should be no functional change resulting from this patch.
> 
> Signed-off-by: Borislav Petkov <petkovbb@...il.com>
> ---
>  drivers/ide/ide-atapi.c |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
> index 7045d34..e1fa52d 100644
> --- a/drivers/ide/ide-atapi.c
> +++ b/drivers/ide/ide-atapi.c
> @@ -477,6 +477,9 @@ static int ide_delayed_transfer_pc(ide_drive_t *drive)
>  	return WAIT_FLOPPY_CMD;
>  }
>  
> +#define DEV_IS_IDECD(drive)	\
> +		(drive->media == ide_cdrom || drive->media == ide_optical)
> +

This needs to check for drive->scsi or the subtle bugs will happen.

Also why not use dev_is_idecd() static inline function instead?
--
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