Patch "net: Specify the owning module for lwtunnel ops" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net: Specify the owning module for lwtunnel ops
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:
net-specify-the-owning-module-for-lwtunnel-ops.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 <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Feb 1 08:50:24 CET 2017
From: Robert Shearman <[email protected]>
Date: Tue, 24 Jan 2017 16:26:47 +0000
Subject: net: Specify the owning module for lwtunnel ops
From: Robert Shearman <[email protected]>
[ Upstream commit 88ff7334f25909802140e690c0e16433e485b0a0 ]
Modules implementing lwtunnel ops should not be allowed to unload while there is state alive using those ops, so specify the owning module for all lwtunnel ops.
--- include/net/lwtunnel.h | 2 ++ net/ipv4/ip_tunnel_core.c | 2 ++ net/ipv6/ila/ila_lwt.c | 1 + net/mpls/mpls_iptunnel.c | 1 + 4 files changed, 6 insertions(+)
include/net/lwtunnel.h +2 -0
@@ -43,6 +43,8 @@ struct lwtunnel_encap_ops {int (*get_encap_size)(struct lwtunnel_state *lwtstate);int (*cmp_encap)(struct lwtunnel_state *a,struct lwtunnel_state *b);int (*xmit)(struct sk_buff *skb); + +struct module *owner; };#ifdef CONFIG_LWTUNNEL
net/ipv4/ip_tunnel_core.c +2 -0
@@ -313,6 +313,7 @@ static const struct lwtunnel_encap_ops i .fill_encap = ip_tun_fill_encap_info, .get_encap_size = ip_tun_encap_nlsize, .cmp_encap = ip_tun_cmp_encap, + .owner = THIS_MODULE, };static const struct nla_policy ip6_tun_policy[LWTUNNEL_IP6_MAX +1 ] = {
@@ -403,6 +404,7 @@ static const struct lwtunnel_encap_ops i .fill_encap = ip6_tun_fill_encap_info, .get_encap_size = ip6_tun_encap_nlsize, .cmp_encap = ip_tun_cmp_encap, + .owner = THIS_MODULE, };void __init ip_tunnel_core_init (void )
net/ipv6/ila/ila_lwt.c +1 -0
@@ -164,6 +164,7 @@ static const struct lwtunnel_encap_ops i .fill_encap = ila_fill_encap_info, .get_encap_size = ila_encap_nlsize, .cmp_encap = ila_encap_cmp, + .owner = THIS_MODULE, };int ila_lwt_init (void )
net/mpls/mpls_iptunnel.c +1 -0
@@ -218,6 +218,7 @@ static const struct lwtunnel_encap_ops m .fill_encap = mpls_fill_encap_info, .get_encap_size = mpls_encap_nlsize, .cmp_encap = mpls_encap_cmp, + .owner = THIS_MODULE, };static int __init mpls_iptunnel_init (void )
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/lwtunnel-fix-oops-on-state-free-after-encap-module-unload.patch queue-4.9/net-specify-the-owning-module-for-lwtunnel-ops.patch queue-4.9/net-mpls-fix-multipath-selection-for-lsr-use-case.patch