提交 3935a709 编写于 作者: S Sudarsana Reddy Kalluru 提交者: David S. Miller

qed: Add sanity check for SIMD fastpath handler.

Avoid calling a SIMD fastpath handler if it is NULL. The check is needed
to handle an unlikely scenario where unsolicited interrupt is destined to
a PF in INTa mode.

Fixes: fe56b9e6 ("qed: Add module with basic common support")
Signed-off-by: NSudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: NAriel Elior <ariel.elior@cavium.com>
Signed-off-by: NMichal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4f9de4df
...@@ -567,8 +567,16 @@ static irqreturn_t qed_single_int(int irq, void *dev_instance) ...@@ -567,8 +567,16 @@ static irqreturn_t qed_single_int(int irq, void *dev_instance)
/* Fastpath interrupts */ /* Fastpath interrupts */
for (j = 0; j < 64; j++) { for (j = 0; j < 64; j++) {
if ((0x2ULL << j) & status) { if ((0x2ULL << j) & status) {
hwfn->simd_proto_handler[j].func( struct qed_simd_fp_handler *p_handler =
hwfn->simd_proto_handler[j].token); &hwfn->simd_proto_handler[j];
if (p_handler->func)
p_handler->func(p_handler->token);
else
DP_NOTICE(hwfn,
"Not calling fastpath handler as it is NULL [handler #%d, status 0x%llx]\n",
j, status);
status &= ~(0x2ULL << j); status &= ~(0x2ULL << j);
rc = IRQ_HANDLED; rc = IRQ_HANDLED;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册