Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1333972 > unrolled thread
| Started by | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| First post | 2016-02-15 01:20 +0100 |
| Last post | 2016-02-15 01:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 4.3 021/200] proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:20 +0100
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:20 +0100 |
| Subject | [PATCH 4.3 021/200] proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter |
| Message-ID | <r2f3v-1Hd-57@gated-at.bofh.it> |
4.3-stable review patch. If anyone has any objections, please let me know.
------------------
From: Colin Ian King <colin.king@canonical.com>
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 <colin.king@canonical.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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)
Back to top | Article view | linux.kernel
csiph-web