From: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Date: Fri, 6 Jun 2014 12:27:52 +0000 (+0200)
Subject: mac802154: llsec: add forgotten list_del_rcu in key removal
X-Git-Tag: v3.16-rc1~27^2~52
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fff1f59b1773fcbb563c503ad9c7ace54062144b;p=users%2Fdwmw2%2Flinux.git

mac802154: llsec: add forgotten list_del_rcu in key removal

During key removal, the key object is freed, but not taken out of the
llsec key list properly. Fix that.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
---

diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c
index e4a25589ec19f..1456f73b02b9f 100644
--- a/net/mac802154/llsec.c
+++ b/net/mac802154/llsec.c
@@ -285,6 +285,7 @@ int mac802154_llsec_key_del(struct mac802154_llsec *sec,
 		mkey = container_of(pos->key, struct mac802154_llsec_key, key);
 
 		if (llsec_key_id_equal(&pos->id, key)) {
+			list_del_rcu(&pos->list);
 			llsec_key_put(mkey);
 			return 0;
 		}