Commit 91d3d14
r8169: prevent potential deadlock in rtl8169_close
ndo_stop() is RTNL-protected by net core, and the worker function takes
RTNL as well. Therefore we will deadlock when trying to execute a
pending work synchronously. To fix this execute any pending work
asynchronously. This will do no harm because netif_running() is false
in ndo_stop(), and therefore the work function is effectively a no-op.
However we have to ensure that no task is running or pending after
rtl_remove_one(), therefore add a call to cancel_work_sync().
Fixes: abe5fc4 ("r8169: use RTNL to protect critical sections")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/12395867-1d17-4cac-aa7d-c691938fcddf@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent 59d395e commit 91d3d14
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4694 | 4694 | | |
4695 | 4695 | | |
4696 | 4696 | | |
4697 | | - | |
| 4697 | + | |
4698 | 4698 | | |
4699 | 4699 | | |
4700 | 4700 | | |
| |||
4928 | 4928 | | |
4929 | 4929 | | |
4930 | 4930 | | |
| 4931 | + | |
| 4932 | + | |
4931 | 4933 | | |
4932 | 4934 | | |
4933 | 4935 | | |
| |||
0 commit comments