Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136113232
D50136.id155016.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
823 B
Referenced Files
None
Subscribers
None
D50136.id155016.diff
View Options
diff --git a/sys/net/if_media.c b/sys/net/if_media.c
--- a/sys/net/if_media.c
+++ b/sys/net/if_media.c
@@ -59,6 +59,7 @@
#include <sys/sysctl.h>
#include <net/if.h>
+#include <net/if_var.h> /* for if_printf() */
#include <net/if_media.h>
/*
@@ -290,6 +291,22 @@
}
ifmr->ifm_mask = ifm->ifm_mask;
ifmr->ifm_status = 0;
+
+ /*
+ * Don't panic if ifm_status isn't yet setup due to
+ * driver/miibus probe ordering. This can happen if
+ * a kldload'ed driver doesn't set the module order
+ * to setup miibus early enough.
+ *
+ * See kern/286530 for more information.
+ */
+ if (ifm->ifm_status == NULL) {
+ if_printf(ifp,
+ "%s: ifm_status is NULL; please fix miibus/driver"
+ " order\n",
+ __func__);
+ return (EDOOFUS);
+ }
(*ifm->ifm_status)(ifp, ifmr);
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 16, 9:36 PM (16 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25390849
Default Alt Text
D50136.id155016.diff (823 B)
Attached To
Mode
D50136: sys: don't panic on ifm_status being NULL
Attached
Detach File
Event Timeline
Log In to Comment