mcctrl: fix NULL pointer dereference for unbooted OS instance shutdown

This commit is contained in:
Balazs Gerofi
2016-10-26 14:50:07 +09:00
parent f284a80656
commit 059fab2cc0
5 changed files with 34 additions and 7 deletions

View File

@@ -1232,9 +1232,16 @@ sysfsm_cleanup(ihk_os_t os)
int error;
ihk_device_t dev = ihk_os_to_dev(os);
struct mcctrl_usrdata *udp = ihk_host_os_get_usrdata(os);
struct sysfsm_data *sdp = &udp->sysfsm_data;
struct sysfsm_data *sdp;
struct sysfsm_node *np;
if (!udp) {
printk("%s: WARNING: no mcctrl_usrdata found\n", __FUNCTION__);
return;
}
sdp = &udp->sysfsm_data;
dprintk("mcctrl:sysfsm_cleanup(%p)\n", os);
if (sdp->sysfs_buf) {