public inbox for kernel-janitors@vger.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: Mon, 30 May 2016 21:05:05 +0000	[thread overview]
Message-ID: <20160530210505.GX11011@mwanda> (raw)
In-Reply-To: <20160510103827.GA28299@mwanda>

I was looking through old warnings and this is still present in current
linux-next.

regards,
dan carpenter

On Tue, May 10, 2016 at 01:38:27PM +0300, Dan Carpenter wrote:
> 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-30 21:05 UTC|newest]

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

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=20160530210505.GX11011@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox