GEOM modules don't wait for "init" completion

Brian Fundakowski Feldman green at FreeBSD.org
Tue Oct 5 17:05:47 PDT 2004


In src/sys/geom/geom_subr.c, g_modevent(MOD_LOAD) does not wait for
completion of the class's initialization before proceeding to return
success to the caller (kldload(8)).  This is especially problematic
for mount_mfs(8)'s use of mdctl(8) -- the first mount hardly ever
succeeds.  Does it not seem like this line:
		g_post_event(g_load_class, hh, M_WAITOK, NULL);
should really be:
		g_waitfor_event(g_load_class, hh, M_WAITOK, NULL);
?

I can't really envision situations where you would at least not want to
have your control device exist before returning from a kldload(2) system
call.

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green at FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\


More information about the freebsd-arch mailing list