public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Horsley <tom.horsley@att.net>
To: linux-kernel@vger.kernel.org
Subject: ptrace & /proc deadlock due to mm_for_maps cred_guard_mutex patch
Date: Wed, 2 Sep 2009 19:28:09 -0400	[thread overview]
Message-ID: <20090902192809.5f3efb48@zooty> (raw)

The redhat bugzilla:

https://bugzilla.redhat.com/show_bug.cgi?id=520206#c2

describes a test program that demonstrates an apparent
deadlock ptrace can get into as a result of the
patch:

   commit 704b836cbf19e885f8366bccb2e4b0474346c02d
   Author: Oleg Nesterov <oleg@redhat.com>
   Date:   Fri Jul 10 03:27:40 2009 +0200
   mm_for_maps: take ->cred_guard_mutex to fix the race with exec  

ptrace hangs attempting to read the newly exec'ed debugged
child process /proc/pid/maps file, and the child is obviously
never going to advance as long as it is stopped by ptrace.

I haven't seen any activity on the bugzilla, so since this
was a kernel.org patch I figured I'd mention it over here.

As the bugzilla says, it is possible to work around this by
single stepping the debugged process before reading the maps
file.

                 reply	other threads:[~2009-09-02 23:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090902192809.5f3efb48@zooty \
    --to=tom.horsley@att.net \
    --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