*/
parahotplug_request_kickoff(req);
controlvm_respond_physdev_changestate
(&inmsg->hdr,
CONTROLVM_RESP_SUCCESS,
inmsg->cmd.device_change_state.state);
parahotplug_request_destroy(req);
} else {
/*
* For disable messages, add the request to the
* request list before kicking off the udev script. It
* won't get responded to until the script has
* indicated it's done.
*/
spin_lock(¶hotplug_request_list_lock);
list_add_tail(&req->list, ¶hotplug_request_list);
spin_unlock(¶hotplug_request_list_lock);
parahotplug_request_kickoff(req);
}
}
/**
* handle_command() - process a controlvm message
* @inmsg: the message to process
* @channel_addr: address of the controlvm channel
*
* Return:
* false - this function will return false only in the case where the
* controlvm message was NOT processed, but processing must be
* retried before reading the next controlvm message; a
* scenario where this can occur is when we need to throttle
* the allocation of memory in which to copy out controlvm
* payload data
* true - processing of the controlvm message completed,
* either successfully or with an error
*/
static bool
handle_command(struct controlvm_message inmsg, u64 channel_addr)
{
struct controlvm_message_packet *cmd = &inmsg.cmd;
u64 parm_addr;
u32 parm_bytes;
struct parser_context *parser_ctx = NULL;
bool local_addr;
struct controlvm_message ackmsg;
/* create parsing context if necessary */
local_addr = (inmsg.hdr.flags.test_message == 1);
if (channel_addr == 0)
return true;
Kanboard:29385
Why not check this before setting local_addr?