futex: fix reference leak
authorPeter Zijlstra <peterz@infradead.org>
Wed, 11 Feb 2009 17:10:10 +0000 (18:10 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 11 Feb 2009 17:24:08 +0000 (18:24 +0100)
Catalin noticed that (38d47c1b7075: futex: rely on get_user_pages() for
shared futexes) caused an mm_struct leak.

Some tracing with the function graph tracer quickly pointed out that
futex_wait() has exit paths with unbalanced reference counts.

This regression was discovered by kmemleak.

Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

No differences found