[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55534550.5060405@6wind.com>
Date: Wed, 13 May 2015 14:36:32 +0200
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: Jiri Pirko <jiri@...nulli.us>
CC: davem@...emloft.net, netdev@...r.kernel.org, j.vosburgh@...il.com,
vfalico@...il.com, gospo@...ulusnetworks.com
Subject: Re: [PATCH net v4] rtnl/bond: don't send rtnl msg for unregistered
iface
Le 13/05/2015 14:24, Jiri Pirko a écrit :
> Wed, May 13, 2015 at 02:19:42PM CEST, nicolas.dichtel@...nd.com wrote:
[snip]
>> The patch fixes the spotted bug by checking in bond driver if the interface
>> is registered before calling the notifier chain.
>> It also adds a check in rtmsg_ifinfo() to prevent this kind of bug in the
>> future.
[snip]
>> --- a/net/core/rtnetlink.c
>> +++ b/net/core/rtnetlink.c
>> @@ -2415,6 +2415,9 @@ void rtmsg_ifinfo(int type, struct net_device *dev, unsigned int change,
>> {
>> struct sk_buff *skb;
>>
>> + if (dev->reg_state != NETREG_REGISTERED)
>> + return;
>> +
>
> This is redundant now that you check it in __bond_opt_set.
As said in the commit log ;-)
>
> Sorry to be a pain Nicolas :/
>
Yeah, I see that you don't want this check ;-)
In fact, I don't really understand why because it does not harm and it prevents
to have again the same bug.
Does anyone else have an opinion on that?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists