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: <20110323113601.GA27809@elte.hu>
Date:	Wed, 23 Mar 2011 12:36:01 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	linux-kernel@...r.kernel.org, peterz@...radead.org,
	perfmon2-devel@...ts.sf.net, paulus@...ba.org, davem@...emloft.net
Subject: Re: [PATCH] perf_events: fix cgrp stale pointer in
 update_cgrp_time_from_cpuctx()


* Stephane Eranian <eranian@...gle.com> wrote:

> -	if (is_cgroup_event(event))
> +	if (is_cgroup_event(event)) {
>  		ctx->nr_cgroups--;
> +		cpuctx = __get_cpu_context(ctx);
> +		/*
> +		 * if there are no more cgroup events
> +		 * then clear cgrp to avoid stale pointer
> +		 * in update_cgrp_time_from_cpuctx()
> +		 */
> +		if (!ctx->nr_cgroups)
> +			cpuctx->cgrp = NULL;
> +	}

The ->cgrp pointer does not exist on !CGROUPS kernels. I suspect the cleanest 
approach would be to make those two cgrp fields available unconditionally in 
struct perf_event.

Thanks,

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