]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove an overly-aggressive assertion.
authorjhb <jhb@FreeBSD.org>
Mon, 10 Jun 2019 19:01:54 +0000 (19:01 +0000)
committerjhb <jhb@FreeBSD.org>
Mon, 10 Jun 2019 19:01:54 +0000 (19:01 +0000)
commit6097f3451ccaa84fc396c8690e5fc5c8ae87c393
tree10c2f212365e7d394237a467f7d348b5da40fd86
parentd2fffbe7fd5e72e3b2d2205f33173f35ea205e7b
Remove an overly-aggressive assertion.

While it is true that the new vmspace passed to vmspace_switch_aio
will always have a valid reference due to the AIO job or the extra
reference on the original vmspace in the worker thread, it is not true
that the old vmspace being switched away from will have more than one
reference.

Specifically, when a process with queued AIO jobs exits, the exit hook
in aio_proc_rundown will only ensure that all of the AIO jobs have
completed or been cancelled.  However, the last AIO job might have
completed and woken up the exiting process before the worker thread
servicing that job has switched back to its original vmspace.  In that
case, the process might finish exiting dropping its reference to the
vmspace before the worker thread resulting in the worker thread
dropping the last reference.

Reported by: np
Reviewed by: alc, markj, np, imp
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D20542
sys/vm/vm_map.c