Re: [PATCH net v2] atm: Fix the cleanup on alloc_mpc failure in atm_mpoa_mpoad_attach
From: Paolo Abeni
Date: Tue Sep 30 2025 - 04:45:30 EST
On 9/25/25 10:42 PM, Deepak Sharma wrote:
> diff --git a/net/atm/mpc.c b/net/atm/mpc.c
> index f6b447bba329..4f67ad1d6bef 100644
> --- a/net/atm/mpc.c
> +++ b/net/atm/mpc.c
> @@ -804,7 +804,7 @@ static int atm_mpoa_mpoad_attach(struct atm_vcc *vcc, int arg)
> /* This lets us now how our LECs are doing */
> err = register_netdevice_notifier(&mpoa_notifier);
> if (err < 0) {
> - timer_delete(&mpc_timer);
> + timer_delete_sync(&mpc_timer);
AFAICS the mpc_timer can rearm itself, so this the above is not enough
and you should use timer_shutdown_sync() instead.
Thanks,
Paolo