hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
kernel/kernel/signal.c
....@@ -763,6 +763,10 @@
763763 void signal_wake_up_state(struct task_struct *t, unsigned int state)
764764 {
765765 set_tsk_thread_flag(t, TIF_SIGPENDING);
766
+
767
+ /* TIF_SIGPENDING must be set prior to notifying. */
768
+ inband_signal_notify(t);
769
+
766770 /*
767771 * TASK_WAKEKILL also means wake it up in the stopped/traced/killable
768772 * case. We don't check t->state here because there is a race with it
....@@ -984,8 +988,11 @@
984988 if (sig == SIGKILL)
985989 return true;
986990
987
- if (task_is_stopped_or_traced(p))
991
+ if (task_is_stopped_or_traced(p)) {
992
+ if (!signal_pending(p))
993
+ inband_signal_notify(p);
988994 return false;
995
+ }
989996
990997 return task_curr(p) || !task_sigpending(p);
991998 }
....@@ -2145,6 +2152,7 @@
21452152 * schedule() will not sleep if there is a pending signal that
21462153 * can awaken the task.
21472154 */
2155
+ inband_ptstop_notify();
21482156 set_special_state(TASK_TRACED);
21492157
21502158 /*
....@@ -2238,6 +2246,8 @@
22382246 read_unlock(&tasklist_lock);
22392247 }
22402248
2249
+ inband_ptcont_notify();
2250
+
22412251 /*
22422252 * We are back. Now reacquire the siglock before touching
22432253 * last_siginfo, so that we are sure to have synchronized with