Skip to contentSkip to conversation

coredump: binfmt_elf_fdpic: don't use sub-thread's ->mm

PATCH In review Oleg Nesterov 1 participant 1 message Jul 16, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 coredump: binfmt_elf_fdpic: don't use sub-thread's ->mm

Change binfmt_elf_fdpic.c:fill_prstatus() to use current->mm instead of p->mm. They are equal, but with the next patch p->mm == NULL.

 binfmt_elf_fdpic.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/binfmt_elf_fdpic.c renamed from fs/binfmt_elf_fdpic.c~6_DONT_USE_MM +2 -2
@@ -1374,8 +1374,8 @@ static void fill_prstatus(struct elf_prs
 	cputime_to_timeval(p->signal->cutime, &prstatus->pr_cutime);
 	cputime_to_timeval(p->signal->cstime, &prstatus->pr_cstime);
 
-	prstatus->pr_exec_fdpic_loadmap = p->mm->context.exec_fdpic_loadmap;
-	prstatus->pr_interp_fdpic_loadmap = p->mm->context.interp_fdpic_loadmap;
+	prstatus->pr_exec_fdpic_loadmap = current->mm->context.exec_fdpic_loadmap;
+	prstatus->pr_interp_fdpic_loadmap = current->mm->context.interp_fdpic_loadmap;
 }
 
 static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p,