<html>
<head>
<base href="https://bugs.dpdk.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8" class="bz_new_table">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - platform bus use after free"
href="https://bugs.dpdk.org/show_bug.cgi?id=1276">1276</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>platform bus use after free
</td>
</tr>
<tr>
<th>Product</th>
<td>DPDK
</td>
</tr>
<tr>
<th>Version</th>
<td>23.07
</td>
</tr>
<tr>
<th>Hardware</th>
<td>ARM
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>critical
</td>
</tr>
<tr>
<th>Priority</th>
<td>Normal
</td>
</tr>
<tr>
<th>Component</th>
<td>ethdev
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dev@dpdk.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>869119842@qq.com
</td>
</tr>
<tr>
<th>Target Milestone</th>
<td>---
</td>
</tr></table>
<p>
<div class="bz_comment_block">
<pre class="bz_comment_text">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.
</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://bugs.dpdk.org/show_bug.cgi?id=1276">
<meta itemprop="name" content="View bug">
</div>
<meta itemprop="description" content="Bugzilla bug update notification">
</div>
</body>
</html>