mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
coredump: fix the setting of PF_DUMPCORE
Commit 079148b919
("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 <svellattu@mvista.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Mandeep Singh Baines <msb@chromium.org>
Cc: <stable@vger.kernel.org> [3.10+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
15ba2236f3
commit
aed8adb768
@@ -306,7 +306,7 @@ static int zap_threads(struct task_struct *tsk, struct mm_struct *mm,
|
|||||||
if (unlikely(nr < 0))
|
if (unlikely(nr < 0))
|
||||||
return nr;
|
return nr;
|
||||||
|
|
||||||
tsk->flags = PF_DUMPCORE;
|
tsk->flags |= PF_DUMPCORE;
|
||||||
if (atomic_read(&mm->mm_users) == nr + 1)
|
if (atomic_read(&mm->mm_users) == nr + 1)
|
||||||
goto done;
|
goto done;
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user