diff options
Diffstat (limited to 'kernel/capability.c')
-rw-r--r-- | kernel/capability.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/capability.c b/kernel/capability.c index c2316d3fa094..c450375e855f 100644 --- a/kernel/capability.c +++ b/kernel/capability.c | |||
@@ -169,8 +169,8 @@ SYSCALL_DEFINE2(capget, cap_user_header_t, header, cap_user_data_t, dataptr) | |||
169 | kernel_cap_t pE, pI, pP; | 169 | kernel_cap_t pE, pI, pP; |
170 | 170 | ||
171 | ret = cap_validate_magic(header, &tocopy); | 171 | ret = cap_validate_magic(header, &tocopy); |
172 | if (ret != 0) | 172 | if ((dataptr == NULL) || (ret != 0)) |
173 | return ret; | 173 | return ((dataptr == NULL) && (ret == -EINVAL)) ? 0 : ret; |
174 | 174 | ||
175 | if (get_user(pid, &header->pid)) | 175 | if (get_user(pid, &header->pid)) |
176 | return -EFAULT; | 176 | return -EFAULT; |