In the Linux kernel, the following vulnerability has been resolved:
net: macb: fix use after free on rmmod
platdev->dev->platformdata is released by platformdeviceunregister(), 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 macbremove+0x77/0xc6 [macbpci] [ 31.275563] Freed by task 306: [ 30.276782] platformdevicerelease+0x25/0x80