DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/enic: fix segfault after receiving error interrupt
@ 2016-07-14  1:09 Nelson Escobar
  2016-07-15 21:33 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Nelson Escobar @ 2016-07-14  1:09 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, Nelson Escobar

When enic's interrupt handler is called indicating an error, it scans
through the receive queues (RQs) on the adapter looking for errors.
But since the inclusion of rx scatter, some of the RQs may not be in
use, and you shouldn't check them for errors.

Fixes: 856d7ba7ed22 ("net/enic: support scattered Rx")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 9ec2a2d..fbd4089 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -123,6 +123,8 @@ static void enic_log_q_error(struct enic *enic)
 	}
 
 	for (i = 0; i < enic_vnic_rq_count(enic); i++) {
+		if (!enic->rq[i].in_use)
+			continue;
 		error_status = vnic_rq_error_status(&enic->rq[i]);
 		if (error_status)
 			dev_err(enic, "RQ[%d] error_status %d\n", i,
-- 
2.7.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-15 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14  1:09 [dpdk-dev] [PATCH] net/enic: fix segfault after receiving error interrupt Nelson Escobar
2016-07-15 21:33 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).