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: <20080714100402.b72e2b1e.akpm@linux-foundation.org>
Date:	Mon, 14 Jul 2008 10:04:02 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Akinobu Mita <akinobu.mita@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	"Michael H. Warfield" <mhw@...tsend.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH] ip2: avoid add_timer() with pending timer

On Mon, 14 Jul 2008 11:49:55 +0900 Akinobu Mita <akinobu.mita@...il.com> wrote:

> @@ -746,10 +742,8 @@ ip2_loadmain(int *iop, int *irqp)
>  			}
>  			if ( ip2config.irq[i] == CIR_POLL ) {
>  retry:
> -				if (!TimerOn) {
> -					PollTimer.expires = POLL_TIMEOUT;
> -					add_timer ( &PollTimer );
> -					TimerOn = 1;
> +				if (!timer_pending(&PollTimer)) {
> +					mod_timer(&PollTimer, POLL_TIMEOUT);
>  					printk( KERN_INFO "IP2: polling\n");

This change to ip2_loadmain() might be racy if it actually did
anything.  But afaict timer_pending() can never be true here (we're
only called from module_init()) so it can and should be removed.

--
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