Commit 741c29f
committed
fix: return NO_VECTOR when reading MSI vector for invalid queue
Fix a bug in the common VirtIO configuration for PCI transport where we
would use `queue_select` to read the queue's MSI vector without
validating it matches a valid queue. This could lead in panics when
accessing the `msix_queue` array. The spec states that in such cases we
should return `NO_VECTOR` (0xffff), so do that.
Signed-off-by: Babis Chalios <[email protected]>1 parent fc26d27 commit 741c29f
1 file changed
+19
-2
lines changedLines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
234 | 246 | | |
235 | 247 | | |
236 | 248 | | |
| |||
408 | 420 | | |
409 | 421 | | |
410 | 422 | | |
411 | | - | |
| 423 | + | |
412 | 424 | | |
413 | 425 | | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
414 | 431 | | |
415 | 432 | | |
0 commit comments