Commit 922a021
committed
Kernel/Io,Ps: Fix resource leaks, IRQL corruption, and race conditions
IopDeleteDevice: lower IRQL when DeletePending is false, preventing
the caller from being stuck at elevated IRQL indefinitely.
IopParseDevice: free FileObject and decrement DeviceObject refcount
when GetObjectNativeHandle fails, fixing per-failed-open leak.
IopQueryDeviceInformation: add missing ObfDereferenceObject call,
fixing a FileObject reference leak on every file query operation.
IoQueryVolumeInformation: return X_STATUS_NOT_IMPLEMENTED instead of
S_OK to prevent callers from using uninitialized output buffers.
IoCompletionObjectType: add IopDeleteIoCompletion delete procedure
that drains queued CXBX_IO_COMPLETION_PACKET entries on destruction.
PsTerminateSystemThread: wrap ThreadListEntry removal, StackCount
decrement, and reaper list insertion in KeRaiseIrqlToDpcLevel/
KfLowerIrql to match KeInitializeThread's insertion locking.1 parent e6701e0 commit 922a021
2 files changed
Lines changed: 35 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
258 | 261 | | |
259 | 262 | | |
260 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
261 | 279 | | |
262 | 280 | | |
263 | 281 | | |
| |||
266 | 284 | | |
267 | 285 | | |
268 | 286 | | |
269 | | - | |
| 287 | + | |
270 | 288 | | |
271 | 289 | | |
272 | 290 | | |
| |||
973 | 991 | | |
974 | 992 | | |
975 | 993 | | |
976 | | - | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
977 | 998 | | |
978 | 999 | | |
979 | 1000 | | |
| |||
1276 | 1297 | | |
1277 | 1298 | | |
1278 | 1299 | | |
| 1300 | + | |
| 1301 | + | |
1279 | 1302 | | |
1280 | 1303 | | |
1281 | 1304 | | |
| |||
1328 | 1351 | | |
1329 | 1352 | | |
1330 | 1353 | | |
1331 | | - | |
| 1354 | + | |
1332 | 1355 | | |
1333 | 1356 | | |
1334 | 1357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
532 | 537 | | |
533 | 538 | | |
534 | 539 | | |
535 | | - | |
536 | 540 | | |
537 | 541 | | |
538 | 542 | | |
| |||
0 commit comments