From: Alexey Simakov <bigalex934@gmail.com>
To: hyonkim@cisco.com
Cc: david.marchand@redhat.com, dev@dpdk.org, johndale@cisco.com,
ssujith@cisco.com, stable@dpdk.org,
Alexey Simakov <bigalex934@gmail.com>
Subject: [PATCH v3] net/enic: check notify set return value during init
Date: Mon, 20 Jul 2026 12:33:39 +0300 [thread overview]
Message-ID: <20260720093338.92744-2-bigalex934@gmail.com> (raw)
In-Reply-To: <IA3PR11MB89877F0FA4E9EF63B478A201BFC42@IA3PR11MB8987.namprd11.prod.outlook.com>
The return value of vnic_dev_notify_set() is silently ignored in
enic_dev_init(), so a memory allocation failure or hardware command
error goes unnoticed and the driver continues with uninitialized
notification state.
Check the return value and propagate the error to abort probe when
notification setup fails.
Fixes: fefed3d1e62c ("enic: new driver")
Cc: stable@dpdk.org
Signed-off-by: Alexey Simakov <bigalex934@gmail.com>
---
v3 changes: add log message
v2 link: https://patches.dpdk.org/project/dpdk/patch/20260715103105.39417-1-bigalex934@gmail.com/
v2 changes: validate return code of vnic_dev_notify_set() in driver init section
v1 link: https://patches.dpdk.org/project/dpdk/patch/20260707112014.82821-1-bigalex934@gmail.com/
drivers/net/enic/enic_main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 2696fa77d4..2a1a65d8da 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1887,7 +1887,11 @@ static int enic_dev_init(struct enic *enic)
LIST_INIT(&enic->flows);
/* set up link status checking */
- vnic_dev_notify_set(enic->vdev, -1); /* No Intr for notify */
+ err = vnic_dev_notify_set(enic->vdev, -1); /* No Intr for notify */
+ if (err) {
+ dev_err(enic, "failed to enable notify buffer\n");
+ return err;
+ }
enic->overlay_offload = false;
/*
--
2.53.0
next prev parent reply other threads:[~2026-07-20 9:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 10:31 [PATCH v2] net/enic: check notify set return value during init Alexey Simakov
2026-07-16 0:40 ` Hyong Youb Kim (hyonkim)
2026-07-17 9:22 ` Alexey Simakov
2026-07-19 3:04 ` Hyong Youb Kim (hyonkim)
2026-07-20 9:33 ` Alexey Simakov [this message]
2026-07-20 22:56 ` [PATCH v3] " Hyong Youb Kim (hyonkim)
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=20260720093338.92744-2-bigalex934@gmail.com \
--to=bigalex934@gmail.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hyonkim@cisco.com \
--cc=johndale@cisco.com \
--cc=ssujith@cisco.com \
--cc=stable@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