Frederic Weisbecker e0ac8457d0 sh, hw_breakpoints: Fix racy access to ptrace breakpoints
While the tracer accesses ptrace breakpoints, the child task may
concurrently exit due to a SIGKILL and thus release its breakpoints
at the same time. We can then dereference some freed pointers.

To fix this, hold a reference on the child breakpoints before
manipulating them.

Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1302284067-7860-6-git-send-email-fweisbec@gmail.com
2011-04-25 17:36:12 +02:00
..
2011-03-31 11:26:23 -03:00
2010-09-30 09:43:32 +09:00
2010-01-12 15:22:26 +09:00
2010-04-26 19:08:55 +09:00
2010-06-02 16:31:42 +09:00
2010-11-01 09:49:04 -04:00
2010-11-01 09:49:04 -04:00
2010-10-07 14:08:55 +01:00
2011-03-31 11:26:23 -03:00
2010-06-14 17:06:10 +09:00
2010-04-26 19:08:55 +09:00
2010-07-14 17:14:00 +10:00
2010-11-01 09:49:04 -04:00
2009-09-01 17:38:32 +09:00
2010-12-16 11:36:43 +01:00
2010-06-14 15:16:53 +09:00
2009-03-18 18:57:43 +09:00
2011-03-31 11:26:23 -03:00
2010-01-12 18:42:52 +09:00
2010-02-15 14:49:37 +09:00
2009-03-10 12:55:40 +09:00
2011-03-22 21:56:08 +09:00
2011-03-22 21:56:08 +09:00