Commit 20452a2
net/tun: Do not DecRef a closed TUN endpoint when un-persisting it.
This requires coordinating tunEndpoint.closed and tunEndpoint.persistent.
Earlier these were independent atomic bools. This change moves them under
the protection of tunEndpoint.mu.
Fixes 81d7f66 ("netstack/tuntap: implement the TUNSETPERSIST ioctl")
Reported-by: syzbot+e18c12f830349b415fdb@syzkaller.appspotmail.com
PiperOrigin-RevId: 8077482541 parent 0bb00ae commit 20452a2
1 file changed
+20
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
362 | 361 | | |
363 | 362 | | |
364 | 363 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
371 | 368 | | |
372 | 369 | | |
373 | 370 | | |
| 371 | + | |
| 372 | + | |
374 | 373 | | |
375 | 374 | | |
376 | 375 | | |
377 | | - | |
378 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
381 | 384 | | |
382 | 385 | | |
383 | 386 | | |
| |||
386 | 389 | | |
387 | 390 | | |
388 | 391 | | |
389 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
390 | 395 | | |
391 | 396 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
| 397 | + | |
| 398 | + | |
397 | 399 | | |
398 | 400 | | |
399 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
400 | 405 | | |
401 | 406 | | |
402 | 407 | | |
| |||
0 commit comments