public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* re: perf/core: Introduce address range filtering
@ 2016-05-10 10:38 Dan Carpenter
  2016-05-30 21:05 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-05-10 10:38 UTC (permalink / raw)
  To: kernel-janitors

Hello Alexander Shishkin,

This is a semi-automatic email about new static checker warnings.

The patch 375637bc5249: "perf/core: Introduce address range 
filtering" from Apr 27, 2016, leads to the following Smatch complaint:

kernel/events/core.c:3865 _free_event()
	 warn: variable dereferenced before check 'event->pmu' (see line 3856)

kernel/events/core.c
  3855		perf_event_free_bpf_prog(event);
  3856		perf_addr_filters_splice(event, NULL);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
New code adds an unchecked "event->pmu" dereference inside function.

  3857		kfree(event->addr_filters_offs);
  3858	
  3859		if (event->destroy)
  3860			event->destroy(event);
  3861	
  3862		if (event->ctx)
  3863			put_ctx(event->ctx);
  3864	
  3865		if (event->pmu) {
                    ^^^^^^^^^^
Existing code assumes this can be NULL.

  3866			exclusive_event_destroy(event);
  3867			module_put(event->pmu->module);

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-30 21:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-10 10:38 perf/core: Introduce address range filtering Dan Carpenter
2016-05-30 21:05 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox