Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151151569
D44865.id137387.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
676 B
Referenced Files
None
Subscribers
None
D44865.id137387.diff
View Options
diff --git a/sys/compat/linuxkpi/common/src/linux_idr.c b/sys/compat/linuxkpi/common/src/linux_idr.c
--- a/sys/compat/linuxkpi/common/src/linux_idr.c
+++ b/sys/compat/linuxkpi/common/src/linux_idr.c
@@ -178,6 +178,15 @@
{
struct idr_layer *il, *iln;
+ /*
+ * if this idr is empty/destroyed already, then return.
+ * If we do not do this then the mutex will panic while
+ * asserting that it is valid.
+ */
+ if(!mtx_initialized(&idr->lock)) {
+ return;
+ }
+
idr_remove_all(idr);
mtx_lock(&idr->lock);
for (il = idr->free; il != NULL; il = iln) {
@@ -802,4 +811,5 @@
{
idr_destroy(&ida->idr);
free(ida->free_bitmap, M_IDR);
+ ida->free_bitmap = NULL;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 10:58 AM (1 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31027094
Default Alt Text
D44865.id137387.diff (676 B)
Attached To
Mode
D44865: linuxkpi: Allow ida_destroy and idr_destroy to be called multiple times
Attached
Detach File
Event Timeline
Log In to Comment