diff options
author | John Baldwin <jhb@FreeBSD.org> | 2001-09-13 22:33:37 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2001-09-13 22:33:37 +0000 |
commit | bce9841972afb034827fa3348d090dd3c0d90236 (patch) | |
tree | 3ea9c98e18153099e9d7e1d8b55c3615bd2cc150 /sys/kern/kern_subr.c | |
parent | 1cb99346e164bc550e62975c9ad35652d84e8be7 (diff) | |
download | src-bce9841972afb034827fa3348d090dd3c0d90236.tar.gz src-bce9841972afb034827fa3348d090dd3c0d90236.zip |
Notes
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r-- | sys/kern/kern_subr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 31cde4fccd94..9f53d2d1f00e 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -78,8 +78,10 @@ uiomove(cp, n, uio) ("uiomove proc")); if (td) { + mtx_lock_spin(&sched_lock); save = td->td_flags & TDF_DEADLKTREAT; td->td_flags |= TDF_DEADLKTREAT; + mtx_unlock_spin(&sched_lock); } while (n > 0 && uio->uio_resid) { @@ -125,8 +127,11 @@ uiomove(cp, n, uio) } if (td != curthread) printf("uiomove: IT CHANGED!"); td = curthread; /* Might things have changed in copyin/copyout? */ - if (td) + if (td) { + mtx_lock_spin(&sched_lock); td->td_flags = (td->td_flags & ~TDF_DEADLKTREAT) | save; + mtx_unlock_spin(&sched_lock); + } return (error); } |