|
Description
|
Before dispatching i_xvdi_oestate_handler(), i_xvdi_oestate_cb() will save the current oestate in dev->otherend_state for i_xvdi_oestate_handler() to read and handle. Let's consider two consecutive oestate change events happened in a row. i_xvdi_oestate_handler() will be dispatched twice. But, it is not guaranteed for i_xvdi_oestate_handler() to read every state change because two writes to dev->otherend_state can happen before the first i_xvdi_oestate_handler() taskq is executed. So, it may happen that two i_xvdi_oestate_handler() taskq are handling the same state change. If the last state change is XenbusStateClosed, we may end up to remove the device node twice, which will cause system to panic.
|