aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2013-11-28 13:20:05 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2013-12-05 08:28:42 -0500
commitc0e656b7a6e1ac03b2921d49211a735893efd544 (patch)
tree3c395a0346da235564b23b50d4dab8b9f81b28f1 /kernel
parent3110e4006ca9652276c2e17443949bcba7dbe789 (diff)
padata: Fix wrong usage of rcu_dereference()
A kernel with enabled lockdep complains about the wrong usage of rcu_dereference() under a rcu_read_lock_bh() protected region. =============================== [ INFO: suspicious RCU usage. ] 3.13.0-rc1+ #126 Not tainted ------------------------------- linux/kernel/padata.c:115 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 1, debug_locks = 1 1 lock held by cryptomgr_test/153: #0: (rcu_read_lock_bh){.+....}, at: [<ffffffff8115c235>] padata_do_parallel+0x5/0x270 Fix that by using rcu_dereference_bh() instead. Signed-off-by: Mathias Krause <minipli@googlemail.com> Acked-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/padata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/padata.c b/kernel/padata.c
index 2abd25d79cc8..161402f0b517 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -112,7 +112,7 @@ int padata_do_parallel(struct padata_instance *pinst,
112 112
113 rcu_read_lock_bh(); 113 rcu_read_lock_bh();
114 114
115 pd = rcu_dereference(pinst->pd); 115 pd = rcu_dereference_bh(pinst->pd);
116 116
117 err = -EINVAL; 117 err = -EINVAL;
118 if (!(pinst->flags & PADATA_INIT) || pinst->flags & PADATA_INVALID) 118 if (!(pinst->flags & PADATA_INIT) || pinst->flags & PADATA_INVALID)