[PATCH v2] Cygwin: signal: Introduce a lock for the signal queue
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Dec 5 10:51:47 GMT 2024
On Dec 5 12:25, Takashi Yano wrote:
> Currently, the signal queue is touched by the thread sig as well as
> other threads that call sigaction_worker(). This potentially has
> a possibility to destroy the signal queue chain. A possible worst
> result may be a self-loop chain which causes infinite loop. With
> this patch, lock()/unlock() are introduce to avoid such a situation.
>
> Fixes: 474048c26edf ("* sigproc.cc (pending_signals::add): Just index directly into signal array rather than treating the array as a heap.")
> Suggested-by: Corinna Vinschen <corinna@vinschen.de>
> Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
> ---
> winsup/cygwin/exceptions.cc | 12 +++++------
> winsup/cygwin/local_includes/sigproc.h | 2 +-
> winsup/cygwin/signal.cc | 4 ++--
> winsup/cygwin/sigproc.cc | 28 +++++++++++++++++++++-----
> 4 files changed, 32 insertions(+), 14 deletions(-)
LGTM, please push.
Thanks,
Corinna
More information about the Cygwin-patches
mailing list