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/hwpb: Invoke __perf_event_disable() if interrupts are already disabled
Date: Mon, 07 Jul 2014 09:37:31 +0000	[thread overview]
Message-ID: <20140707093731.GA32260@mwanda> (raw)

Hello K.Prasad,

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

The patch 500ad2d8b013: "perf/hwpb: Invoke __perf_event_disable() if
interrupts are already disabled" from Aug 2, 2012, leads to the
following Smatch complaint:

kernel/events/hw_breakpoint.c:449 modify_user_hw_breakpoint()
	 error: we previously assumed 'bp->ctx' could be null (see line 446)

kernel/events/hw_breakpoint.c
   445		 */
   446		if (irqs_disabled() && bp->ctx && bp->ctx->task = current)
                                       ^^^^^^^
We add a new assumption that bp->ctx can be NULL in this patch.

   447			__perf_event_disable(bp);
   448		else
   449			perf_event_disable(bp);
                        ^^^^^^^^^^^^^^^^^^^^^^
But it is dereferenced unconditionally in perf_event_disable().

   450	
   451		bp->attr.bp_addr = attr->bp_addr;

regards,
dan carpenter

                 reply	other threads:[~2014-07-07  9:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20140707093731.GA32260@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.