Skip to content

Commit

Permalink
coredump: fix the setting of PF_DUMPCORE
Browse files Browse the repository at this point in the history
Commit 079148b ("coredump: factor out the setting of PF_DUMPCORE")
cleaned up the setting of PF_DUMPCORE by removing it from all the
linux_binfmt->core_dump() and moving it to zap_threads().But this ended
up clearing all the previously set flags.  This causes issues during
core generation when tsk->flags is checked again (eg.  for PF_USED_MATH
to dump floating point registers).  Fix this.

Signed-off-by: Silesh C V <[email protected]>
Acked-by: Oleg Nesterov <[email protected]>
Cc: Mandeep Singh Baines <[email protected]>
Cc: <[email protected]>	[3.10+]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Silesh C V authored and torvalds committed Jul 23, 2014
1 parent 15ba223 commit aed8adb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/coredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ static int zap_threads(struct task_struct *tsk, struct mm_struct *mm,
if (unlikely(nr < 0))
return nr;

tsk->flags = PF_DUMPCORE;
tsk->flags |= PF_DUMPCORE;
if (atomic_read(&mm->mm_users) == nr + 1)
goto done;
/*
Expand Down

0 comments on commit aed8adb

Please sign in to comment.