diff options
author | Eric Dumazet <edumazet@google.com> | 2015-03-19 22:04:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-20 12:40:25 -0400 |
commit | 52452c542559ac980b48dbf22a30ee7fa0af507c (patch) | |
tree | a212dbe95694ea11e86b9d9aca8a2eba0b06a2d1 /net/dccp/ipv6.c | |
parent | a998f712f77ea4892d3fcf24e0a67603e63da128 (diff) |
inet: drop prev pointer handling in request sock
When request sock are put in ehash table, the whole notion
of having a previous request to update dl_next is pointless.
Also, following patch will get rid of big purge timer,
so we want to delete a request sock without holding listener lock.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r-- | net/dccp/ipv6.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index c655de5f67c9..ae2184039fe3 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -149,12 +149,12 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
149 | 149 | ||
150 | /* Might be for an request_sock */ | 150 | /* Might be for an request_sock */ |
151 | switch (sk->sk_state) { | 151 | switch (sk->sk_state) { |
152 | struct request_sock *req, **prev; | 152 | struct request_sock *req; |
153 | case DCCP_LISTEN: | 153 | case DCCP_LISTEN: |
154 | if (sock_owned_by_user(sk)) | 154 | if (sock_owned_by_user(sk)) |
155 | goto out; | 155 | goto out; |
156 | 156 | ||
157 | req = inet6_csk_search_req(sk, &prev, dh->dccph_dport, | 157 | req = inet6_csk_search_req(sk, dh->dccph_dport, |
158 | &hdr->daddr, &hdr->saddr, | 158 | &hdr->daddr, &hdr->saddr, |
159 | inet6_iif(skb)); | 159 | inet6_iif(skb)); |
160 | if (req == NULL) | 160 | if (req == NULL) |
@@ -172,7 +172,7 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
172 | goto out; | 172 | goto out; |
173 | } | 173 | } |
174 | 174 | ||
175 | inet_csk_reqsk_queue_drop(sk, req, prev); | 175 | inet_csk_reqsk_queue_drop(sk, req); |
176 | goto out; | 176 | goto out; |
177 | 177 | ||
178 | case DCCP_REQUESTING: | 178 | case DCCP_REQUESTING: |
@@ -317,16 +317,13 @@ static struct sock *dccp_v6_hnd_req(struct sock *sk,struct sk_buff *skb) | |||
317 | { | 317 | { |
318 | const struct dccp_hdr *dh = dccp_hdr(skb); | 318 | const struct dccp_hdr *dh = dccp_hdr(skb); |
319 | const struct ipv6hdr *iph = ipv6_hdr(skb); | 319 | const struct ipv6hdr *iph = ipv6_hdr(skb); |
320 | struct request_sock *req; | ||
320 | struct sock *nsk; | 321 | struct sock *nsk; |
321 | struct request_sock **prev; | 322 | |
322 | /* Find possible connection requests. */ | 323 | req = inet6_csk_search_req(sk, dh->dccph_sport, &iph->saddr, |
323 | struct request_sock *req = inet6_csk_search_req(sk, &prev, | 324 | &iph->daddr, inet6_iif(skb)); |
324 | dh->dccph_sport, | ||
325 | &iph->saddr, | ||
326 | &iph->daddr, | ||
327 | inet6_iif(skb)); | ||
328 | if (req != NULL) | 325 | if (req != NULL) |
329 | return dccp_check_req(sk, skb, req, prev); | 326 | return dccp_check_req(sk, skb, req); |
330 | 327 | ||
331 | nsk = __inet6_lookup_established(sock_net(sk), &dccp_hashinfo, | 328 | nsk = __inet6_lookup_established(sock_net(sk), &dccp_hashinfo, |
332 | &iph->saddr, dh->dccph_sport, | 329 | &iph->saddr, dh->dccph_sport, |