mbox series

[net,0/2] fsl/fman: Fix refcount handling of fman-related devices

Message ID 20241015060122.25709-1-amishin@t-argos.ru (mailing list archive)
Headers show
Series fsl/fman: Fix refcount handling of fman-related devices | expand

Message

Aleksandr Mishin Oct. 15, 2024, 6:01 a.m. UTC
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@kernel.org>
(https://lore.kernel.org/all/20240702133651.GK598357@kernel.org/)

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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 21, 2024, 9:20 a.m. UTC | #1
Hello:

This series was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 15 Oct 2024 09:01:20 +0300 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net,1/2] fsl/fman: Save device references taken in mac_probe()
    https://git.kernel.org/netdev/net/c/efeddd552ec6
  - [net,2/2] fsl/fman: Fix refcount handling of fman-related devices
    https://git.kernel.org/netdev/net/c/1dec67e0d9fb

You are awesome, thank you!