Commit 89662225 authored by Jan Kiszka's avatar Jan Kiszka
Browse files

cobalt/thread: Rework kthread check for xnthread_signal

We only reach lostage_task_signal for a kthread if xnthread_signal has
sent us. So move the check to the caller, making debugging easier.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 54bc0937
......@@ -2089,19 +2089,9 @@ struct lostage_signal {
int signo, sigval;
static inline void do_kthread_signal(struct task_struct *p,
struct xnthread *thread,
struct lostage_signal *rq)
"kernel shadow %s received unhandled signal %d (action=0x%x)\n",
thread->name, rq->signo, rq->sigval);
static void lostage_task_signal(struct pipeline_inband_work *inband_work)
struct lostage_signal *rq;
struct xnthread *thread;
struct task_struct *p;
kernel_siginfo_t si;
int signo;
......@@ -2109,12 +2099,6 @@ static void lostage_task_signal(struct pipeline_inband_work *inband_work)
rq = container_of(inband_work, struct lostage_signal, inband_work);
p = rq->task;
thread = xnthread_from_task(p);
if (thread && !xnthread_test_state(thread, XNUSER)) {
do_kthread_signal(p, thread, rq);
signo = rq->signo;
trace_cobalt_lostage_signal(p, signo);
......@@ -2298,6 +2282,9 @@ void xnthread_signal(struct xnthread *thread, int sig, int arg)
.sigval = sig == SIGDEBUG ? arg | sigdebug_marker : arg,
if (XENO_WARN_ON(COBALT, !xnthread_test_state(thread, XNUSER)))
trace_cobalt_lostage_request("signal", sigwork.task);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment