Re: [PATCH] appletalk: Fix potential NULL pointer dereference in unregister_snap_client
From: YueHaibing
Date: Wed Mar 13 2019 - 23:18:51 EST
On 2019/3/14 5:03, David Miller wrote:
> From: Yue Haibing <yuehaibing@xxxxxxxxxx>
> Date: Tue, 12 Mar 2019 10:04:26 +0800
>
>> timer_setup(&aarp_timer, aarp_expire_timeout, 0);
>> aarp_timer.expires = jiffies + sysctl_aarp_expiry_time;
>> add_timer(&aarp_timer);
>> - register_netdevice_notifier(&aarp_notifier);
>> + rc = register_netdevice_notifier(&aarp_notifier);
>> + if (rc)
>> + unregister_snap_client(aarp_dl);
>> + return rc;
>
> You've left the timer running in this error path.
Oops, sorry, I'll resend to fix it.
>
> .
>