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: