Commit 8f0d145
net/mlx5: Serialize module cleanup with reload and remove
Currently, remove and reload flows can run in parallel to module cleanup.
This design is error prone. For example: aux_drivers callbacks are called
from both cleanup and remove flows with different lockings, which can
cause a deadlock[1].
Hence, serialize module cleanup with reload and remove.
[1]
cleanup remove
------- ------
auxiliary_driver_unregister();
devl_lock()
auxiliary_device_delete(mlx5e_aux)
device_lock(mlx5e_aux)
devl_lock()
device_lock(mlx5e_aux)
Fixes: 912cebf ("net/mlx5e: Connect ethernet part to auxiliary bus")
Signed-off-by: Shay Drory <[email protected]>
Reviewed-by: Moshe Shemesh <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>1 parent 184e1e4 commit 8f0d145
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2110 | 2110 | | |
2111 | 2111 | | |
2112 | 2112 | | |
2113 | | - | |
| 2113 | + | |
2114 | 2114 | | |
2115 | 2115 | | |
2116 | 2116 | | |
2117 | 2117 | | |
2118 | 2118 | | |
2119 | 2119 | | |
2120 | 2120 | | |
2121 | | - | |
| 2121 | + | |
2122 | 2122 | | |
2123 | | - | |
| 2123 | + | |
2124 | 2124 | | |
2125 | 2125 | | |
2126 | 2126 | | |
2127 | | - | |
| 2127 | + | |
2128 | 2128 | | |
2129 | 2129 | | |
2130 | | - | |
| 2130 | + | |
2131 | 2131 | | |
2132 | 2132 | | |
2133 | 2133 | | |
2134 | 2134 | | |
2135 | 2135 | | |
2136 | 2136 | | |
2137 | 2137 | | |
2138 | | - | |
2139 | | - | |
2140 | 2138 | | |
| 2139 | + | |
| 2140 | + | |
2141 | 2141 | | |
2142 | 2142 | | |
2143 | 2143 | | |
| |||
0 commit comments