Merge branch 'fix-xhci-panic' into 'master'

Fix possible panic in device enumeration

See merge request redox-os/drivers!279
This commit is contained in:
Jeremy Soller
2025-08-25 07:21:30 -06:00
+10 -1
View File
@@ -333,7 +333,16 @@ impl IrqReactor {
);
{
let mut ports = self.hci.ports.lock().unwrap();
let port = &mut ports[port_id.root_hub_port_index()];
let root_port_index = port_id.root_hub_port_index();
if root_port_index >= ports.len() {
warn!(
"Received out of bounds transmit device numeration request on root index {} at port {} [port len was: {}]",
root_port_index, port_id, ports.len()
);
return;
}
let port = &mut ports[root_port_index];
port.clear_csc();
}
} else {