diff options
author | Josh Boyer <jwboyer@fedoraproject.org> | 2016-04-26 10:54:31 -0400 |
---|---|---|
committer | Josh Boyer <jwboyer@fedoraproject.org> | 2016-04-26 10:58:40 -0400 |
commit | 4ee66c3a576fbc173bfe7a16882d00f9f58ac9fd (patch) | |
tree | e1abf403bc2268dd4191c293e29c4a72a5dc8ee4 /ipv4-fib-don-t-warn-when-primary-address-is-missing-.patch | |
parent | f5b0e8bac7b4e106038a30313821d3f2d6509187 (diff) | |
download | kernel-4ee66c3a576fbc173bfe7a16882d00f9f58ac9fd.tar.gz kernel-4ee66c3a576fbc173bfe7a16882d00f9f58ac9fd.tar.xz kernel-4ee66c3a576fbc173bfe7a16882d00f9f58ac9fd.zip |
Avoid unnecessary warnings when deleting a network device
Diffstat (limited to 'ipv4-fib-don-t-warn-when-primary-address-is-missing-.patch')
-rw-r--r-- | ipv4-fib-don-t-warn-when-primary-address-is-missing-.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ipv4-fib-don-t-warn-when-primary-address-is-missing-.patch b/ipv4-fib-don-t-warn-when-primary-address-is-missing-.patch new file mode 100644 index 000000000..9e4cf4e0e --- /dev/null +++ b/ipv4-fib-don-t-warn-when-primary-address-is-missing-.patch @@ -0,0 +1,40 @@ +From 9f79323a0aebccb9915ab8f4b7dcf531578b9cf9 Mon Sep 17 00:00:00 2001 +From: Paolo Abeni <pabeni@redhat.com> +Date: Thu, 21 Apr 2016 20:23:31 -0400 +Subject: [PATCH] ipv4/fib: don't warn when primary address is missing if + in_dev is dead + +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> +--- + 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 8a9246deccfe..63566ec54794 100644 +--- a/net/ipv4/fib_frontend.c ++++ b/net/ipv4/fib_frontend.c +@@ -904,7 +904,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) { +- 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.5.5 + |