diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-05-20 19:45:36 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2022-05-27 09:03:41 +0200 |
commit | 57ae0b67b747031bc41fb44643aa5344ab58607e (patch) | |
tree | 1e9d908c43466f475d90e4e0cc01249e8b11afcb /arch/x86/um | |
parent | af9fb41ed315ce95f659f0b10b4d59a71975381d (diff) | |
download | linux-57ae0b67b747031bc41fb44643aa5344ab58607e.tar.gz linux-57ae0b67b747031bc41fb44643aa5344ab58607e.tar.bz2 linux-57ae0b67b747031bc41fb44643aa5344ab58607e.zip |
um: chan_user: Fix winch_tramp() return value
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>
Diffstat (limited to 'arch/x86/um')
0 files changed, 0 insertions, 0 deletions