Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1403539 > unrolled thread

[PATCH 3.12 65/76] ipv4/fib: don't warn when primary address is missing if in_dev is dead

Started byJiri Slaby <jslaby@suse.cz>
First post2016-05-19 11:20 +0200
Last post2016-05-19 11:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.12 65/76] ipv4/fib: don't warn when primary address is missing if in_dev is dead Jiri Slaby <jslaby@suse.cz> - 2016-05-19 11:20 +0200

#1403539 — [PATCH 3.12 65/76] ipv4/fib: don't warn when primary address is missing if in_dev is dead

FromJiri Slaby <jslaby@suse.cz>
Date2016-05-19 11:20 +0200
Subject[PATCH 3.12 65/76] ipv4/fib: don't warn when primary address is missing if in_dev is dead
Message-ID<rAshA-6ee-27@gated-at.bofh.it>
From: Paolo Abeni <pabeni@redhat.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

[ Upstream commit 391a20333b8393ef2e13014e6e59d192c5594471 ]

After commit fbd40ea0180a ("ipv4: Don't do expensive useless work
during inetdev destroy.") when deleting an interface,
fib_del_ifaddr() can be executed without any primary address
present on the dead interface.

The above is safe, but triggers some "bug: prim == NULL" warnings.

This commit avoids warning if the in_dev is dead

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 net/ipv4/fib_frontend.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 25a0946f7074..3d3966bf3df6 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -797,7 +797,11 @@ void fib_del_ifaddr(struct in_ifaddr *ifa, struct in_ifaddr *iprim)
 	if (ifa->ifa_flags & IFA_F_SECONDARY) {
 		prim = inet_ifa_byprefix(in_dev, any, ifa->ifa_mask);
 		if (prim == NULL) {
-			pr_warn("%s: bug: prim == NULL\n", __func__);
+			/* if the device has been deleted, we don't perform
+			 * address promotion
+			 */
+			if (!in_dev->dead)
+				pr_warn("%s: bug: prim == NULL\n", __func__);
 			return;
 		}
 		if (iprim && iprim != prim) {
-- 
2.8.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web