summaryrefslogtreecommitdiffstats
path: root/keyring-fix.patch
blob: 6539144e40c29f27e1c003b2f2d7d6bfe8e29276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
@@ -, +, @@ 
---
--- a/security/keys/keyring.c	
+++ a/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;
 }