__return_syscall(): verify response structure
This commit is contained in:
@@ -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),
|
res = ihk_device_map_virtual(ihk_os_to_dev(os),
|
||||||
phys, sizeof(*res), NULL, 0);
|
phys, sizeof(*res), NULL, 0);
|
||||||
|
|
||||||
|
if (!res) {
|
||||||
|
printk("%s: ERROR: invalid response structure address\n",
|
||||||
|
__FUNCTION__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Map response structure and notify offloading thread */
|
/* Map response structure and notify offloading thread */
|
||||||
res->ret = ret;
|
res->ret = ret;
|
||||||
res->stid = stid;
|
res->stid = stid;
|
||||||
|
|||||||
Reference in New Issue
Block a user