yshigeru / linux-devel

Linux kernel source tree
Other
0 stars 0 forks source link

macvlan: Return error on register_netdevice_notifier() failure #42

Open yshigeru opened 4 months ago

yshigeru commented 4 months ago

macvlan.cでregister_netdevice_notifier()のエラーハンドリングを追加する。

static int __init macvlan_init_module(void)
{
    int err;

    register_netdevice_notifier(&macvlan_notifier_block);

    err = macvlan_link_register(&macvlan_link_ops);
    if (err < 0)
        goto err1;
    return 0;
err1:
    unregister_netdevice_notifier(&macvlan_notifier_block);
    return err;
}
yshigeru commented 4 months ago

Sent v1 patch: https://lore.kernel.org/all/20240724135622.1797145-1-syoshida@redhat.com/