[vbox-dev] vgdrvIoCtl_CancelAllWaitEvents inconsistent behavior ?
Hans de Goede
hdegoede at redhat.com
Mon Jul 3 15:21:46 UTC 2017
Hi,
So while working on cleaning up the vboxguest driver for mainline
linux kernel submission (*) I noticed some inconsistent behavior
wrt vgdrvIoCtl_CancelAllWaitEvents vs vgdrvIoCtl_WaitEvent.
If there are no waiters then vgdrvIoCtl_CancelAllWaitEvents
sets pSession->fPendingCancelWaitEvents and then when
vgdrvIoCtl_WaitEvent calls vbdgCheckWaitEventCondition it
will return VINF_SUCCESS + VBOXGUEST_WAITEVENT_OK even
if u32EventFlagsOut is 0.
While as vgdrvIoCtl_WaitEvent actually waits and then
vgdrvIoCtl_CancelAllWaitEvents gets called u32Result
gets set to VBOXGUEST_WAITEVENT_INTERRUPTED.
I'm planning on rewriting all this code to directly
use Linux waitqueues and I was wondering if I should
preserve this behavior ?
Regards,
Hans
*) Very much WIP, see: https://github.com/jwrdegoede/vboxguest
More information about the vbox-dev
mailing list