From: Zhang Rui <rui.zhang@intel.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Matthew Wilcox <mawilcox@microsoft.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
Linux PM <linux-pm@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [BUG] v4.11-rc1: CPUFREQ Circular locking dependency
Date: Thu, 30 Mar 2017 10:51:08 +0800 [thread overview]
Message-ID: <1490842268.2347.10.camel@intel.com> (raw)
In-Reply-To: <20170329175100.GD7909@n2100.armlinux.org.uk>
On Wed, 2017-03-29 at 18:51 +0100, Russell King - ARM Linux wrote:
> On Mon, Mar 13, 2017 at 10:44:48AM +0800, Zhang Rui wrote:
> >
> > On Fri, 2017-03-10 at 23:43 +0000, Russell King - ARM Linux wrote:
> > >
> > > On Fri, Mar 10, 2017 at 06:33:28PM +0000, Matthew Wilcox wrote:
> > > >
> > > >
> > > > From cd5401d81633d5e48e39d67d4e65156e6759537e Mon Sep 17
> > > > 00:00:00
> > > > 2001
> > > > From: Matthew Wilcox <mawilcox@microsoft.com>
> > > > Date: Fri, 10 Mar 2017 13:22:53 -0500
> > > > Subject: [PATCH] thermal: Fix potential deadlock in cpu_cooling
> > > >
> > > > I expanded the scope of cooling_list_lock a little too far; it
> > > > was
> > > > not just covering cpufreq_dev_count, it was also covering the
> > > > calls
> > > > to cpufreq_register_notifier() and
> > > > cpufreq_unregister_notifier().
> > > > Since cooling_list_lock is also used within
> > > > cpufreq_thermal_notifier(),
> > > > lockdep reports a potential deadlock. I don't think that's
> > > > actually
> > > > possible, but it's easy enough to make it impossible by testing
> > > > the
> > > > condition under cooling_list_lock and dropping the lock before
> > > > calling
> > > > cpufreq_register_notifier().
> > > >
> > > > As a bonus, I noticed that cpufreq_dev_count is only used for
> > > > the
> > > > purpose
> > > > of knowing whether this is the first or last cooling device
> > > > registered,
> > > > and we know that anyway because we know whether the list
> > > > transitioned
> > > > between empty and not-empty. So we can delete that variable
> > > > too.
> > > >
> > > > Fixes: ae606089621ef0349402cfcbeca33a82abbd0fd0
> > > > Reported-by: Russell King <linux@armlinux.org.uk>
> > > > Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
> > > Thanks Matthew, appears to solve the problem.
> > >
> > > Tested-by: Russell King <rmk+kernel@armlinux.org.uk>
> > >
> > patch applied.
> It's almost three weeks, and it isn't in Linus' tree. What's
> happening
> with this _fix_ for a regression that occured during the merge
> window?
>
Pull request just sent out, thanks for the reminder.
-rui
WARNING: multiple messages have this Message-ID (diff)
From: rui.zhang@intel.com (Zhang Rui)
To: linux-arm-kernel@lists.infradead.org
Subject: [BUG] v4.11-rc1: CPUFREQ Circular locking dependency
Date: Thu, 30 Mar 2017 10:51:08 +0800 [thread overview]
Message-ID: <1490842268.2347.10.camel@intel.com> (raw)
In-Reply-To: <20170329175100.GD7909@n2100.armlinux.org.uk>
On Wed, 2017-03-29 at 18:51 +0100, Russell King - ARM Linux wrote:
> On Mon, Mar 13, 2017 at 10:44:48AM +0800, Zhang Rui wrote:
> >
> > On Fri, 2017-03-10 at 23:43 +0000, Russell King - ARM Linux wrote:
> > >
> > > On Fri, Mar 10, 2017 at 06:33:28PM +0000, Matthew Wilcox wrote:
> > > >
> > > >
> > > > From cd5401d81633d5e48e39d67d4e65156e6759537e Mon Sep 17
> > > > 00:00:00
> > > > 2001
> > > > From: Matthew Wilcox <mawilcox@microsoft.com>
> > > > Date: Fri, 10 Mar 2017 13:22:53 -0500
> > > > Subject: [PATCH] thermal: Fix potential deadlock in cpu_cooling
> > > >
> > > > I expanded the scope of cooling_list_lock a little too far; it
> > > > was
> > > > not just covering cpufreq_dev_count, it was also covering the
> > > > calls
> > > > to cpufreq_register_notifier() and
> > > > cpufreq_unregister_notifier().
> > > > Since cooling_list_lock is also used within
> > > > cpufreq_thermal_notifier(),
> > > > lockdep reports a potential deadlock.??I don't think that's
> > > > actually
> > > > possible, but it's easy enough to make it impossible by testing
> > > > the
> > > > condition under cooling_list_lock and dropping the lock before
> > > > calling
> > > > cpufreq_register_notifier().
> > > >
> > > > As a bonus, I noticed that cpufreq_dev_count is only used for
> > > > the
> > > > purpose
> > > > of knowing whether this is the first or last cooling device
> > > > registered,
> > > > and we know that anyway because we know whether the list
> > > > transitioned
> > > > between empty and not-empty.??So we can delete that variable
> > > > too.
> > > >
> > > > Fixes: ae606089621ef0349402cfcbeca33a82abbd0fd0
> > > > Reported-by: Russell King <linux@armlinux.org.uk>
> > > > Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
> > > Thanks Matthew, appears to solve the problem.
> > >
> > > Tested-by: Russell King <rmk+kernel@armlinux.org.uk>
> > >
> > patch applied.
> It's almost three weeks, and it isn't in Linus' tree.??What's
> happening
> with this _fix_ for a regression that occured during the merge
> window?
>
Pull request just sent out, thanks for the reminder.
-rui
next prev parent reply other threads:[~2017-03-30 2:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 15:02 [BUG] v4.11-rc1: CPUFREQ Circular locking dependency Russell King - ARM Linux
2017-03-10 15:02 ` Russell King - ARM Linux
2017-03-10 17:42 ` Rafael J. Wysocki
2017-03-10 17:42 ` Rafael J. Wysocki
2017-03-10 18:06 ` Matthew Wilcox
2017-03-10 18:06 ` Matthew Wilcox
2017-03-10 18:33 ` Matthew Wilcox
2017-03-10 18:33 ` Matthew Wilcox
2017-03-10 22:38 ` Rafael J. Wysocki
2017-03-10 22:38 ` Rafael J. Wysocki
2017-03-10 23:43 ` Russell King - ARM Linux
2017-03-10 23:43 ` Russell King - ARM Linux
2017-03-13 2:44 ` Zhang Rui
2017-03-13 2:44 ` Zhang Rui
2017-03-29 17:51 ` Russell King - ARM Linux
2017-03-29 17:51 ` Russell King - ARM Linux
2017-03-30 2:51 ` Zhang Rui [this message]
2017-03-30 2:51 ` Zhang Rui
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=1490842268.2347.10.camel@intel.com \
--to=rui.zhang@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mawilcox@microsoft.com \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--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 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.