Messages in this thread | | | Date | Fri, 27 Jun 2008 16:00:50 -0400 | From | Jeff Dike <> | Subject | Re: BUG: Linux 2.6.25 ptrace leaks struct_task |
| |
On Fri, Jun 27, 2008 at 08:30:45PM +0200, Joris van Rantwijk wrote: > I think sys32_ptrace() is leaking struct_task. > > In arch/x86/kernel/ptrace.c, function sys32_ptrace(), there > is a call to ptrace_get_task_struct(). In some cases (such as > PTRACE_GETREGS), there is no matching call to put_task_struct().
Yup, good diagnosis. The culprit is 5a4646a4efed8c835f76c3b88f3155f6ab5b8d9b. Doing an s/return /ret = / inside that switch should fix the bug.
It looks like it's since been fixed in mainline by the restructuring done in 562b80bafffaf42a6d916b0a2ee3d684220a1c10.
Jeff
-- Work email - jdike at linux dot intel dot com
| |