Repository navigation
Commit 40d86ef
Wait for route RCU callbacks in homa_peer_free_net
homa_peer_free_net releases each route in the namespace with
call_rcu(homa_route_free), and homa_route_free dereferences
route->key.hnet to find the peertab. But hnet is the pernet data for
the namespace, which cleanup_net frees right after the exit methods
return (its rcu_barrier comes later). A callback that runs after that
reads freed memory.
Found by deleting network namespaces that had carried Homa traffic, in
a VM: with init_on_free=1 every run oopsed in homa_route_free (6.12 and
7.3); without it, 3 of 8 runs on 7.3 hit a general protection fault
there under load.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 4bd0275 commit 40d86ef
2 files changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
175 | 180 | | |
176 | 181 | | |
177 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
154 | 169 | | |
155 | 170 | | |
156 | 171 | | |
| |||
0 commit comments