diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-03-15 10:14:50 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-03-15 10:14:50 +0000 |
commit | c2779123e77b37c662b6254fe1c8f1998c4a567d (patch) | |
tree | 1cad4445073c39aa90c01605ac4e3a0d67f30b3a /sys/dev/pci | |
parent | 6bfd70eea76fa2c562c7adaa15f3bb619aa582cb (diff) |
kthread_park() and kthread_stop() don't need PCATCH the linux API does
not interrupt either and not checking the return value of tsleep_nsec()
could actually result in a infinite loop if a signal is pending.
Remove PCATCH also from kthread_parkme() for the same reason but this
function is only called for kthreads and those have no signals anyway.
OK kettenis@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/drm_linux.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c index 5ed38d23037..110e18dbe24 100644 --- a/sys/dev/pci/drm/drm_linux.c +++ b/sys/dev/pci/drm/drm_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.c,v 1.57 2020/03/06 07:50:01 kettenis Exp $ */ +/* $OpenBSD: drm_linux.c,v 1.58 2020/03/15 10:14:49 claudio Exp $ */ /* * Copyright (c) 2013 Jonathan Gray <jsg@openbsd.org> * Copyright (c) 2015, 2016 Mark Kettenis <kettenis@openbsd.org> @@ -229,7 +229,7 @@ kthread_parkme(void) while (thread->flags & KTHREAD_SHOULDPARK) { thread->flags |= KTHREAD_PARKED; wakeup(thread); - tsleep_nsec(thread, PPAUSE | PCATCH, "parkme", INFSLP); + tsleep_nsec(thread, PPAUSE, "parkme", INFSLP); thread->flags &= ~KTHREAD_PARKED; } } @@ -242,7 +242,7 @@ kthread_park(struct proc *p) while ((thread->flags & KTHREAD_PARKED) == 0) { thread->flags |= KTHREAD_SHOULDPARK; wake_up_process(thread->proc); - tsleep_nsec(thread, PPAUSE | PCATCH, "park", INFSLP); + tsleep_nsec(thread, PPAUSE, "park", INFSLP); } } @@ -270,7 +270,7 @@ kthread_stop(struct proc *p) while ((thread->flags & KTHREAD_STOPPED) == 0) { thread->flags |= KTHREAD_SHOULDSTOP; wake_up_process(thread->proc); - tsleep_nsec(thread, PPAUSE | PCATCH, "stop", INFSLP); + tsleep_nsec(thread, PPAUSE, "stop", INFSLP); } LIST_REMOVE(thread, next); free(thread, M_DRM, sizeof(*thread)); |