From: Matthew Dillon Date: Wed, 10 Oct 2012 20:24:59 +0000 (-0700) Subject: kernel - Fix missing LWKT token init in linprocfs X-Git-Tag: v3.4.0rc~1000^2~4 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/35cecbe1f369c33903a923c4b76758cebaa1102d kernel - Fix missing LWKT token init in linprocfs * Fix missing LWKT token init in linprocfs. linprocfs_init() was not being called. Reported-by: marino --- diff --git a/sys/emulation/linux/i386/linprocfs/linprocfs.h b/sys/emulation/linux/i386/linprocfs/linprocfs.h index 33d3aaae6e..c5c13f9c49 100644 --- a/sys/emulation/linux/i386/linprocfs/linprocfs.h +++ b/sys/emulation/linux/i386/linprocfs/linprocfs.h @@ -130,7 +130,6 @@ struct dbreg; #define PFIND(pid) ((pid) ? pfindn(pid) : &proc0) /* pfindn() not MPSAFE XXX */ -void linprocfs_init (void); void linprocfs_exit (struct thread *); int linprocfs_freevp (struct vnode *); int linprocfs_allocvp (struct mount *, struct vnode **, long, pfstype); diff --git a/sys/emulation/linux/i386/linprocfs/linprocfs_subr.c b/sys/emulation/linux/i386/linprocfs/linprocfs_subr.c index 6ad4d68140..d6def22a88 100644 --- a/sys/emulation/linux/i386/linprocfs/linprocfs_subr.c +++ b/sys/emulation/linux/i386/linprocfs/linprocfs_subr.c @@ -43,6 +43,7 @@ #include #include +#include #include #include #include @@ -431,11 +432,13 @@ vfs_findname(vfs_namemap_t *nm, char *buf, int buflen) } #endif -void -linprocfs_init(void) +static void +linprocfs_init(void *arg __unused) { lwkt_token_init(&pfs_token, "linprocfs"); } +SYSINIT(linprocfs_init, SI_SUB_PRE_DRIVERS, SI_ORDER_FIRST, + linprocfs_init, NULL); void linprocfs_exit(struct thread *td)