linux_dsm_epyc7002/drivers/net/ethernet/socionext
Jia-Ju Bai 0020f5c807 net: socionext: Fix two sleep-in-atomic-context bugs in ave_rxfifo_reset()
The driver may sleep with holding a spinlock.
The function call paths (from bottom to top) in Linux-4.17 are:

[FUNC] usleep_range
drivers/net/ethernet/socionext/sni_ave.c, 892:
	usleep_range in ave_rxfifo_reset
drivers/net/ethernet/socionext/sni_ave.c, 932:
	ave_rxfifo_reset in ave_irq_handler

[FUNC] usleep_range
drivers/net/ethernet/socionext/sni_ave.c, 888:
	usleep_range in ave_rxfifo_reset
drivers/net/ethernet/socionext/sni_ave.c, 932:
	ave_rxfifo_reset in ave_irq_handler

To fix these bugs, usleep_range() is replaced with udelay().

These bugs are found by my static analysis tool DSAC.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-17 19:02:44 -07:00
..
Kconfig net: ethernet: ave: add support for phy-mode setting of system controller 2018-04-20 10:49:41 -04:00
Makefile
netsec.c net: socionext: Increase descriptors to 256 2018-08-11 12:11:36 -07:00
sni_ave.c net: socionext: Fix two sleep-in-atomic-context bugs in ave_rxfifo_reset() 2018-09-17 19:02:44 -07:00