pcrypt/padata rcu fixes
cover pcrypt/padata rcu fixes
Two small RCU related fixes, lockdep complained about.
Please apply!
Mathias Krause (2):
crypto: pcrypt - Fix wrong usage of rcu_dereference()
padata: Fix wrong usage of rcu_dereference()
crypto/pcrypt.c | 2 +- kernel/padata.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.10.4
PATCH 1/2 crypto: pcrypt - 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/crypto/pcrypt.c:81 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: [<ffffffff812c8075>] pcrypt_do_parallel.isra.2+0x5/0x200
Fix that by using rcu_dereference_bh() instead.
--- crypto/pcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/pcrypt.c +1 -1
@@ -78,7 +78,7 @@ static int pcrypt_do_parallel(struct padata_priv *padata, unsigned int *cb_cpu, cpu = *cb_cpu;rcu_read_lock_bh (); - cpumask =rcu_dereference (pcrypt->cb_cpumask); + cpumask =rcu_dereference_bh (pcrypt->cb_cpumask);if (cpumask_test_cpu (cpu, cpumask->mask)) goto out;
Signature · 1 line
1.7.10.4
PATCH 2/2 padata: Fix wrong usage of rcu_dereference()
In reply to Mathias KrauseA 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.
--- kernel/padata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/padata.c +1 -1
@@ -112,7 +112,7 @@ int padata_do_parallel(struct padata_instance *pinst,rcu_read_lock_bh (); - pd =rcu_dereference (pinst->pd); + pd =rcu_dereference_bh (pinst->pd); err = -EINVAL ;if (!(pinst->flags &PADATA_INIT ) || pinst->flags &PADATA_INVALID )
Signature · 1 line
1.7.10.4
Quoted 9 lines · Mathias Krause
Two small RCU related fixes, lockdep complained about.
Please apply!
Mathias Krause (2):
crypto: pcrypt - Fix wrong usage ofrcu_dereference()
padata: Fix wrong usage ofrcu_dereference()
Both
Thanks!
Herbert Xu
maintainerQuoted 6 lines · Steffen Klassert
Quoted 5 lines · Mathias Krause
Two small RCU related fixes, lockdep complained about.
Please apply!
Quoted 7 lines
Quoted 4 lines
Mathias Krause (2):
crypto: pcrypt - Fix wrong usage ofrcu_dereference()
padata: Fix wrong usage ofrcu_dereference()Both
Acked-by Steffen Klassert <[email protected]>
Both patches applied.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt