[PATCH net 0/2] fsl/fman: Fix refcount handling of fman-related devices
From: Aleksandr Mishin
Date: Tue Oct 15 2024 - 02:03:52 EST
The series is intended to fix refcount handling for fman-related "struct
device" objects - the devices are not released upon driver removal or in
the error paths during probe. This leads to device reference leaks.
The device pointers are now saved to struct mac_device and properly handled
in the driver's probe and removal functions.
Originally reported by Simon Horman <horms@xxxxxxxxxx>
(https://lore.kernel.org/all/20240702133651.GK598357@xxxxxxxxxx/)
Compile tested only.
Aleksandr Mishin (2):
fsl/fman: Save device references taken in mac_probe()
fsl/fman: Fix refcount handling of fman-related devices
drivers/net/ethernet/freescale/fman/mac.c | 68 +++++++++++++++++------
drivers/net/ethernet/freescale/fman/mac.h | 6 +-
2 files changed, 56 insertions(+), 18 deletions(-)
--
2.30.2