提交 45e354e3 编写于 作者: A Alexander Schmidt 提交者: Roland Dreier

IB/ehca: Require in_wc in process_mad()

If the caller does not pass a valid in_wc to process_mad(), return MAD
failure status, as it is not possible to generate a valid MAD redirect
response (and redirects are the only MAD responses ehca generates).
Signed-off-by: NAlexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 fa55e30b
......@@ -222,7 +222,7 @@ int ehca_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
{
int ret;
if (!port_num || port_num > ibdev->phys_port_cnt)
if (!port_num || port_num > ibdev->phys_port_cnt || !in_wc)
return IB_MAD_RESULT_FAILURE;
/* accept only pma request */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册