Commit 7319a36
Fixed a transient pointer overwritten problem which caused live-lock
Need to save node->prev to a temporary variable, because once clh_unlock()
has been called, the current clh_node may be used by another thread for
many times and node->prev value might be changed. Therefore two thread
may end up using the same clh_node next time and cause circular linked
list problem (live-lock on the same clh_node)1 parent a70863f commit 7319a36
1 file changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | 241 | | |
243 | 242 | | |
244 | 243 | | |
| |||
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
254 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
255 | 262 | | |
0 commit comments