]> bbs.cooldavid.org Git - net-next-2.6.git/commit
futex: Nullify robust lists after cleanup
authorPeter Zijlstra <peterz@infradead.org>
Mon, 5 Oct 2009 16:17:32 +0000 (18:17 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 6 Oct 2009 15:00:01 +0000 (17:00 +0200)
commitfc6b177dee33365ccb29fe6d2092223cf8d679f9
tree849fcb60282bc6c0a01c3113dfc617c7f03f97d3
parenteaaea8036d0261d87d7072c5bc88c7ea730c18ac
futex: Nullify robust lists after cleanup

The robust list pointers of user space held futexes are kept intact
over an exec() call. When the exec'ed task exits exit_robust_list() is
called with the stale pointer. The risk of corruption is minimal, but
still it is incorrect to keep the pointers valid. Actually glibc
should uninstall the robust list before calling exec() but we have to
deal with it anyway.

Nullify the pointers after [compat_]exit_robust_list() has been
called.

Reported-by: Anirban Sinha <ani@anirban.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <new-submission>
Cc: stable@kernel.org
kernel/fork.c