Subject: Re: [PATCH net v2] rtnl/bond: don't send rtnl msg for unregistered iface

From: Nicolas Dichtel <[email-masked]>
Date: Tue, 12 May 2015 17:06:02 +0200

Le 12/05/2015 17:03, Nicolas Dichtel a écrit :
[snip]
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -3273,7 +3273,8 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi
>   	case NETDEV_BONDING_INFO:
>   		break;
>   	default:
> -		rtmsg_ifinfo(RTM_NEWLINK, dev, 0, GFP_KERNEL);
> +		if (dev->reg_state == NETREG_REGISTERED)
> +			rtmsg_ifinfo(RTM_NEWLINK, dev, 0, GFP_KERNEL);
In fact, it's probably better to put this in rtmsg_ifinfo().
Will send a v3, sorry for the noise.