aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-08-01 13:03:17 -0400
committerDavid S. Miller <davem@davemloft.net>2017-08-01 13:03:17 -0400
commitbb1182bc3e5956a93ab3ef8a3cbfb7966c42a94a (patch)
tree434e1071679b5a6280155293de74fd5cd81c5dc5
parent1f139ed9ec40521b4497aa34e107d38bb082b0e0 (diff)
parente6eeb287e3b534ce1bd6477894b9df8e394b4fbc (diff)
Merge branch 'revert-ipv6-const'
Julia Lawall says: ==================== Revert "ipv6: constify inet6_protocol structures" inet6_add_protocol and inet6_del_protocol include casts that remove the effect of the const annotation on their parameter, leading to possible runtime crashes. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/ip6_gre.c2
-rw-r--r--net/ipv6/tcp_ipv6.c2
-rw-r--r--net/ipv6/udp.c2
-rw-r--r--net/l2tp/l2tp_ip6.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 33865d67bcb4..67ff2aaf5dcb 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1080,7 +1080,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
1080} 1080}
1081 1081
1082 1082
1083static const struct inet6_protocol ip6gre_protocol = { 1083static struct inet6_protocol ip6gre_protocol __read_mostly = {
1084 .handler = gre_rcv, 1084 .handler = gre_rcv,
1085 .err_handler = ip6gre_err, 1085 .err_handler = ip6gre_err,
1086 .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, 1086 .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 39ee8e7fc4bd..ced5dcf37465 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1944,7 +1944,7 @@ struct proto tcpv6_prot = {
1944 .diag_destroy = tcp_abort, 1944 .diag_destroy = tcp_abort,
1945}; 1945};
1946 1946
1947static const struct inet6_protocol tcpv6_protocol = { 1947static struct inet6_protocol tcpv6_protocol = {
1948 .early_demux = tcp_v6_early_demux, 1948 .early_demux = tcp_v6_early_demux,
1949 .early_demux_handler = tcp_v6_early_demux, 1949 .early_demux_handler = tcp_v6_early_demux,
1950 .handler = tcp_v6_rcv, 1950 .handler = tcp_v6_rcv,
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 5f8b8d766c63..4a3e65626e8b 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1448,7 +1448,7 @@ int compat_udpv6_getsockopt(struct sock *sk, int level, int optname,
1448} 1448}
1449#endif 1449#endif
1450 1450
1451static const struct inet6_protocol udpv6_protocol = { 1451static struct inet6_protocol udpv6_protocol = {
1452 .early_demux = udp_v6_early_demux, 1452 .early_demux = udp_v6_early_demux,
1453 .early_demux_handler = udp_v6_early_demux, 1453 .early_demux_handler = udp_v6_early_demux,
1454 .handler = udpv6_rcv, 1454 .handler = udpv6_rcv,
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
index d2efcd93e1e2..88b397c30d86 100644
--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -788,7 +788,7 @@ static struct inet_protosw l2tp_ip6_protosw = {
788 .ops = &l2tp_ip6_ops, 788 .ops = &l2tp_ip6_ops,
789}; 789};
790 790
791static const struct inet6_protocol l2tp_ip6_protocol = { 791static struct inet6_protocol l2tp_ip6_protocol __read_mostly = {
792 .handler = l2tp_ip6_recv, 792 .handler = l2tp_ip6_recv,
793}; 793};
794 794