nptl: Don't madvise user provided stack
commit087942251f26d5fd5802b8d14e47d460263a0c4d
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Wed, 24 Jun 2020 06:47:15 +0000 (24 07:47 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 25 Jun 2020 13:19:16 +0000 (25 14:19 +0100)
tree58df96511a0b52696ba666628506ba37f913abac
parentf6b955e8ba4f0bcc7b9dafa64406d3b40edfa107
nptl: Don't madvise user provided stack

User provided stack should not be released nor madvised at
thread exit because it's owned by the user.

If the memory is shared or file based then MADV_DONTNEED
can have unwanted effects. With memory tagging on aarch64
linux the tags are dropped and thus it may invalidate
pointers.

Tested on aarch64-linux-gnu with MTE, it fixes

FAIL: nptl/tst-stack3
FAIL: nptl/tst-stack3-mem
nptl/pthread_create.c