[PATCH v2] Cygwin: signal: Introduce a lock for the signal queue
Takashi Yano
takashi.yano@nifty.ne.jp
Thu Dec 5 11:43:27 GMT 2024
On Thu, 5 Dec 2024 11:51:47 +0100
Corinna Vinschen wrote:
> 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.
With the patch
[PATCH v3 3/9] Cygwin: signal: Remove queue entry from the queue chain when cleared
?
--
Takashi Yano <takashi.yano@nifty.ne.jp>
More information about the Cygwin-patches
mailing list