]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
s390/process: avoid potential reading of freed stack
authorVasily Gorbik <gor@linux.ibm.com>
Tue, 13 Aug 2019 18:11:08 +0000 (20:11 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 18:04:17 +0000 (19:04 +0100)
commit133ebe2bb9ec3c7b82366efa59950bd643cd2a81
tree1d14474cea807916f585750d0ab9270080a58ca6
parentad85666cf30fb921558424a18cabbf396361a90c
s390/process: avoid potential reading of freed stack

BugLink: https://bugs.launchpad.net/bugs/1849576
commit 8769f610fe6d473e5e8e221709c3ac402037da6c upstream.

With THREAD_INFO_IN_TASK (which is selected on s390) task's stack usage
is refcounted and should always be protected by get/put when touching
other task's stack to avoid race conditions with task's destruction code.

Fixes: d5c352cdd022 ("s390: move thread_info into task_struct")
Cc: stable@vger.kernel.org # v4.10+
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/s390/kernel/process.c