summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-01-23 20:50:40 +0000
committerjhb <jhb@FreeBSD.org>2001-01-23 20:50:40 +0000
commit6db3488060d4a689e8490d47f4d94c78d10ec7e2 (patch)
tree23cce9dfb1635c854a7ae5becb62ac997c69307a /sys/compat
parentcfe2dc9d904508d43c30b1c286a6d68b78d6cb12 (diff)
downloadFreeBSD-src-6db3488060d4a689e8490d47f4d94c78d10ec7e2.zip
FreeBSD-src-6db3488060d4a689e8490d47f4d94c78d10ec7e2.tar.gz
Protect calcru() with sched_lock.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_misc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 86c14d1..10eaa6e 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -654,7 +654,9 @@ linux_times(struct proc *p, struct linux_times_args *args)
#ifdef DEBUG
printf("Linux-emul(%ld): times(*)\n", (long)p->p_pid);
#endif
+ mtx_enter(&sched_lock, MTX_SPIN);
calcru(p, &ru.ru_utime, &ru.ru_stime, NULL);
+ mtx_exit(&sched_lock, MTX_SPIN);
tms.tms_utime = CONVTCK(ru.ru_utime);
tms.tms_stime = CONVTCK(ru.ru_stime);
OpenPOWER on IntegriCloud