diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2016-07-04 16:12:53 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2016-07-04 16:12:53 +0000 |
commit | c9438304f1897b119cad48232cdf0e4b1506f480 (patch) | |
tree | bc2e2b800d1133450ee5f8febed31453ae7797d8 /sys | |
parent | 57d0ae3281583ba663d1c0429e061c7ae1779117 (diff) |
switch calculuated thrsleep timeout to unsigned to prevent overflow
into negative values, which later causes a panic.
reported by Tim Newsham at NCC.
ok guenther
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_synch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 83e7eba33bf..d72e0f5f3c3 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_synch.c,v 1.131 2016/03/29 02:43:47 jsg Exp $ */ +/* $OpenBSD: kern_synch.c,v 1.132 2016/07/04 16:12:52 tedu Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /* @@ -491,7 +491,7 @@ thrsleep(struct proc *p, struct sys___thrsleep_args *v) long ident = (long)SCARG(uap, ident); struct timespec *tsp = (struct timespec *)SCARG(uap, tp); void *lock = SCARG(uap, lock); - long long to_ticks = 0; + unsigned long long to_ticks = 0; int abort, error; clockid_t clock_id = SCARG(uap, clock_id) & 0x7; int lockflags = SCARG(uap, clock_id) & 0x8; |