diff options
| author | Christian Brauner <[email protected]> | 2025-04-14 13:55:06 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2025-05-02 12:28:46 +0000 |
| commit | 95c5f43181fe9c1b5e5a4bd3281c857a5259991f (patch) | |
| tree | 8ca69c2a9b138cf0be3e91b2a208dc88817fdcfa /net/unix/af_unix.c | |
| parent | pidfs: move O_RDWR into pidfs_alloc_file() (diff) | |
| download | kernel-95c5f43181fe9c1b5e5a4bd3281c857a5259991f.tar.gz kernel-95c5f43181fe9c1b5e5a4bd3281c857a5259991f.zip | |
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/[email protected]
Tested-by: Luca Boccassi <[email protected]>
Reviewed-by: Oleg Nesterov <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
