* [PATCH net] net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags
@ 2018-09-12 20:21 Roopa Prabhu
2018-09-13 18:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Roopa Prabhu @ 2018-09-12 20:21 UTC (permalink / raw)
To: davem; +Cc: netdev, stephen, liam.mcbirnie
From: Roopa Prabhu <roopa@cumulusnetworks.com>
This fix addresses https://bugzilla.kernel.org/show_bug.cgi?id=201071
Commit 5025f7f7d506 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: 5025f7f7d506 ("rtnetlink: add rtnl_link_state check in rtnl_configure_link")
Reported-By: Liam mcbirnie <liam.mcbirnie@boeing.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
Dave, if 5025f7f7d506 made it to stable, request you to pls queue this one up too. Thanks.
net/core/rtnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 60c9288..63ce2283 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2810,7 +2810,7 @@ int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm)
}
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 {
dev->rtnl_link_state = RTNL_LINK_INITIALIZED;
__dev_notify_flags(dev, old_flags, ~0U);
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags
2018-09-12 20:21 [PATCH net] net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags Roopa Prabhu
@ 2018-09-13 18:02 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-09-13 18:02 UTC (permalink / raw)
To: roopa; +Cc: netdev, stephen, liam.mcbirnie
From: Roopa Prabhu <roopa@cumulusnetworks.com>
Date: Wed, 12 Sep 2018 13:21:48 -0700
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
> This fix addresses https://bugzilla.kernel.org/show_bug.cgi?id=201071
>
> Commit 5025f7f7d506 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: 5025f7f7d506 ("rtnetlink: add rtnl_link_state check in rtnl_configure_link")
> Reported-By: Liam mcbirnie <liam.mcbirnie@boeing.com>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Applied.
> ---
> Dave, if 5025f7f7d506 made it to stable, request you to pls queue this one up too. Thanks.
I will, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-13 23:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-12 20:21 [PATCH net] net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags Roopa Prabhu
2018-09-13 18:02 ` 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.