[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1400584463-21692-2-git-send-email-phoebe.buckheister@itwm.fraunhofer.de>
Date: Tue, 20 May 2014 13:14:22 +0200
From: Phoebe Buckheister <phoebe.buckheister@...m.fraunhofer.de>
To: netdev@...r.kernel.org
Cc: linux-zigbee-devel@...ts.sourceforge.net, davem@...emloft.net,
Phoebe Buckheister <phoebe.buckheister@...m.fraunhofer.de>
Subject: [PATCH net-next 1/2] 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@...m.fraunhofer.de>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
---
net/mac802154/llsec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c
index a83674e..6edcb20 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;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists