* Patch "lwtunnel: valid encap attr check should return 0 when lwtunnel is disabled" has been added to the 4.9-stable tree
@ 2017-02-15 1:04 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-02-15 1:04 UTC (permalink / raw)
To: dsa, davem, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
lwtunnel: valid encap attr check should return 0 when lwtunnel is disabled
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
lwtunnel-valid-encap-attr-check-should-return-0-when-lwtunnel-is-disabled.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Tue Feb 14 17:03:08 PST 2017
From: David Ahern <dsa@cumulusnetworks.com>
Date: Wed, 8 Feb 2017 09:29:00 -0800
Subject: lwtunnel: valid encap attr check should return 0 when lwtunnel is disabled
From: David Ahern <dsa@cumulusnetworks.com>
[ Upstream commit 2bd137de531367fb573d90150d1872cb2a2095f7 ]
An error was reported upgrading to 4.9.8:
root@Typhoon:~# ip route add default table 210 nexthop dev eth0 via 10.68.64.1
weight 1 nexthop dev eth0 via 10.68.64.2 weight 1
RTNETLINK answers: Operation not supported
The problem occurs when CONFIG_LWTUNNEL is not enabled and a multipath
route is submitted.
The point of lwtunnel_valid_encap_type_attr is catch modules that
need to be loaded before any references are taken with rntl held. With
CONFIG_LWTUNNEL disabled, there will be no modules to load so the
lwtunnel_valid_encap_type_attr stub should just return 0.
Fixes: 9ed59592e3e3 ("lwtunnel: fix autoload of lwt modules")
Reported-by: pupilla@libero.it
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/net/lwtunnel.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/include/net/lwtunnel.h
+++ b/include/net/lwtunnel.h
@@ -176,7 +176,10 @@ static inline int lwtunnel_valid_encap_t
}
static inline int lwtunnel_valid_encap_type_attr(struct nlattr *attr, int len)
{
- return -EOPNOTSUPP;
+ /* return 0 since we are not walking attr looking for
+ * RTA_ENCAP_TYPE attribute on nexthops.
+ */
+ return 0;
}
static inline int lwtunnel_build_state(struct net_device *dev, u16 encap_type,
Patches currently in stable-queue which might be from dsa@cumulusnetworks.com are
queue-4.9/lwtunnel-valid-encap-attr-check-should-return-0-when-lwtunnel-is-disabled.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-15 1:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-15 1:04 Patch "lwtunnel: valid encap attr check should return 0 when lwtunnel is disabled" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).