Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

1) Fix uninitialized struct station_info in cfg80211_wireless_stats(),
from Johannes Berg.

2) Revert commit attempt to fix ipv6 protocol resubmission, it adds
regressions.

3) Endless loops can be created in bridge port lists, fix from Nikolay
Aleksandrov.

4) Don't WARN_ON() if sk->sk_forward_alloc is non-zero in
sk_clear_memalloc, it is a legal situation during swap deactivation.
Fix from Mel Gorman.

5) Fix order of disabling interrupts and unlocking NAPI in enic driver
to avoid a race. From Govindarajulu Varadarajan.

6) High and low register writes are swapped when programming the start
of periodic output in igb driver. From Richard Cochran.

7) Fix device rename handling in mpls stack, from Robert Shearman.

8) Do not trigger compaction synchronously when optimistically trying
to allocate an order 3 page in alloc_skb_with_frags() and
skb_page_frag_refill(). From Shaohua Li.

9) Authentication with COOKIE_ECHO is not handled properly in SCTP, fix
from Marcelo Ricardo Leitner.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
Doc: networking: Fix URL for wiki.wireshark.org in udplite.txt
sctp: allow authenticating DATA chunks that are bundled with COOKIE_ECHO
net: don't wait for order-3 page allocation
mpls: handle device renames for per-device sysctls
net: igb: fix the start time for periodic output signals
enic: fix memory leak in rq_clean
enic: check return value for stat dump
enic: unlock napi busy poll before unmasking intr
net, swap: Remove a warning and clarify why sk_mem_reclaim is required when deactivating swap
bridge: fix multicast router rlist endless loop
tipc: disconnect socket directly after probe failure
Revert "ipv6: Fix protocol resubmission"
cfg80211: wext: clear sinfo struct before calling driver

+79 -37
+1 -1
Documentation/networking/udplite.txt
··· 20 20 files/UDP-Lite-HOWTO.txt 21 21 22 22 o The Wireshark UDP-Lite WiKi (with capture files): 23 - http://wiki.wireshark.org/Lightweight_User_Datagram_Protocol 23 + https://wiki.wireshark.org/Lightweight_User_Datagram_Protocol 24 24 25 25 o The Protocol Spec, RFC 3828, http://www.ietf.org/rfc/rfc3828.txt 26 26
+16 -2
drivers/net/ethernet/cisco/enic/enic_ethtool.c
··· 131 131 { 132 132 struct enic *enic = netdev_priv(netdev); 133 133 struct vnic_devcmd_fw_info *fw_info; 134 + int err; 134 135 135 - enic_dev_fw_info(enic, &fw_info); 136 + err = enic_dev_fw_info(enic, &fw_info); 137 + /* return only when pci_zalloc_consistent fails in vnic_dev_fw_info 138 + * For other failures, like devcmd failure, we return previously 139 + * recorded info. 140 + */ 141 + if (err == -ENOMEM) 142 + return; 136 143 137 144 strlcpy(drvinfo->driver, DRV_NAME, sizeof(drvinfo->driver)); 138 145 strlcpy(drvinfo->version, DRV_VERSION, sizeof(drvinfo->version)); ··· 188 181 struct enic *enic = netdev_priv(netdev); 189 182 struct vnic_stats *vstats; 190 183 unsigned int i; 184 + int err; 191 185 192 - enic_dev_stats_dump(enic, &vstats); 186 + err = enic_dev_stats_dump(enic, &vstats); 187 + /* return only when pci_zalloc_consistent fails in vnic_dev_stats_dump 188 + * For other failures, like devcmd failure, we return previously 189 + * recorded stats. 190 + */ 191 + if (err == -ENOMEM) 192 + return; 193 193 194 194 for (i = 0; i < enic_n_tx_stats; i++) 195 195 *(data++) = ((u64 *)&vstats->tx)[enic_tx_stats[i].index];
+9 -2
drivers/net/ethernet/cisco/enic/enic_main.c
··· 615 615 { 616 616 struct enic *enic = netdev_priv(netdev); 617 617 struct vnic_stats *stats; 618 + int err; 618 619 619 - enic_dev_stats_dump(enic, &stats); 620 + err = enic_dev_stats_dump(enic, &stats); 621 + /* return only when pci_zalloc_consistent fails in vnic_dev_stats_dump 622 + * For other failures, like devcmd failure, we return previously 623 + * recorded stats. 624 + */ 625 + if (err == -ENOMEM) 626 + return net_stats; 620 627 621 628 net_stats->tx_packets = stats->tx.tx_frames_ok; 622 629 net_stats->tx_bytes = stats->tx.tx_bytes_ok; ··· 1414 1407 */ 1415 1408 enic_calc_int_moderation(enic, &enic->rq[rq]); 1416 1409 1410 + enic_poll_unlock_napi(&enic->rq[rq]); 1417 1411 if (work_done < work_to_do) { 1418 1412 1419 1413 /* Some work done, but not enough to stay in polling, ··· 1426 1418 enic_set_int_moderation(enic, &enic->rq[rq]); 1427 1419 vnic_intr_unmask(&enic->intr[intr]); 1428 1420 } 1429 - enic_poll_unlock_napi(&enic->rq[rq]); 1430 1421 1431 1422 return work_done; 1432 1423 }
+4 -5
drivers/net/ethernet/cisco/enic/vnic_rq.c
··· 188 188 struct vnic_rq_buf *buf; 189 189 u32 fetch_index; 190 190 unsigned int count = rq->ring.desc_count; 191 + int i; 191 192 192 193 buf = rq->to_clean; 193 194 194 - while (vnic_rq_desc_used(rq) > 0) { 195 - 195 + for (i = 0; i < rq->ring.desc_count; i++) { 196 196 (*buf_clean)(rq, buf); 197 - 198 - buf = rq->to_clean = buf->next; 199 - rq->ring.desc_avail++; 197 + buf = buf->next; 200 198 } 199 + rq->ring.desc_avail = rq->ring.desc_count - 1; 201 200 202 201 /* Use current fetch_index as the ring starting point */ 203 202 fetch_index = ioread32(&rq->ctrl->fetch_index);
+2 -2
drivers/net/ethernet/intel/igb/igb_ptp.c
··· 538 538 igb->perout[i].start.tv_nsec = rq->perout.start.nsec; 539 539 igb->perout[i].period.tv_sec = ts.tv_sec; 540 540 igb->perout[i].period.tv_nsec = ts.tv_nsec; 541 - wr32(trgttiml, rq->perout.start.sec); 542 - wr32(trgttimh, rq->perout.start.nsec); 541 + wr32(trgttimh, rq->perout.start.sec); 542 + wr32(trgttiml, rq->perout.start.nsec); 543 543 tsauxc |= tsauxc_mask; 544 544 tsim |= tsim_mask; 545 545 } else {
+3 -4
net/bridge/br_multicast.c
··· 1167 1167 struct net_bridge_port *p; 1168 1168 struct hlist_node *slot = NULL; 1169 1169 1170 + if (!hlist_unhashed(&port->rlist)) 1171 + return; 1172 + 1170 1173 hlist_for_each_entry(p, &br->router_list, rlist) { 1171 1174 if ((unsigned long) port >= (unsigned long) p) 1172 1175 break; ··· 1197 1194 if (port->multicast_router != 1) 1198 1195 return; 1199 1196 1200 - if (!hlist_unhashed(&port->rlist)) 1201 - goto timer; 1202 - 1203 1197 br_multicast_add_router(br, port); 1204 1198 1205 - timer: 1206 1199 mod_timer(&port->multicast_router_timer, 1207 1200 now + br->multicast_querier_interval); 1208 1201 }
+1 -1
net/core/skbuff.c
··· 4398 4398 4399 4399 while (order) { 4400 4400 if (npages >= 1 << order) { 4401 - page = alloc_pages(gfp_mask | 4401 + page = alloc_pages((gfp_mask & ~__GFP_WAIT) | 4402 4402 __GFP_COMP | 4403 4403 __GFP_NOWARN | 4404 4404 __GFP_NORETRY,
+6 -9
net/core/sock.c
··· 354 354 355 355 /* 356 356 * SOCK_MEMALLOC is allowed to ignore rmem limits to ensure forward 357 - * progress of swapping. However, if SOCK_MEMALLOC is cleared while 358 - * it has rmem allocations there is a risk that the user of the 359 - * socket cannot make forward progress due to exceeding the rmem 360 - * limits. By rights, sk_clear_memalloc() should only be called 361 - * on sockets being torn down but warn and reset the accounting if 362 - * that assumption breaks. 357 + * progress of swapping. SOCK_MEMALLOC may be cleared while 358 + * it has rmem allocations due to the last swapfile being deactivated 359 + * but there is a risk that the socket is unusable due to exceeding 360 + * the rmem limits. Reclaim the reserves and obey rmem limits again. 363 361 */ 364 - if (WARN_ON(sk->sk_forward_alloc)) 365 - sk_mem_reclaim(sk); 362 + sk_mem_reclaim(sk); 366 363 } 367 364 EXPORT_SYMBOL_GPL(sk_clear_memalloc); 368 365 ··· 1880 1883 1881 1884 pfrag->offset = 0; 1882 1885 if (SKB_FRAG_PAGE_ORDER) { 1883 - pfrag->page = alloc_pages(gfp | __GFP_COMP | 1886 + pfrag->page = alloc_pages((gfp & ~__GFP_WAIT) | __GFP_COMP | 1884 1887 __GFP_NOWARN | __GFP_NORETRY, 1885 1888 SKB_FRAG_PAGE_ORDER); 1886 1889 if (likely(pfrag->page)) {
+3 -5
net/ipv6/ip6_input.c
··· 212 212 */ 213 213 214 214 rcu_read_lock(); 215 + resubmit: 215 216 idev = ip6_dst_idev(skb_dst(skb)); 216 217 if (!pskb_pull(skb, skb_transport_offset(skb))) 217 218 goto discard; 218 219 nhoff = IP6CB(skb)->nhoff; 219 220 nexthdr = skb_network_header(skb)[nhoff]; 220 221 221 - resubmit: 222 222 raw = raw6_local_deliver(skb, nexthdr); 223 223 ipprot = rcu_dereference(inet6_protos[nexthdr]); 224 224 if (ipprot) { ··· 246 246 goto discard; 247 247 248 248 ret = ipprot->handler(skb); 249 - if (ret < 0) { 250 - nexthdr = -ret; 249 + if (ret > 0) 251 250 goto resubmit; 252 - } else if (ret == 0) { 251 + else if (ret == 0) 253 252 IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDELIVERS); 254 - } 255 253 } else { 256 254 if (!raw) { 257 255 if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
+11
net/mpls/af_mpls.c
··· 564 564 case NETDEV_UNREGISTER: 565 565 mpls_ifdown(dev); 566 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 579 return NOTIFY_OK; 569 580 }
+10 -1
net/sctp/auth.c
··· 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 385 * See code above for the algorithm. 386 386 */ 387 387 int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp) 388 388 { 389 389 struct sctp_auth_bytes *secret; 390 390 struct sctp_shared_key *ep_key; 391 + struct sctp_chunk *chunk; 391 392 392 393 /* If we don't support AUTH, or peer is not capable 393 394 * we don't need to do anything. ··· 410 409 411 410 sctp_auth_key_put(asoc->asoc_shared_key); 412 411 asoc->asoc_shared_key = secret; 412 + 413 + /* Update send queue in case any chunk already in there now 414 + * needs authenticating 415 + */ 416 + list_for_each_entry(chunk, &asoc->outqueue.out_chunk_list, list) { 417 + if (sctp_auth_send_cid(chunk->chunk_hdr->type, asoc)) 418 + chunk->auth = 1; 419 + } 413 420 414 421 return 0; 415 422 }
+11 -5
net/tipc/socket.c
··· 2142 2142 peer_node = tsk_peer_node(tsk); 2143 2143 2144 2144 if (tsk->probing_state == TIPC_CONN_PROBING) { 2145 - /* Previous probe not answered -> self abort */ 2146 - skb = tipc_msg_create(TIPC_CRITICAL_IMPORTANCE, 2147 - TIPC_CONN_MSG, SHORT_H_SIZE, 0, 2148 - own_node, peer_node, tsk->portid, 2149 - peer_port, TIPC_ERR_NO_PORT); 2145 + if (!sock_owned_by_user(sk)) { 2146 + sk->sk_socket->state = SS_DISCONNECTING; 2147 + tsk->connected = 0; 2148 + tipc_node_remove_conn(sock_net(sk), tsk_peer_node(tsk), 2149 + tsk_peer_port(tsk)); 2150 + sk->sk_state_change(sk); 2151 + } else { 2152 + /* Try again later */ 2153 + sk_reset_timer(sk, &sk->sk_timer, (HZ / 20)); 2154 + } 2155 + 2150 2156 } else { 2151 2157 skb = tipc_msg_create(CONN_MANAGER, CONN_PROBE, 2152 2158 INT_H_SIZE, 0, peer_node, own_node,
+2
net/wireless/wext-compat.c
··· 1333 1333 memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN); 1334 1334 wdev_unlock(wdev); 1335 1335 1336 + memset(&sinfo, 0, sizeof(sinfo)); 1337 + 1336 1338 if (rdev_get_station(rdev, dev, bssid, &sinfo)) 1337 1339 return NULL; 1338 1340