summaryrefslogtreecommitdiff
path: root/security/keys
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-04-14 05:23:14 +0400
committerJames Morris <james.l.morris@oracle.com>2014-04-14 05:23:14 +0400
commitecd740c6f2f092b90b95fa35f757973589eaaca2 (patch)
treece02b1e18c4fc5729699251460cd8be7604d8401 /security/keys
parentf64410ec665479d7b4b77b7519e814253ed0f686 (diff)
parent455c6fdbd219161bd09b1165f11699d6d73de11c (diff)
downloadlinux-ecd740c6f2f092b90b95fa35f757973589eaaca2.tar.xz
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;
}