mac802154: llsec: add forgotten list_del_rcu in key removal
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Fri, 6 Jun 2014 12:27:52 +0000 (14:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Jun 2014 23:25:37 +0000 (16:25 -0700)
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>
net/mac802154/llsec.c

index e4a25589ec19fbbf21688429be6ead557439e11b..1456f73b02b9f8ae92909d84ee408d0c6ca93987 100644 (file)
@@ -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;
                }