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: <alpine.DEB.1.10.0901261041430.9334@gandalf.stny.rr.com>
Date:	Mon, 26 Jan 2009 10:41:59 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Cyrill Gorcunov <gorcunov@...il.com>
cc:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH -tip] x86: ftrace - simplify wait_for_nmi


On Mon, 26 Jan 2009, Cyrill Gorcunov wrote:

> Get rid of 'waited' stack variable.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@...il.com>

Thanks Cyrill,

Either I or Ingo will pull it in.

-- Steve

> ---
>  arch/x86/kernel/ftrace.c |   11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> Index: linux-2.6.git/arch/x86/kernel/ftrace.c
> ===================================================================
> --- linux-2.6.git.orig/arch/x86/kernel/ftrace.c
> +++ linux-2.6.git/arch/x86/kernel/ftrace.c
> @@ -133,15 +133,14 @@ void ftrace_nmi_exit(void)
>  
>  static void wait_for_nmi(void)
>  {
> -	int waited = 0;
> +	if (!atomic_read(&in_nmi))
> +		return;
>  
> -	while (atomic_read(&in_nmi)) {
> -		waited = 1;
> +	do {
>  		cpu_relax();
> -	}
> +	} while(atomic_read(&in_nmi));
>  
> -	if (waited)
> -		nmi_wait_count++;
> +	nmi_wait_count++;
>  }
>  
>  static int
> 
> 
--
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