提交 4e204c10 编写于 作者: A Alexander Beregalov 提交者: David S. Miller

vxge: fix possible NULL dereference in vxge-traffic.c

If vpath is NULL then hldev is NULL also.
Signed-off-by: NAlexander Beregalov <a.beregalov@gmail.com>
Acked-by: NRam Vepa <ram.vepa@neterion.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 41f89100
......@@ -1923,7 +1923,7 @@ enum vxge_hw_status __vxge_hw_vpath_alarm_process(
if (vpath == NULL) {
alarm_event = VXGE_HW_SET_LEVEL(VXGE_HW_EVENT_UNKNOWN,
alarm_event);
goto out;
goto out2;
}
hldev = vpath->hldev;
......@@ -2161,7 +2161,7 @@ enum vxge_hw_status __vxge_hw_vpath_alarm_process(
}
out:
hldev->stats.sw_dev_err_stats.vpath_alarms++;
out2:
if ((alarm_event == VXGE_HW_EVENT_ALARM_CLEARED) ||
(alarm_event == VXGE_HW_EVENT_UNKNOWN))
return VXGE_HW_OK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册