kernel_optimize_test/arch/um
Johannes Berg 7f8fd5dd43 um: chan_user: Fix winch_tramp() return value
commit 57ae0b67b747031bc41fb44643aa5344ab58607e upstream.

The previous fix here was only partially correct, it did
result in returning a proper error value in case of error,
but it also clobbered the pid that we need to return from
this function (not just zero for success).

As a result, it returned 0 here, but later this is treated
as a pid and used to kill the process, but since it's now
0 we kill(0, SIGKILL), which makes UML kill itself rather
than just the helper thread.

Fix that and make it more obvious by using a separate
variable for the pid.

Fixes: ccf1236ecac4 ("um: fix error return code in winch_tramp()")
Reported-and-tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-09 10:21:26 +02:00
..
configs um: Cleanup CONFIG_IOSCHED_CFQ 2020-03-29 23:15:22 +02:00
drivers um: chan_user: Fix winch_tramp() return value 2022-06-09 10:21:26 +02:00
include ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP 2022-06-09 10:20:49 +02:00
kernel ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP 2022-06-09 10:20:49 +02:00
os-Linux um: registers: Rename function names to avoid conflicts and build problems 2022-01-27 10:54:18 +01:00
scripts License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kconfig Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-22 09:59:21 -07:00
Kconfig.debug um: Disable CONFIG_GCOV with MODULES 2021-05-22 11:40:53 +02:00
Makefile kbuild: remove cc-option test of -fno-stack-protector 2020-07-07 11:13:10 +09:00
Makefile-os-Linux
Makefile-skas