diff options
| author | Chen Jie <chenjie6@huawei.com> | 2019-03-15 03:44:38 +0000 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-09-11 14:26:36 +0200 |
| commit | 1df42f16714e9bbf58917390a29ad564c9df7a14 (patch) | |
| tree | f3df79d54ba89d7bb69a11813d192b22616c1c58 /kernel/kthread.c | |
| parent | af8543463d699874fb15b0297de26aa9ad4f8f1b (diff) | |
futex: Ensure that futex address is aligned in handle_futex_death()
commit 5a07168d8d89b00fe1760120714378175b3ef992 upstream.
The futex code requires that the user space addresses of futexes are 32bit
aligned. sys_futex() checks this in futex_get_keys() but the robust list
code has no alignment check in place.
As a consequence the kernel crashes on architectures with strict alignment
requirements in handle_futex_death() when trying to cmpxchg() on an
unaligned futex address which was retrieved from the robust list.
[ tglx: Rewrote changelog, proper sizeof() based alignement check and add
comment ]
Fixes: 0771dfefc9e5 ("[PATCH] lightweight robust futexes: core")
Change-Id: Ia19dbc196f5debc3c506f7d65fc2e155c835703d
Signed-off-by: Chen Jie <chenjie6@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: <dvhart@infradead.org>
Cc: <peterz@infradead.org>
Cc: <zengweilin@huawei.com>
Link: https://lkml.kernel.org/r/1552621478-119787-1-git-send-email-chenjie6@huawei.com
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'kernel/kthread.c')
0 files changed, 0 insertions, 0 deletions
