aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-01 12:53:14 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-01 12:53:14 -0800
commit6e9131cc43a672003a75483d9b9db5c51015ae5f (patch)
tree23deb539a695272dc9f003b4ab094037ccc10f31 /security
parenttty: Remove ASYNC_CLOSING (diff)
parentLinux 4.5-rc2 (diff)
downloadlinux-dev-6e9131cc43a672003a75483d9b9db5c51015ae5f.tar.xz
linux-dev-6e9131cc43a672003a75483d9b9db5c51015ae5f.zip
Merge 4.5-rc2 into tty-next
We want the tty/serial fixes in here as well to make merges easier. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
-rw-r--r--security/keys/key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/keys/key.c b/security/keys/key.c
index 07a87311055c..09ef276c4bdc 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -430,7 +430,8 @@ static int __key_instantiate_and_link(struct key *key,
/* and link it into the destination keyring */
if (keyring) {
- set_bit(KEY_FLAG_KEEP, &key->flags);
+ if (test_bit(KEY_FLAG_KEEP, &keyring->flags))
+ set_bit(KEY_FLAG_KEEP, &key->flags);
__key_link(key, _edit);
}