summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 8fd97c6764a4..5e9a520cfd77 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -172,19 +172,14 @@ static int worker_thread(void *__startup)
DECLARE_WAITQUEUE(wait, current);
struct k_sigaction sa;
- daemonize();
- sprintf(current->comm, "%s/%d", startup->name, cpu);
+ daemonize("%s/%d", startup->name, cpu);
+ allow_signal(SIGCHLD);
current->flags |= PF_IOTHREAD;
cwq->thread = current;
set_user_nice(current, -10);
set_cpus_allowed(current, 1UL << cpu);
- spin_lock_irq(&current->sighand->siglock);
- siginitsetinv(&current->blocked, sigmask(SIGCHLD));
- recalc_sigpending();
- spin_unlock_irq(&current->sighand->siglock);
-
complete(&startup->done);
/* Install a handler so SIGCLD is delivered */
@@ -213,10 +208,7 @@ static int worker_thread(void *__startup)
/* SIGCHLD - auto-reaping */ ;
/* zap all other signals */
- spin_lock_irq(&current->sighand->siglock);
flush_signals(current);
- recalc_sigpending();
- spin_unlock_irq(&current->sighand->siglock);
}
}
remove_wait_queue(&cwq->more_work, &wait);