]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] pi-futex: Validate futex type instead of oopsing
authorThomas Gleixner <tglx@linutronix.de>
Mon, 10 Jul 2006 11:44:30 +0000 (04:44 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 10 Jul 2006 20:24:18 +0000 (13:24 -0700)
commit19b25f658da6ebf5043d58ff32d9eceeb31b4188
treea98c1293470967bfa93e250b99b6a0ff129e3dee
parentb462823260218732cde5ee23918f2f8f53aa7431
[PATCH] pi-futex: Validate futex type instead of oopsing

Calling futex_lock_pi is called with a reference to a non PI futex and
waiters exist already, lookup_pi_state() oopses due to pi_state == NULL.
Check this condition and return -EINVAL to userspace.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/futex.c