tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Returning to userland via a signal handler
Maybe the following analyzis is wrong, or there is something wrong in
sparc64 machdep code...
----- Forwarded message from Martin Husemann <martin%netbsd.org@localhost> -----
Delivered-To: source-changes%NetBSD.org@localhost
Date: Thu, 21 May 2009 13:24:38 +0000
From: Martin Husemann <martin%netbsd.org@localhost>
Subject: CVS commit: src/sys/arch/sparc64/sparc64
To: source-changes%NetBSD.org@localhost
Approved: for-source-only
Reply-To: martin%netbsd.org@localhost
X-Mailer: log_accum
Module Name: src
Committed By: martin
Date: Thu May 21 13:24:38 UTC 2009
Modified Files:
src/sys/arch/sparc64/sparc64: vm_machdep.c
Log Message:
Deja Vu: when preparing the initial trap frame for a new forked lwp,
explicitly clear condition code. Otherwise we might catch a signal
(handlers are inherited from the parent) before we ever return to
userland. The current trapframe is converted into a ucontext and after
the signal handler returns, the lwp stays in userland and directly
uses the ucontext to return to the fork call.
Fixes PR 41302.
To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/sparc64/sparc64/vm_machdep.c
----- End forwarded message -----
... but if this is correct, it would mean we never run through lwp_trampoline
and thus don't call lwp_startup for the new lwp.
This can't be good.
Martin
Home |
Main Index |
Thread Index |
Old Index