aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-08-21 13:50:47 +0200
committerChristian Brauner <brauner@kernel.org>2025-08-21 13:54:40 +0200
commitbe1e0283021ec73c2eb92839db9a471a068709d9 (patch)
tree51cf0d5982442bca24b95ed791cd1735345ef464 /fs/exec.c
parent41a86f62424ac436cb51e3de612ef1e1ddb0c873 (diff)
downloadlinux-be1e0283021ec73c2eb92839db9a471a068709d9.tar.gz
coredump: don't pointlessly check and spew warnings
When a write happens it doesn't make sense to check perform checks on the input. Skip them. Whether a fixes tag is licensed is a bit of a gray area here but I'll add one for the socket validation part I added recently. Link: https://lore.kernel.org/20250821-moosbedeckt-denunziant-7908663f3563@brauner Fixes: 16195d2c7dd2 ("coredump: validate socket name as it is written") Reported-by: Brad Spengler <brad.spengler@opensrcsec.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 2a1e5e4042a149..e861a4b7ffda92 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -2048,7 +2048,7 @@ static int proc_dointvec_minmax_coredump(const struct ctl_table *table, int writ
{
int error = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
- if (!error)
+ if (!error && !write)
validate_coredump_safety();
return error;
}