diff options
Diffstat (limited to 'security/keys')
-rw-r--r-- | security/keys/compat.c | 4 | ||||
-rw-r--r-- | security/keys/keyring.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/security/keys/compat.c b/security/keys/compat.c index bbd32c729dbb..347896548ad3 100644 --- a/security/keys/compat.c +++ b/security/keys/compat.c | |||
@@ -65,8 +65,8 @@ no_payload: | |||
65 | * taking a 32-bit syscall are zero. If you can, you should call sys_keyctl() | 65 | * taking a 32-bit syscall are zero. If you can, you should call sys_keyctl() |
66 | * directly. | 66 | * directly. |
67 | */ | 67 | */ |
68 | asmlinkage long compat_sys_keyctl(u32 option, | 68 | COMPAT_SYSCALL_DEFINE5(keyctl, u32, option, |
69 | u32 arg2, u32 arg3, u32 arg4, u32 arg5) | 69 | u32, arg2, u32, arg3, u32, arg4, u32, arg5) |
70 | { | 70 | { |
71 | switch (option) { | 71 | switch (option) { |
72 | case KEYCTL_GET_KEYRING_ID: | 72 | case KEYCTL_GET_KEYRING_ID: |
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, | |||
1000 | 1000 | ||
1001 | kenter("{%d}", key->serial); | 1001 | kenter("{%d}", key->serial); |
1002 | 1002 | ||
1003 | BUG_ON(key != ctx->match_data); | 1003 | /* We might get a keyring with matching index-key that is nonetheless a |
1004 | * different keyring. */ | ||
1005 | if (key != ctx->match_data) | ||
1006 | return 0; | ||
1007 | |||
1004 | ctx->result = ERR_PTR(-EDEADLK); | 1008 | ctx->result = ERR_PTR(-EDEADLK); |
1005 | return 1; | 1009 | return 1; |
1006 | } | 1010 | } |