android_kernel_samsung_msm8976/drivers/net/ethernet/marvell
Jeremy Linton 45dbac38f8 net: sky2: Fix shutdown crash
commit 06ba3b2133dc203e1e9bc36cee7f0839b79a9e8b upstream.

The sky2 frequently crashes during machine shutdown with:

sky2_get_stats+0x60/0x3d8 [sky2]
dev_get_stats+0x68/0xd8
rtnl_fill_stats+0x54/0x140
rtnl_fill_ifinfo+0x46c/0xc68
rtmsg_ifinfo_build_skb+0x7c/0xf0
rtmsg_ifinfo.part.22+0x3c/0x70
rtmsg_ifinfo+0x50/0x5c
netdev_state_change+0x4c/0x58
linkwatch_do_dev+0x50/0x88
__linkwatch_run_queue+0x104/0x1a4
linkwatch_event+0x30/0x3c
process_one_work+0x140/0x3e0
worker_thread+0x60/0x44c
kthread+0xdc/0xf0
ret_from_fork+0x10/0x50

This is caused by the sky2 being called after it has been shutdown.
A previous thread about this can be found here:

https://lkml.org/lkml/2016/4/12/410

An alternative fix is to assure that IFF_UP gets cleared by
calling dev_close() during shutdown. This is similar to what the
bnx2/tg3/xgene and maybe others are doing to assure that the driver
isn't being called following _shutdown().

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2019-07-27 21:42:44 +02:00
..
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-04-22 20:32:51 -04:00
Makefile mv643xx_eth: convert to use the Marvell Orion MDIO driver 2013-03-22 10:25:15 -04:00
mv643xx_eth.c net: mv643xx_eth: fix orphaned statistics timer crash 2013-11-04 04:31:00 -08:00
mvmdio.c net: mvmdio: get and enable optional clock 2013-04-08 16:55:26 -04:00
mvneta.c net: mvneta: Fix CPU_MAP registers initialisation 2015-12-09 13:40:09 -05:00
pxa168_eth.c pxa168_eth: Allocate receive queue initialized to zero 2013-06-19 22:18:52 -07:00
skge.c
skge.h
sky2.c net: sky2: Fix shutdown crash 2019-07-27 21:42:44 +02:00
sky2.h sky2: Receive Overflows not counted 2013-03-29 14:53:19 -04:00