• Breno Leitao's avatar
    net: netconsole: Populate dynamic entry even if netpoll fails · 908ee298
    Breno Leitao authored
    Currently, netconsole discards targets that fail during initialization,
    causing two issues:
    
    1) Inconsistency between target list and configfs entries
      * user pass cmdline0, cmdline1. If cmdline0 fails, then cmdline1
        becomes cmdline0 in configfs.
    
    2) Inability to manage failed targets from userspace
      * If user pass a target that fails with netpoll (interface not loaded at
        netcons initialization time, such as interface is a module), then
        the target will not exist in the configfs, so, user cannot re-enable
        or modify it from userspace.
    
    Failed targets are now added to the target list and configfs, but
    remain disabled until manually enabled or reconfigured. This change does
    not change the behaviour if CONFIG_NETCONSOLE_DYNAMIC is not set.
    
    CC: Aijay Adams <aijay@meta.com>
    Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
    Link: https://patch.msgid.link/20240822111051.179850-3-leitao@debian.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    908ee298
netconsole.c 35.2 KB