Markus Metzger 9f339e7028 x86, ptrace, mm: fix double-free on race
Ptrace_detach() races with __ptrace_unlink() if the traced task is
reaped while detaching. This might cause a double-free of the BTS
buffer.

Change the ptrace_detach() path to only do the memory accounting in
ptrace_bts_detach() and leave the buffer free to ptrace_bts_untrace()
which will be called from __ptrace_unlink().

The fix follows a proposal from Oleg Nesterov.

Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-02-11 15:44:20 +01:00
..
2009-01-09 03:39:43 -05:00
2008-10-16 16:53:13 +02:00
2008-12-12 11:08:42 +01:00
2009-02-10 13:13:23 +01:00
2009-01-04 18:19:37 +01:00
2008-12-31 18:07:42 -05:00
2009-01-04 13:23:07 +01:00
2009-01-04 18:19:37 +01:00
2009-01-04 13:23:04 +01:00
2009-01-04 13:23:04 +01:00
2009-01-02 17:46:24 +01:00
2008-07-26 12:00:04 -07:00
2009-01-06 13:34:03 +01:00
2008-10-12 12:37:32 +02:00
2008-12-16 20:36:44 +01:00
2008-10-20 08:52:41 -07:00
2008-07-16 12:15:17 -07:00
2008-07-26 16:31:35 +02:00
2008-07-22 14:35:57 +02:00
2008-10-22 22:55:23 -07:00
2009-01-04 13:23:05 +01:00
2009-01-04 13:23:05 +01:00
2008-07-22 14:35:57 +02:00
2008-10-16 16:53:13 +02:00
2008-07-22 14:35:57 +02:00
2008-10-29 08:02:28 +01:00