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

2018-11-28 Thread David Miller
From: Pan Bian 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

[PATCH] net: hisilicon: remove unexpected free_netdev

2018-11-27 Thread Pan Bian
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 --- drivers/net/ethernet/hisilicon/hip04_eth.c | 4 +--- 1 file