futex: Nullify robust lists after cleanup
commit1c4dacc248f10d641c9ea3a65a8d260d28732e6e
authorPeter Zijlstra <peterz@infradead.org>
Mon, 5 Oct 2009 16:17:32 +0000 (5 18:17 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 12 Oct 2009 19:40:11 +0000 (12 12:40 -0700)
tree99da23e7208b2d756de191cef87c69819742d6ce
parent3e82b94373aeccc3624e228e40a60749f70deaf8
futex: Nullify robust lists after cleanup

commit fc6b177dee33365ccb29fe6d2092223cf8d679f9 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/fork.c