All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: perf/core: Introduce address range filtering
Date: Tue, 10 May 2016 10:38:27 +0000	[thread overview]
Message-ID: <20160510103827.GA28299@mwanda> (raw)

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

             reply	other threads:[~2016-05-10 10:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 10:38 Dan Carpenter [this message]
2016-05-30 21:05 ` perf/core: Introduce address range filtering Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160510103827.GA28299@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.