vmaffione ce475b8a78 bhyve: rework mevent processing to fix a race condition
At the end of both mevent_add() and mevent_update(), mevent_notify()
is called to wakeup the I/O thread, that will call kevent(changelist)
to update the kernel.
A race condition is possible where the client calls mevent_add() and
mevent_update(EV_ENABLE) before the I/O thread has the chance to wake
up and call mevent_build()+kevent(changelist) in response to mevent_add().
The mevent_add() is therefore ignored by the I/O thread, and
kevent(fd, EV_ENABLE) is called before kevent(fd, EV_ADD), resuliting
in a failure of the kevent(fd, EV_ENABLE) call.

PR:	241808
Reviewed by:	jhb, markj
MFC with:	r354288
Differential Revision:	https://reviews.freebsd.org/D22286
2019-11-12 21:07:51 +00:00
..
2019-10-24 22:33:46 +00:00
2018-06-14 01:34:53 +00:00
2018-06-13 03:22:08 +00:00
2018-06-13 03:22:08 +00:00
2019-02-01 03:09:11 +00:00
2018-06-13 03:22:08 +00:00
2018-06-14 01:34:53 +00:00
2018-06-13 03:22:08 +00:00
2018-06-14 01:34:53 +00:00
2018-06-13 03:22:08 +00:00
2018-06-14 01:34:53 +00:00
2019-10-24 22:33:46 +00:00
2018-06-13 03:22:08 +00:00
2018-06-13 03:22:08 +00:00
2018-06-13 03:22:08 +00:00
2018-06-13 03:22:08 +00:00
2018-06-13 03:22:08 +00:00
2018-06-13 03:22:08 +00:00
2018-06-13 03:22:08 +00:00
2018-06-14 01:34:53 +00:00
2018-06-14 01:34:53 +00:00
2018-06-13 03:22:08 +00:00
2018-06-13 03:22:08 +00:00
2018-06-13 03:22:08 +00:00
2018-06-13 03:22:08 +00:00
2019-02-01 03:09:11 +00:00
2018-06-13 03:22:08 +00:00
2018-06-14 01:34:53 +00:00