Re: Oops: ptrace fix buggy

Marc-Christian Petersen (m.c.p@wolk-project.de)
Sat, 12 Apr 2003 11:54:32 +0200


--Boundary-00=_YJ+l+B5NrJ5m/YQ
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Saturday 12 April 2003 09:13, Ken Brownfield wrote:

Hi Ken,

> I'm reproducing this as well when using gdb. Two oopses attached.
> This is with the ptrace patch applied to 2.4.20 (SMP/i386/P3).
Does the attached patch fixes the issue?

ciao, Marc
--Boundary-00=_YJ+l+B5NrJ5m/YQ
Content-Type: text/x-diff;
charset="iso-8859-1";
name="ptrace-oops-fix.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="ptrace-oops-fix.patch"

diff -Naurp linux-2.4.20/include/linux/sched.h linux-2.4.20-ptrace/include/linux/sched.h
--- linux-2.4.20/include/linux/sched.h 2003-03-20 14:35:49.000000000 +0100
+++ linux-2.4.20-ptrace/include/linux/sched.h 2003-04-07 18:20:45.000000000 +0200
@@ -478,7 +479,7 @@ struct task_struct {
#define PT_TRACESYSGOOD 0x00000008
#define PT_PTRACE_CAP 0x00000010 /* ptracer can follow suid-exec */

-#define is_dumpable(tsk) ((tsk)->task_dumpable && (tsk)->mm->dumpable)
+#define is_dumpable(tsk) ((tsk)->task_dumpable && (tsk)->mm && (tsk)->mm->dumpable)

/*
* Limit the stack by to some sane default: root can always

--Boundary-00=_YJ+l+B5NrJ5m/YQ--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/