aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-08-03 01:22:46 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-03 01:22:46 -0400
commit00dad5e479531e379aba7358600cc768725d4f1f (patch)
tree652199eacee32c2cf317f5a54da8265973d29978 /net/ipv4
parentc477d0447db08068a497e7beb892b2b2a7bff64b (diff)
parent3a3dfb062c2e086c202d34f09ce29634515ad256 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/e1000e/hw.h net/bridge/br_device.c net/bridge/br_input.c
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 1a700651600b..176e11aaea77 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2187,6 +2187,8 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
2187 GFP_KERNEL); 2187 GFP_KERNEL);
2188 if (cvp == NULL) 2188 if (cvp == NULL)
2189 return -ENOMEM; 2189 return -ENOMEM;
2190
2191 kref_init(&cvp->kref);
2190 } 2192 }
2191 lock_sock(sk); 2193 lock_sock(sk);
2192 tp->rx_opt.cookie_in_always = 2194 tp->rx_opt.cookie_in_always =
@@ -2201,12 +2203,11 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
2201 */ 2203 */
2202 kref_put(&tp->cookie_values->kref, 2204 kref_put(&tp->cookie_values->kref,
2203 tcp_cookie_values_release); 2205 tcp_cookie_values_release);
2204 kref_init(&cvp->kref);
2205 tp->cookie_values = cvp;
2206 } else { 2206 } else {
2207 cvp = tp->cookie_values; 2207 cvp = tp->cookie_values;
2208 } 2208 }
2209 } 2209 }
2210
2210 if (cvp != NULL) { 2211 if (cvp != NULL) {
2211 cvp->cookie_desired = ctd.tcpct_cookie_desired; 2212 cvp->cookie_desired = ctd.tcpct_cookie_desired;
2212 2213
@@ -2220,6 +2221,8 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
2220 cvp->s_data_desired = ctd.tcpct_s_data_desired; 2221 cvp->s_data_desired = ctd.tcpct_s_data_desired;
2221 cvp->s_data_constant = 0; /* false */ 2222 cvp->s_data_constant = 0; /* false */
2222 } 2223 }
2224
2225 tp->cookie_values = cvp;
2223 } 2226 }
2224 release_sock(sk); 2227 release_sock(sk);
2225 return err; 2228 return err;