diff options
author | phk <phk@FreeBSD.org> | 2005-01-29 14:03:41 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-01-29 14:03:41 +0000 |
commit | cd117518d720ce374bbfeb92213511183b43249c (patch) | |
tree | 36f5151176a670b535df41b899ea67ac6b28da12 /sys/kern/kern_exit.c | |
parent | 4306a1806101ef51084bd79f7a19590fd8f87b5b (diff) | |
download | FreeBSD-src-cd117518d720ce374bbfeb92213511183b43249c.zip FreeBSD-src-cd117518d720ce374bbfeb92213511183b43249c.tar.gz |
In 1.276 of kern/subr_trap.c I introduced a mechanism for delaying
a process return to userspace if it had pending GEOM events.
We need to have the same check in the exit pass to catch the case
where a GEOM related filedescriptor is not explicitly closed by
the process.
Bumped into by: people using dd(1) to build releases, nanobsd etc.
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index a52464e..a52e695 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -238,6 +238,13 @@ retry: mtx_unlock(&Giant); /* + * If this thread tickled GEOM, we need to wait for the giggling to + * stop before we return to userland + */ + if (td->td_pflags & TDP_GEOM) + g_waitidle(); + + /* * Remove ourself from our leader's peer list and wake our leader. */ mtx_lock(&ppeers_lock); |