From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:49062 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750928AbcBLVBe (ORCPT ); Fri, 12 Feb 2016 16:01:34 -0500 Subject: Patch "proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter" has been added to the 4.3-stable tree To: colin.king@canonical.com, akpm@linux-foundation.org, gregkh@linuxfoundation.org, keescook@chromium.org, torvalds@linux-foundation.org Cc: , From: Date: Fri, 12 Feb 2016 13:01:33 -0800 Message-ID: <145531089327239@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 41a0c249cb8706a2efa1ab3d59466b23a27d0c8b Mon Sep 17 00:00:00 2001 From: Colin Ian King 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 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 Fixes: 774636e19ed51 ("proc: convert to kstrto*()/kstrto*_from_user()") Signed-off-by: Colin Ian King Acked-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- fs/proc/base.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -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 colin.king@canonical.com are queue-4.3/proc-fix-esrch-error-when-writing-to-proc-pid-coredump_filter.patch