Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204032
b: refs/heads/master
c: a3bdb54
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Popov authored and David S. Miller committed Jul 31, 2010
1 parent a58b2f9 commit 0beda28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eeaf61d8891f9c9ed12c1a667e72bf83f0857954
refs/heads/master: a3bdb549e30e7a263f7a589747c40e9c50110315
7 changes: 5 additions & 2 deletions trunk/net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2176,6 +2176,8 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
GFP_KERNEL);
if (cvp == NULL)
return -ENOMEM;

kref_init(&cvp->kref);
}
lock_sock(sk);
tp->rx_opt.cookie_in_always =
Expand All @@ -2190,12 +2192,11 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
*/
kref_put(&tp->cookie_values->kref,
tcp_cookie_values_release);
kref_init(&cvp->kref);
tp->cookie_values = cvp;
} else {
cvp = tp->cookie_values;
}
}

if (cvp != NULL) {
cvp->cookie_desired = ctd.tcpct_cookie_desired;

Expand All @@ -2209,6 +2210,8 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
cvp->s_data_desired = ctd.tcpct_s_data_desired;
cvp->s_data_constant = 0; /* false */
}

tp->cookie_values = cvp;
}
release_sock(sk);
return err;
Expand Down

0 comments on commit 0beda28

Please sign in to comment.