Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171127004
D17976.id50423.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
906 B
Referenced Files
None
Subscribers
None
D17976.id50423.diff
View Options
Index: head/sys/x86/x86/msi.c
===================================================================
--- head/sys/x86/x86/msi.c
+++ head/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
Wed, Sep 9, 9:12 PM (54 m, 42 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38612154
Default Alt Text
D17976.id50423.diff (906 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