aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-04-14 11:23:14 +1000
committerJames Morris <james.l.morris@oracle.com>2014-04-14 11:23:14 +1000
commitecd740c6f2f092b90b95fa35f757973589eaaca2 (patch)
treece02b1e18c4fc5729699251460cd8be7604d8401 /security/keys
parentselinux: correctly label /proc inodes in use before the policy is loaded (diff)
parentLinux 3.14 (diff)
downloadlinux-dev-ecd740c6f2f092b90b95fa35f757973589eaaca2.tar.xz
linux-dev-ecd740c6f2f092b90b95fa35f757973589eaaca2.zip
Merge commit 'v3.14' into next
Diffstat (limited to 'security/keys')
-rw-r--r--security/keys/keyring.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/security/keys/keyring.c b/security/keys/keyring.c
index d46cbc5e335e..2fb2576dc644 100644
--- a/security/keys/keyring.c
+++ b/security/keys/keyring.c
@@ -1000,7 +1000,11 @@ static int keyring_detect_cycle_iterator(const void *object,
kenter("{%d}", key->serial);
- BUG_ON(key != ctx->match_data);
+ /* We might get a keyring with matching index-key that is nonetheless a
+ * different keyring. */
+ if (key != ctx->match_data)
+ return 0;
+
ctx->result = ERR_PTR(-EDEADLK);
return 1;
}