All of lore.kernel.org
 help / color / mirror / Atom feed
* re: perf/hwpb: Invoke __perf_event_disable() if interrupts are already disabled
@ 2014-07-07  9:37 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-07-07  9:37 UTC (permalink / raw)
  To: kernel-janitors

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-07  9:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07  9:37 perf/hwpb: Invoke __perf_event_disable() if interrupts are already disabled Dan Carpenter

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.