summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/sockfs/socksubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/fs/sockfs/socksubr.c')
-rw-r--r--usr/src/uts/common/fs/sockfs/socksubr.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/sockfs/socksubr.c b/usr/src/uts/common/fs/sockfs/socksubr.c
index d8b69aef5e..33a6841f16 100644
--- a/usr/src/uts/common/fs/sockfs/socksubr.c
+++ b/usr/src/uts/common/fs/sockfs/socksubr.c
@@ -92,7 +92,7 @@ static struct kmem_cache *socktpi_cache, *socktpi_unix_cache;
struct kmem_cache *socktpi_sod_cache;
dev_t sockdev; /* For fsid in getattr */
-
+int sockfs_defer_nl7c_init = 0;
struct sockparams *sphead;
krwlock_t splist_lock;
@@ -107,6 +107,8 @@ extern void nl7c_init(void);
extern int sostr_init();
+extern int modrootloaded;
+
#define ADRSTRLEN (2 * sizeof (void *) + 1)
/*
* kernel structure for passing the sockinfo data back up to the user.
@@ -195,6 +197,11 @@ soconfig(int domain, int type, int protocol,
dprint(0, ("soconfig(%d,%d,%d,%s,%d)\n",
domain, type, protocol, devpath, devpathlen));
+ if (sockfs_defer_nl7c_init) {
+ nl7c_init();
+ sockfs_defer_nl7c_init = 0;
+ }
+
/*
* Look for an existing match.
*/
@@ -769,7 +776,11 @@ sockinit(int fstype, char *name)
mutex_init(&socklist.sl_lock, NULL, MUTEX_DEFAULT, NULL);
sendfile_init();
- nl7c_init();
+ if (!modrootloaded) {
+ sockfs_defer_nl7c_init = 1;
+ } else {
+ nl7c_init();
+ }
return (0);