From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
Bruce Richardson <bruce.richardson@intel.com>,
stable@dpdk.org
Subject: [PATCH 2/2] net/iavf: fix crash on app exit on FreeBSD
Date: Mon, 10 Mar 2025 13:11:16 +0000 [thread overview]
Message-ID: <20250310131116.557117-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20250310131116.557117-1-bruce.richardson@intel.com>
With the fallback interrupt path now enabled on FreeBSD there are
segmentation faults on app exit, due to the alarm interrupt trying to
access invalid pointers. Add checks for null to fix these crashes.
Fixes: cd3b124955d4 ("net/iavf: enable interrupt polling")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/iavf/iavf_ethdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 1ab84b0bfc..2335746f04 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -2698,6 +2698,9 @@ void
iavf_dev_alarm_handler(void *param)
{
struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
+ if (dev == NULL || dev->data == NULL || dev->data->dev_private == NULL)
+ return;
+
struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
uint32_t icr0;
--
2.43.0
prev parent reply other threads:[~2025-03-10 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 13:11 [PATCH 1/2] net/iavf: fix missing check for interrupt errors Bruce Richardson
2025-03-10 13:11 ` Bruce Richardson [this message]
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=20250310131116.557117-2-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=vladimir.medvedkin@intel.com \
/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).