aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/ip6mr.c2
-rw-r--r--net/ipv6/ipv6_sockglue.c3
2 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index da673ef75e12..433042114148 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1238,7 +1238,7 @@ int ip6_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, int
1238#ifdef CONFIG_IPV6_PIMSM_V2 1238#ifdef CONFIG_IPV6_PIMSM_V2
1239 case MRT6_PIM: 1239 case MRT6_PIM:
1240 { 1240 {
1241 int v, ret; 1241 int v;
1242 if (get_user(v, (int __user *)optval)) 1242 if (get_user(v, (int __user *)optval))
1243 return -EFAULT; 1243 return -EFAULT;
1244 v = !!v; 1244 v = !!v;
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 99624109c010..bf9695375219 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -159,8 +159,6 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
159 159
160 if (sk->sk_protocol == IPPROTO_TCP) { 160 if (sk->sk_protocol == IPPROTO_TCP) {
161 struct inet_connection_sock *icsk = inet_csk(sk); 161 struct inet_connection_sock *icsk = inet_csk(sk);
162 struct net *net = sock_net(sk);
163
164 local_bh_disable(); 162 local_bh_disable();
165 sock_prot_inuse_add(net, sk->sk_prot, -1); 163 sock_prot_inuse_add(net, sk->sk_prot, -1);
166 sock_prot_inuse_add(net, &tcp_prot, 1); 164 sock_prot_inuse_add(net, &tcp_prot, 1);
@@ -172,7 +170,6 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
172 tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); 170 tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
173 } else { 171 } else {
174 struct proto *prot = &udp_prot; 172 struct proto *prot = &udp_prot;
175 struct net *net = sock_net(sk);
176 173
177 if (sk->sk_protocol == IPPROTO_UDPLITE) 174 if (sk->sk_protocol == IPPROTO_UDPLITE)
178 prot = &udplite_prot; 175 prot = &udplite_prot;