aboutsummaryrefslogtreecommitdiff
path: root/include/linux/fpga/fpga-mgr.h
diff options
context:
space:
mode:
authorZekun Shen <[email protected]>2020-06-15 11:50:29 -0400
committerDavid S. Miller <[email protected]>2020-06-15 13:20:14 -0700
commite89df5c4322c1bf495f62d74745895b5fd2a4393 (patch)
tree2c73ec0ca58c7e7e2e2efc60f4b4cefc0b510702 /include/linux/fpga/fpga-mgr.h
parentdff515a3e71dc8ab3b9dcc2e23a9b5fca88b3c18 (diff)
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions