2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 02:04:05 +08:00
linux-next/drivers/net/ethernet/cadence
Tong Zhang d82d5303c4 net: macb: fix use after free on rmmod
plat_dev->dev->platform_data is released by platform_device_unregister(),
use of pclk and hclk is a use-after-free. Since device unregister won't
need a clk device we adjust the function call sequence to fix this issue.

[   31.261225] BUG: KASAN: use-after-free in macb_remove+0x77/0xc6 [macb_pci]
[   31.275563] Freed by task 306:
[   30.276782]  platform_device_release+0x25/0x80

Suggested-by: Nicolas Ferre <Nicolas.Ferre@microchip.com>
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-09-09 10:55:44 +01:00
..
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
macb_main.c net: macb: Add PTP support for SAMA5D29 2021-08-13 16:12:32 -07:00
macb_pci.c net: macb: fix use after free on rmmod 2021-09-09 10:55:44 +01:00
macb_ptp.c net: macb: Add a NULL check on desc_ptp 2021-08-25 10:39:17 +01:00
macb.h net: macb: Disable PCS auto-negotiation for SGMII fixed-link mode 2021-03-12 16:44:45 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00