• Kuniyuki Iwashima's avatar
    mpls: Handle error of rtnl_register_module(). · 5be2062e
    Kuniyuki Iwashima authored
    Since introduced, mpls_init() has been ignoring the returned
    value of rtnl_register_module(), which could fail silently.
    
    Handling the error allows users to view a module as an all-or-nothing
    thing in terms of the rtnetlink functionality.  This prevents syzkaller
    from reporting spurious errors from its tests, where OOM often occurs
    and module is automatically loaded.
    
    Let's handle the errors by rtnl_register_many().
    
    Fixes: 03c05665 ("mpls: Netlink commands to add, remove, and dump routes")
    Signed-off-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    5be2062e
af_mpls.c 63.7 KB