Skip to content

Commit bb1182b

Browse files
committed
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 <[email protected]>
2 parents 1f139ed + e6eeb28 commit bb1182b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

net/ipv6/ip6_gre.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
10801080
}
10811081

10821082

1083-
static const struct inet6_protocol ip6gre_protocol = {
1083+
static struct inet6_protocol ip6gre_protocol __read_mostly = {
10841084
.handler = gre_rcv,
10851085
.err_handler = ip6gre_err,
10861086
.flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,

net/ipv6/tcp_ipv6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,7 @@ struct proto tcpv6_prot = {
19441944
.diag_destroy = tcp_abort,
19451945
};
19461946

1947-
static const struct inet6_protocol tcpv6_protocol = {
1947+
static struct inet6_protocol tcpv6_protocol = {
19481948
.early_demux = tcp_v6_early_demux,
19491949
.early_demux_handler = tcp_v6_early_demux,
19501950
.handler = tcp_v6_rcv,

net/ipv6/udp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ int compat_udpv6_getsockopt(struct sock *sk, int level, int optname,
14481448
}
14491449
#endif
14501450

1451-
static const struct inet6_protocol udpv6_protocol = {
1451+
static struct inet6_protocol udpv6_protocol = {
14521452
.early_demux = udp_v6_early_demux,
14531453
.early_demux_handler = udp_v6_early_demux,
14541454
.handler = udpv6_rcv,

net/l2tp/l2tp_ip6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ static struct inet_protosw l2tp_ip6_protosw = {
788788
.ops = &l2tp_ip6_ops,
789789
};
790790

791-
static const struct inet6_protocol l2tp_ip6_protocol = {
791+
static struct inet6_protocol l2tp_ip6_protocol __read_mostly = {
792792
.handler = l2tp_ip6_recv,
793793
};
794794

0 commit comments

Comments
 (0)