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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0000013ac23c254a-853c069d-2a95-4dec-a7a1-2e43f6c9b35b-000000@email.amazonses.com>
Date:	Fri, 2 Nov 2012 17:47:32 +0000
From:	Christoph Lameter <cl@...ux.com>
To:	Shan Wei <shanwei88@...il.com>
cc:	rostedt@...dmis.org, fweisbec@...il.com,
	Kernel-Maillist <linux-kernel@...r.kernel.org>, mingo@...hat.com
Subject: Re: [PATCH v2 7/9] trace: use this_cpu_ptr per-cpu helper

On Sat, 3 Nov 2012, Shan Wei wrote:

> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 31e4f55..81ae35b 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -1513,7 +1513,7 @@ static char *get_trace_buf(void)
>  	if (!percpu_buffer)
>  		return NULL;
>
> -	buffer = per_cpu_ptr(percpu_buffer, smp_processor_id());
> +	buffer = this_cpu_ptr(percpu_buffer);
>
>  	return buffer->buffer;

	return this_cpu_read(percpu_buffer->buffer)

and drop the this_cpu_ptr operation please.

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