The patch titled Subject: c/r: prctl: return -EFAULT instead of -EINVAL in case if underlied VMA is not found has been removed from the -mm tree. Its filename was c-r-prctl-return-efault-instead-of-einval-in-case-if-underlied-vma-is-not-found.patch This patch was dropped because it was folded into c-r-prctl-extend-pr_set_mm-to-set-up-more-mm_struct-entries-v2.patch The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ From: Cyrill Gorcunov <gorcunov@xxxxxxxxxx> Subject: c/r: prctl: return -EFAULT instead of -EINVAL in case if underlied VMA is not found In case if underlied VMA is not found prctl_set_mm will return -EINVAL, but Michael proposed to return -EFAULT and Kosaki seconded. Make it so. Reported-by: "Michael Kerrisk (man-pages)" <mtk.manpages@xxxxxxxxx> Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxxx> Acked-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Cc: Pavel Emelyanov <xemul@xxxxxxxxxxxxx>, Cc: Tejun Heo <tj@xxxxxxxxxx> Acked-by: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Serge Hallyn <serge.hallyn@xxxxxxxxxxxxx> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Acked-by: Michael Kerrisk <mtk.manpages@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/sys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN kernel/sys.c~c-r-prctl-return-efault-instead-of-einval-in-case-if-underlied-vma-is-not-found kernel/sys.c --- a/kernel/sys.c~c-r-prctl-return-efault-instead-of-einval-in-case-if-underlied-vma-is-not-found +++ a/kernel/sys.c @@ -1864,8 +1864,10 @@ static int prctl_set_mm(int opt, unsigne case PR_SET_MM_ARG_END: case PR_SET_MM_ENV_START: case PR_SET_MM_ENV_END: - if (!vma) + if (!vma) { + error = -EFAULT; goto out; + } #ifdef CONFIG_STACK_GROWSUP if (vma_flags_mismatch(vma, VM_READ | VM_WRITE | VM_GROWSUP, 0)) #else _ Patches currently in -mm which might be from gorcunov@xxxxxxxxxx are origin.patch sethostname-setdomainname-notify-userspace-when-there-is-a-change-in-uts_kern_table.patch pidns-use-task_active_pid_ns-in-do_notify_parent.patch pidns-make-killed-children-autoreap.patch sysctl-make-kernelns_last_pid-control-being-checkpoint_restore-dependent.patch fs-proc-introduce-proc-pid-task-tid-children-entry-v9.patch fs-proc-introduce-proc-pid-task-tid-children-entry-v9-fix.patch syscalls-x86-add-__nr_kcmp-syscall-v8.patch syscalls-x86-add-__nr_kcmp-syscall-v8-comment-update.patch syscalls-x86-add-__nr_kcmp-syscall-v8-comment-update-fix.patch c-r-procfs-add-arg_start-end-env_start-end-and-exit_code-members-to-proc-pid-stat.patch c-r-prctl-extend-pr_set_mm-to-set-up-more-mm_struct-entries-v2.patch c-r-prctl-add-ability-to-set-new-mm_struct-exe_file.patch c-r-prctl-add-ability-to-set-new-mm_struct-exe_file-update-after-mm-num_exe_file_vmas-removal.patch c-r-prctl-add-ability-to-set-new-mm_struct-exe_file-add-minimal-address-test-to-pr_set_mm.patch c-r-prctl-add-ability-to-get-clear_tid_address.patch c-r-prctl-drop-vma-flags-test-on-pr_set_mm_-stack-data-assignment.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html