mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Gross <mgross@unix-os.sc.intel.com>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PATCH Multithreaded core dump support for the 2.5.14 (and 15) kernel.
Date: Thu, 16 May 2002 10:13:40 -0400	[thread overview]
Message-ID: <200205161714.g4GHE3w02908@unix-os.sc.intel.com> (raw)
In-Reply-To: <59885C5E3098D511AD690002A5072D3C057B485B@orsmsx111.jf.intel.com.suse.lists.linux.kernel> <200205152353.g4FNrew30146@unix-os.sc.intel.com.suse.lists.linux.kernel> <p73it5oz21j.fsf@oldwotan.suse.de>

On Thursday 16 May 2002 08:54 am, Andi Kleen wrote:
> Mark Gross <mgross@unix-os.sc.intel.com> writes:
> > Any driver that holds a lock across any sleep_on call I think is abusing
> > locks and needs adjusting.
>
> That's true for spinlocks, but not for semaphores. The mm layer and the
> vfs layer both use semaphores extensively and sleep with them hold,
> also some other subsystems (like networking) use sleeping locks.
>
> -Andi

Hmmm, then the only nasty bit I see is the down_write(&current->mm->mmap_sem) 
in elf_core_dump.  

If as durring a core dump, one of the suspended thread processes had the 
mmap_sem for the currently dumping process, AND was sleeping, then I could 
get into trouble.  This could happen with thread processes created using the 
CLONE_VM flag (pthread applications use this flag).

I've just spent a bit of time grepping around looking for places a process 
could grab the mmap_sem and then sleep but didn't find anything.   I know 
this doesn't prove anything, but I had to look ;)

Does anyone knowlegible with the use / role of the mm_sem in the kernel have 
any insight into its use that would help me?  I would really like to make the 
TCORE patch work well.

Also, does anyone know WHY the mmap_sem is needed in the elf_core_dump code, 
and is this need still valid if I've suspended all the other processes that 
could even touch that mm?  I.e. can I fix this by removing the down_write / 
up_write in elf_core_dump?

--mgross

  reply	other threads:[~2002-05-16 17:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <59885C5E3098D511AD690002A5072D3C057B485B@orsmsx111.jf.intel.com.suse.lists.linux.kernel>
     [not found] ` <20020515120722.A17644@in.ibm.com.suse.lists.linux.kernel>
     [not found]   ` <20020515140448.C37@toy.ucw.cz.suse.lists.linux.kernel>
     [not found]     ` <200205152353.g4FNrew30146@unix-os.sc.intel.com.suse.lists.linux.kernel>
2002-05-16 12:54       ` Andi Kleen
2002-05-16 14:13         ` Mark Gross [this message]
2002-05-16 17:27           ` Andi Kleen
2002-05-16 17:36             ` Daniel Jacobowitz
2002-05-16 18:08               ` Mark Gross
2002-05-16 21:32                 ` Alan Cox
2002-05-16 21:24                   ` Robert Love
2002-05-16 18:40                     ` Mark Gross
2002-05-20 15:44 Gross, Mark
  -- strict thread matches above, loose matches on Subject: below --
2002-05-17 12:26 Erich Focht
2002-05-14 16:38 Gross, Mark
2002-05-15  6:37 ` Vamsi Krishna S .
2002-05-15 14:04   ` Pavel Machek
2002-05-15 20:53     ` Mark Gross
2002-05-16 10:11       ` Pavel Machek
2002-05-13 19:17 Mark Gross
2002-05-14 15:35 ` Erich Focht

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=200205161714.g4GHE3w02908@unix-os.sc.intel.com \
    --to=mgross@unix-os.sc.intel.com \
    --cc=ak@suse.de \
    --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

all inboxes | Powered by JetHome®