diff options
Diffstat (limited to 'net/core/sock.c')
-rw-r--r-- | net/core/sock.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 9e5b71fda6ec..2676a88f533e 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1180,12 +1180,12 @@ void sock_update_classid(struct sock *sk) | |||
1180 | } | 1180 | } |
1181 | EXPORT_SYMBOL(sock_update_classid); | 1181 | EXPORT_SYMBOL(sock_update_classid); |
1182 | 1182 | ||
1183 | void sock_update_netprioidx(struct sock *sk) | 1183 | void sock_update_netprioidx(struct sock *sk, struct task_struct *task) |
1184 | { | 1184 | { |
1185 | if (in_interrupt()) | 1185 | if (in_interrupt()) |
1186 | return; | 1186 | return; |
1187 | 1187 | ||
1188 | sk->sk_cgrp_prioidx = task_netprioidx(current); | 1188 | sk->sk_cgrp_prioidx = task_netprioidx(task); |
1189 | } | 1189 | } |
1190 | EXPORT_SYMBOL_GPL(sock_update_netprioidx); | 1190 | EXPORT_SYMBOL_GPL(sock_update_netprioidx); |
1191 | #endif | 1191 | #endif |
@@ -1215,7 +1215,7 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority, | |||
1215 | atomic_set(&sk->sk_wmem_alloc, 1); | 1215 | atomic_set(&sk->sk_wmem_alloc, 1); |
1216 | 1216 | ||
1217 | sock_update_classid(sk); | 1217 | sock_update_classid(sk); |
1218 | sock_update_netprioidx(sk); | 1218 | sock_update_netprioidx(sk, current); |
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | return sk; | 1221 | return sk; |
@@ -1465,6 +1465,11 @@ void sock_rfree(struct sk_buff *skb) | |||
1465 | } | 1465 | } |
1466 | EXPORT_SYMBOL(sock_rfree); | 1466 | EXPORT_SYMBOL(sock_rfree); |
1467 | 1467 | ||
1468 | void sock_edemux(struct sk_buff *skb) | ||
1469 | { | ||
1470 | sock_put(skb->sk); | ||
1471 | } | ||
1472 | EXPORT_SYMBOL(sock_edemux); | ||
1468 | 1473 | ||
1469 | int sock_i_uid(struct sock *sk) | 1474 | int sock_i_uid(struct sock *sk) |
1470 | { | 1475 | { |
@@ -2154,6 +2159,10 @@ void release_sock(struct sock *sk) | |||
2154 | spin_lock_bh(&sk->sk_lock.slock); | 2159 | spin_lock_bh(&sk->sk_lock.slock); |
2155 | if (sk->sk_backlog.tail) | 2160 | if (sk->sk_backlog.tail) |
2156 | __release_sock(sk); | 2161 | __release_sock(sk); |
2162 | |||
2163 | if (sk->sk_prot->release_cb) | ||
2164 | sk->sk_prot->release_cb(sk); | ||
2165 | |||
2157 | sk->sk_lock.owned = 0; | 2166 | sk->sk_lock.owned = 0; |
2158 | if (waitqueue_active(&sk->sk_lock.wq)) | 2167 | if (waitqueue_active(&sk->sk_lock.wq)) |
2159 | wake_up(&sk->sk_lock.wq); | 2168 | wake_up(&sk->sk_lock.wq); |