diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-03-26 11:18:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-03-26 11:19:03 -0400 |
commit | 7fd52392c56361a40f0c630a82b36b95ca31eac6 (patch) | |
tree | 14091de24c6b28ea4cae9826f98aeedb7be091f5 /net/tipc/socket.c | |
parent | b01c3a0010aabadf745f3e7fdb9cab682e0a28a2 (diff) | |
parent | e22057c8599373e5caef0bc42bdb95d2a361ab0d (diff) |
Merge branch 'linus' into perf/urgent
Merge reason: we need to fix a non-trivial merge conflict.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r-- | net/tipc/socket.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index e2f7c5d370ba..29e957f64458 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -126,7 +126,7 @@ static atomic_t tipc_queue_size = ATOMIC_INIT(0); | |||
126 | 126 | ||
127 | static void advance_rx_queue(struct sock *sk) | 127 | static void advance_rx_queue(struct sock *sk) |
128 | { | 128 | { |
129 | buf_discard(__skb_dequeue(&sk->sk_receive_queue)); | 129 | kfree_skb(__skb_dequeue(&sk->sk_receive_queue)); |
130 | atomic_dec(&tipc_queue_size); | 130 | atomic_dec(&tipc_queue_size); |
131 | } | 131 | } |
132 | 132 | ||
@@ -142,7 +142,7 @@ static void discard_rx_queue(struct sock *sk) | |||
142 | 142 | ||
143 | while ((buf = __skb_dequeue(&sk->sk_receive_queue))) { | 143 | while ((buf = __skb_dequeue(&sk->sk_receive_queue))) { |
144 | atomic_dec(&tipc_queue_size); | 144 | atomic_dec(&tipc_queue_size); |
145 | buf_discard(buf); | 145 | kfree_skb(buf); |
146 | } | 146 | } |
147 | } | 147 | } |
148 | 148 | ||
@@ -288,7 +288,7 @@ static int release(struct socket *sock) | |||
288 | break; | 288 | break; |
289 | atomic_dec(&tipc_queue_size); | 289 | atomic_dec(&tipc_queue_size); |
290 | if (TIPC_SKB_CB(buf)->handle != 0) | 290 | if (TIPC_SKB_CB(buf)->handle != 0) |
291 | buf_discard(buf); | 291 | kfree_skb(buf); |
292 | else { | 292 | else { |
293 | if ((sock->state == SS_CONNECTING) || | 293 | if ((sock->state == SS_CONNECTING) || |
294 | (sock->state == SS_CONNECTED)) { | 294 | (sock->state == SS_CONNECTED)) { |
@@ -355,6 +355,9 @@ static int bind(struct socket *sock, struct sockaddr *uaddr, int uaddr_len) | |||
355 | else if (addr->addrtype != TIPC_ADDR_NAMESEQ) | 355 | else if (addr->addrtype != TIPC_ADDR_NAMESEQ) |
356 | return -EAFNOSUPPORT; | 356 | return -EAFNOSUPPORT; |
357 | 357 | ||
358 | if (addr->addr.nameseq.type < TIPC_RESERVED_TYPES) | ||
359 | return -EACCES; | ||
360 | |||
358 | return (addr->scope > 0) ? | 361 | return (addr->scope > 0) ? |
359 | tipc_publish(portref, addr->scope, &addr->addr.nameseq) : | 362 | tipc_publish(portref, addr->scope, &addr->addr.nameseq) : |
360 | tipc_withdraw(portref, -addr->scope, &addr->addr.nameseq); | 363 | tipc_withdraw(portref, -addr->scope, &addr->addr.nameseq); |
@@ -1612,7 +1615,7 @@ restart: | |||
1612 | if (buf) { | 1615 | if (buf) { |
1613 | atomic_dec(&tipc_queue_size); | 1616 | atomic_dec(&tipc_queue_size); |
1614 | if (TIPC_SKB_CB(buf)->handle != 0) { | 1617 | if (TIPC_SKB_CB(buf)->handle != 0) { |
1615 | buf_discard(buf); | 1618 | kfree_skb(buf); |
1616 | goto restart; | 1619 | goto restart; |
1617 | } | 1620 | } |
1618 | tipc_disconnect(tport->ref); | 1621 | tipc_disconnect(tport->ref); |