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]
Date:	Wed, 22 Oct 2014 17:07:12 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	linux-kernel@...r.kernel.org, peterz@...radead.org, mingo@...e.hu,
	ak@...ux.intel.com, kan.liang@...el.com, bp@...en8.de,
	maria.n.dimakopoulou@...il.com
Subject: Re: [PATCH v2 05/12] perf/x86: add cross-HT counter exclusion
 infrastructure

On Thu, Oct 09, 2014 at 06:34:39PM +0200, Stephane Eranian wrote:
> From: Maria Dimakopoulou <maria.n.dimakopoulou@...il.com>
> 

SNIP

> +struct intel_excl_cntrs *allocate_excl_cntrs(int cpu)
> +{
> +	struct intel_excl_cntrs *c;
> +	int i;
> +
> +	c = kzalloc_node(sizeof(struct intel_excl_cntrs),
> +			 GFP_KERNEL, cpu_to_node(cpu));
> +	if (c) {
> +		spin_lock_init(&c->lock);
> +		for (i = 0; i < X86_PMC_IDX_MAX; i++) {
> +			c->states[0].state[i] = INTEL_EXCL_UNUSED;
> +			c->states[0].init_state[i] = INTEL_EXCL_UNUSED;
> +
> +			c->states[1].state[i] = INTEL_EXCL_UNUSED;
> +			c->states[1].init_state[i] = INTEL_EXCL_UNUSED;

'c' is allocated with kzalloc_node, seems there's no need
to re-initialize states it to zero again with INTEL_EXCL_UNUSED

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