lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu,  5 Apr 2007 12:39:54 -0700 (PDT)
From:	Roland McGrath <roland@...hat.com>
To:	Lee Schermerhorn <Lee.Schermerhorn@...com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: 2.6.21-rc5-mm4: ia64:  scheduling while atomic - utrace?

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;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ