Patch "proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter" has been added to the 4.3-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter
to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
proc-fix-esrch-error-when-writing-to-proc-pid-coredump_filter.patch
and it can be found in the queue-4.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
41a0c249cb8706a2efa1ab3d59466b23a27d0c8bMon Sep 17 00:00:00 2001
From: Colin Ian King <[email protected]>
Date: Fri, 18 Dec 2015 14:22:01 -0800
Subject: proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter
From: Colin Ian King <[email protected]>
commit 41a0c249cb8706a2efa1ab3d59466b23a27d0c8b upstream.
Writing to /proc/$pid/coredump_filter always returns -ESRCH because commit 774636e19ed51 ("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
--- fs/proc/base.c | 1 + 1 file changed, 1 insertion(+)
fs/proc/base.c +1 -0
@@ -2484,6 +2484,7 @@ static ssize_t proc_coredump_filter_writ mm =get_task_mm (task);if (!mm) goto out_no_mm; + ret =0 ;for (i =0 , mask =1 ; i <MMF_DUMP_FILTER_BITS ; i++, mask <<=1 ) {if (val & mask)
Patches currently in stable-queue which might be from [email protected] are
queue-4.3/proc-fix-esrch-error-when-writing-to-proc-pid-coredump_filter.patch