diff options
author | Johannes Berg <johannes.berg@intel.com> | 2021-01-13 22:09:42 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2021-02-12 21:34:33 +0100 |
commit | 84b2789d61156db0224724806b20110c0d34b07c (patch) | |
tree | 2af3dfceb3fb3fc0271c0cc742db74b9c10afffe /arch/x86/um | |
parent | a7d48886cacf8b426e0079bca9639d2657cf2d38 (diff) | |
download | linux-84b2789d61156db0224724806b20110c0d34b07c.tar.gz linux-84b2789d61156db0224724806b20110c0d34b07c.tar.bz2 linux-84b2789d61156db0224724806b20110c0d34b07c.zip |
um: separate child and parent errors in clone stub
If the two are mixed up, then it looks as though the parent
returned an error if the child failed (before) the mmap(),
and then the resulting process never gets killed. Fix this
by splitting the child and parent errors, reporting and
using them appropriately.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/x86/um')
-rw-r--r-- | arch/x86/um/shared/sysdep/stub_32.h | 2 | ||||
-rw-r--r-- | arch/x86/um/shared/sysdep/stub_64.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/um/shared/sysdep/stub_32.h b/arch/x86/um/shared/sysdep/stub_32.h index 51fd256c75f0..8ea69211e53c 100644 --- a/arch/x86/um/shared/sysdep/stub_32.h +++ b/arch/x86/um/shared/sysdep/stub_32.h @@ -86,7 +86,7 @@ static inline void remap_stack(int fd, unsigned long offset) "d" (PROT_READ | PROT_WRITE), "S" (MAP_FIXED | MAP_SHARED), "D" (fd), "a" (offset), - "i" (&((struct stub_data *) STUB_DATA)->err) + "i" (&((struct stub_data *) STUB_DATA)->child_err) : "memory"); } diff --git a/arch/x86/um/shared/sysdep/stub_64.h b/arch/x86/um/shared/sysdep/stub_64.h index 994df93c5ed3..b7b8b8e4359d 100644 --- a/arch/x86/um/shared/sysdep/stub_64.h +++ b/arch/x86/um/shared/sysdep/stub_64.h @@ -92,7 +92,7 @@ static inline void remap_stack(long fd, unsigned long offset) "d" (PROT_READ | PROT_WRITE), "g" (MAP_FIXED | MAP_SHARED), "g" (fd), "g" (offset), - "i" (&((struct stub_data *) STUB_DATA)->err) + "i" (&((struct stub_data *) STUB_DATA)->child_err) : __syscall_clobber, "r10", "r8", "r9" ); } |