diff options
author | David S. Miller <davem@davemloft.net> | 2015-10-02 07:21:25 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-02 07:21:25 -0700 |
commit | f6d3125fa3c2f55ddf7cf69365c41089de6cfae6 (patch) | |
tree | ff2bcb135ebf090d7b383d55123b621f4590632c /security | |
parent | 2dc6a0303b89de4c92b44f5278d61b6b6c9c20eb (diff) | |
parent | 36f8dafe52b0d0726edd5102900e37192f1d3c65 (diff) | |
download | linux-stable-f6d3125fa3c2f55ddf7cf69365c41089de6cfae6.tar.gz linux-stable-f6d3125fa3c2f55ddf7cf69365c41089de6cfae6.tar.bz2 linux-stable-f6d3125fa3c2f55ddf7cf69365c41089de6cfae6.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/dsa/slave.c
net/dsa/slave.c simply had overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security')
-rw-r--r-- | security/keys/gc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/security/keys/gc.c b/security/keys/gc.c index c7952375ac53..39eac1fd5706 100644 --- a/security/keys/gc.c +++ b/security/keys/gc.c @@ -134,6 +134,10 @@ static noinline void key_gc_unused_keys(struct list_head *keys) kdebug("- %u", key->serial); key_check(key); + /* Throw away the key data */ + if (key->type->destroy) + key->type->destroy(key); + security_key_free(key); /* deal with the user's key tracking and quota */ @@ -148,10 +152,6 @@ static noinline void key_gc_unused_keys(struct list_head *keys) if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags)) atomic_dec(&key->user->nikeys); - /* now throw away the key memory */ - if (key->type->destroy) - key->type->destroy(key); - key_user_put(key->user); kfree(key->description); |