Commit cb881f1
committed
fix(mmio): don't return MMIO virtual addresses to the free list
check_linux_args MMIO device registers into a PageBox-allocated VA,
then return a VolatileRef<'static> pointing at it. When the PageBox
is dropped, the VA range goes back to the free list. A subsequent
allocation could reuse and remap the same VA, corrupting the driver's
VolatileRef.
Use into_raw() to prevent the VA from being reclaimed when a device
is found.1 parent 4912505 commit cb881f1
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
141 | 147 | | |
142 | 148 | | |
143 | 149 | | |
| |||
0 commit comments