diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2012-11-29 16:46:03 +0800 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-02-07 15:08:19 -0800 |
commit | 6e6f1b307e23201fb3e7aaf16322e80355d2a3d5 (patch) | |
tree | 1664a448ebf4d45c0aadf6fe186644ee5d8ebdce /kernel | |
parent | 5a41344a3d83ef2c08e40bfce1efa5795def9b82 (diff) | |
download | linux-6e6f1b307e23201fb3e7aaf16322e80355d2a3d5.tar.bz2 |
srcu: Add might_sleep() annotation to synchronize_srcu()
Although synchronize_srcu() can sleep, it will not sleep if the fast
path succeeds, which means that illegal use of synchronize_rcu()
might go unnoticed. This commit therefore adds might_sleep(), which
unconditionally catches illegal use of synchronize_rcu() from atomic
context.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/srcu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/srcu.c b/kernel/srcu.c index c9d003bc6c49..3e43a214b4dc 100644 --- a/kernel/srcu.c +++ b/kernel/srcu.c @@ -421,6 +421,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; |