Commit cfe28fb1 authored by Philippe Gerum's avatar Philippe Gerum

sched: ipipe: announce signal receipt

Emit IPIPE_KEVT_SIGWAKE when the target task is about to receive a
(regular) signal. The co-kernel may decide to schedule a transition of
the recipient to the root domain in order to have it handle that
signal asap, which is commonly required for keeping the kernel sane.

This notification is always sent from the context of the issuer.
parent d94ddc97
......@@ -32,6 +32,7 @@
#include <linux/tracehook.h>
#include <linux/capability.h>
#include <linux/freezer.h>
#include <linux/ipipe.h>
#include <linux/pid_namespace.h>
#include <linux/nsproxy.h>
#include <linux/user_namespace.h>
......@@ -737,6 +738,10 @@ still_pending:
void signal_wake_up_state(struct task_struct *t, unsigned int state)
set_tsk_thread_flag(t, TIF_SIGPENDING);
/* TIF_SIGPENDING must be prior to reporting. */
* TASK_WAKEKILL also means wake it up in the stopped/traced/killable
* case. We don't check t->state here because there is a race with it
......@@ -957,8 +962,11 @@ static inline bool wants_signal(int sig, struct task_struct *p)
if (sig == SIGKILL)
return true;
if (task_is_stopped_or_traced(p))
if (task_is_stopped_or_traced(p)) {
if (!signal_pending(p))
return false;
return task_curr(p) || !signal_pending(p);
Markdown is supported
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