public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: Thomas Renninger <trenn@suse.de>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [BUGFIX] cpufreq: dont BUG_ON uninitialized policy cpu
Date: Wed, 13 Jan 2010 01:32:46 -0500	[thread overview]
Message-ID: <20100113063246.GA20803@redhat.com> (raw)
In-Reply-To: <20100113051438.GA32519@localhost>

On Wed, Jan 13, 2010 at 01:14:38PM +0800, Wu Fengguang wrote:
 > Remove a BUG_ON which is always triggered here after commit 0b19a310eebb93:
 > 
 > --- linux-mm.orig/drivers/cpufreq/cpufreq.c	2010-01-13 13:06:03.000000000 +0800
 > +++ linux-mm/drivers/cpufreq/cpufreq.c	2010-01-13 13:06:57.000000000 +0800
 > @@ -72,7 +72,8 @@ int lock_policy_rwsem_##mode						\
 >  (int cpu)								\
 >  {									\
 >  	int policy_cpu = per_cpu(cpufreq_policy_cpu, cpu);		\
 > -	BUG_ON(policy_cpu == -1);					\
 > +	if (policy_cpu == -1)						\
 > +		return -1;						\
 >  	down_##mode(&per_cpu(cpu_policy_rwsem, policy_cpu));		\
 >  	if (unlikely(!cpu_online(cpu))) {				\
 >  		up_##mode(&per_cpu(cpu_policy_rwsem, policy_cpu));	\

So instead of always BUG'ing, we'll always fail to get the lock ?
How can this be correct ?

This makes no sense. cpufreq_update_policy shouldn't be called without
an existing policy.   Can someone send me the full trace ?

Andrew cc'd me on a revert of Thomas's last patch to this file,
but again, no trace, and I can't find the mails he refers to.

	Dave


  reply	other threads:[~2010-01-13  6:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13  5:14 [BUGFIX] cpufreq: dont BUG_ON uninitialized policy cpu Wu Fengguang
2010-01-13  6:32 ` Dave Jones [this message]
2010-01-13 12:42 ` Thomas Renninger
2010-01-13 12:48   ` Wu Fengguang
2010-01-13 15:59   ` Dave Jones
2010-01-14  2:42     ` Wu Fengguang

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=20100113063246.GA20803@redhat.com \
    --to=davej@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trenn@suse.de \
    /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