diff options
author | David S. Miller <davem@davemloft.net> | 2015-06-14 02:56:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-14 02:56:52 -0400 |
commit | 25c43bf13b1657d9a2f6a2565e9159ce31517aa5 (patch) | |
tree | c1fef736d3227dbd3788206c746d00763247f232 /net | |
parent | a2f0fad32b0d0022c7e5706d333d74a9579f3742 (diff) | |
parent | c8d17b451aa18b07b60e771addf17a5fdd4138c7 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_multicast.c | 7 | ||||
-rw-r--r-- | net/core/skbuff.c | 2 | ||||
-rw-r--r-- | net/core/sock.c | 15 | ||||
-rw-r--r-- | net/ipv6/ip6_input.c | 8 | ||||
-rw-r--r-- | net/mpls/af_mpls.c | 11 | ||||
-rw-r--r-- | net/sctp/auth.c | 11 | ||||
-rw-r--r-- | net/tipc/socket.c | 16 | ||||
-rw-r--r-- | net/wireless/wext-compat.c | 2 |
8 files changed, 47 insertions, 25 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 0b38ee98024b..2e246a1a9b43 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -1164,6 +1164,9 @@ static void br_multicast_add_router(struct net_bridge *br, | |||
1164 | struct net_bridge_port *p; | 1164 | struct net_bridge_port *p; |
1165 | struct hlist_node *slot = NULL; | 1165 | struct hlist_node *slot = NULL; |
1166 | 1166 | ||
1167 | if (!hlist_unhashed(&port->rlist)) | ||
1168 | return; | ||
1169 | |||
1167 | hlist_for_each_entry(p, &br->router_list, rlist) { | 1170 | hlist_for_each_entry(p, &br->router_list, rlist) { |
1168 | if ((unsigned long) port >= (unsigned long) p) | 1171 | if ((unsigned long) port >= (unsigned long) p) |
1169 | break; | 1172 | break; |
@@ -1191,12 +1194,8 @@ static void br_multicast_mark_router(struct net_bridge *br, | |||
1191 | if (port->multicast_router != 1) | 1194 | if (port->multicast_router != 1) |
1192 | return; | 1195 | return; |
1193 | 1196 | ||
1194 | if (!hlist_unhashed(&port->rlist)) | ||
1195 | goto timer; | ||
1196 | |||
1197 | br_multicast_add_router(br, port); | 1197 | br_multicast_add_router(br, port); |
1198 | 1198 | ||
1199 | timer: | ||
1200 | mod_timer(&port->multicast_router_timer, | 1199 | mod_timer(&port->multicast_router_timer, |
1201 | now + br->multicast_querier_interval); | 1200 | now + br->multicast_querier_interval); |
1202 | } | 1201 | } |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 9bac0e6f8dfa..b6a19ca0f99e 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -4467,7 +4467,7 @@ struct sk_buff *alloc_skb_with_frags(unsigned long header_len, | |||
4467 | 4467 | ||
4468 | while (order) { | 4468 | while (order) { |
4469 | if (npages >= 1 << order) { | 4469 | if (npages >= 1 << order) { |
4470 | page = alloc_pages(gfp_mask | | 4470 | page = alloc_pages((gfp_mask & ~__GFP_WAIT) | |
4471 | __GFP_COMP | | 4471 | __GFP_COMP | |
4472 | __GFP_NOWARN | | 4472 | __GFP_NOWARN | |
4473 | __GFP_NORETRY, | 4473 | __GFP_NORETRY, |
diff --git a/net/core/sock.c b/net/core/sock.c index e72633c346b1..7063c329c1b6 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -354,15 +354,12 @@ void sk_clear_memalloc(struct sock *sk) | |||
354 | 354 | ||
355 | /* | 355 | /* |
356 | * SOCK_MEMALLOC is allowed to ignore rmem limits to ensure forward | 356 | * SOCK_MEMALLOC is allowed to ignore rmem limits to ensure forward |
357 | * progress of swapping. However, if SOCK_MEMALLOC is cleared while | 357 | * progress of swapping. SOCK_MEMALLOC may be cleared while |
358 | * it has rmem allocations there is a risk that the user of the | 358 | * it has rmem allocations due to the last swapfile being deactivated |
359 | * socket cannot make forward progress due to exceeding the rmem | 359 | * but there is a risk that the socket is unusable due to exceeding |
360 | * limits. By rights, sk_clear_memalloc() should only be called | 360 | * the rmem limits. Reclaim the reserves and obey rmem limits again. |
361 | * on sockets being torn down but warn and reset the accounting if | ||
362 | * that assumption breaks. | ||
363 | */ | 361 | */ |
364 | if (WARN_ON(sk->sk_forward_alloc)) | 362 | sk_mem_reclaim(sk); |
365 | sk_mem_reclaim(sk); | ||
366 | } | 363 | } |
367 | EXPORT_SYMBOL_GPL(sk_clear_memalloc); | 364 | EXPORT_SYMBOL_GPL(sk_clear_memalloc); |
368 | 365 | ||
@@ -1872,7 +1869,7 @@ bool skb_page_frag_refill(unsigned int sz, struct page_frag *pfrag, gfp_t gfp) | |||
1872 | 1869 | ||
1873 | pfrag->offset = 0; | 1870 | pfrag->offset = 0; |
1874 | if (SKB_FRAG_PAGE_ORDER) { | 1871 | if (SKB_FRAG_PAGE_ORDER) { |
1875 | pfrag->page = alloc_pages(gfp | __GFP_COMP | | 1872 | pfrag->page = alloc_pages((gfp & ~__GFP_WAIT) | __GFP_COMP | |
1876 | __GFP_NOWARN | __GFP_NORETRY, | 1873 | __GFP_NOWARN | __GFP_NORETRY, |
1877 | SKB_FRAG_PAGE_ORDER); | 1874 | SKB_FRAG_PAGE_ORDER); |
1878 | if (likely(pfrag->page)) { | 1875 | if (likely(pfrag->page)) { |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 41a73da371a9..f2e464eba5ef 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -212,13 +212,13 @@ static int ip6_input_finish(struct sock *sk, struct sk_buff *skb) | |||
212 | */ | 212 | */ |
213 | 213 | ||
214 | rcu_read_lock(); | 214 | rcu_read_lock(); |
215 | resubmit: | ||
215 | idev = ip6_dst_idev(skb_dst(skb)); | 216 | idev = ip6_dst_idev(skb_dst(skb)); |
216 | if (!pskb_pull(skb, skb_transport_offset(skb))) | 217 | if (!pskb_pull(skb, skb_transport_offset(skb))) |
217 | goto discard; | 218 | goto discard; |
218 | nhoff = IP6CB(skb)->nhoff; | 219 | nhoff = IP6CB(skb)->nhoff; |
219 | nexthdr = skb_network_header(skb)[nhoff]; | 220 | nexthdr = skb_network_header(skb)[nhoff]; |
220 | 221 | ||
221 | resubmit: | ||
222 | raw = raw6_local_deliver(skb, nexthdr); | 222 | raw = raw6_local_deliver(skb, nexthdr); |
223 | ipprot = rcu_dereference(inet6_protos[nexthdr]); | 223 | ipprot = rcu_dereference(inet6_protos[nexthdr]); |
224 | if (ipprot) { | 224 | if (ipprot) { |
@@ -246,12 +246,10 @@ resubmit: | |||
246 | goto discard; | 246 | goto discard; |
247 | 247 | ||
248 | ret = ipprot->handler(skb); | 248 | ret = ipprot->handler(skb); |
249 | if (ret < 0) { | 249 | if (ret > 0) |
250 | nexthdr = -ret; | ||
251 | goto resubmit; | 250 | goto resubmit; |
252 | } else if (ret == 0) { | 251 | else if (ret == 0) |
253 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDELIVERS); | 252 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDELIVERS); |
254 | } | ||
255 | } else { | 253 | } else { |
256 | if (!raw) { | 254 | if (!raw) { |
257 | if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { | 255 | if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { |
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index bff427f31924..1f93a5978f2a 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c | |||
@@ -564,6 +564,17 @@ static int mpls_dev_notify(struct notifier_block *this, unsigned long event, | |||
564 | case NETDEV_UNREGISTER: | 564 | case NETDEV_UNREGISTER: |
565 | mpls_ifdown(dev); | 565 | mpls_ifdown(dev); |
566 | break; | 566 | break; |
567 | case NETDEV_CHANGENAME: | ||
568 | mdev = mpls_dev_get(dev); | ||
569 | if (mdev) { | ||
570 | int err; | ||
571 | |||
572 | mpls_dev_sysctl_unregister(mdev); | ||
573 | err = mpls_dev_sysctl_register(dev, mdev); | ||
574 | if (err) | ||
575 | return notifier_from_errno(err); | ||
576 | } | ||
577 | break; | ||
567 | } | 578 | } |
568 | return NOTIFY_OK; | 579 | return NOTIFY_OK; |
569 | } | 580 | } |
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index fb7976aee61c..4f15b7d730e1 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c | |||
@@ -381,13 +381,14 @@ nomem: | |||
381 | } | 381 | } |
382 | 382 | ||
383 | 383 | ||
384 | /* Public interface to creat the association shared key. | 384 | /* Public interface to create the association shared key. |
385 | * See code above for the algorithm. | 385 | * See code above for the algorithm. |
386 | */ | 386 | */ |
387 | int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp) | 387 | int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp) |
388 | { | 388 | { |
389 | struct sctp_auth_bytes *secret; | 389 | struct sctp_auth_bytes *secret; |
390 | struct sctp_shared_key *ep_key; | 390 | struct sctp_shared_key *ep_key; |
391 | struct sctp_chunk *chunk; | ||
391 | 392 | ||
392 | /* If we don't support AUTH, or peer is not capable | 393 | /* If we don't support AUTH, or peer is not capable |
393 | * we don't need to do anything. | 394 | * we don't need to do anything. |
@@ -410,6 +411,14 @@ int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp) | |||
410 | sctp_auth_key_put(asoc->asoc_shared_key); | 411 | sctp_auth_key_put(asoc->asoc_shared_key); |
411 | asoc->asoc_shared_key = secret; | 412 | asoc->asoc_shared_key = secret; |
412 | 413 | ||
414 | /* Update send queue in case any chunk already in there now | ||
415 | * needs authenticating | ||
416 | */ | ||
417 | list_for_each_entry(chunk, &asoc->outqueue.out_chunk_list, list) { | ||
418 | if (sctp_auth_send_cid(chunk->chunk_hdr->type, asoc)) | ||
419 | chunk->auth = 1; | ||
420 | } | ||
421 | |||
413 | return 0; | 422 | return 0; |
414 | } | 423 | } |
415 | 424 | ||
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 30ea82a9b0f1..46b6ed534ef2 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -2140,11 +2140,17 @@ static void tipc_sk_timeout(unsigned long data) | |||
2140 | peer_node = tsk_peer_node(tsk); | 2140 | peer_node = tsk_peer_node(tsk); |
2141 | 2141 | ||
2142 | if (tsk->probing_state == TIPC_CONN_PROBING) { | 2142 | if (tsk->probing_state == TIPC_CONN_PROBING) { |
2143 | /* Previous probe not answered -> self abort */ | 2143 | if (!sock_owned_by_user(sk)) { |
2144 | skb = tipc_msg_create(TIPC_CRITICAL_IMPORTANCE, | 2144 | sk->sk_socket->state = SS_DISCONNECTING; |
2145 | TIPC_CONN_MSG, SHORT_H_SIZE, 0, | 2145 | tsk->connected = 0; |
2146 | own_node, peer_node, tsk->portid, | 2146 | tipc_node_remove_conn(sock_net(sk), tsk_peer_node(tsk), |
2147 | peer_port, TIPC_ERR_NO_PORT); | 2147 | tsk_peer_port(tsk)); |
2148 | sk->sk_state_change(sk); | ||
2149 | } else { | ||
2150 | /* Try again later */ | ||
2151 | sk_reset_timer(sk, &sk->sk_timer, (HZ / 20)); | ||
2152 | } | ||
2153 | |||
2148 | } else { | 2154 | } else { |
2149 | skb = tipc_msg_create(CONN_MANAGER, CONN_PROBE, | 2155 | skb = tipc_msg_create(CONN_MANAGER, CONN_PROBE, |
2150 | INT_H_SIZE, 0, peer_node, own_node, | 2156 | INT_H_SIZE, 0, peer_node, own_node, |
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index fff1bef6ed6d..fd682832a0e3 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -1333,6 +1333,8 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev) | |||
1333 | memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN); | 1333 | memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN); |
1334 | wdev_unlock(wdev); | 1334 | wdev_unlock(wdev); |
1335 | 1335 | ||
1336 | memset(&sinfo, 0, sizeof(sinfo)); | ||
1337 | |||
1336 | if (rdev_get_station(rdev, dev, bssid, &sinfo)) | 1338 | if (rdev_get_station(rdev, dev, bssid, &sinfo)) |
1337 | return NULL; | 1339 | return NULL; |
1338 | 1340 | ||