From: Daniil Iskhakov <dish@amicon.ru>
To: Anatoly Burakov <anatoly.burakov@intel.com>,
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>, <rrv@amicon.ru>,
<dish@amicon.ru>, <sdl.dpdk@linuxtesting.org>
Subject: [PATCH] fbarray: check fbarray lock downgrade failure
Date: Tue, 14 Jul 2026 11:02:42 +0300 [thread overview]
Message-ID: <20260714080242.35630-1-dish@amicon.ru> (raw)
Return value of eal_file_lock() is ignored in the fbarray destroy error
path.
Check the return value and log the downgrade failure while keeping the
original rte_errno reported by unlink().
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 176bb37ca6f3 ("eal: introduce internal wrappers for file operations")
Cc: stable@dpdk.org
Signed-off-by: Daniil Iskhakov <dish@amicon.ru>
---
Cc: dmitry.kozliuk@gmail.com
Cc: sdl.dpdk@linuxtesting.org
Cc: rrv@amicon.ru
---
lib/eal/common/eal_common_fbarray.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 8bdcefb717..5a694ccdae 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -1022,7 +1022,9 @@ rte_fbarray_destroy(struct rte_fbarray *arr)
* we're still holding an exclusive lock, so drop it to
* shared.
*/
- eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN);
+ if (eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN))
+ EAL_LOG(DEBUG, "Cannot restore fbarray shared lock: %s",
+ rte_strerror(rte_errno));
ret = -1;
goto out;
--
2.43.0
reply other threads:[~2026-07-18 9:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260714080242.35630-1-dish@amicon.ru \
--to=dish@amicon.ru \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=rrv@amicon.ru \
--cc=sdl.dpdk@linuxtesting.org \
--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