All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hongzhan Chen <hongzhan.chen@intel.com>
To: xenomai@xenomai.org
Subject: [PATCH] cobalt/thread: initialize sigarray in __xnthread_init
Date: Tue, 15 Jun 2021 22:19:43 -0400	[thread overview]
Message-ID: <20210616021943.13526-1-hongzhan.chen@intel.com> (raw)

Add missing sigarray initialization to avoid missing signal in
__xnthread_signal.

Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>

diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index d096a20d3..49913accc 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -287,6 +287,8 @@ int __xnthread_init(struct xnthread *thread,
 	thread->cookie = NULL;
 	init_completion(&thread->exited);
 	memset(xnthread_archtcb(thread), 0, sizeof(struct xnarchtcb));
+	memset(thread->sigarray, 0, sizeof(thread->sigarray[0]) *
+				XNTHREAD_MAX_SIGNALS);
 
 	gravity = flags & XNUSER ? XNTIMER_UGRAVITY : XNTIMER_KGRAVITY;
 	xntimer_init(&thread->rtimer, &nkclock, timeout_handler,
-- 
2.17.1



             reply	other threads:[~2021-06-16  2:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16  2:19 Hongzhan Chen [this message]
2021-06-16  5:35 ` [PATCH] cobalt/thread: initialize sigarray in __xnthread_init Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2021-06-16  2:14 Hongzhan Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210616021943.13526-1-hongzhan.chen@intel.com \
    --to=hongzhan.chen@intel.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.