Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F172524503
D17976.id50369.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
891 B
Referenced Files
None
Subscribers
None
D17976.id50369.diff
View Options
Index: sys/x86/x86/msi.c
===================================================================
--- sys/x86/x86/msi.c
+++ sys/x86/x86/msi.c
@@ -409,7 +409,7 @@
/* Do we need to create some new sources? */
if (cnt < count) {
/* If we would exceed the max, give up. */
- if (i + (count - cnt) >= first_msi_irq + NUM_MSI_INTS) {
+ if (i + (count - cnt) > first_msi_irq + NUM_MSI_INTS) {
mtx_unlock(&msi_lock);
free(mirqs, M_MSI);
return (ENXIO);
@@ -647,13 +647,14 @@
break;
}
+ /* Are all IRQs in use? */
+ if (i == first_msi_irq + NUM_MSI_INTS) {
+ mtx_unlock(&msi_lock);
+ return (ENXIO);
+ }
+
/* Do we need to create a new source? */
if (msi == NULL) {
- /* If we would exceed the max, give up. */
- if (i + 1 >= first_msi_irq + NUM_MSI_INTS) {
- mtx_unlock(&msi_lock);
- return (ENXIO);
- }
mtx_unlock(&msi_lock);
/* Create a new source. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 20, 1:10 AM (3 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39263501
Default Alt Text
D17976.id50369.diff (891 B)
Attached To
Mode
D17976: Revert r332735 and fix MSI-X to properly fail allocations when full.
Attached
Detach File
Event Timeline
Log In to Comment