From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: akpm@linux-foundation.org, Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Subject: [patch 1/4] kernel call_rcu usage: initialize rcu_head structures
Date: Tue, 06 Oct 2009 10:37:29 -0400 [thread overview]
Message-ID: <20091006144035.668169139@polymtl.ca> (raw)
In-Reply-To: 20091006143727.868480435@polymtl.ca
[-- Attachment #1: rcu-init-null.patch --]
[-- Type: text/plain, Size: 1884 bytes --]
Initialize rcu_head structures before passing them to call_rcu() to eliminate
false positives in DEBUG_RCU_HEAD.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
CC: mingo@elte.hu
CC: akpm@linux-foundation.org
---
kernel/exit.c | 1 +
kernel/pid.c | 1 +
kernel/rcupdate.c | 1 +
3 files changed, 3 insertions(+)
Index: linux-2.6-lttng/kernel/rcupdate.c
===================================================================
--- linux-2.6-lttng.orig/kernel/rcupdate.c 2009-10-06 09:00:06.000000000 -0400
+++ linux-2.6-lttng/kernel/rcupdate.c 2009-10-06 09:01:14.000000000 -0400
@@ -92,6 +92,7 @@ void synchronize_rcu(void)
init_completion(&rcu.completion);
/* Will wake me after RCU finished. */
+ INIT_RCU_HEAD(&rcu.head);
call_rcu(&rcu.head, wakeme_after_rcu);
/* Wait for it. */
wait_for_completion(&rcu.completion);
Index: linux-2.6-lttng/kernel/exit.c
===================================================================
--- linux-2.6-lttng.orig/kernel/exit.c 2009-10-06 09:05:21.000000000 -0400
+++ linux-2.6-lttng/kernel/exit.c 2009-10-06 09:05:34.000000000 -0400
@@ -208,6 +208,7 @@ repeat:
write_unlock_irq(&tasklist_lock);
release_thread(p);
+ INIT_RCU_HEAD(&p->rcu);
call_rcu(&p->rcu, delayed_put_task_struct);
p = leader;
Index: linux-2.6-lttng/kernel/pid.c
===================================================================
--- linux-2.6-lttng.orig/kernel/pid.c 2009-10-06 09:10:59.000000000 -0400
+++ linux-2.6-lttng/kernel/pid.c 2009-10-06 09:11:43.000000000 -0400
@@ -236,6 +236,7 @@ void free_pid(struct pid *pid)
for (i = 0; i <= pid->level; i++)
free_pidmap(pid->numbers + i);
+ INIT_RCU_HEAD(&pid->rcu);
call_rcu(&pid->rcu, delayed_put_pid);
}
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
next prev parent reply other threads:[~2009-10-06 14:41 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 14:37 [patch 0/4] DEBUG_RCU_HEAD: Debug and fix racy call_rcu() users Mathieu Desnoyers
2009-10-06 14:37 ` Mathieu Desnoyers [this message]
2009-10-06 15:19 ` [patch 1/4] kernel call_rcu usage: initialize rcu_head structures (v2) Mathieu Desnoyers
2009-10-06 14:37 ` [patch 2/4] tree rcu: Add debug RCU head option Mathieu Desnoyers
2009-10-06 15:54 ` Eric Dumazet
2009-10-06 16:09 ` Mathieu Desnoyers
2009-10-06 16:17 ` Eric Dumazet
2009-10-06 16:35 ` Mathieu Desnoyers
2009-10-06 14:37 ` [patch 3/4] markers call_rcu usage: initialize rcu_head structures Mathieu Desnoyers
2009-10-06 14:37 ` [patch 4/4] vunmap: Fix racy use of rcu_head Mathieu Desnoyers
2009-10-06 14:37 ` Mathieu Desnoyers
2009-10-06 15:23 ` Mathieu Desnoyers
2009-10-06 15:23 ` Mathieu Desnoyers
2009-10-06 16:43 ` Christoph Lameter
2009-10-06 16:43 ` Christoph Lameter
2009-10-06 17:33 ` Mathieu Desnoyers
2009-10-06 17:33 ` Mathieu Desnoyers
2009-10-07 4:20 ` [patch 0/4] DEBUG_RCU_HEAD: Debug and fix racy call_rcu() users Paul E. McKenney
2009-10-07 12:36 ` Mathieu Desnoyers
2009-10-12 18:07 ` Ingo Molnar
2009-10-12 18:30 ` Mathieu Desnoyers
2009-10-12 18:37 ` Ingo Molnar
2009-10-12 18:56 ` Thomas Gleixner
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=20091006144035.668169139@polymtl.ca \
--to=mathieu.desnoyers@polymtl.ca \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 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.