]> git.baikalelectronics.ru Git - kernel.git/commit
ravb: Fix up dma_free_coherent() call in ravb_remove()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 5 Oct 2023 01:12:00 +0000 (10:12 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Oct 2023 21:08:52 +0000 (23:08 +0200)
commit3f9295ad7f9478e65debcef496da4e4eb83db5ea
treeb2a9800ada8f24695d901897c11f9eafd83c8a68
parentcfe535ee694d5ec03c277f94ca419cad7ba53a4a
ravb: Fix up dma_free_coherent() call in ravb_remove()

[ Upstream commit e6864af61493113558c502b5cd0d754c19b93277 ]

In ravb_remove(), dma_free_coherent() should be call after
unregister_netdev(). Otherwise, this controller is possible to use
the freed buffer.

Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/20231005011201.14368-2-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/renesas/ravb_main.c