Re: [PATCH] net: hisilicon: remove unexpected free_netdev

From: David Miller
Date: Wed Nov 28 2018 - 13:42:34 EST


From: Pan Bian <bianpan2016@xxxxxxx>
Date: Wed, 28 Nov 2018 15:30:24 +0800

> The net device ndev is freed via free_netdev when failing to register
> the device. The control flow then jumps to the error handling code
> block. ndev is used and freed again. Resulting in a use-after-free bug.
>
> Signed-off-by: Pan Bian <bianpan2016@xxxxxxx>

Applied.