DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nelson Escobar <neescoba@cisco.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, Nelson Escobar <neescoba@cisco.com>
Subject: [dpdk-dev] [PATCH] net/enic: fix segfault after receiving error interrupt
Date: Wed, 13 Jul 2016 18:09:17 -0700	[thread overview]
Message-ID: <1468458557-17989-1-git-send-email-neescoba@cisco.com> (raw)

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

             reply	other threads:[~2016-07-14  1:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14  1:09 Nelson Escobar [this message]
2016-07-15 21:33 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468458557-17989-1-git-send-email-neescoba@cisco.com \
    --to=neescoba@cisco.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).