summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>2014-05-20 13:14:22 +0200
committerDavid S. Miller <davem@davemloft.net>2014-05-22 15:24:13 -0400
commit6f3eabcd041aa062cfabd2fc62194a33b507f51c (patch)
treea9af119650dbecdfa82d5bbfb83761f589a9571e /net
parent68bc74feb0ce1cc79cb2b5bbdfc592f30f37dab8 (diff)
mac802154: llsec: fix incorrect lock pairing
In encrypt, sec->lock is taken with read_lock_bh, so in the error path, we must read_unlock_bh. Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/mac802154/llsec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c
index a83674edaafd..6edcb20c2e70 100644
--- a/net/mac802154/llsec.c
+++ b/net/mac802154/llsec.c
@@ -776,7 +776,7 @@ int mac802154_llsec_encrypt(struct mac802154_llsec *sec, struct sk_buff *skb)
return rc < 0 ? rc : 0;
fail_read:
- read_unlock(&sec->lock);
+ read_unlock_bh(&sec->lock);
fail:
rcu_read_unlock();
return rc;