Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jun 1995 22:02:32 -0700
From:      Bill Paul <wpaul>
To:        CVS-commiters, cvs-sys
Subject:   cvs commit: src/sys/sys lkm.h
Message-ID:  <199506170502.WAA07395@freefall.cdrom.com>

next in thread | raw e-mail | index | archive | help
wpaul       95/06/16 22:02:31

  Modified:    sys/sys   lkm.h
  Log:
  Close out PR #507 (loading LM_MISC pseudo-lkms twice crashes system).
  
  For the LKM_E_LOAD case of the DISPATCH() macro, use lkmexists() to
  make sure we don't have another instance the module we're trying to
  load already loaded _before_ calling the module's load() function.
  If lkmexists() returns true, return EEXIST without trying to load
  the module.
  
  For most types of modules, the individual dispatch functions in the
  kernel check for duplicated modules, but for LM_MISC we can't trust
  the module to do the checks itself. Currently, the kernel does
  do an lkmexists() check on LM_MISC modules, but not until after
  the module's load() function has been called, which is too late
  for it to do any good. If the load() function does irreversible
  things to the kernel, the belated lkmexists() check forces an
  unload() and a crash.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506170502.WAA07395>