* Again: Fix multithread coredump deadlock (patch Manfred Spraul)
@ 2003-07-03 8:38 Kirill Korotaev
2003-07-03 17:02 ` Manfred Spraul
0 siblings, 1 reply; 2+ messages in thread
From: Kirill Korotaev @ 2003-07-03 8:38 UTC (permalink / raw)
To: manfred; +Cc: linux-kernel
Hi!
There was a patch some time ago included in linux-2.4.17-pre6 which fixed mmap
semaphore deadlock in do_coredump (double down_read() on mmap_sem).
This fix introduces down_write() on mmap_sem and uses get_user_pages()
function to avoid do_page_fault().
The question is why down_write() is used in elf_core_dump() (instead of
down_read())?
Kirill
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Again: Fix multithread coredump deadlock (patch Manfred Spraul)
2003-07-03 8:38 Again: Fix multithread coredump deadlock (patch Manfred Spraul) Kirill Korotaev
@ 2003-07-03 17:02 ` Manfred Spraul
0 siblings, 0 replies; 2+ messages in thread
From: Manfred Spraul @ 2003-07-03 17:02 UTC (permalink / raw)
To: Kirill Korotaev; +Cc: linux-kernel
Kirill Korotaev wrote:
>Hi!
>
>There was a patch some time ago included in linux-2.4.17-pre6 which fixed mmap
>semaphore deadlock in do_coredump (double down_read() on mmap_sem).
>This fix introduces down_write() on mmap_sem and uses get_user_pages()
>function to avoid do_page_fault().
>The question is why down_write() is used in elf_core_dump() (instead of
>down_read())?
>
>
down_write is required to prevent expand_stack() from growing the stack
- expand_stack is called by the page fault handler under
down_read(&->mmap_sem) and changes vma->vm_start. A change of vm_start
between writing the program headers and the actual segment dump would
corrupt the coredump.
--
Manfred
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-03 16:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-03 8:38 Again: Fix multithread coredump deadlock (patch Manfred Spraul) Kirill Korotaev
2003-07-03 17:02 ` Manfred Spraul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).