From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 1276] platform bus use after free
Date: Tue, 22 Aug 2023 06:22:06 +0000 [thread overview]
Message-ID: <bug-1276-3@http.bugs.dpdk.org/> (raw)
[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]
https://bugs.dpdk.org/show_bug.cgi?id=1276
Bug ID: 1276
Summary: platform bus use after free
Product: DPDK
Version: 23.07
Hardware: ARM
OS: Linux
Status: UNCONFIRMED
Severity: critical
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: 869119842@qq.com
Target Milestone: ---
After I register a platform driver, a segment fault occurs when the program
call rte_eal_cleanup.
The code that causes this problem is at drivers/bus/platform/platform.c:615, as
follows:
static int
platform_bus_cleanup(void)
{
struct rte_platform_device *pdev, *tmp;
RTE_TAILQ_FOREACH_SAFE(pdev, &platform_bus.device_list, next, tmp) {
platform_bus_unplug(&pdev->device);
TAILQ_REMOVE(&platform_bus.device_list, pdev, next);
}
return 0;
}
To fix this, modify it as follows:
static int
platform_bus_cleanup(void)
{
struct rte_platform_device *pdev, *tmp;
RTE_TAILQ_FOREACH_SAFE(pdev, &platform_bus.device_list, next, tmp) {
TAILQ_REMOVE(&platform_bus.device_list, pdev, next);
platform_bus_unplug(&pdev->device);
}
return 0;
}
I'm lazy, that's all.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #2: Type: text/html, Size: 3317 bytes --]
next reply other threads:[~2023-08-22 6:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 6:22 bugzilla [this message]
2023-10-02 8:47 ` bugzilla
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=bug-1276-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--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).