public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Luis Henriques <henrix@sapo.pt>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Dave Jones <davej@redhat.com>, Ingo Molnar <mingo@redhat.com>,
	mark.langsdorf@amd.com, linux-kernel@vger.kernel.org,
	Avi Kivity <avi@redhat.com>
Subject: Re: [BUG -tip] unable to handle kernel paging request
Date: Mon, 27 Apr 2009 10:43:28 +0200	[thread overview]
Message-ID: <49F57030.3010802@siemens.com> (raw)
In-Reply-To: <20090423182417.GA3679@hades.domain.com>

Luis Henriques wrote:
> (CC'ing Avi Kivity and Jan Kiszka)
> On Mon, Apr 13, 2009 at 01:59:08PM -0700, Paul E. McKenney wrote:
>> On Mon, Apr 13, 2009 at 05:59:13PM +0100, Luis Henriques wrote:
>>> Hi,
>>>
>>> (not sure if I'm CC'ing all the relevant persons...)
>>>
>>> I am hitting this bug, which occurs mainly when I am shutting down my laptop.  I
>>> took a look at the cpufreq code and found out something which I am not sure if it
>>> is related with this bug (or even if it is an issue at all):
>>>
>>> void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state)
>>> {
>>>         struct cpufreq_policy *policy;
>>>
>>>         BUG_ON(irqs_disabled());
>>>
>>>         freqs->flags = cpufreq_driver->flags;
>>>
>>> 		...
>>>
>>> This code accesses cpufreq_driver without using the cpufreq_driver_lock.  I
>>> believe this is the only place in the code where this lock is not obtaining
>>> before accessing the global cpufreq_driver.
>>>
>>> Any ideas?
>> Well, one thought would be that SRCU is protecting it, but when I look
>> at the code, SRCU is instead only protecting the notifier chain itself.
>> So SRCU is -not- a substitute for cpufreq_driver_lock in this case.
>>
>> But the "freqs" argument looks to be a parameter block private to the
>> caller, so the modification of freqs->old is safe.  Ditto for
>> adjust_jiffies().
>>
>> This does use per-CPU data, but it is not clear to me how preemption is
>> disabled -- or that it is always operating on the current CPU, for that
>> matter.  And the few notifier callbacks I looked at did not have any
>> locking either.
>>
>> So is the cpufreq_driver_lock acquired at a higher level, for example,
>> by the guy who calls through the cpufreq_driver control blocks?
>>
>> 							Thanx, Paul
> 
> I believe my problem has finally been solved by commit
> 888d256e9c565cb61505bd218eb37c81fe77a325 in kvm git tree.  Basically, the kvm
> notifier for the cpufreq was not being unregistered when kvm module was
> unloaded and, thus, when notifier_call_chain invoked the handler for the kvm,
> there was a NULL pointer there.
> 
> Does this make sense to everybody?

If your system unloads the kvm modules on shutdown/reboot: yes, would
make sense.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

  reply	other threads:[~2009-04-27  9:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-13 16:59 [BUG -tip] unable to handle kernel paging request Luis Henriques
2009-04-13 20:59 ` Paul E. McKenney
2009-04-23 18:24   ` Luis Henriques
2009-04-27  8:43     ` Jan Kiszka [this message]
2009-04-27 16:55       ` Luis Henriques

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=49F57030.3010802@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=avi@redhat.com \
    --cc=davej@redhat.com \
    --cc=henrix@sapo.pt \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.langsdorf@amd.com \
    --cc=mingo@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    /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