Revert "um: allocate a guard page to helper threads"
authorJohannes Berg <johannes.berg@intel.com>
Sun, 10 Jan 2021 18:05:08 +0000 (19:05 +0100)
committerRichard Weinberger <richard@nod.at>
Tue, 26 Jan 2021 21:11:38 +0000 (22:11 +0100)
commit2fcb4090cd7352665ecb756990a3087bfd86a295
tree4562c5264a7b6326b8cdf82ebe379bc351ab58d4
parentf4172b084342fd3f9e38c10650ffe19eac30d8ce
Revert "um: allocate a guard page to helper threads"

This reverts commit ef4459a6da09 ("um: allocate a guard page to
helper threads"), it's broken in multiple ways:

 1) the free no longer matches the alloc; and

 2) more importantly, the set_memory_ro() causes allocation of
    page tables for the normal memory that doesn't have any,
    and that later causes corruption and crashes (usually but
    not always in vfree()).

We could fix the first bug and use vmalloc() to work around the
second, but set_memory_ro() actually doesn't do anything either
so I'll just revert that as well.

Reported-by: Benjamin Berg <benjamin@sipsolutions.net>
Fixes: ef4459a6da09 ("um: allocate a guard page to helper threads")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/ubd_kern.c
arch/um/include/shared/kern_util.h
arch/um/kernel/process.c
arch/um/os-Linux/helper.c