• Johannes Berg's avatar
    cfg80211: initialize regulatory keys/database later · d7be102f
    Johannes Berg authored
    When cfg80211 is built as a module, everything is fine, and we
    can keep the code as is; in fact, we have to, because there can
    only be a single module_init().
    
    When cfg80211 is built-in, however, it needs to initialize
    before drivers (device_initcall/module_init), and thus used to
    be at subsys_initcall(). I'd moved it to fs_initcall() earlier,
    where it can remain. However, this is still too early because at
    that point the key infrastructure hasn't been initialized yet,
    so X.509 certificates can't be parsed yet.
    
    To work around this problem, load the regdb keys only later in
    a late_initcall(), at which point the necessary infrastructure
    has been initialized.
    
    Fixes: 90a53e44 ("cfg80211: implement regdb signature checking")
    Reported-by: default avatarXiaolong Ye <xiaolong.ye@intel.com>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    d7be102f
reg.c 95.4 KB