Linux 3.10.12
Greg KH
maintainerI'm announcing the release of the 3.10.12 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/at91sam9260.dtsi | 10 ++++ arch/x86/include/asm/xor_avx.h | 4 - drivers/net/bonding/bond_main.c | 8 ++- drivers/net/ethernet/broadcom/tg3.c | 18 ++++++- drivers/net/ethernet/emulex/benet/be_main.c | 2 drivers/net/ethernet/marvell/mvneta.c | 13 +++++ drivers/net/ethernet/realtek/8139cp.c | 1 drivers/net/ethernet/sfc/filter.c | 2 drivers/net/macvlan.c | 4 + drivers/net/tun.c | 6 +- drivers/net/usb/cdc_mbim.c | 4 + drivers/net/vxlan.c | 2 drivers/net/wireless/mwifiex/main.c | 14 ----- drivers/rtc/rtc-max77686.c | 4 - drivers/vhost/net.c | 9 ++- include/linux/ipv6.h | 1 include/net/genetlink.h | 20 +++++++- include/net/ip_tunnels.h | 14 ----- include/net/sch_generic.h | 9 +++ include/uapi/linux/icmpv6.h | 2 include/uapi/linux/pkt_sched.h | 10 +++- net/bridge/br_fdb.c | 10 ++-- net/bridge/br_multicast.c | 5 +- net/bridge/br_netlink.c | 4 - net/bridge/br_vlan.c | 4 - net/core/flow_dissector.c | 11 +--- net/core/neighbour.c | 10 ++-- net/core/rtnetlink.c | 4 - net/core/sysctl_net_core.c | 6 ++ net/ipv4/devinet.c | 4 + net/ipv4/fib_trie.c | 5 -- net/ipv4/ip_gre.c | 2 net/ipv4/ip_tunnel.c | 2 net/ipv4/raw.c | 3 - net/ipv4/tcp.c | 7 ++ net/ipv4/tcp_cubic.c | 12 ++--- net/ipv4/tcp_input.c | 9 ++- net/ipv4/tcp_output.c | 4 + net/ipv6/addrconf.c | 10 +--- net/ipv6/addrlabel.c | 48 +++++++++----------- net/ipv6/icmp.c | 10 +++- net/ipv6/ip6_fib.c | 16 +++++- net/ipv6/ndisc.c | 14 +++-- net/ipv6/reassembly.c | 5 ++ net/ipv6/tcp_ipv6.c | 2 net/netlink/genetlink.c | 67 ++++++++++++++++++++++------ net/packet/af_packet.c | 2 net/sched/sch_api.c | 41 +++++++++++++++++ net/sched/sch_generic.c | 1 net/sched/sch_htb.c | 15 +++++- net/tipc/socket.c | 4 - 52 files changed, 345 insertions(+), 151 deletions(-)
Andrew Vagin (2):
tcp: initialize rcv_tstamp for restored sockets
tcp: don't apply tsoffset if rcv_tsecr is zero
Andrey Vagin (1):
tcp: set timestamps for restored skb-s
Asbjoern Sloth Toennesen (1):
rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header
Ben Hutchings (1):
sfc: Fix lookup of default RX MAC filters when steered using ethtool
Bing Zhao (1):
mwifiex: do not create AP and P2P interfaces upon driver loading
Chris Clark (1):
ipv4: sendto/hdrincl: don't use destination address found in header
Dan Carpenter (1):
tun: signedness bug in tun_get_user()
Daniel Borkmann (3):
net: rtm_to_ifaddr: free ifa if ifa_cacheinfo processing fails
net: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for max_delay
net: ipv6: tcp: fix potential use after free in tcp_v6_do_rcv
Dave Jones (1):
8139cp: Fix skb leak in rx_status_loop failure path.
Eric Dumazet (4):
fib_trie: remove potential out of bound access
tcp: cubic: fix overflow error in bictcp_update()
tcp: cubic: fix bug in bictcp_acked()
net: revert 8728c544a9c ("net: dev_pick_tx() fix")
Erik Hugne (1):
tipc: set sk_err correctly when connection fails
Greg Kroah-Hartman (1):
Linux 3.10.12
Hannes Frederic Sowa (4):
ipv6: don't stop backtracking in fib6_lookup_1 if subtree does not match
ipv6: remove max_addresses check from ipv6_create_tempaddr
ipv6: drop packets with multiple fragmentation headers
ipv6: fix null pointer dereference in __ip6addrlbl_add
Jason Wang (1):
vhost_net: poll vhost queue after marking DMA is done
Jean-Christophe PLAGNIOL-VILLARD (1):
ARM: at91: dt: sam9260: add i2c gpio pinctrl
Jesper Dangaard Brouer (1):
net_sched: restore "linklayer atm" handling
Jiri Bohac (1):
ICMPv6: treat dest unreachable codes 5 and 6 as EACCES, not EPROTO
John Haxby (1):
crypto: xor - Check for osxsave as well as avx in crypto/xor
Linus Lüssing (1):
bridge: don't try to update timers in case of broken MLD queries
Michael S. Tsirkin (1):
macvlan: validate flags
Nithin Sujir (1):
tg3: Don't turn off led on 5719 serdes port 0
Phil Oester (1):
tcp: tcp_make_synack() should use sock_wmalloc
Pravin B Shelar (3):
genl: Fix genl dumpit() locking.
genl: Hold reference on correct module while netlink-dump.
ip_tunnel: Do not use inner ip-header-id for tunnel ip-header-id.
Rob Gardner (1):
net: usb: Add HP hs2434 device to ZLP exception table
Roman Gushchin (1):
net: check net.core.somaxconn sysctl values
Sangjung Woo (1):
drivers/rtc/rtc-max77686.c: Fix wrong register
Sathya Perla (1):
be2net: fix disabling TX in be_close()
Sridhar Samudrala (1):
rtnetlink: Fix inverted check in ndo_dflt_fdb_del()
Thomas Graf (1):
ipv6: Don't depend on per socket memory for neighbour discovery messages
Thomas Petazzoni (1):
net: mvneta: properly disable HW PHY polling and ensure adjust_link() works
Timo Teräs (1):
ip_gre: fix ipgre_header to return correct offset MIME-Version: 1.0
Toshiaki Makita (1):
bridge: Use the correct bit length for bitmap functions in the VLAN code
Veaceslav Falico (2):
neighbour: populate neigh_parms on alloc before calling ndo_neigh_setup
bonding: modify only neigh_parms owned by us
Willem de Bruijn (1):
packet: restore packet statistics tp_packets to include drops
stephen hemminger (1):
htb: fix sign extension bug
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 11 +SUBLEVEL = 12 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arm/boot/dts/at91sam9260.dtsi +10 -0
@@ -340,6 +340,14 @@ }; }; + i2c_gpio0 { + pinctrl_i2c_gpio0: i2c_gpio0-0 { + atmel,pins = + <0 23 0x0 0x3 /* PA23 gpio I2C_SDA pin */ + 0 24 0x0 0x3>; /* PA24 gpio I2C_SCL pin */ + }; + }; + pioA: gpio@fffff400 { compatible = "atmel,at91rm9200-gpio"; reg = <0xfffff400 0x200>;
@@ -592,6 +600,8 @@ i2c-gpio,delay-us = <2>; /* ~100 kHz */ #address-cells = <1>; #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c_gpio0>; status = "disabled"; }; };
arch/x86/include/asm/xor_avx.h +2 -2
@@ -167,12 +167,12 @@ static struct xor_block_template xor_block_avx = {#define AVX_XOR_SPEED \ do { \ - if (cpu_has_avx) \ + if (cpu_has_avx && cpu_has_osxsave) \ xor_speed(&xor_block_avx); \ } while (0)#define AVX_SELECT (FASTEST ) \ - (cpu_has_avx ? &xor_block_avx : FASTEST) + (cpu_has_avx && cpu_has_osxsave ? &xor_block_avx : FASTEST)#else
drivers/net/bonding/bond_main.c +7 -1
@@ -3770,11 +3770,17 @@ static int bond_neigh_init(struct neighbour *n)* The bonding ndo_neigh_setup is called at init time beofre any * slave exists. So we must declare proxy setup function which will * be used at run time to resolve the actual slave neigh param setup. +* +* It's also called by master devices (such as vlans) to setup their +* underlying devices. In that case - do nothing, we're already set up from +* our init. */ static int bond_neigh_setup (struct net_device *dev,struct neigh_parms *parms) { - parms->neigh_setup = bond_neigh_init; +/* modify only our neigh_parms */ +if (parms->dev == dev) + parms->neigh_setup = bond_neigh_init;return 0 ; }
drivers/net/ethernet/broadcom/tg3.c +16 -2
@@ -3003,6 +3003,19 @@ static bool tg3_phy_power_bug(struct tg3 *tp)return false; } +static bool tg3_phy_led_bug (struct tg3 *tp) +{ +switch (tg3_asic_rev (tp)) { +case ASIC_REV_5719 : +if ((tp->phy_flags &TG3_PHYFLG_MII_SERDES ) && + !tp->pci_fn) +return true; +return false; + } + +return false; +} +static void tg3_power_down_phy (struct tg3 *tp,bool do_low_power) {u32 val;
@@ -3050,8 +3063,9 @@ static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power) }return ; }else if (do_low_power) { -tg3_writephy (tp,MII_TG3_EXT_CTRL , -MII_TG3_EXT_CTRL_FORCE_LED_OFF ); +if (!tg3_phy_led_bug (tp)) +tg3_writephy (tp,MII_TG3_EXT_CTRL , +MII_TG3_EXT_CTRL_FORCE_LED_OFF ); val =MII_TG3_AUXCTL_PCTL_100TX_LPWR | MII_TG3_AUXCTL_PCTL_SPR_ISOLATE |
drivers/net/ethernet/emulex/benet/be_main.c +1 -1
@@ -2561,8 +2561,8 @@ static int be_close(struct net_device *netdev)/* Wait for all pending tx completions to arrive so that * all tx skbs are freed. */ -be_tx_compl_clean (adapter);netif_tx_disable (netdev); +be_tx_compl_clean (adapter);be_rx_qs_destroy (adapter);
drivers/net/ethernet/marvell/mvneta.c +12 -1
@@ -136,7 +136,9 @@#define MVNETA_GMAC_FORCE_LINK_PASS BIT(1)#define MVNETA_GMAC_CONFIG_MII_SPEED BIT(5)#define MVNETA_GMAC_CONFIG_GMII_SPEED BIT(6) +#define MVNETA_GMAC_AN_SPEED_EN BIT(7)#define MVNETA_GMAC_CONFIG_FULL_DUPLEX BIT(12) +#define MVNETA_GMAC_AN_DUPLEX_EN BIT(13)#define MVNETA_MIB_COUNTERS_BASE 0x3080#define MVNETA_MIB_LATE_COLLISION 0x7c#define MVNETA_DA_FILT_SPEC_MCAST 0x3400
@@ -911,6 +913,13 @@ static void mvneta_defaults_set(struct mvneta_port *pp)/* Assign port SDMA configuration */ mvreg_write (pp,MVNETA_SDMA_CONFIG , val); +/* Disable PHY polling in hardware, since we're using the +* kernel phylib to do this. +*/ + val =mvreg_read (pp,MVNETA_UNIT_CONTROL ); + val &= ~MVNETA_PHY_POLLING_ENABLE ; +mvreg_write (pp,MVNETA_UNIT_CONTROL , val); +mvneta_set_ucast_table (pp,-1 );mvneta_set_special_mcast_table (pp,-1 );mvneta_set_other_mcast_table (pp,-1 );
@@ -2288,7 +2297,9 @@ static void mvneta_adjust_link(struct net_device *ndev) val =mvreg_read (pp,MVNETA_GMAC_AUTONEG_CONFIG ); val &= ~(MVNETA_GMAC_CONFIG_MII_SPEED |MVNETA_GMAC_CONFIG_GMII_SPEED | -MVNETA_GMAC_CONFIG_FULL_DUPLEX ); +MVNETA_GMAC_CONFIG_FULL_DUPLEX | +MVNETA_GMAC_AN_SPEED_EN | +MVNETA_GMAC_AN_DUPLEX_EN );if (phydev->duplex) val |=MVNETA_GMAC_CONFIG_FULL_DUPLEX ;
drivers/net/ethernet/realtek/8139cp.c +1 -0
@@ -524,6 +524,7 @@ rx_status_loop: PCI_DMA_FROMDEVICE);if (dma_mapping_error (&cp->pdev->dev, new_mapping)) { dev->stats.rx_dropped++; +kfree_skb (new_skb); goto rx_next; }
drivers/net/ethernet/sfc/filter.c +1 -1
@@ -675,7 +675,7 @@ s32 efx_filter_insert_filter(struct efx_nic *efx, struct efx_filter_spec *spec,BUILD_BUG_ON (EFX_FILTER_INDEX_UC_DEF !=0 );BUILD_BUG_ON (EFX_FILTER_INDEX_MC_DEF !=EFX_FILTER_MC_DEF -EFX_FILTER_UC_DEF ); - rep_index = spec->type -EFX_FILTER_INDEX_UC_DEF ; + rep_index = spec->type -EFX_FILTER_UC_DEF ; ins_index = rep_index;spin_lock_bh (&state->lock);
drivers/net/macvlan.c +4 -0
@@ -727,6 +727,10 @@ static int macvlan_validate(struct nlattr *tb[], struct nlattr *data[])return -EADDRNOTAVAIL ; } +if (data && data[IFLA_MACVLAN_FLAGS ] && +nla_get_u16 (data[IFLA_MACVLAN_FLAGS ]) & ~MACVLAN_FLAG_NOPROMISC ) +return -EINVAL ; +if (data && data[IFLA_MACVLAN_MODE ]) {switch (nla_get_u32 (data[IFLA_MACVLAN_MODE ])) {case MACVLAN_MODE_PRIVATE :
drivers/net/tun.c +4 -2
@@ -1076,8 +1076,9 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,u32 rxhash;if (!(tun->flags &TUN_NO_PI )) { -if ((len -=sizeof (pi)) > total_len) +if (len <sizeof (pi))return -EINVAL ; + len -=sizeof (pi);if (memcpy_fromiovecend ((void *)&pi, iv,0 ,sizeof (pi)))return -EFAULT ;
@@ -1085,8 +1086,9 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile, }if (tun->flags &TUN_VNET_HDR ) { -if ((len -= tun->vnet_hdr_sz) > total_len) +if (len < tun->vnet_hdr_sz)return -EINVAL ; + len -= tun->vnet_hdr_sz;if (memcpy_fromiovecend ((void *)&gso, iv, offset,sizeof (gso)))return -EFAULT ;
drivers/net/usb/cdc_mbim.c +4 -0
@@ -400,6 +400,10 @@ static const struct usb_device_id mbim_devs[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68a2, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), .driver_info = (unsigned long )&cdc_mbim_info_zlp, }, + /* HP hs2434 Mobile Broadband Module needs ZLPs */ + { USB_DEVICE_AND_INTERFACE_INFO(0x3f0, 0x4b1d, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), + .driver_info = (unsigned long)&cdc_mbim_info_zlp, + }, { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), .driver_info = (unsigned long)&cdc_mbim_info, },
drivers/net/vxlan.c +1 -1
@@ -1090,7 +1090,7 @@ static netdev_tx_t vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, iph->daddr = dst; iph->saddr = fl4.saddr; iph->ttl = ttl ? :ip4_dst_hoplimit (&rt->dst); -tunnel_ip_select_ident (skb, old_iph, &rt->dst); +__ip_select_ident (iph, &rt->dst, (skb_shinfo (skb)->gso_segs ?:1 ) -1 );nf_reset (skb);
drivers/net/wireless/mwifiex/main.c +0 -14
@@ -363,20 +363,6 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)dev_err (adapter->dev,"cannot create default STA interface\n" ); goto err_add_intf; } - -/* Create AP interface by default */ -if (!mwifiex_add_virtual_intf (adapter->wiphy,"uap%d" , -NL80211_IFTYPE_AP ,NULL ,NULL )) { -dev_err (adapter->dev,"cannot create default AP interface\n" ); - goto err_add_intf; - } - -/* Create P2P interface by default */ -if (!mwifiex_add_virtual_intf (adapter->wiphy,"p2p%d" , -NL80211_IFTYPE_P2P_CLIENT ,NULL ,NULL )) { -dev_err (adapter->dev,"cannot create default P2P interface\n" ); - goto err_add_intf; - }rtnl_unlock ();mwifiex_drv_get_driver_version (adapter, fmt,sizeof (fmt) -1 );
drivers/rtc/rtc-max77686.c +2 -2
@@ -240,9 +240,9 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) } alrm->pending =0 ; - ret =regmap_read (info->max77686->regmap,MAX77686_REG_STATUS1 , &val); + ret =regmap_read (info->max77686->regmap,MAX77686_REG_STATUS2 , &val);if (ret <0 ) { -dev_err (info->dev,"%s:%d fail to read status1 reg(%d)\n" , +dev_err (info->dev,"%s:%d fail to read status2 reg(%d)\n" , __func__, __LINE__, ret); goto out; }
drivers/vhost/net.c +5 -4
@@ -307,6 +307,11 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success)struct vhost_virtqueue *vq = ubufs->vq;int cnt =atomic_read (&ubufs->kref.refcount); +/* set len to mark this desc buffers done DMA */ + vq->heads[ubuf->desc].len = success ? +VHOST_DMA_DONE_LEN :VHOST_DMA_FAILED_LEN ; +vhost_net_ubuf_put (ubufs); +/* * Trigger polling thread if guest stopped submitting new buffers: * in this case, the refcount after decrement will eventually reach 1
@@ -317,10 +322,6 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success)*/ if (cnt <=2 || !(cnt %16 ))vhost_poll_queue (&vq->poll); -/* set len to mark this desc buffers done DMA */ - vq->heads[ubuf->desc].len = success ? -VHOST_DMA_DONE_LEN :VHOST_DMA_FAILED_LEN ; -vhost_net_ubuf_put (ubufs); }/* Expects to be always run from workqueue - which acts as
include/linux/ipv6.h +1 -0
@@ -101,6 +101,7 @@ struct inet6_skb_parm {#define IP6SKB_FORWARDED 2#define IP6SKB_REROUTED 4#define IP6SKB_ROUTERALERT 8 +#define IP6SKB_FRAGMENTED 16 };#define IP6CB (skb) ((struct inet6_skb_parm*)((skb)->cb))
include/net/genetlink.h +18 -2
@@ -61,6 +61,7 @@ struct genl_family {struct list_head ops_list;/* private */ struct list_head family_list;/* private */ struct list_head mcast_groups;/* private */ +struct module *module; };/**
@@ -121,9 +122,24 @@ struct genl_ops {struct list_head ops_list; }; -extern int genl_register_family (struct genl_family *family); -extern int genl_register_family_with_ops (struct genl_family *family, +extern int __genl_register_family (struct genl_family *family); + +static inline int genl_register_family (struct genl_family *family) +{ + family->module =THIS_MODULE ; +return __genl_register_family (family); +} + +extern int __genl_register_family_with_ops (struct genl_family *family,struct genl_ops *ops,size_t n_ops); + +static inline int genl_register_family_with_ops (struct genl_family *family, +struct genl_ops *ops,size_t n_ops) +{ + family->module =THIS_MODULE ; +return __genl_register_family_with_ops (family, ops, n_ops); +} +extern int genl_unregister_family (struct genl_family *family);extern int genl_register_ops (struct genl_family *,struct genl_ops *ops);extern int genl_unregister_ops (struct genl_family *,struct genl_ops *ops);
include/net/ip_tunnels.h +0 -14
@@ -141,20 +141,6 @@ static inline u8 ip_tunnel_ecn_encap(u8 tos, const struct iphdr *iph,return INET_ECN_encapsulate (tos, inner); } -static inline void tunnel_ip_select_ident (struct sk_buff *skb, -const struct iphdr *old_iph, -struct dst_entry *dst) -{ -struct iphdr *iph =ip_hdr (skb); - -/* Use inner packet iph-id if possible. */ -if (skb->protocol ==htons (ETH_P_IP ) && old_iph->id) - iph->id = old_iph->id; -else -__ip_select_ident (iph, dst, - (skb_shinfo (skb)->gso_segs ?:1 ) -1 ); -} -static inline void iptunnel_xmit (struct sk_buff *skb,struct net_device *dev) {int err;
include/net/sch_generic.h +8 -1
@@ -682,13 +682,19 @@ struct psched_ratecfg {u64 rate_bps;u32 mult;u16 overhead; +u8 linklayer;u8 shift; };static inline u64 psched_l2t_ns (const struct psched_ratecfg *r,unsigned int len) { -return ((u64)(len + r->overhead) * r->mult) >> r->shift; + len += r->overhead; + +if (unlikely (r->linklayer ==TC_LINKLAYER_ATM )) +return ((u64)(DIV_ROUND_UP (len,48 )*53 ) * r->mult) >> r->shift; + +return ((u64 )len * r->mult) >> r->shift; }extern void psched_ratecfg_precompute (struct psched_ratecfg *r,const struct tc_ratespec *conf);
@@ -699,6 +705,7 @@ static inline void psched_ratecfg_getrate(struct tc_ratespec *res,memset (res,0 ,sizeof (*res)); res->rate = r->rate_bps >>3 ; res->overhead = r->overhead; + res->linklayer = (r->linklayer & TC_LINKLAYER_MASK); }#endif
include/uapi/linux/icmpv6.h +2 -0
@@ -115,6 +115,8 @@ struct icmp6hdr {#define ICMPV6_NOT_NEIGHBOUR 2#define ICMPV6_ADDR_UNREACH 3#define ICMPV6_PORT_UNREACH 4 +#define ICMPV6_POLICY_FAIL 5 +#define ICMPV6_REJECT_ROUTE 6/* * Codes for Time Exceeded
include/uapi/linux/pkt_sched.h +9 -1
@@ -73,9 +73,17 @@ struct tc_estimator {#define TC_H_ROOT (0xFFFFFFFFU)#define TC_H_INGRESS (0xFFFFFFF1U) +/* Need to corrospond to iproute2 tc/tc_core.h "enum link_layer" */ +enum tc_link_layer { +TC_LINKLAYER_UNAWARE ,/* Indicate unaware old iproute2 util */ +TC_LINKLAYER_ETHERNET , +TC_LINKLAYER_ATM , +}; +#define TC_LINKLAYER_MASK 0x0F/* limit use to lower 4 bits */ +struct tc_ratespec {unsigned char cell_log; -unsigned char __reserved; +__u8 linklayer;/* lower 4 bits */ unsigned short overhead;short cell_align;unsigned short mpu;
net/bridge/br_fdb.c +5 -5
@@ -161,7 +161,7 @@ void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr)if (!pv)return ; -for_each_set_bit_from (vid, pv->vlan_bitmap,BR_VLAN_BITMAP_LEN ) { +for_each_set_bit_from (vid, pv->vlan_bitmap,VLAN_N_VID ) { f =__br_fdb_get (br, br->dev->dev_addr, vid);if (f && f->is_local && !f->dst)fdb_delete (br, f);
@@ -725,7 +725,7 @@ int br_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],/* VID was specified, so use it. */ err =__br_fdb_add (ndm, p, addr, nlh_flags, vid); }else { -if (!pv ||bitmap_empty (pv->vlan_bitmap,BR_VLAN_BITMAP_LEN )) { +if (!pv ||bitmap_empty (pv->vlan_bitmap,VLAN_N_VID )) { err =__br_fdb_add (ndm, p, addr, nlh_flags,0 ); goto out; }
@@ -734,7 +734,7 @@ int br_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],* specify a VLAN. To be nice, add/update entry for every * vlan on this port. */ -for_each_set_bit (vid, pv->vlan_bitmap,BR_VLAN_BITMAP_LEN ) { +for_each_set_bit (vid, pv->vlan_bitmap,VLAN_N_VID ) { err =__br_fdb_add (ndm, p, addr, nlh_flags, vid);if (err) goto out;
@@ -812,7 +812,7 @@ int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[], err =__br_fdb_delete (p, addr, vid); }else { -if (!pv ||bitmap_empty (pv->vlan_bitmap,BR_VLAN_BITMAP_LEN )) { +if (!pv ||bitmap_empty (pv->vlan_bitmap,VLAN_N_VID )) { err =__br_fdb_delete (p, addr,0 ); goto out; }
@@ -822,7 +822,7 @@ int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],* vlan on this port. */ err = -ENOENT ; -for_each_set_bit (vid, pv->vlan_bitmap,BR_VLAN_BITMAP_LEN ) { +for_each_set_bit (vid, pv->vlan_bitmap,VLAN_N_VID ) { err &=__br_fdb_delete (p, addr, vid); } }
net/bridge/br_multicast.c +3 -2
@@ -1185,7 +1185,7 @@ static int br_ip6_multicast_query(struct net_bridge *br, max_delay =msecs_to_jiffies (ntohs (mld->mld_maxdelay));if (max_delay) group = &mld->mld_mca; - }else if (skb->len >=sizeof (*mld2q)) { + }else {if (!pskb_may_pull (skb,sizeof (*mld2q))) { err = -EINVAL ; goto out;
@@ -1193,7 +1193,8 @@ static int br_ip6_multicast_query(struct net_bridge *br, mld2q = (struct mld2_query *)icmp6_hdr (skb);if (!mld2q->mld2q_nsrcs) group = &mld2q->mld2q_mca; - max_delay = mld2q->mld2q_mrc ?MLDV2_MRC (ntohs (mld2q->mld2q_mrc)) :1 ; + + max_delay =max (msecs_to_jiffies (MLDV2_MRC (ntohs (mld2q->mld2q_mrc))),1UL ); }if (!group)
net/bridge/br_netlink.c +2 -2
@@ -128,7 +128,7 @@ static int br_fill_ifinfo(struct sk_buff *skb,else pv =br_get_vlan_info (br); -if (!pv ||bitmap_empty (pv->vlan_bitmap,BR_VLAN_BITMAP_LEN )) +if (!pv ||bitmap_empty (pv->vlan_bitmap,VLAN_N_VID )) goto done; af =nla_nest_start (skb,IFLA_AF_SPEC );
@@ -136,7 +136,7 @@ static int br_fill_ifinfo(struct sk_buff *skb, goto nla_put_failure; pvid =br_get_pvid (pv); -for_each_set_bit (vid, pv->vlan_bitmap,BR_VLAN_BITMAP_LEN ) { +for_each_set_bit (vid, pv->vlan_bitmap,VLAN_N_VID ) { vinfo.vid = vid; vinfo.flags =0 ;if (vid == pvid)
net/bridge/br_vlan.c +2 -2
@@ -108,7 +108,7 @@ static int __vlan_del(struct net_port_vlans *v, u16 vid)clear_bit (vid, v->vlan_bitmap); v->num_vlans--; -if (bitmap_empty (v->vlan_bitmap,BR_VLAN_BITMAP_LEN )) { +if (bitmap_empty (v->vlan_bitmap,VLAN_N_VID )) {if (v->port_idx)rcu_assign_pointer (v->parent.port->vlan_info,NULL );else
@@ -122,7 +122,7 @@ static void __vlan_flush(struct net_port_vlans *v) {smp_wmb (); v->pvid =0 ; -bitmap_zero (v->vlan_bitmap,BR_VLAN_BITMAP_LEN ); +bitmap_zero (v->vlan_bitmap,VLAN_N_VID );if (v->port_idx)rcu_assign_pointer (v->parent.port->vlan_info,NULL );else
net/core/flow_dissector.c +3 -8
@@ -345,14 +345,9 @@ u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb)if (new_index <0 ) new_index =skb_tx_hash (dev, skb); -if (queue_index != new_index && sk) { -struct dst_entry *dst = -rcu_dereference_check (sk->sk_dst_cache,1 ); - -if (dst &&skb_dst (skb) == dst) -sk_tx_queue_set (sk, queue_index); - - } +if (queue_index != new_index && sk && +rcu_access_pointer (sk->sk_dst_cache)) +sk_tx_queue_set (sk, queue_index); queue_index = new_index; }
net/core/neighbour.c +6 -4
@@ -1445,16 +1445,18 @@ struct neigh_parms *neigh_parms_alloc(struct net_device *dev,atomic_set (&p->refcnt,1 ); p->reachable_time =neigh_rand_reach_time (p->base_reachable_time); +dev_hold (dev); + p->dev = dev; +write_pnet (&p->net,hold_net (net)); + p->sysctl_table =NULL ;if (ops->ndo_neigh_setup && ops->ndo_neigh_setup (dev, p)) { +release_net (net); +dev_put (dev);kfree (p);return NULL ; } -dev_hold (dev); - p->dev = dev; -write_pnet (&p->net,hold_net (net)); - p->sysctl_table =NULL ;write_lock_bh (&tbl->lock); p->next = tbl->parms.next; tbl->parms.next = p;
net/core/rtnetlink.c +2 -2
@@ -2142,7 +2142,7 @@ int ndo_dflt_fdb_del(struct ndmsg *ndm,/* If aging addresses are supported device will need to * implement its own handler for this. */ -if (ndm->ndm_state &NUD_PERMANENT ) { +if (!(ndm->ndm_state &NUD_PERMANENT )) {pr_info ("%s: FDB only supports static addresses\n" , dev->name);return -EINVAL ; }
@@ -2374,7 +2374,7 @@ static int rtnl_bridge_getlink(struct sk_buff *skb, struct netlink_callback *cb)struct nlattr *extfilt;u32 filter_mask =0 ; - extfilt =nlmsg_find_attr (cb->nlh,sizeof (struct rtgenmsg ), + extfilt =nlmsg_find_attr (cb->nlh,sizeof (struct ifinfomsg ),IFLA_EXT_MASK );if (extfilt) filter_mask =nla_get_u32 (extfilt);
net/core/sysctl_net_core.c +5 -1
@@ -20,7 +20,9 @@#include <net/sock.h> #include <net/net_ratelimit.h> +static int zero =0 ;static int one =1 ; +static int ushort_max =USHRT_MAX ;#ifdef CONFIG_RPS static int rps_sock_flow_sysctl(ctl_table *table, int write,
@@ -204,7 +206,9 @@ static struct ctl_table netns_core_table[] = { .data = &init_net.core.sysctl_somaxconn, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec + .extra1 = &zero, + .extra2 = &ushort_max, + .proc_handler = proc_dointvec_minmax }, { } };
net/ipv4/devinet.c +3 -1
@@ -771,7 +771,7 @@ static struct in_ifaddr *rtm_to_ifaddr(struct net *net, struct nlmsghdr *nlh, ci =nla_data (tb[IFA_CACHEINFO ]);if (!ci->ifa_valid || ci->ifa_prefered > ci->ifa_valid) { err = -EINVAL ; - goto errout; + goto errout_free; } *pvalid_lft = ci->ifa_valid; *pprefered_lft = ci->ifa_prefered;
@@ -779,6 +779,8 @@ static struct in_ifaddr *rtm_to_ifaddr(struct net *net, struct nlmsghdr *nlh,return ifa; +errout_free: +inet_free_ifa (ifa); errout:return ERR_PTR (err); }
net/ipv4/fib_trie.c +1 -4
@@ -71,7 +71,6 @@#include <linux/init.h> #include <linux/list.h> #include <linux/slab.h> -#include <linux/prefetch.h> #include <linux/export.h> #include <net/net_namespace.h> #include <net/ip.h>
@@ -1761,10 +1760,8 @@ static struct leaf *leaf_walk_rcu(struct tnode *p, struct rt_trie_node *c)if (!c)continue ; -if (IS_LEAF (c)) { -prefetch (rcu_dereference_rtnl (p->child[idx])); +if (IS_LEAF (c))return (struct leaf *) c; - }/* Rescan start scanning in new node */ p = (struct tnode *) c;
net/ipv4/ip_gre.c +1 -1
@@ -572,7 +572,7 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev,if (daddr)memcpy (&iph->daddr, daddr,4 );if (iph->daddr) -return t->hlen; +return t->hlen +sizeof (*iph);return -(t->hlen +sizeof (*iph)); }
net/ipv4/ip_tunnel.c +1 -1
@@ -686,7 +686,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, iph->daddr = fl4.daddr; iph->saddr = fl4.saddr; iph->ttl = ttl; -tunnel_ip_select_ident (skb, inner_iph, &rt->dst); +__ip_select_ident (iph, &rt->dst, (skb_shinfo (skb)->gso_segs ?:1 ) -1 );iptunnel_xmit (skb, dev);return ;
net/ipv4/raw.c +2 -1
@@ -571,7 +571,8 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,flowi4_init_output (&fl4, ipc.oif, sk->sk_mark, tos,RT_SCOPE_UNIVERSE , inet->hdrincl ?IPPROTO_RAW : sk->sk_protocol, -inet_sk_flowi_flags (sk) |FLOWI_FLAG_CAN_SLEEP , +inet_sk_flowi_flags (sk) |FLOWI_FLAG_CAN_SLEEP | + (inet->hdrincl ?FLOWI_FLAG_KNOWN_NH :0 ), daddr, saddr,0 ,0 );if (!inet->hdrincl) {
net/ipv4/tcp.c +7 -0
@@ -1118,6 +1118,13 @@ new_segment: goto wait_for_memory;/* +* All packets are restored as if they have +* already been sent. +*/ +if (tp->repair) +TCP_SKB_CB (skb)->when = tcp_time_stamp; + +/* * Check whether we can use HW checksum. */ if (sk->sk_route_caps &NETIF_F_ALL_CSUM )
net/ipv4/tcp_cubic.c +7 -5
@@ -206,8 +206,8 @@ static u32 cubic_root(u64 a)*/ static inline void bictcp_update (struct bictcp *ca,u32 cwnd) { -u64 offs; -u32 delta, t, bic_target, max_cnt; +u32 delta, bic_target, max_cnt; +u64 offs, t; ca->ack_cnt++;/* count the number of ACKs */
@@ -250,9 +250,11 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd)* if the cwnd < 1 million packets !!! */ + t = (s32)(tcp_time_stamp - ca->epoch_start); + t +=msecs_to_jiffies (ca->delay_min >>3 );/* change the unit from HZ to bictcp_HZ */ - t = ((tcp_time_stamp +msecs_to_jiffies (ca->delay_min>>3 ) - - ca->epoch_start) <<BICTCP_HZ ) /HZ ; + t <<=BICTCP_HZ ; +do_div (t,HZ );if (t < ca->bic_K)/* t - K */ offs = ca->bic_K - t;
@@ -414,7 +416,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us)return ;/* Discard delay samples right after fast recovery */ -if ((s32)(tcp_time_stamp - ca->epoch_start) <HZ ) +if (ca->epoch_start && (s32)(tcp_time_stamp - ca->epoch_start) <HZ )return ; delay = (rtt_us <<3 ) /USEC_PER_MSEC ;
net/ipv4/tcp_input.c +6 -3
@@ -3598,7 +3598,10 @@ static bool tcp_parse_aligned_timestamp(struct tcp_sock *tp, const struct tcphdr ++ptr; tp->rx_opt.rcv_tsval =ntohl (*ptr); ++ptr; - tp->rx_opt.rcv_tsecr =ntohl (*ptr) - tp->tsoffset; +if (*ptr) + tp->rx_opt.rcv_tsecr =ntohl (*ptr) - tp->tsoffset; +else + tp->rx_opt.rcv_tsecr =0 ;return true; }return false;
@@ -3623,7 +3626,7 @@ static bool tcp_fast_parse_options(const struct sk_buff *skb, }tcp_parse_options (skb, &tp->rx_opt,1 ,NULL ); -if (tp->rx_opt.saw_tstamp) +if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) tp->rx_opt.rcv_tsecr -= tp->tsoffset;return true;
@@ -5376,7 +5379,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,int saved_clamp = tp->rx_opt.mss_clamp;tcp_parse_options (skb, &tp->rx_opt,0 , &foc); -if (tp->rx_opt.saw_tstamp) +if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) tp->rx_opt.rcv_tsecr -= tp->tsoffset;if (th->ack) {
net/ipv4/tcp_output.c +3 -1
@@ -2664,7 +2664,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,int tcp_header_size;int mss; - skb =alloc_skb (MAX_TCP_HEADER +15 ,sk_gfp_atomic (sk,GFP_ATOMIC )); + skb =sock_wmalloc (sk,MAX_TCP_HEADER +15 ,1 ,GFP_ATOMIC );if (unlikely (!skb)) {dst_release (dst);return NULL ;
@@ -2808,6 +2808,8 @@ void tcp_connect_init(struct sock *sk)if (likely (!tp->repair)) tp->rcv_nxt =0 ; +else + tp->rcv_tstamp = tcp_time_stamp; tp->rcv_wup = tp->rcv_nxt; tp->copied_seq = tp->rcv_nxt;
net/ipv6/addrconf.c +4 -6
@@ -1124,12 +1124,10 @@ retry:if (ifp->flags &IFA_F_OPTIMISTIC ) addr_flags |=IFA_F_OPTIMISTIC ; - ift = !max_addresses || -ipv6_count_addresses (idev) < max_addresses ? -ipv6_add_addr (idev, &addr, tmp_plen, -ipv6_addr_type (&addr)&IPV6_ADDR_SCOPE_MASK , - addr_flags) :NULL ; -if (IS_ERR_OR_NULL (ift)) { + ift =ipv6_add_addr (idev, &addr, tmp_plen, +ipv6_addr_type (&addr)&IPV6_ADDR_SCOPE_MASK , + addr_flags); +if (IS_ERR (ift)) {in6_ifa_put (ifp);in6_dev_put (idev);pr_info ("%s: retry temporary address regeneration\n" , __func__);
net/ipv6/addrlabel.c +23 -25
61 lines not on this page · raw message
net/ipv6/icmp.c +9 -1
@@ -931,6 +931,14 @@ static const struct icmp6_err { .err = ECONNREFUSED, .fatal = 1, }, + {/* POLICY_FAIL */ + .err = EACCES, + .fatal = 1, + }, + {/* REJECT_ROUTE */ + .err = EACCES, + .fatal = 1, + }, };int icmpv6_err_convert (u8 type,u8 code,int *err)
@@ -942,7 +950,7 @@ int icmpv6_err_convert(u8 type, u8 code, int *err)switch (type) {case ICMPV6_DEST_UNREACH : fatal =1 ; -if (code <=ICMPV6_PORT_UNREACH ) { +if (code <ARRAY_SIZE (tab_unreach)) { *err = tab_unreach[code].err; fatal = tab_unreach[code].fatal; }
net/ipv6/ip6_fib.c +12 -4
@@ -993,14 +993,22 @@ static struct fib6_node * fib6_lookup_1(struct fib6_node *root,if (ipv6_prefix_equal (&key->addr, args->addr, key->plen)) {#ifdef CONFIG_IPV6_SUBTREES -if (fn->subtree) - fn =fib6_lookup_1 (fn->subtree, args +1 ); +if (fn->subtree) { +struct fib6_node *sfn; + sfn =fib6_lookup_1 (fn->subtree, + args +1 ); +if (!sfn) + goto backtrack; + fn = sfn; + }#endif -if (!fn || fn->fn_flags &RTN_RTINFO ) +if (fn->fn_flags &RTN_RTINFO )return fn; } } - +#ifdef CONFIG_IPV6_SUBTREES +backtrack: +#endif if (fn->fn_flags &RTN_ROOT )break ;
net/ipv6/ndisc.c +8 -6
@@ -372,14 +372,11 @@ static struct sk_buff *ndisc_alloc_skb(struct net_device *dev,int tlen = dev->needed_tailroom;struct sock *sk =dev_net (dev)->ipv6.ndisc_sk;struct sk_buff *skb; -int err; - skb =sock_alloc_send_skb (sk, - hlen +sizeof (struct ipv6hdr ) + len + tlen, -1 , &err); + skb =alloc_skb (hlen +sizeof (struct ipv6hdr ) + len + tlen,GFP_ATOMIC );if (!skb) { -ND_PRINTK (0 , err,"ndisc: %s failed to allocate an skb, err=%d\n" , - __func__, err); +ND_PRINTK (0 , err,"ndisc: %s failed to allocate an skb\n" , + __func__);return NULL ; }
@@ -389,6 +386,11 @@ static struct sk_buff *ndisc_alloc_skb(struct net_device *dev,skb_reserve (skb, hlen +sizeof (struct ipv6hdr ));skb_reset_transport_header (skb); +/* Manually assign socket ownership as we avoid calling +* sock_alloc_send_pskb() to bypass wmem buffer limits +*/ +skb_set_owner_w (skb, sk); +return skb; }
net/ipv6/reassembly.c +5 -0
@@ -490,6 +490,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,ipv6_hdr (head)->payload_len =htons (payload_len);ipv6_change_dsfield (ipv6_hdr (head),0xff , ecn);IP6CB (head)->nhoff = nhoff; +IP6CB (head)->flags |=IP6SKB_FRAGMENTED ;/* Yes, and fold redundant checksum back. 8) */ if (head->ip_summed ==CHECKSUM_COMPLETE )
@@ -524,6 +525,9 @@ static int ipv6_frag_rcv(struct sk_buff *skb)struct net *net =dev_net (skb_dst (skb)->dev);int evicted; +if (IP6CB (skb)->flags &IP6SKB_FRAGMENTED ) + goto fail_hdr; +IP6_INC_STATS_BH (net,ip6_dst_idev (skb_dst (skb)),IPSTATS_MIB_REASMREQDS );/* Jumbo payload inhibits frag. header */
@@ -544,6 +548,7 @@ static int ipv6_frag_rcv(struct sk_buff *skb) ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_REASMOKS);IP6CB (skb)->nhoff = (u8 *)fhdr -skb_network_header (skb); +IP6CB (skb)->flags |=IP6SKB_FRAGMENTED ;return 1 ; }
net/ipv6/tcp_ipv6.c +1 -1
@@ -1426,7 +1426,7 @@ ipv6_pktoptions:if (np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) np->mcast_hops =ipv6_hdr (opt_skb)->hop_limit;if (np->rxopt.bits.rxtclass) - np->rcv_tclass =ipv6_get_dsfield (ipv6_hdr (skb)); + np->rcv_tclass =ipv6_get_dsfield (ipv6_hdr (opt_skb));if (ipv6_opt_accepted (sk, opt_skb)) {skb_set_owner_r (opt_skb, sk); opt_skb =xchg (&np->pktoptions, opt_skb);
net/netlink/genetlink.c +55 -12
119 lines not on this page · raw message
net/packet/af_packet.c +2 -0
@@ -3259,9 +3259,11 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,if (po->tp_version ==TPACKET_V3 ) { lv =sizeof (struct tpacket_stats_v3 ); + st.stats3.tp_packets += st.stats3.tp_drops; data = &st.stats3; }else { lv =sizeof (struct tpacket_stats ); + st.stats1.tp_packets += st.stats1.tp_drops; data = &st.stats1; }
net/sched/sch_api.c +41 -0
53 lines not on this page · raw message
net/sched/sch_generic.c +1 -0
@@ -908,6 +908,7 @@ void psched_ratecfg_precompute(struct psched_ratecfg *r,memset (r,0 ,sizeof (*r)); r->overhead = conf->overhead; r->rate_bps = (u64 )conf->rate <<3 ; + r->linklayer = (conf->linklayer &TC_LINKLAYER_MASK ); r->mult =1 ;/* * Calibrate mult, shift so that token counting is accurate
net/sched/sch_htb.c +14 -1
@@ -87,7 +87,7 @@ struct htb_class {unsigned int children;struct htb_class *parent;/* parent class */ -int prio;/* these two are used only by leaves... */ +u32 prio;/* these two are used only by leaves... */ int quantum;/* but stored for parent-to-leaf return */ union {
@@ -1312,6 +1312,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,struct htb_sched *q =qdisc_priv (sch);struct htb_class *cl = (struct htb_class *)*arg, *parent;struct nlattr *opt = tca[TCA_OPTIONS ]; +struct qdisc_rate_table *rtab =NULL , *ctab =NULL ;struct nlattr *tb[TCA_HTB_MAX +1 ];struct tc_htb_opt *hopt;
@@ -1333,6 +1334,18 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,if (!hopt->rate.rate || !hopt->ceil.rate) goto failure; +/* Keeping backward compatible with rate_table based iproute2 tc */ +if (hopt->rate.linklayer ==TC_LINKLAYER_UNAWARE ) { + rtab =qdisc_get_rtab (&hopt->rate, tb[TCA_HTB_RTAB ]); +if (rtab) +qdisc_put_rtab (rtab); + } +if (hopt->ceil.linklayer ==TC_LINKLAYER_UNAWARE ) { + ctab =qdisc_get_rtab (&hopt->ceil, tb[TCA_HTB_CTAB ]); +if (ctab) +qdisc_put_rtab (ctab); + } +if (!cl) {/* new class */ struct Qdisc *new_q;int prio;
net/tipc/socket.c +2 -2
@@ -1179,7 +1179,7 @@ static u32 filter_connect(struct tipc_sock *tsock, struct sk_buff **buf)/* Accept only ACK or NACK message */ if (unlikely (msg_errcode (msg))) { sock->state =SS_DISCONNECTING ; - sk->sk_err = -ECONNREFUSED ; + sk->sk_err =ECONNREFUSED ; retval =TIPC_OK ;break ; }
@@ -1190,7 +1190,7 @@ static u32 filter_connect(struct tipc_sock *tsock, struct sk_buff **buf) res =auto_connect (sock, msg);if (res) { sock->state =SS_DISCONNECTING ; - sk->sk_err = res; + sk->sk_err = -res; retval =TIPC_OK ;break ; }