From: Tejun Heo <tj@kernel.org>
To: Li Zefan <lizefan@huawei.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
LKML <linux-kernel@vger.kernel.org>,
Cgroups <cgroups@vger.kernel.org>
Subject: Re: [PATCH] cgroup: make cgrp->event_list_lock irqsafe
Date: Tue, 5 Mar 2013 22:22:24 -0800 [thread overview]
Message-ID: <20130306062224.GJ1227@htj.dyndns.org> (raw)
In-Reply-To: <5136B7C1.6030403@huawei.com>
Hello, Li.
On Wed, Mar 06, 2013 at 11:28:01AM +0800, Li Zefan wrote:
> cgroup_event_wake() is called with hardirq-safe wqh->lock held, so
> the nested cgrp->event_list_lock should also be hardirq-safe.
>
> Fortunately I don't think the deadlock can happen in real life.
>
> Lockdep never complained, maybe because it never found wqh->lock was
> held in irq context?
Why should wqh->lock be hard-irq-safe? Is it actually grabbed from
irq context? Locks which are grabbed with irq disabled aren't
necessarily irq context locks as that doesn't lead to deadlocks. They
need to be actually grabbed from irq context.
Thanks.
--
tejun
next prev parent reply other threads:[~2013-03-06 6:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 3:28 [PATCH] cgroup: make cgrp->event_list_lock irqsafe Li Zefan
2013-03-06 6:22 ` Tejun Heo [this message]
[not found] ` <20130306062224.GJ1227-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2013-03-06 7:00 ` Li Zefan
[not found] ` <5136E9A4.7000201-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-03-06 7:02 ` Tejun Heo
[not found] ` <CAOS58YN9K9OrvvdZjUV9dFOP=SpJYgeyPp0Y5yipNE47osqXpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-06 7:15 ` Li Zefan
[not found] ` <5136ED2F.8080400-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-03-06 7:21 ` Tejun Heo
[not found] ` <CAOS58YNJd557hGDMGqavp8eq+B9x5WExCcpW+CwZ8dUainjUUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-06 7:23 ` Tejun Heo
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=20130306062224.GJ1227@htj.dyndns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.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