Просмотр исходного кода

Merge branch 'mac80211'

Phoebe Buckheister says:

====================
mac802154: llsec oversights

Fixes an unlock operation not matching a previous lock operation in an
unlikely error path and removes a redundant check.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 11 лет назад
Родитель
Сommit
beb584275b
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      net/mac802154/llsec.c

+ 2 - 2
net/mac802154/llsec.c

@@ -773,10 +773,10 @@ int mac802154_llsec_encrypt(struct mac802154_llsec *sec, struct sk_buff *skb)
 	rc = llsec_do_encrypt(skb, sec, &hdr, key);
 	rc = llsec_do_encrypt(skb, sec, &hdr, key);
 	llsec_key_put(key);
 	llsec_key_put(key);
 
 
-	return rc < 0 ? rc : 0;
+	return rc;
 
 
 fail_read:
 fail_read:
-	read_unlock(&sec->lock);
+	read_unlock_bh(&sec->lock);
 fail:
 fail:
 	rcu_read_unlock();
 	rcu_read_unlock();
 	return rc;
 	return rc;