diff options
Diffstat (limited to 'net/ipv4/tcp_ulp.c')
-rw-r--r-- | net/ipv4/tcp_ulp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c index a5995bb2eaca..34e96353f115 100644 --- a/net/ipv4/tcp_ulp.c +++ b/net/ipv4/tcp_ulp.c | |||
@@ -123,6 +123,8 @@ void tcp_cleanup_ulp(struct sock *sk) | |||
123 | { | 123 | { |
124 | struct inet_connection_sock *icsk = inet_csk(sk); | 124 | struct inet_connection_sock *icsk = inet_csk(sk); |
125 | 125 | ||
126 | sock_owned_by_me(sk); | ||
127 | |||
126 | if (!icsk->icsk_ulp_ops) | 128 | if (!icsk->icsk_ulp_ops) |
127 | return; | 129 | return; |
128 | 130 | ||
@@ -140,6 +142,7 @@ int tcp_set_ulp(struct sock *sk, const char *name) | |||
140 | const struct tcp_ulp_ops *ulp_ops; | 142 | const struct tcp_ulp_ops *ulp_ops; |
141 | int err = 0; | 143 | int err = 0; |
142 | 144 | ||
145 | sock_owned_by_me(sk); | ||
143 | if (icsk->icsk_ulp_ops) | 146 | if (icsk->icsk_ulp_ops) |
144 | return -EEXIST; | 147 | return -EEXIST; |
145 | 148 | ||
@@ -168,6 +171,7 @@ int tcp_set_ulp_id(struct sock *sk, int ulp) | |||
168 | const struct tcp_ulp_ops *ulp_ops; | 171 | const struct tcp_ulp_ops *ulp_ops; |
169 | int err; | 172 | int err; |
170 | 173 | ||
174 | sock_owned_by_me(sk); | ||
171 | if (icsk->icsk_ulp_ops) | 175 | if (icsk->icsk_ulp_ops) |
172 | return -EEXIST; | 176 | return -EEXIST; |
173 | 177 | ||