public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Kirill Korotaev <dev@sw.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Again: Fix multithread coredump deadlock (patch Manfred Spraul)
Date: Thu, 03 Jul 2003 19:02:15 +0200	[thread overview]
Message-ID: <3F046197.40600@colorfullife.com> (raw)
In-Reply-To: <200307031238.10570.dev@sw.ru>

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


      reply	other threads:[~2003-07-03 16:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-03  8:38 Again: Fix multithread coredump deadlock (patch Manfred Spraul) Kirill Korotaev
2003-07-03 17:02 ` Manfred Spraul [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F046197.40600@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=dev@sw.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox