summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2020-02-20 08:20:59 +0000
committerjsg <jsg@openbsd.org>2020-02-20 08:20:59 +0000
commitb5c62e15268c6654b77295fbd8dafb03bd406598 (patch)
treef1e35afb7f6ce0638a8906896dcb3fce20a18e0f
parentAdd selection_active format for when the selection is present but not (diff)
downloadwireguard-openbsd-b5c62e15268c6654b77295fbd8dafb03bd406598.tar.xz
wireguard-openbsd-b5c62e15268c6654b77295fbd8dafb03bd406598.zip
In signal_pending_state() only test for pending signal when
TASK_INTERRUPTIBLE (PCATCH) is set in the state argument. Spotted by and original diff from claudio@. ok claudio@
-rw-r--r--sys/dev/pci/drm/include/linux/sched/signal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/include/linux/sched/signal.h b/sys/dev/pci/drm/include/linux/sched/signal.h
index 3eb6d900800..c201146f159 100644
--- a/sys/dev/pci/drm/include/linux/sched/signal.h
+++ b/sys/dev/pci/drm/include/linux/sched/signal.h
@@ -6,7 +6,8 @@
#include <sys/systm.h>
#include <sys/signalvar.h>
-#define signal_pending_state(x, y) SIGPENDING(curproc)
+#define signal_pending_state(s, x) \
+ ((s) & TASK_INTERRUPTIBLE ? SIGPENDING(curproc) : 0)
#define signal_pending(y) SIGPENDING(curproc)
#endif