bus/platform: fix use after free
PATCH 1/1 bus/platform: fix use after free
Remove device from the list before doing actual cleanup to avoid use after free.
Bugzilla ID: 1276
Fixes 17c839f74da3 ("bus: add platform bus")
Signed-off-by Tomasz Duszynski <[email protected]>
--- drivers/bus/platform/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/platform/platform.c +1 -1
@@ -617,8 +617,8 @@ 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); +platform_bus_unplug (&pdev->device); }return 0 ;
Signature · 1 line
2.34.1
David Marchand
AppliedQuoted 8 lines · Tomasz Duszynski
Remove device from the list before doing actual cleanup to avoid use after free.
Bugzilla ID: 1276
Fixes 17c839f74da3 ("bus: add platform bus")Signed-off-by Tomasz Duszynski <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand