From: Guangshuo Li <hidden> Date: 2026-09-16 03:14:30
fs_enet_probe() allocates the platform information structure with
kzalloc_obj() and stores it in fep->fpi.
The probe failure paths release this allocation with kfree(). However,
after a successful probe, fs_enet_remove() tears down the network
device without freeing fep->fpi, leaving the platform information
structure allocated after driver removal.
Free fep->fpi before releasing the network device.
This issue was found by manual code inspection.
Fixes: 976de6a8c304 ("fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <redacted>
---
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 1 +
1 file changed, 1 insertion(+)
From: Simon Horman <horms@kernel.org> Date: 2026-09-18 09:24:14
On Wed, Sep 16, 2026 at 11:14:14AM +0800, Guangshuo Li wrote:
quoted hunk
fs_enet_probe() allocates the platform information structure with
kzalloc_obj() and stores it in fep->fpi.
The probe failure paths release this allocation with kfree(). However,
after a successful probe, fs_enet_remove() tears down the network
device without freeing fep->fpi, leaving the platform information
structure allocated after driver removal.
Free fep->fpi before releasing the network device.
This issue was found by manual code inspection.
Fixes: 976de6a8c304 ("fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <redacted>
---
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 1 +
1 file changed, 1 insertion(+)
From: Simon Horman <horms@kernel.org> Date: 2026-09-18 09:31:07
On Wed, Sep 16, 2026 at 11:14:14AM +0800, Guangshuo Li wrote:
fs_enet_probe() allocates the platform information structure with
kzalloc_obj() and stores it in fep->fpi.
The probe failure paths release this allocation with kfree(). However,
after a successful probe, fs_enet_remove() tears down the network
device without freeing fep->fpi, leaving the platform information
structure allocated after driver removal.
Free fep->fpi before releasing the network device.
This issue was found by manual code inspection.
Fixes: 976de6a8c304 ("fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <redacted>
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski [off-list ref]:
On Wed, 16 Sep 2026 11:14:14 +0800 you wrote:
fs_enet_probe() allocates the platform information structure with
kzalloc_obj() and stores it in fep->fpi.
The probe failure paths release this allocation with kfree(). However,
after a successful probe, fs_enet_remove() tears down the network
device without freeing fep->fpi, leaving the platform information
structure allocated after driver removal.
[...]