Commit 56a49d70 authored by Roopa Prabhu's avatar Roopa Prabhu Committed by David S. Miller

net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags

This fix addresses https://bugzilla.kernel.org/show_bug.cgi?id=201071

Commit 5025f7f7 wrongly relied on __dev_change_flags to notify users of
dev flag changes in the case when dev->rtnl_link_state = RTNL_LINK_INITIALIZED.
Fix it by indicating flag changes explicitly to __dev_notify_flags.

Fixes: 5025f7f7 ("rtnetlink: add rtnl_link_state check in rtnl_configure_link")
Reported-By: default avatarLiam mcbirnie <liam.mcbirnie@boeing.com>
Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9824dfae
...@@ -2810,7 +2810,7 @@ int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm) ...@@ -2810,7 +2810,7 @@ int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm)
} }
if (dev->rtnl_link_state == RTNL_LINK_INITIALIZED) { if (dev->rtnl_link_state == RTNL_LINK_INITIALIZED) {
__dev_notify_flags(dev, old_flags, 0U); __dev_notify_flags(dev, old_flags, (old_flags ^ dev->flags));
} else { } else {
dev->rtnl_link_state = RTNL_LINK_INITIALIZED; dev->rtnl_link_state = RTNL_LINK_INITIALIZED;
__dev_notify_flags(dev, old_flags, ~0U); __dev_notify_flags(dev, old_flags, ~0U);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment