linux_dsm_epyc7002/drivers/net/ethernet/atheros
Zekun Shen e89df5c432 net: alx: fix race condition in alx_remove
There is a race condition exist during termination. The path is
alx_stop and then alx_remove. An alx_schedule_link_check could be called
before alx_stop by interrupt handler and invoke alx_link_check later.
Alx_stop frees the napis, and alx_remove cancels any pending works.
If any of the work is scheduled before termination and invoked before
alx_remove, a null-ptr-deref occurs because both expect alx->napis[i].

This patch fix the race condition by moving cancel_work_sync functions
before alx_free_napis inside alx_stop. Because interrupt handler can call
alx_schedule_link_check again, alx_free_irq is moved before
cancel_work_sync calls too.

Signed-off-by: Zekun Shen <bruceshenzk@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-06-15 13:20:14 -07:00
..
alx net: alx: fix race condition in alx_remove 2020-06-15 13:20:14 -07:00
atl1c net: atheros: remove dead code in atl1c_resume() 2020-05-07 13:04:21 -07:00
atl1e net/atheros: Clean atheros code from driver version 2020-02-24 11:24:47 -08:00
atlx net/atheros: remove redundant assignment to variable size 2020-05-08 22:46:36 -07:00
ag71xx.c net: ag71xx: extend link validation to support other SoCs 2020-04-27 10:09:21 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile net: ethernet: add ag71xx driver 2019-05-26 13:22:50 -07:00