[PATCH 8/8] Cygwin: signal: Fix another deadlock between main and sig thread
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Nov 27 17:02:52 GMT 2024
On Nov 27 20:22, Takashi Yano wrote:
> In _cygtls::handle_SIGCONT(), the sig thread waits for the main thread
> processing the signal without unlocking tls area. This causes a deadlock
> if the main thread tries to acquire a lock for the tls area meanwhile.
> With this patch, unlock tls before calling yield() in handle_SIGCONT().
>
> Addresses: https://cygwin.com/pipermail/cygwin/2024-November/256744.html
> Fixes: 26158dc3e9c2("* exceptions.cc (sigpacket::process): Lock _cygtls area of thread before accessing it.")
> Reported-by: Christian Franke <Christian.Franke@t-online.de>
> Reviewed-by:
> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
> ---
> winsup/cygwin/exceptions.cc | 10 +++++++---
> winsup/cygwin/local_includes/cygtls.h | 4 +++-
> 2 files changed, 10 insertions(+), 4 deletions(-)
LGTM.
Thanks,
Corinna
More information about the Cygwin-patches
mailing list