public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	Stephen Warren <swarren@wwwdotorg.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	cpufreq <cpufreq@vger.kernel.org>
Subject: Re: cpufreq_stats NULL deref on second system suspend
Date: Thu, 12 Sep 2013 12:16:12 +0530	[thread overview]
Message-ID: <52316334.6080603@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAKohpo=LuoKTf+mX1oBt97K3sJVu0iN=whN7VGw6kuartnrr+w@mail.gmail.com>

On 09/12/2013 12:11 PM, Viresh Kumar wrote:
> On 12 September 2013 11:56, Srivatsa S. Bhat
> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>> I had the same thought when solving this bug.. We have had similar issues with
>> CPU hotplug notifiers too: why are they invoked in the same order during both
>> CPU down and up, instead of reversing the order? I even had a patchset to perform
>> reverse-invocation of notifiers.. http://lwn.net/Articles/508072/
>> ... but people didn't find that very compelling to have.
>>
> 
>> It does to me too, but I think the reason nobody really bothered is because perhaps
>> not many other subsystems care about the order in which CPUs are torn down or
>> brought up; they just need the total number to match.. cpufreq is one exception
>> as we saw with this bug.
> 
> Probably its time to re-spin that series and make CPUFreq as one of the users
> of that patchset.. Resume should be just opposite of suspend and so
> that patchset
> would make sense even if not many people care about it :)
> 
> Over that there is one more problem that I see, don't know if it is really a big
> issue..
> 
> After a suspend/resume value of policy->cpu may get changed... And so the
> hierarchy of sysfs cpufreq files too.. Folder that had links to other
> CPUs folder
> can now be actual folders instead of links and vice versa..
> 
> Don't know if this can break something ??
> 

Interesting observation :-) But we just managed to retain sysfs file permissions
across suspend/resume with a lot of trouble and regressions. That's probably
good enough for some time to come ;-) We can retain folder/links when somebody
really finds a need to do that ;-)

Of course, if we change the suspend/resume sequence and that fixes this, that
would be like getting it for free, nobody would say no to it ;-)

Regards,
Srivatsa S. Bhat


  reply	other threads:[~2013-09-12  6:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <522E1FEF.6080803@wwwdotorg.org>
     [not found] ` <1775778.MeiRhuYy7o@vostro.rjw.lan>
     [not found]   ` <522F86AD.6010603@wwwdotorg.org>
     [not found]     ` <2521560.SfeNbV74nj@vostro.rjw.lan>
2013-09-11 10:21       ` cpufreq_stats NULL deref on second system suspend Srivatsa S. Bhat
2013-09-11 10:44         ` Viresh Kumar
2013-09-11 10:45           ` Viresh Kumar
2013-09-11 11:14             ` Srivatsa S. Bhat
2013-09-11 11:59               ` Viresh Kumar
2013-09-11 13:56                 ` Srivatsa S. Bhat
2013-09-12  5:52                 ` Viresh Kumar
2013-09-12  6:26                   ` Srivatsa S. Bhat
2013-09-12  6:41                     ` Viresh Kumar
2013-09-12  6:46                       ` Srivatsa S. Bhat [this message]
2013-09-12  6:52                         ` Viresh Kumar
2013-09-12  7:14                           ` Srivatsa S. Bhat
2013-09-12 15:55                     ` Stephen Warren
2013-09-12 17:26                       ` Srivatsa S. Bhat
2013-09-13  4:26                         ` Viresh Kumar
2013-09-11 11:10           ` Srivatsa S. Bhat
2013-09-11 11:15             ` Viresh Kumar
2013-09-11 11:17               ` Srivatsa S. Bhat
2013-09-11 11:41                 ` Viresh Kumar
2013-09-11 11:09         ` Srivatsa S. Bhat
2013-09-11 16:05         ` Stephen Warren
2013-09-11 18:03           ` Srivatsa S. Bhat
2013-09-11 18:42             ` Srivatsa S. Bhat
2013-09-11 19:03               ` Stephen Warren
2013-09-11 19:46                 ` Srivatsa S. Bhat
2013-09-11 20:07                   ` Stephen Warren
2013-09-11 20:05                     ` Srivatsa S. Bhat
2013-09-12  6:04                   ` Viresh Kumar
2013-09-12  6:00                 ` Viresh Kumar
2013-09-12  5:58               ` Viresh Kumar

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=52316334.6080603@linux.vnet.ibm.com \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=swarren@wwwdotorg.org \
    --cc=viresh.kumar@linaro.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