diff options
author | 2019-06-01 14:11:17 +0000 | |
---|---|---|
committer | 2019-06-01 14:11:17 +0000 | |
commit | 17b25159f9636a4b303d8df3547b4d6c61a0117a (patch) | |
tree | ea1e4351fe6e3e2ddf32c130a794db388a2c3abe /sys/kern/tty.c | |
parent | On machines with large amounts of physical memory we fail to initialize uvm (diff) | |
download | wireguard-openbsd-17b25159f9636a4b303d8df3547b4d6c61a0117a.tar.xz wireguard-openbsd-17b25159f9636a4b303d8df3547b4d6c61a0117a.zip |
Revert to using the SCHED_LOCK() to protect time accounting.
It currently creates a lock ordering problem because SCHED_LOCK() is taken
by hardclock(). That means the "priorities" of a thread should be moved
out of the SCHED_LOCK() first in order to make progress.
Reported-by: syzbot+8e4863b3dde88eb706dc@syzkaller.appspotmail.com
via anton@ as well as by kettenis@
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 5c4366e66a5..e4ad73ddd3d 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.145 2019/05/31 19:51:10 mpi Exp $ */ +/* $OpenBSD: tty.c,v 1.146 2019/06/01 14:11:17 mpi Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -2191,9 +2191,7 @@ update_pickpr: rss = (pickpr->ps_flags & (PS_EMBRYO | PS_ZOMBIE)) ? 0 : vm_resident_count(pickpr->ps_vmspace); - mtx_enter(&pickpr->ps_mtx); calctsru(&pickpr->ps_tu, &utime, &stime, NULL); - mtx_leave(&pickpr->ps_mtx); /* Round up and print user time. */ utime.tv_nsec += 5000000; |