Skip to content
Commit 41a0c249 authored by Colin Ian King's avatar Colin Ian King Committed by Linus Torvalds
Browse files

proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter

Writing to /proc/$pid/coredump_filter always returns -ESRCH because commit
774636e1 ("proc: convert to kstrto*()/kstrto*_from_user()") removed
the setting of ret after the get_proc_task call and incorrectly left it as
-ESRCH.  Instead, return 0 when successful.

Example breakage:

  echo 0 > /proc/self/coredump_filter
  bash: echo: write error: No such process

Fixes: 774636e1

 ("proc: convert to kstrto*()/kstrto*_from_user()")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Cc: <stable@vger.kernel.org> [4.3+]
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 73796d8b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment