* [PATCH v2] bridge: dont send notification when skb->len == 0 in rtnl_bridge_notify
@ 2015-01-29 0:23 roopa
2015-01-29 6:22 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: roopa @ 2015-01-29 0:23 UTC (permalink / raw)
To: netdev, davem, stephen, rami.rosen
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.
v2: rebase patch on net tree
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
net/core/rtnetlink.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 9cf6fe9..446cbaf 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2895,12 +2895,16 @@ static int rtnl_bridge_notify(struct net_device *dev, u16 flags)
goto errout;
}
+ if (!skb->len)
+ goto errout;
+
rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC);
return 0;
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;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] bridge: dont send notification when skb->len == 0 in rtnl_bridge_notify
2015-01-29 0:23 [PATCH v2] bridge: dont send notification when skb->len == 0 in rtnl_bridge_notify roopa
@ 2015-01-29 6:22 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-01-29 6:22 UTC (permalink / raw)
To: roopa; +Cc: netdev, stephen, rami.rosen
From: roopa@cumulusnetworks.com
Date: Wed, 28 Jan 2015 16:23:11 -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.
>
> v2: rebase patch on net tree
>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-29 6:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 0:23 [PATCH v2] bridge: dont send notification when skb->len == 0 in rtnl_bridge_notify roopa
2015-01-29 6:22 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.