[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130801132934.GG1032@krava.brq.redhat.com>
Date: Thu, 1 Aug 2013 15:29:34 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Namhyung Kim <namhyung@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 2/8] perf: Sanitize get_callchain_buffer()
On Tue, Jul 23, 2013 at 02:31:00AM +0200, Frederic Weisbecker wrote:
SNIP
> if (event->attach_state & PERF_ATTACH_TASK)
> static_key_slow_inc(&perf_sched_events.key);
> if (event->attr.mmap || event->attr.mmap_data)
> @@ -6572,16 +6570,19 @@ done:
> atomic_inc(&per_cpu(perf_branch_stack_events,
> event->cpu));
> }
> - if (event->attr.sample_type & PERF_SAMPLE_CALLCHAIN) {
> - err = get_callchain_buffers();
> - if (err) {
> - free_event(event);
> - return ERR_PTR(err);
> - }
> - }
> }
>
> return event;
> +
> +err_pmu:
> + if (event->destroy)
> + event->destroy(event);
> +err_ns:
> + if (event->ns)
> + put_pid_ns(event->ns);
> + kfree(event);
> +
> + return ERR_PTR(err);
could we call __free_filter(event) here?
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