Skip to content

Commit 227175b

Browse files
nviennotChristian Brauner
authored andcommitted
prctl: exe link permission error changed from -EINVAL to -EPERM
This brings consistency with the rest of the prctl() syscall where -EPERM is returned when failing a capability check. Signed-off-by: Nicolas Viennot <[email protected]> Signed-off-by: Adrian Reber <[email protected]> Reviewed-by: Serge Hallyn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent ebd6de6 commit 227175b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ static int prctl_set_mm_map(int opt, const void __user *addr, unsigned long data
20152015
* This may have implications in the tomoyo subsystem.
20162016
*/
20172017
if (!checkpoint_restore_ns_capable(current_user_ns()))
2018-
return -EINVAL;
2018+
return -EPERM;
20192019

20202020
error = prctl_set_mm_exe_file(mm, prctl_map.exe_fd);
20212021
if (error)

0 commit comments

Comments
 (0)