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: <20090608112736.GL29447@sgi.com>
Date:	Mon, 8 Jun 2009 06:27:36 -0500
From:	Robin Holt <holt@....com>
To:	cl@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org, Tejun Heo <tj@...nel.org>,
	mingo@...e.hu, rusty@...tcorp.com.au, davem@...emloft.net
Subject: Re: [this_cpu_xx 04/11] Use this_cpu ops for network statistics

On Fri, Jun 05, 2009 at 03:18:23PM -0400, cl@...ux-foundation.org wrote:
...
> --- linux-2.6.orig/include/net/netfilter/nf_conntrack.h	2009-06-03 16:23:29.000000000 -0500
...
>  #define NF_CT_STAT_INC_ATOMIC(net, count)		\
> -do {							\
> -	local_bh_disable();				\
> -	per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++;	\
> -	local_bh_enable();				\
> -} while (0)
> +	this_cpu_inc((net)->ct.stat->count)

Why not put this on one line?
#define NF_CT_STAT_INC_ATOMIC(net, count)  this_cpu_inc((net)->ct.stat->count)

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