Workaround the panic, triggered by the netgraph attempting to
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Tue, 30 Aug 2005 13:25:07 +0000 (13:25 +0000)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Tue, 30 Aug 2005 13:25:07 +0000 (13:25 +0000)
commitd8fef73ea32e173f627061acd85cebf684e2ed87
tree776d732576382e7269d990fb282b370b2b1412fd
parent5fb9cbd0cd50eb258d78d01eb487d3263c979476
Workaround the panic, triggered by the netgraph attempting to
load a missing module from within the socket dispatch thread, by:

- not trying to load a netgraph module when you can't.

- preloading ng_ksocket.ko(if missing) from the module handler
  where you're guaranteed to have the process context needed by
  the linker_* functions. This makes us sure at least that the basic
  netgraph operations will work without messing with loading a kernel
  module on the fly (suggested by: hiten@).

Reviewed-by: hiten@
sys/netgraph/netgraph/ng_base.c