[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191221080746.GA2246@nanopsycho.orion>
Date: Sat, 21 Dec 2019 09:07:46 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: David Ahern <dsahern@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
jakub.kicinski@...ronome.com, saeedm@...lanox.com, leon@...nel.org,
tariqt@...lanox.com, ayal@...lanox.com, vladbu@...lanox.com,
michaelgur@...lanox.com, moshe@...lanox.com, mlxsw@...lanox.com
Subject: Re: [patch net-next 2/4] net: push code from net notifier reg/unreg
into helpers
Fri, Dec 20, 2019 at 07:07:59PM CET, dsahern@...il.com wrote:
>On 12/20/19 5:35 AM, Jiri Pirko wrote:
>> @@ -1784,6 +1784,42 @@ int unregister_netdevice_notifier(struct notifier_block *nb)
>> }
>> EXPORT_SYMBOL(unregister_netdevice_notifier);
>>
>> +static int __register_netdevice_notifier_net(struct net *net,
>> + struct notifier_block *nb,
>> + bool ignore_call_fail)
>> +{
>> + int err;
>> +
>> + err = raw_notifier_chain_register(&net->netdev_chain, nb);
>> + if (err)
>> + return err;
>> + if (dev_boot_phase)
>> + return 0;
>> +
>> + err = call_netdevice_register_net_notifiers(nb, net);
>> + if (err && !ignore_call_fail)
>> + goto chain_unregister;
>> +
>> + return 0;
>> +
>> +chain_unregister:
>> + raw_notifier_chain_unregister(&netdev_chain, nb);
>
>why is the error path using the global netdev_chain when the register is
>relative to a namespace? yes, I realize existing code does that and this
A bug. Will fix. Thanks!
>is maintaining that behavior.
>
Powered by blists - more mailing lists