diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-06-09 09:17:10 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-09 09:17:10 +0300 |
commit | 8affb06737ae565722764c2b309eb0e892538344 (patch) | |
tree | 80ee0ce911755a2d30a18c7698ea1424764e8de6 /kernel/rcu/srcutiny.c | |
parent | b29794ec95c6856b316c2295904208bf11ffddd9 (diff) | |
parent | 1123a6041654e8f889014659593bad4168e542c2 (diff) | |
download | linux-8affb06737ae565722764c2b309eb0e892538344.tar.xz |
Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into rcu/urgent
Pull RCU fix from Paul E. McKenney:
" This series enables srcu_read_lock() and srcu_read_unlock() to be used from
interrupt handlers, which fixes a bug in KVM's use of SRCU in delivery
of interrupts to guest OSes. "
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/rcu/srcutiny.c')
-rw-r--r-- | kernel/rcu/srcutiny.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c index 36e1f82faed1..32798eb14853 100644 --- a/kernel/rcu/srcutiny.c +++ b/kernel/rcu/srcutiny.c @@ -97,8 +97,9 @@ EXPORT_SYMBOL_GPL(cleanup_srcu_struct); /* * Counts the new reader in the appropriate per-CPU element of the - * srcu_struct. Must be called from process context. - * Returns an index that must be passed to the matching srcu_read_unlock(). + * srcu_struct. Can be invoked from irq/bh handlers, but the matching + * __srcu_read_unlock() must be in the same handler instance. Returns an + * index that must be passed to the matching srcu_read_unlock(). */ int __srcu_read_lock(struct srcu_struct *sp) { @@ -112,7 +113,7 @@ EXPORT_SYMBOL_GPL(__srcu_read_lock); /* * Removes the count for the old reader from the appropriate element of - * the srcu_struct. Must be called from process context. + * the srcu_struct. */ void __srcu_read_unlock(struct srcu_struct *sp, int idx) { |