Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1499608
| Path | csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | lizf@kernel.org |
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.4 035/125] net: fix __netdev_update_features return on ndo_set_features failure |
| Date | Wed, 12 Oct 2016 15:00:03 +0200 |
| Message-ID | <srriz-4vs-79@gated-at.bofh.it> (permalink) |
| References | <srqZb-4nM-3@gated-at.bofh.it> |
| X-Mailer | git-send-email 1.9.1 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 39 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Nikolay Aleksandrov <nikolay@cumulusnetworks.com>, Michał Mirosław <mirq-linux@rere.qmqm.pl>, "David S. Miller" <davem@davemloft.net>, Zefan Li <lizefan@huawei.com> |
| X-Original-Date | Wed, 12 Oct 2016 20:32:31 +0800 |
| X-Original-Message-ID | <1476275641-4697-35-git-send-email-lizf@kernel.org> |
| X-Original-References | <1476275600-4626-1-git-send-email-lizf@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1499608 |
Show key headers only | View raw
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
3.4.113-rc1 review patch. If anyone has any objections, please let me know.
------------------
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@rere.qmqm.pl>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Zefan Li <lizefan@huawei.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 4f679bf..1f57ab1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5368,7 +5368,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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.4 035/125] net: fix __netdev_update_features return on ndo_set_features failure lizf@kernel.org - 2016-10-12 15:00 +0200
csiph-web