Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f3eabcd authored by Phoebe Buckheister's avatar Phoebe Buckheister Committed by David S. Miller
Browse files

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: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 68bc74fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;