- Notifications
You must be signed in to change notification settings - Fork5k
Commit96da905
committed
aio: Be more paranoid about interrupts
As reported by Noah, it's possible, although practically very unlikely, thatinterrupts could be processed in between pgaio_io_reopen() andpgaio_io_perform_synchronously(). Prevent that by explicitly holdinginterrupts.It also seems good to add an assertion to pgaio_io_before_prep() to ensurethat interrupts are held, as otherwise FDs referenced by the IO could beclosed during interrupt processing. All code in the aio series currently runsthe code with interrupts held, but it seems better to be paranoid.Reviewed-by: Noah Misch <noah@leadboat.com>Reported-by: Noah Misch <noah@leadboat.com>Discussion:https://postgr.es/m/20250324002939.5c.nmisch@google.com1 parent47a1f07 commit96da905
2 files changed
+15
-0
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
162 | 168 |
| |
163 | 169 |
| |
164 | 170 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
476 | 476 |
| |
477 | 477 |
| |
478 | 478 |
| |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
479 | 486 |
| |
480 | 487 |
| |
481 | 488 |
| |
| |||
502 | 509 |
| |
503 | 510 |
| |
504 | 511 |
| |
| 512 | + | |
| 513 | + | |
505 | 514 |
| |
506 | 515 |
| |
507 | 516 |
| |
|
0 commit comments
Comments
(0)