diff options
author | Christian Brauner <brauner@kernel.org> | 2025-04-14 15:55:06 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-05-02 14:28:46 +0200 |
commit | 95c5f43181fe9c1b5e5a4bd3281c857a5259991f (patch) | |
tree | 8ca69c2a9b138cf0be3e91b2a208dc88817fdcfa /net/unix/af_unix.c | |
parent | c57f07b235871c9e5bffaccd458dca2d9a62b164 (diff) |
coredump: fix error handling for replace_fd()
The replace_fd() helper returns the file descriptor number on success
and a negative error code on failure. The current error handling in
umh_pipe_setup() only works because the file descriptor that is replaced
is zero but that's pretty volatile. Explicitly check for a negative
error code.
Link: https://lore.kernel.org/20250414-work-coredump-v2-2-685bf231f828@kernel.org
Tested-by: Luca Boccassi <luca.boccassi@gmail.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions