Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177553251
D38599.1794700938.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D38599.1794700938.diff
View Options
diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c
--- a/sys/kern/subr_intr.c
+++ b/sys/kern/subr_intr.c
@@ -468,13 +468,10 @@
mtx_assert(&isrc_table_lock, MA_OWNED);
- if (isrc->isrc_irq >= intr_nirq)
- return (EINVAL);
- if (irq_sources[isrc->isrc_irq] != isrc)
- return (EINVAL);
-
- irq_sources[isrc->isrc_irq] = NULL;
- isrc->isrc_irq = INTR_IRQ_INVALID; /* just to be safe */
+ if (isrc->isrc_irq < intr_nirq) {
+ if (irq_sources[isrc->isrc_irq] == isrc)
+ irq_sources[isrc->isrc_irq] = NULL;
+ isrc->isrc_irq = INTR_IRQ_INVALID; /* mark removed */
/*
* If we are recovering from the state irq_sources table is full,
@@ -482,8 +479,9 @@
* will ensure maximum separation of allocation order from release
* order.
*/
- if (irq_next_free >= intr_nirq)
- irq_next_free = 0;
+ if (irq_next_free >= intr_nirq)
+ irq_next_free = 0;
+ }
return (0);
}
@@ -537,7 +535,11 @@
isrc_release_counters(isrc);
error = isrc_free_irq(isrc);
mtx_unlock(&isrc_table_lock);
- return (error);
+
+ if (error != 0)
+ return (error);
+
+ return (intr_event_destroy(isrc->isrc_event));
}
#ifdef SMP
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 12:02 AM (29 m, 14 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41734370
Default Alt Text
D38599.1794700938.diff (1 KB)
Attached To
Mode
D38599: intrng: destroy event when deregistering source
Attached
Detach File
Event Timeline