Skip to contentSkip to conversation

proc: fix /proc/*/coredump_filter write return value

PATCH New Alexey Dobriyan 1 participant 1 message Nov 6, 2015 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 proc: fix /proc/*/coredump_filter write return value

From: Joshua Baergen <[email protected]>

https://bugzilla.kernel.org/show_bug.cgi?id=107321

commit 774636e19ed514cdf560006813c0473409616de8 ("proc: convert to kstrto*()/kstrto*_from_user()")

made write to /proc/*/coredump_filter always return -ESRCH (still new value was applied correctly).

---

 fs/proc/base.c |    1 +
 1 file changed, 1 insertion(+)
fs/proc/base.c +1 -0
@@ -2503,6 +2503,7 @@ static ssize_t proc_coredump_filter_write(struct file *file,
 	}
 
 	mmput(mm);
+	ret = 0;
  out_no_mm:
 	put_task_struct(task);
  out_no_task: