[3.19.y-ckt stable] Patch "net: fix __netdev_update_features return on ndo_set_features failure" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Mon Dec 14 22:47:37 UTC 2015
This is a note to let you know that I have just added a patch titled
net: fix __netdev_update_features return on ndo_set_features failure
to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue
This patch is scheduled to be released in version 3.19.8-ckt12.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From f3f8ef701330e83390c21cf58bc46128a5db6546 Mon Sep 17 00:00:00 2001
From: Nikolay Aleksandrov <nikolay at cumulusnetworks.com>
Date: Fri, 13 Nov 2015 15:20:24 +0100
Subject: net: fix __netdev_update_features return on ndo_set_features failure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 00ee5927177792a6e139d50b6b7564d35705556a upstream.
If ndo_set_features fails __netdev_update_features() will return -1 but
this is wrong because it is expected to return 0 if no features were
changed (see netdev_update_features()), which will cause a netdev
notifier to be called without any actual changes. Fix this by returning
0 if ndo_set_features fails.
Fixes: 6cb6a27c45ce ("net: Call netdev_features_change() from netdev_update_features()")
CC: Michał Mirosław <mirq-linux at rere.qmqm.pl>
Signed-off-by: Nikolay Aleksandrov <nikolay at cumulusnetworks.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 9c14e87..c8c801b 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6076,7 +6076,7 @@ int __netdev_update_features(struct net_device *dev)
netdev_err(dev,
"set_features() failed (%d); wanted %pNF, left %pNF\n",
err, &features, &dev->features);
- return -1;
+ return 0;
}
if (!err)
--
1.9.1
More information about the kernel-team
mailing list