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: <4652C640.3090806@garzik.org>
Date:	Tue, 22 May 2007 06:30:24 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH] CDROM: replace jiffies busyloop with msleep

Thomas Gleixner wrote:
> From: Ingo Molnar <mingo@...e.hu>
> 
> The SJCD driver uses a jiffies busy loop. Replace it with msleep.
> 
> Signed-off-by: Ingo Molnar <mingo@...e.hu>
> Acked-by: Thomas Gleixner <tglx@...utronix.de>
> 
> ---
>  drivers/cdrom/sjcd.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Index: linux-2.6/drivers/cdrom/sjcd.c
> ===================================================================
> --- linux-2.6.orig/drivers/cdrom/sjcd.c
> +++ linux-2.6/drivers/cdrom/sjcd.c
> @@ -69,6 +69,7 @@
>  #include <linux/string.h>
>  #include <linux/major.h>
>  #include <linux/init.h>
> +#include <linux/delay.h>
>  
>  #include <asm/system.h>
>  #include <asm/io.h>
> @@ -1709,12 +1710,11 @@ static int __init sjcd_init(void)
>  	printk(KERN_INFO "SJCD: Resetting: ");
>  	sjcd_send_cmd(SCMD_RESET);
>  	for (i = 1000; i > 0 && !sjcd_status_valid; --i) {
> -		unsigned long timer;
> -
>  		/*
>  		 * Wait 10ms approx.
>  		 */
> -		for (timer = jiffies; time_before_eq(jiffies, timer););
> +		msleep(10);
> +

I always worry when I see code like this, wondering if there is some 
arcane reason that I cannot fathom, that is being removed.  You gotta 
wonder how long it has been since this driver was used, by anybody.

Oh well, I cannot find fault with the patch, paranoia worries aside.

ACK.

	Jeff



-
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