Skip to content
  • Lawrence Stewart's avatar
    cc_init() should only be run once on system boot, but with VIMAGE kernels it · 14f57a8b
    Lawrence Stewart authored
    runs on boot and each time a vnet jail is created. Running cc_init() multiple
    times results in a panic when attempting to initialise the cc_list lock again,
    and so r215166 effectively broke the use of vnet jails.
    
    Switch to using a SYSINIT to run cc_init() on boot. CC algorithm modules loaded
    on boot register in the same SI_SUB_PROTO_IFATTACHDOMAIN category as is used in
    this patch, so cc_init() is run at SI_ORDER_FIRST to ensure the framework is
    initialised before module registration is attempted.
    
    Sponsored by:	FreeBSD Foundation
    Reported and tested by:	Mikolaj Golub <to.my.trociny at gmail com>
    MFC after:	11 weeks
    X-MFC with:	r215166
    14f57a8b