__return_syscall(): verify response structure

This commit is contained in:
Balazs Gerofi
2017-06-07 16:57:03 +09:00
parent 446ef0465b
commit 46b48ac59b

View File

@ -1446,6 +1446,12 @@ void __return_syscall(ihk_os_t os, struct ikc_scd_packet *packet,
res = ihk_device_map_virtual(ihk_os_to_dev(os),
phys, sizeof(*res), NULL, 0);
if (!res) {
printk("%s: ERROR: invalid response structure address\n",
__FUNCTION__);
return;
}
/* Map response structure and notify offloading thread */
res->ret = ret;
res->stid = stid;