Message ID | 1422423984-29743-1-git-send-email-roopa@cumulusnetworks.com |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
From: roopa@cumulusnetworks.com Date: Tue, 27 Jan 2015 21:46:24 -0800 > From: Roopa Prabhu <roopa@cumulusnetworks.com> > > Reported in: https://bugzilla.kernel.org/show_bug.cgi?id=92081 > > This patch avoids calling rtnl_notify if the device ndo_bridge_getlink > handler does not return any bytes in the skb. > > Alternately, the skb->len check can be moved inside rtnl_notify. > > For the bridge vlan case described in 92081, there is also a fix needed > in bridge driver to generate a proper notification. Will fix that in > subsequent patch. > > Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> This doesn't apply to the 'net' tree, is there something I missed? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 1/27/15, 11:05 PM, David Miller wrote: > From: roopa@cumulusnetworks.com > Date: Tue, 27 Jan 2015 21:46:24 -0800 > >> From: Roopa Prabhu <roopa@cumulusnetworks.com> >> >> Reported in: https://bugzilla.kernel.org/show_bug.cgi?id=92081 >> >> This patch avoids calling rtnl_notify if the device ndo_bridge_getlink >> handler does not return any bytes in the skb. >> >> Alternately, the skb->len check can be moved inside rtnl_notify. >> >> For the bridge vlan case described in 92081, there is also a fix needed >> in bridge driver to generate a proper notification. Will fix that in >> subsequent patch. >> >> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> > This doesn't apply to the 'net' tree, is there something I missed? sorry, that's me. This should be net-next. Resubmitting with net-next in the PATCH line. thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 1/28/15, 5:37 AM, roopa wrote: > On 1/27/15, 11:05 PM, David Miller wrote: >> From: roopa@cumulusnetworks.com >> Date: Tue, 27 Jan 2015 21:46:24 -0800 >> >>> From: Roopa Prabhu <roopa@cumulusnetworks.com> >>> >>> Reported in: https://bugzilla.kernel.org/show_bug.cgi?id=92081 >>> >>> This patch avoids calling rtnl_notify if the device ndo_bridge_getlink >>> handler does not return any bytes in the skb. >>> >>> Alternately, the skb->len check can be moved inside rtnl_notify. >>> >>> For the bridge vlan case described in 92081, there is also a fix needed >>> in bridge driver to generate a proper notification. Will fix that in >>> subsequent patch. >>> >>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> >> This doesn't apply to the 'net' tree, is there something I missed? > sorry, that's me. This should be net-next. Resubmitting with net-next > in the PATCH line. > A few more details ... ....This bug exists in 'net' tree (and I believe previous releases) as well. However my patch was generated on net-next, And there are other changes in the related area in net-next tree hence the patch will not apply on 'net'. Looks like its better for me to regenerate and submit against 'net'. will do. Thanks, Roopa -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 07447d1..e9d0f86 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -2934,7 +2934,7 @@ static int rtnl_bridge_notify(struct net_device *dev) } err = dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev, 0); - if (err < 0) + if (err < 0 || !skb->len) goto errout; rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC); @@ -2942,7 +2942,8 @@ static int rtnl_bridge_notify(struct net_device *dev) errout: WARN_ON(err == -EMSGSIZE); kfree_skb(skb); - rtnl_set_sk_err(net, RTNLGRP_LINK, err); + if (err) + rtnl_set_sk_err(net, RTNLGRP_LINK, err); return err; }