propagate error code for prepare image
This commit is contained in:
@ -87,8 +87,8 @@ static long mcexec_prepare_image(ihk_os_t os,
|
|||||||
|
|
||||||
wait_event_interruptible(usrdata->wq_prepare, pdesc->status);
|
wait_event_interruptible(usrdata->wq_prepare, pdesc->status);
|
||||||
|
|
||||||
if(pdesc->err == -1){
|
if(pdesc->err < 0){
|
||||||
ret = -EFAULT;
|
ret = pdesc->err;
|
||||||
goto free_out;
|
goto free_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SCD_MSG_PREPARE_PROCESS_NACKED:
|
case SCD_MSG_PREPARE_PROCESS_NACKED:
|
||||||
mcexec_prepare_ack(__os, pisp->arg, -1);
|
mcexec_prepare_ack(__os, pisp->arg, pisp->err);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCD_MSG_SYSCALL_ONESIDE:
|
case SCD_MSG_SYSCALL_ONESIDE:
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
struct ikc_scd_packet {
|
struct ikc_scd_packet {
|
||||||
int msg;
|
int msg;
|
||||||
int ref;
|
int ref;
|
||||||
|
int err;
|
||||||
unsigned long arg;
|
unsigned long arg;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -367,6 +367,7 @@ static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
|
|||||||
{
|
{
|
||||||
struct ikc_scd_packet *packet = __packet;
|
struct ikc_scd_packet *packet = __packet;
|
||||||
struct ikc_scd_packet pckt;
|
struct ikc_scd_packet pckt;
|
||||||
|
int rc;
|
||||||
|
|
||||||
switch (packet->msg) {
|
switch (packet->msg) {
|
||||||
case SCD_MSG_INIT_CHANNEL_ACKED:
|
case SCD_MSG_INIT_CHANNEL_ACKED:
|
||||||
@ -375,10 +376,14 @@ static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case SCD_MSG_PREPARE_PROCESS:
|
case SCD_MSG_PREPARE_PROCESS:
|
||||||
if(process_msg_prepare_process(packet->arg) == 0)
|
if((rc = process_msg_prepare_process(packet->arg)) == 0){
|
||||||
pckt.msg = SCD_MSG_PREPARE_PROCESS_ACKED;
|
pckt.msg = SCD_MSG_PREPARE_PROCESS_ACKED;
|
||||||
else
|
pckt.err = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
pckt.msg = SCD_MSG_PREPARE_PROCESS_NACKED;
|
pckt.msg = SCD_MSG_PREPARE_PROCESS_NACKED;
|
||||||
|
pckt.err = rc;
|
||||||
|
}
|
||||||
pckt.ref = packet->ref;
|
pckt.ref = packet->ref;
|
||||||
pckt.arg = packet->arg;
|
pckt.arg = packet->arg;
|
||||||
syscall_channel_send(c, &pckt);
|
syscall_channel_send(c, &pckt);
|
||||||
|
|||||||
@ -73,6 +73,7 @@ struct user_desc {
|
|||||||
struct ikc_scd_packet {
|
struct ikc_scd_packet {
|
||||||
int msg;
|
int msg;
|
||||||
int ref;
|
int ref;
|
||||||
|
int err;
|
||||||
unsigned long arg;
|
unsigned long arg;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user