From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca,
josh@joshtriplett.org, dvhltc@us.ibm.com, niv@us.ibm.com,
tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org,
Valdis.Kletnieks@vt.edu, dhowells@redhat.com,
eric.dumazet@gmail.com,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH tip/core/urgent 2/5] rcu: fix RCU lockdep splat on freezer_fork path
Date: Wed, 21 Apr 2010 13:02:08 -0700 [thread overview]
Message-ID: <1271880131-3951-2-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100421200150.GA3818@linux.vnet.ibm.com>
Add an RCU read-side critical section to suppress this false positive.
Located-by: Eric Paris <eparis@parisplace.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
---
kernel/cgroup_freezer.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c
index da5e139..e5c0244 100644
--- a/kernel/cgroup_freezer.c
+++ b/kernel/cgroup_freezer.c
@@ -205,9 +205,12 @@ static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task)
* No lock is needed, since the task isn't on tasklist yet,
* so it can't be moved to another cgroup, which means the
* freezer won't be removed and will be valid during this
- * function call.
+ * function call. Nevertheless, apply RCU read-side critical
+ * section to suppress RCU lockdep false positives.
*/
+ rcu_read_lock();
freezer = task_freezer(task);
+ rcu_read_unlock();
/*
* The root cgroup is non-freezable, so we can skip the
--
1.7.0
next prev parent reply other threads:[~2010-04-21 20:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 20:01 [PATCH tip/core/urgent] fix several lockdep splats, allow multiple splats Paul E. McKenney
2010-04-21 20:02 ` [PATCH tip/core/urgent 1/5] rcu: Fix RCU lockdep splat in set_task_cpu on fork path Paul E. McKenney
2010-04-30 10:51 ` [tip:core/urgent] " tip-bot for Peter Zijlstra
2010-04-21 20:02 ` Paul E. McKenney [this message]
2010-04-30 10:51 ` [tip:core/urgent] rcu: Fix RCU lockdep splat on freezer_fork path tip-bot for Paul E. McKenney
2010-04-21 20:02 ` [PATCH tip/core/urgent 3/5] rcu: leave lockdep enabled after RCU lockdep splat Paul E. McKenney
2010-04-21 20:02 ` [PATCH tip/core/urgent 4/5] NFSv4: Fix the locking in nfs_inode_reclaim_delegation() Paul E. McKenney
2010-04-21 20:02 ` [PATCH tip/core/urgent 5/5] NFS: Fix RCU issues in the NFSv4 delegation code Paul E. McKenney
2010-04-30 10:07 ` [PATCH tip/core/urgent] fix several lockdep splats, allow multiple splats Ingo Molnar
2010-04-30 15:33 ` Mathieu Desnoyers
2010-04-30 16:16 ` Valdis.Kletnieks
2010-04-30 18:02 ` Paul E. McKenney
2010-04-30 18:12 ` Mathieu Desnoyers
2010-04-30 18:32 ` Paul E. McKenney
2010-04-30 19:09 ` Mathieu Desnoyers
2010-04-30 23:47 ` Paul E. McKenney
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=1271880131-3951-2-git-send-email-paulmck@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=dvhltc@us.ibm.com \
--cc=eric.dumazet@gmail.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=niv@us.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.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
all inboxes | Powered by JetHome®