mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.21-rc5-mm4: ia64:  scheduling while atomic - utrace?
Date: Thu,  5 Apr 2007 12:39:54 -0700 (PDT)	[thread overview]
Message-ID: <20070405193955.1D812180055@magilla.sf.frob.com> (raw)
In-Reply-To: Lee Schermerhorn's message of  Thursday, 5 April 2007 14:20:29 -0400 <1175797229.5335.22.camel@localhost>

Thanks for the report.  I introduced this bug recently when I changed
around some of the locking but forgot about the writeback issue.  I don't
think this is directly related to any other crash you might have seen.

I've moved the call out of the lock-holding region, where it didn't need to
be.  I'm updating my patch series now; I've appended the incremental patch.


Thanks,
Roland

---
 kernel/ptrace.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index fb6c3fb..c31d744 100644  
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -1473,16 +1473,6 @@ ptrace_report(struct utrace_attached_eng
 	 */
 	utrace_set_flags(tsk, engine, engine->flags | UTRACE_ACTION_QUIESCE);
 
-	/*
-	 * If regset 0 has a writeback call, do it now.  On register window
-	 * machines, this makes sure the user memory backing the register
-	 * data is up to date by the time wait_task_inactive returns to
-	 * ptrace_start in our tracer doing a PTRACE_PEEKDATA or the like.
-	 */
-	regset = utrace_regset(tsk, engine, utrace_native_view(tsk), 0);
-	if (regset->writeback)
-		(*regset->writeback)(tsk, regset, 0);
-
 	BUG_ON(code == 0);
 	tsk->exit_code = code;
 	do_notify(tsk, state->parent, CLD_TRAPPED);
@@ -1494,6 +1484,16 @@ ptrace_report(struct utrace_attached_eng
 
 	NO_LOCKS;
 
+	/*
+	 * If regset 0 has a writeback call, do it now.  On register window
+	 * machines, this makes sure the user memory backing the register
+	 * data is up to date by the time wait_task_inactive returns to
+	 * ptrace_start in our tracer doing a PTRACE_PEEKDATA or the like.
+	 */
+	regset = utrace_regset(tsk, engine, utrace_native_view(tsk), 0);
+	if (regset->writeback)
+		(*regset->writeback)(tsk, regset, 0);
+
 	return UTRACE_ACTION_RESUME;
 }
 

      reply	other threads:[~2007-04-05 19:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05 18:20 Lee Schermerhorn
2007-04-05 19:39 ` Roland McGrath [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=20070405193955.1D812180055@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=akpm@linux-foundation.org \
    --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®