[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1354178770-6028-3-git-send-email-laijs@cn.fujitsu.com>
Date: Thu, 29 Nov 2012 16:46:03 +0800
From: Lai Jiangshan <laijs@...fujitsu.com>
To: linux-kernel@...r.kernel.org,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: Lai Jiangshan <laijs@...fujitsu.com>
Subject: [PATCH 2/8] srcu: add might_sleep() annotation to synchronize_srcu()
synchronize_srcu() can sleep but it will not sleep if the fast path
succeeds. This annotation will helps us to catch the problem early
if it is called in a wrong contex which can't sleep.
Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
---
kernel/srcu.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel/srcu.c b/kernel/srcu.c
index b2e4f36..48d0edb 100644
--- a/kernel/srcu.c
+++ b/kernel/srcu.c
@@ -417,6 +417,7 @@ static void __synchronize_srcu(struct srcu_struct *sp, int trycount)
!lock_is_held(&rcu_sched_lock_map),
"Illegal synchronize_srcu() in same-type SRCU (or RCU) read-side critical section");
+ might_sleep();
init_completion(&rcu.completion);
head->next = NULL;
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists