Commit 345f7e9
committed
fix(uffd): hold settle Lock across read+SetRange in serve loop
Serve loop previously took the lock only around SetRange after readEvents
returned. A snapshot-path goroutine could win the Lock race in the gap
between read and SetRange, exporting an incomplete Removed bitmap before
the serve loop applied the just-read events. Hold Lock across the read
itself so read+SetRange are atomic from any other goroutine's perspective.1 parent d725d87 commit 345f7e9
1 file changed
Lines changed: 11 additions & 7 deletions
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
265 | 272 | | |
266 | 273 | | |
267 | 274 | | |
| 275 | + | |
268 | 276 | | |
269 | 277 | | |
270 | 278 | | |
271 | 279 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | 280 | | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| |||
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
| 305 | + | |
304 | 306 | | |
| 307 | + | |
| 308 | + | |
305 | 309 | | |
306 | 310 | | |
307 | 311 | | |
| |||
0 commit comments