Linux 4.14.59
Greg KH
maintainerI'm announcing the release of the 4.14.59 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.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 | 3 arch/mips/ath79/common.c | 2 arch/mips/pci/pci.c | 2 arch/powerpc/include/asm/mmu_context.h | 4 arch/powerpc/kvm/book3s_64_vio.c | 2 arch/powerpc/kvm/book3s_64_vio_hv.c | 6 arch/powerpc/mm/mmu_context_iommu.c | 37 + arch/x86/xen/xen-pvh.S | 26 + drivers/base/dd.c | 8 drivers/gpu/drm/nouveau/dispnv04/disp.c | 3 drivers/gpu/drm/nouveau/nouveau_drm.c | 7 drivers/gpu/drm/nouveau/nv50_display.c | 8 drivers/net/bonding/bond_options.c | 23 - drivers/net/can/m_can/m_can.c | 3 drivers/net/can/peak_canfd/peak_pciefd_main.c | 19 drivers/net/can/xilinx_can.c | 392 +++++++++++++----- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 7 drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 12 drivers/net/phy/phy.c | 2 drivers/net/vxlan.c | 126 +++-- drivers/staging/speakup/speakup_soft.c | 6 drivers/usb/class/cdc-acm.c | 3 drivers/usb/core/hub.c | 8 drivers/usb/dwc2/hcd.c | 44 +- drivers/usb/gadget/function/f_fs.c | 2 drivers/vfio/vfio_iommu_spapr_tce.c | 2 fs/cifs/smb2pdu.c | 7 include/linux/skbuff.h | 2 include/net/tcp.h | 7 net/core/rtnetlink.c | 9 net/core/skbuff.c | 10 net/ipv4/igmp.c | 3 net/ipv4/ip_output.c | 2 net/ipv4/ip_sockglue.c | 7 net/ipv4/tcp_dctcp.c | 50 -- net/ipv4/tcp_input.c | 65 ++ net/ipv4/tcp_output.c | 33 + net/ipv6/datagram.c | 7 net/ipv6/icmp.c | 5 net/ipv6/ip6_output.c | 2 net/ipv6/mcast.c | 3 net/ipv6/tcp_ipv6.c | 6 net/tls/tls_sw.c | 7 44 files changed, 690 insertions(+), 294 deletions(-)
Alexey Kardashevskiy (1):
KVM: PPC: Check if IOMMU page is contained in the pinned physical page
Anssi Hannula (7):
can: xilinx_can: fix RX loop if RXNEMP is asserted without RXOK
can: xilinx_can: fix power management handling
can: xilinx_can: fix recovery from error states not being propagated
can: xilinx_can: fix device dropping off bus on RX overrun
can: xilinx_can: keep only 1-2 frames in TX FIFO to fix TX accounting
can: xilinx_can: fix incorrect clear of non-processed interrupts
can: xilinx_can: fix RX overflow interrupt not being enabled
Antti Seppälä (1):
usb: dwc2: Fix DMA alignment to start at allocated boundary
Ariel Levkovich (1):
net/mlx5: Adjust clock overflow work period
Arnd Bergmann (1):
turn off -Wattribute-alias
Bin Liu (1):
usb: core: handle hub C_PORT_OVER_CURRENT condition
Boris Ostrovsky (1):
xen/PVH: Set up GS segment for stack canary
Daniel Borkmann (1):
sock: fix sg page frag coalescing in sk_alloc_sg
David Ahern (1):
net/ipv6: Fix linklocal to global address with VRF
Eran Ben Elisha (2):
net/mlx5e: Don't allow aRFS for encapsulated packets net/mlx5e: Fix quota counting in aRFS expire flow
Eric Dumazet (6):
net: skb_segment() should not return NULL
tcp: free batches of packets in tcp_prune_ofo_queue()
tcp: avoid collapses in tcp_prune_queue() if possible
tcp: detect malicious patterns in tcp_collapse_ofo_queue()
tcp: call tcp_drop() from tcp_data_queue_ofo()
tcp: add tcp_ooo_try_coalesce() helper
Felix Fietkau (1):
MIPS: ath79: fix register address in ath79_ddr_wb_flush()
Greg Kroah-Hartman (2):
Revert "cifs: Fix slab-out-of-bounds in send_set_info() on SMB2 ACE setting" Linux 4.14.59
Hangbin Liu (1):
multicast: do not restore deleted record source filter mode to new one
Heiner Kallweit (1):
net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv
Jack Morgenstein (1):
net/mlx4_core: Save the qpn from the input modifier in RST2INIT wrapper
Jarod Wilson (1):
bonding: set default miimon value for non-arp modes if not set
Jerry Zhang (1):
usb: gadget: f_fs: Only return delayed status when len is 0
Lubomir Rintel (1):
usb: cdc_acm: Add quirk for Castles VEGA3000
Lyude Paul (2):
drm/nouveau/drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit() drm/nouveau: Set DRIVER_ATOMIC cap earlier to fix debugfs
Paolo Abeni (1):
ip: hash fragments consistently
Paul Burton (1):
MIPS: Fix off-by-one in pci_resource_to_user()
Rafael J. Wysocki (1):
driver core: Partially revert "driver core: correct device's shutdown order"
Roman Fietze (1):
can: m_can.c: fix setup of CCCR register: clear CCCR NISO bit before checking can.ctrlmode
Roopa Prabhu (4):
rtnetlink: add rtnl_link_state check in rtnl_configure_link
vxlan: add new fdb alloc and create helpers
vxlan: make netlink notify in vxlan_fdb_destroy optional
vxlan: fix default fdb entry netlink notify ordering during netdev create
Samuel Thibault (1):
staging: speakup: fix wraparound in uaccess length check
Stephane Grosjean (1):
can: peak_canfd: fix firmware < v3.3.0: limit allocation to 32-bit DMA addr only
Willem de Bruijn (1):
ip: in cmsg IP(V6)_ORIGDSTADDR call pskb_may_pull
Yuchung Cheng (4):
tcp: fix dctcp delayed ACK schedule
tcp: helpers to send special DCTCP ack
tcp: do not cancel delay-AcK on DCTCP special ACK
tcp: do not delay ACK in DCTCP upon CE status change
Greg KH
maintainerMakefile +2 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 58 +SUBLEVEL = 59 EXTRAVERSION = NAME = Petit Gorille
@@ -642,6 +642,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation) KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow) KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context) +KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
arch/mips/ath79/common.c +1 -1
@@ -58,7 +58,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_ctrl_init);void ath79_ddr_wb_flush (u32 reg) { -void __iomem *flush_reg = ath79_ddr_wb_flush_base + reg; +void __iomem *flush_reg = ath79_ddr_wb_flush_base + (reg *4 );/* Flush the DDR write buffer. */ __raw_writel (0x1 , flush_reg);
arch/mips/pci/pci.c +1 -1
@@ -54,5 +54,5 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar,phys_addr_t size =resource_size (rsrc); *start =fixup_bigphys_addr (rsrc->start, size); - *end = rsrc->start + size; + *end = rsrc->start + size -1 ; }
arch/powerpc/include/asm/mmu_context.h +2 -2
@@ -35,9 +35,9 @@ extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup_rm(extern struct mm_iommu_table_group_mem_t *mm_iommu_find (struct mm_struct *mm,unsigned long ua,unsigned long entries);extern long mm_iommu_ua_to_hpa (struct mm_iommu_table_group_mem_t *mem, -unsigned long ua,unsigned long *hpa); +unsigned long ua,unsigned int pageshift,unsigned long *hpa);extern long mm_iommu_ua_to_hpa_rm (struct mm_iommu_table_group_mem_t *mem, -unsigned long ua,unsigned long *hpa); +unsigned long ua,unsigned int pageshift,unsigned long *hpa);extern long mm_iommu_mapped_inc (struct mm_iommu_table_group_mem_t *mem);extern void mm_iommu_mapped_dec (struct mm_iommu_table_group_mem_t *mem);#endif
arch/powerpc/kvm/book3s_64_vio.c +1 -1
@@ -433,7 +433,7 @@ long kvmppc_tce_iommu_map(struct kvm *kvm, struct iommu_table *tbl,/* This only handles v2 IOMMU type, v1 is handled via ioctl() */ return H_TOO_HARD ; -if (WARN_ON_ONCE (mm_iommu_ua_to_hpa (mem, ua, &hpa))) +if (WARN_ON_ONCE (mm_iommu_ua_to_hpa (mem, ua, tbl->it_page_shift, &hpa)))return H_HARDWARE ;if (mm_iommu_mapped_inc (mem))
arch/powerpc/kvm/book3s_64_vio_hv.c +4 -2
@@ -262,7 +262,8 @@ static long kvmppc_rm_tce_iommu_map(struct kvm *kvm, struct iommu_table *tbl,if (!mem)return H_TOO_HARD ; -if (WARN_ON_ONCE_RM (mm_iommu_ua_to_hpa_rm (mem, ua, &hpa))) +if (WARN_ON_ONCE_RM (mm_iommu_ua_to_hpa_rm (mem, ua, tbl->it_page_shift, + &hpa)))return H_HARDWARE ; pua = (void *)vmalloc_to_phys (pua);
@@ -431,7 +432,8 @@ long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu, mem =mm_iommu_lookup_rm (vcpu->kvm->mm, ua,IOMMU_PAGE_SIZE_4K );if (mem) - prereg =mm_iommu_ua_to_hpa_rm (mem, ua, &tces) ==0 ; + prereg =mm_iommu_ua_to_hpa_rm (mem, ua, +IOMMU_PAGE_SHIFT_4K , &tces) ==0 ; }if (!prereg) {
arch/powerpc/mm/mmu_context_iommu.c +35 -2
@@ -19,6 +19,7 @@#include <linux/hugetlb.h> #include <linux/swap.h> #include <asm/mmu_context.h> +#include <asm/pte-walk.h> static DEFINE_MUTEX (mem_list_mutex);
@@ -27,6 +28,7 @@ struct mm_iommu_table_group_mem_t {struct rcu_head rcu;unsigned long used;atomic64_t mapped; +unsigned int pageshift;u64 ua;/* userspace address */ u64 entries;/* number of entries in hpas[] */ u64 *hpas;/* vmalloc'ed */
@@ -126,6 +128,8 @@ long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries, {struct mm_iommu_table_group_mem_t *mem;long i, j, ret =0 , locked_entries =0 ; +unsigned int pageshift; +unsigned long flags;struct page *page =NULL ;mutex_lock (&mem_list_mutex);
@@ -160,6 +164,12 @@ long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries, goto unlock_exit; } +/* +* For a starting point for a maximum page size calculation +* we use @ua and @entries natural alignment to allow IOMMU pages +* smaller than huge pages but still bigger than PAGE_SIZE. +*/ + mem->pageshift =__ffs (ua | (entries <<PAGE_SHIFT )); mem->hpas =vzalloc (entries *sizeof (mem->hpas[0 ]));if (!mem->hpas) {kfree (mem);
@@ -200,6 +210,23 @@ long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries, } } populate: + pageshift =PAGE_SHIFT ; +if (PageCompound (page)) { +pte_t *pte; +struct page *head =compound_head (page); +unsigned int compshift =compound_order (head); + +local_irq_save (flags);/* disables as well */ + pte =find_linux_pte (mm->pgd, ua,NULL , &pageshift); +local_irq_restore (flags); + +/* Double check it is still the same pinned page */ +if (pte &&pte_page (*pte) == head && + pageshift == compshift) + pageshift = max_t(unsigned int, pageshift, +PAGE_SHIFT ); + } + mem->pageshift =min (mem->pageshift, pageshift); mem->hpas[i] =page_to_pfn (page) <<PAGE_SHIFT ; }
@@ -350,7 +377,7 @@ struct mm_iommu_table_group_mem_t *mm_iommu_find(struct mm_struct *mm,EXPORT_SYMBOL_GPL (mm_iommu_find);long mm_iommu_ua_to_hpa (struct mm_iommu_table_group_mem_t *mem, -unsigned long ua,unsigned long *hpa) +unsigned long ua,unsigned int pageshift,unsigned long *hpa) {const long entry = (ua - mem->ua) >>PAGE_SHIFT ;u64 *va = &mem->hpas[entry];
@@ -358,6 +385,9 @@ long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,if (entry >= mem->entries)return -EFAULT ; +if (pageshift > mem->pageshift) +return -EFAULT ; + *hpa = *va | (ua & ~PAGE_MASK );return 0 ;
@@ -365,7 +395,7 @@ long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,EXPORT_SYMBOL_GPL (mm_iommu_ua_to_hpa);long mm_iommu_ua_to_hpa_rm (struct mm_iommu_table_group_mem_t *mem, -unsigned long ua,unsigned long *hpa) +unsigned long ua,unsigned int pageshift,unsigned long *hpa) {const long entry = (ua - mem->ua) >>PAGE_SHIFT ;void *va = &mem->hpas[entry];
@@ -374,6 +404,9 @@ long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem,if (entry >= mem->entries)return -EFAULT ; +if (pageshift > mem->pageshift) +return -EFAULT ; + pa = (void *)vmalloc_to_phys (va);if (!pa)return -EFAULT ;
arch/x86/xen/xen-pvh.S +25 -1
@@ -54,6 +54,9 @@ * charge of setting up it's own stack, GDT and IDT. */ +#define PVH_GDT_ENTRY_CANARY 4 +#define PVH_CANARY_SEL (PVH_GDT_ENTRY_CANARY * 8) + ENTRY(pvh_start_xen) cld
@@ -98,6 +101,12 @@ ENTRY(pvh_start_xen) /* 64-bit entry point. */ .code64 1: + /* Set base address in stack canary descriptor. */ + mov $MSR_GS_BASE,%ecx + mov $_pa(canary), %eax + xor %edx, %edx + wrmsr + call xen_prepare_pvh /* startup_64 expects boot_params in %rsi. */
@@ -107,6 +116,17 @@ ENTRY(pvh_start_xen) #else /* CONFIG_X86_64 */ + /* Set base address in stack canary descriptor. */ + movl $_pa(gdt_start),%eax + movl $_pa(canary),%ecx + movw %cx, (PVH_GDT_ENTRY_CANARY * 8) + 2(%eax) + shrl $16, %ecx + movb %cl, (PVH_GDT_ENTRY_CANARY * 8) + 4(%eax) + movb %ch, (PVH_GDT_ENTRY_CANARY * 8) + 7(%eax) + + mov $PVH_CANARY_SEL,%eax + mov %eax,%gs + call mk_early_pgtbl_32 mov $_pa(initial_page_table), %eax
@@ -150,9 +170,13 @@ gdt_start: .quad GDT_ENTRY(0xc09a, 0, 0xfffff) /* __KERNEL_CS */ #endif .quad GDT_ENTRY(0xc092, 0, 0xfffff) /* __KERNEL_DS */ + .quad GDT_ENTRY(0x4090, 0, 0x18) /* PVH_CANARY_SEL */ gdt_end: - .balign 4 + .balign 16 +canary: + .fill 48, 1, 0 + early_stack: .fill 256, 1, 0 early_stack_end:
drivers/base/dd.c +0 -8
@@ -401,14 +401,6 @@ static int really_probe(struct device *dev, struct device_driver *drv) goto probe_failed; } -/* -* Ensure devices are listed in devices_kset in correct order -* It's important to move Dev to the end of devices_kset before -* calling .probe, because it could be recursive and parent Dev -* should always go first -*/ -devices_kset_move_last (dev); -if (dev->bus->probe) { ret = dev->bus->probe (dev);if (ret)
drivers/gpu/drm/nouveau/dispnv04/disp.c +3 -0
@@ -55,6 +55,9 @@ nv04_display_create(struct drm_device *dev)nouveau_display (dev)->init = nv04_display_init;nouveau_display (dev)->fini = nv04_display_fini; +/* Pre-nv50 doesn't support atomic, so don't expose the ioctls */ + dev->driver->driver_features &= ~DRIVER_ATOMIC ; +nouveau_hw_save_vga_fonts (dev,1 );nv04_crtc_create (dev,0 );
drivers/gpu/drm/nouveau/nouveau_drm.c +7 -0
@@ -79,6 +79,10 @@ MODULE_PARM_DESC(modeset, "enable driver (default: auto, "int nouveau_modeset =-1 ;module_param_named (modeset, nouveau_modeset, int,0400 ); +MODULE_PARM_DESC (atomic,"Expose atomic ioctl (default: disabled)" ); +static int nouveau_atomic =0 ; +module_param_named (atomic, nouveau_atomic, int,0400 ); +MODULE_PARM_DESC (runpm,"disable (0), force enable (1), optimus only default (-1)" );static int nouveau_runtime_pm =-1 ;module_param_named (runpm, nouveau_runtime_pm, int,0400 );
@@ -383,6 +387,9 @@ static int nouveau_drm_probe(struct pci_dev *pdev,pci_set_master (pdev); +if (nouveau_atomic) + driver_pci.driver_features |=DRIVER_ATOMIC ; + ret =drm_get_pci_dev (pdev, pent, &driver_pci);if (ret) {nvkm_device_del (&device);
drivers/gpu/drm/nouveau/nv50_display.c +1 -7
@@ -4150,7 +4150,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,nv50_disp_atomic_commit_tail (state);drm_for_each_crtc (crtc, dev) { -if (crtc->state->enable) { +if (crtc->state->active) {if (!drm->have_disp_power_ref) { drm->have_disp_power_ref = true;return 0 ;
@@ -4398,10 +4398,6 @@ nv50_display_destroy(struct drm_device *dev)kfree (disp); } -MODULE_PARM_DESC (atomic,"Expose atomic ioctl (default: disabled)" ); -static int nouveau_atomic =0 ; -module_param_named (atomic, nouveau_atomic, int,0400 ); -int nv50_display_create (struct drm_device *dev) {
@@ -4426,8 +4422,6 @@ nv50_display_create(struct drm_device *dev) disp->disp = &nouveau_display (dev)->disp; dev->mode_config.funcs = &nv50_disp_func; dev->driver->driver_features |=DRIVER_PREFER_XBGR_30BPP ; -if (nouveau_atomic) - dev->driver->driver_features |=DRIVER_ATOMIC ;/* small shared memory area we use for notifiers and semaphores */ ret = nouveau_bo_new(&drm->client, 4096, 0x1000, TTM_PL_FLAG_VRAM,
drivers/net/bonding/bond_options.c +14 -9
@@ -743,15 +743,20 @@ const struct bond_option *bond_opt_get(unsigned int option)static int bond_option_mode_set (struct bonding *bond,const struct bond_opt_value *newval) { -if (!bond_mode_uses_arp (newval->value) && bond->params.arp_interval) { -netdev_dbg (bond->dev,"%s mode is incompatible with arp monitoring, start mii monitoring\n" , - newval->string); -/* disable arp monitoring */ - bond->params.arp_interval =0 ; -/* set miimon to default value */ - bond->params.miimon =BOND_DEFAULT_MIIMON ; -netdev_dbg (bond->dev,"Setting MII monitoring interval to %d\n" , - bond->params.miimon); +if (!bond_mode_uses_arp (newval->value)) { +if (bond->params.arp_interval) { +netdev_dbg (bond->dev,"%s mode is incompatible with arp monitoring, start mii monitoring\n" , + newval->string); +/* disable arp monitoring */ + bond->params.arp_interval =0 ; + } + +if (!bond->params.miimon) { +/* set miimon to default value */ + bond->params.miimon =BOND_DEFAULT_MIIMON ; +netdev_dbg (bond->dev,"Setting MII monitoring interval to %d\n" , + bond->params.miimon); + } }if (newval->value ==BOND_MODE_ALB )
drivers/net/can/m_can/m_can.c +2 -1
@@ -1073,7 +1073,8 @@ static void m_can_chip_config(struct net_device *dev) }else {/* Version 3.1.x or 3.2.x */ - cccr &= ~(CCCR_TEST |CCCR_MON |CCCR_BRSE |CCCR_FDOE ); + cccr &= ~(CCCR_TEST |CCCR_MON |CCCR_BRSE |CCCR_FDOE | +CCCR_NISO );/* Only 3.2.x has NISO Bit implemented */ if (priv->can.ctrlmode &CAN_CTRLMODE_FD_NON_ISO )
drivers/net/can/peak_canfd/peak_pciefd_main.c +19 -0
@@ -58,6 +58,10 @@ MODULE_LICENSE("GPL v2");#define PCIEFD_REG_SYS_VER1 0x0040/* version reg #1 */ #define PCIEFD_REG_SYS_VER2 0x0044/* version reg #2 */ +#define PCIEFD_FW_VERSION (x, y, z) (((u32)(x) << 24) | \ + ((u32)(y) << 16) | \ + ((u32)(z) << 8)) +/* System Control Registers Bits */ #define PCIEFD_SYS_CTL_TS_RST 0x00000001/* timestamp clock */ #define PCIEFD_SYS_CTL_CLK_EN 0x00000002/* system clock */
@@ -783,6 +787,21 @@ static int peak_pciefd_probe(struct pci_dev *pdev,"%ux CAN-FD PCAN-PCIe FPGA v%u.%u.%u:\n" , can_count, hw_ver_major, hw_ver_minor, hw_ver_sub); +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT +/* FW < v3.3.0 DMA logic doesn't handle correctly the mix of 32-bit and +* 64-bit logical addresses: this workaround forces usage of 32-bit +* DMA addresses only when such a fw is detected. +*/ +if (PCIEFD_FW_VERSION (hw_ver_major, hw_ver_minor, hw_ver_sub) < +PCIEFD_FW_VERSION (3 ,3 ,0 )) { + err =dma_set_mask_and_coherent (&pdev->dev,DMA_BIT_MASK (32 )); +if (err) +dev_warn (&pdev->dev, +"warning: can't set DMA mask %llxh (err %d)\n" , +DMA_BIT_MASK (32 ), err); + } +#endif +/* stop system clock */ pciefd_sys_writereg (pciefd,PCIEFD_SYS_CTL_CLK_EN ,PCIEFD_REG_SYS_CTL_CLR );
drivers/net/can/xilinx_can.c +288 -104
618 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +1 -1
@@ -2957,7 +2957,7 @@ int mlx4_RST2INIT_QP_wrapper(struct mlx4_dev *dev, int slave,u32 srqn =qp_get_srqn (qpc) &0xffffff ;int use_srq = (qp_get_srqn (qpc) >>24 ) &1 ;struct res_srq *srq; -int local_qpn =be32_to_cpu (qpc->local_qpn) &0xffffff ; +int local_qpn = vhcr->in_modifier &0xffffff ; err =adjust_qp_sched_queue (dev, slave, qpc, inbox);if (err)
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c +5 -2
@@ -381,14 +381,14 @@ static void arfs_may_expire_flow(struct mlx5e_priv *priv)HLIST_HEAD (del_list);spin_lock_bh (&priv->fs.arfs.arfs_lock);mlx5e_for_each_arfs_rule (arfs_rule, htmp, priv->fs.arfs.arfs_tables, i, j) { -if (quota++ >MLX5E_ARFS_EXPIRY_QUOTA ) -break ;if (!work_pending (&arfs_rule->arfs_work) &&rps_may_expire_flow (priv->netdev, arfs_rule->rxq, arfs_rule->flow_id, arfs_rule->filter_id)) {hlist_del_init (&arfs_rule->hlist);hlist_add_head (&arfs_rule->hlist, &del_list); +if (quota++ >MLX5E_ARFS_EXPIRY_QUOTA ) +break ; } }spin_unlock_bh (&priv->fs.arfs.arfs_lock);
@@ -711,6 +711,9 @@ int mlx5e_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb, skb->protocol != htons(ETH_P_IPV6))return -EPROTONOSUPPORT ; +if (skb->encapsulation) +return -EPROTONOSUPPORT ; + arfs_t =arfs_get_table (arfs,arfs_get_ip_proto (skb), skb->protocol);if (!arfs_t)return -EPROTONOSUPPORT ;
drivers/net/ethernet/mellanox/mlx5/core/en_clock.c +10 -2
@@ -545,6 +545,7 @@ void mlx5e_pps_event_handler(struct mlx5e_priv *priv,void mlx5e_timestamp_init (struct mlx5e_priv *priv) {struct mlx5e_tstamp *tstamp = &priv->tstamp; +u64 overflow_cycles;u64 ns;u64 frac =0 ;u32 dev_freq;
@@ -569,10 +570,17 @@ void mlx5e_timestamp_init(struct mlx5e_priv *priv)/* Calculate period in seconds to call the overflow watchdog - to make * sure counter is checked at least once every wrap around. +* The period is calculated as the minimum between max HW cycles count +* (The clock source mask) and max amount of cycles that can be +* multiplied by clock multiplier where the result doesn't exceed +* 64bits. */ - ns =cyclecounter_cyc2ns (&tstamp->cycles, tstamp->cycles.mask, + overflow_cycles =div64_u64 (~0ULL >>1 , tstamp->cycles.mult); + overflow_cycles =min (overflow_cycles, tstamp->cycles.mask >>1 ); + + ns =cyclecounter_cyc2ns (&tstamp->cycles, overflow_cycles, frac, &frac); -do_div (ns,NSEC_PER_SEC /2 /HZ ); +do_div (ns,NSEC_PER_SEC /HZ ); tstamp->overflow_period = ns;INIT_WORK (&tstamp->pps_info.out_work, mlx5e_pps_out);
drivers/net/phy/phy.c +1 -1
@@ -511,7 +511,7 @@ static int phy_start_aneg_priv(struct phy_device *phydev, bool sync)* negotiation may already be done and aneg interrupt may not be * generated. */ -if (phy_interrupt_is_valid (phydev) && (phydev->state ==PHY_AN )) { +if (phydev->irq !=PHY_POLL && phydev->state ==PHY_AN ) { err =phy_aneg_done (phydev);if (err >0 ) { trigger = true;
drivers/net/vxlan.c +87 -39
239 lines not on this page · raw message
drivers/staging/speakup/speakup_soft.c +5 -1
@@ -207,11 +207,15 @@ static ssize_t softsynthx_read(struct file *fp, char __user *buf, size_t count,int chars_sent =0 ;char __user *cp;char *init; +size_t bytes_per_ch = unicode ?3 :1 ;u16 ch;int empty;unsigned long flags;DEFINE_WAIT (wait); +if (count < bytes_per_ch) +return -EINVAL ; +spin_lock_irqsave (&speakup_info.spinlock, flags);while (1 ) {prepare_to_wait (&speakup_event, &wait,TASK_INTERRUPTIBLE );
@@ -237,7 +241,7 @@ static ssize_t softsynthx_read(struct file *fp, char __user *buf, size_t count, init =get_initstring ();/* Keep 3 bytes available for a 16bit UTF-8-encoded character */ -while (chars_sent <= count -3 ) { +while (chars_sent <= count - bytes_per_ch) {if (speakup_info.flushing) { speakup_info.flushing =0 ; ch ='\x18' ;
drivers/usb/class/cdc-acm.c +3 -0
@@ -1844,6 +1844,9 @@ static const struct usb_device_id acm_ids[] = { { USB_DEVICE(0x09d8, 0x0320), /* Elatec GmbH TWN3 */ .driver_info =NO_UNION_NORMAL ,/* has misplaced union descriptor */ }, + { USB_DEVICE(0x0ca6, 0xa050), /* Castles VEGA3000 */ + .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ + }, { USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */ .driver_info = CLEAR_HALT_CONDITIONS,
drivers/usb/core/hub.c +6 -2
@@ -1141,10 +1141,14 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)if (!udev || udev->state ==USB_STATE_NOTATTACHED ) {/* Tell hub_wq to disconnect the device or -* check for a new connection +* check for a new connection or over current condition. +* Based on USB2.0 Spec Section 11.12.5, +* C_PORT_OVER_CURRENT could be set while +* PORT_OVER_CURRENT is not. So check for any of them. */ if (udev || (portstatus &USB_PORT_STAT_CONNECTION ) || - (portstatus &USB_PORT_STAT_OVERCURRENT )) + (portstatus &USB_PORT_STAT_OVERCURRENT ) || + (portchange &USB_PORT_STAT_C_OVERCURRENT ))set_bit (port1, hub->change_bits); }else if (portstatus &USB_PORT_STAT_ENABLE ) {
drivers/usb/dwc2/hcd.c +23 -21
79 lines not on this page · raw message
drivers/usb/gadget/function/f_fs.c +1 -1
@@ -3243,7 +3243,7 @@ static int ffs_func_setup(struct usb_function *f,__ffs_event_add (ffs,FUNCTIONFS_SETUP );spin_unlock_irqrestore (&ffs->ev.waitq.lock, flags); -return USB_GADGET_DELAYED_STATUS ; +return creq->wLength ==0 ?USB_GADGET_DELAYED_STATUS :0 ; } static bool ffs_func_req_match(struct usb_function *f,
drivers/vfio/vfio_iommu_spapr_tce.c +1 -1
@@ -467,7 +467,7 @@ static int tce_iommu_prereg_ua_to_hpa(struct tce_container *container,if (!mem)return -EINVAL ; - ret =mm_iommu_ua_to_hpa (mem, tce, phpa); + ret =mm_iommu_ua_to_hpa (mem, tce, shift, phpa);if (ret)return -EINVAL ;
fs/cifs/smb2pdu.c +2 -5
@@ -338,10 +338,7 @@ smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon,return rc;/* BB eventually switch this to SMB2 specific small buf size */ -if (smb2_command ==SMB2_SET_INFO ) - *request_buf =cifs_buf_get (); -else - *request_buf =cifs_small_buf_get (); + *request_buf =cifs_small_buf_get ();if (*request_buf ==NULL ) {/* BB should we add a retry in here if not a writepage? */ return -ENOMEM ;
@@ -3171,7 +3168,7 @@ send_set_info(const unsigned int xid, struct cifs_tcon *tcon, } rc =SendReceive2 (xid, ses, iov, num, &resp_buftype, flags, &rsp_iov); -cifs_buf_release (req); +cifs_small_buf_release (req); rsp = (struct smb2_set_info_rsp *)rsp_iov.iov_base;if (rc !=0 )
include/linux/skbuff.h +2 -0
@@ -3167,6 +3167,8 @@ static inline int __skb_grow_rcsum(struct sk_buff *skb, unsigned int len)return __skb_grow (skb, len); } +#define rb_to_skb (rb) rb_entry_safe(rb, struct sk_buff, rbnode) +#define skb_queue_walk (queue, skb) \ for (skb = (queue)->next; \ skb != (struct sk_buff *)(queue); \
include/net/tcp.h +7 -0
@@ -372,6 +372,7 @@ ssize_t tcp_splice_read(struct socket *sk, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags); +void tcp_enter_quickack_mode (struct sock *sk);static inline void tcp_dec_quickack_mode (struct sock *sk,const unsigned int pkts) {
@@ -560,6 +561,7 @@ void tcp_send_fin(struct sock *sk);void tcp_send_active_reset (struct sock *sk,gfp_t priority);int tcp_send_synack (struct sock *);void tcp_push_one (struct sock *,unsigned int mss_now); +void __tcp_send_ack (struct sock *sk,u32 rcv_nxt);void tcp_send_ack (struct sock *sk);void tcp_send_delayed_ack (struct sock *sk);void tcp_send_loss_probe (struct sock *sk);
@@ -857,6 +859,11 @@ struct tcp_skb_cb {* as TCP moves IP6CB into a different location in skb->cb[] */ static inline int tcp_v6_iif (const struct sk_buff *skb) +{ +return TCP_SKB_CB (skb)->header.h6.iif; +} + +static inline int tcp_v6_iif_l3_slave (const struct sk_buff *skb) {bool l3_slave =ipv6_l3mdev_skb (TCP_SKB_CB (skb)->header.h6.flags);
net/core/rtnetlink.c +6 -3
@@ -2402,9 +2402,12 @@ int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm)return err; } - dev->rtnl_link_state =RTNL_LINK_INITIALIZED ; - -__dev_notify_flags (dev, old_flags, ~0U ); +if (dev->rtnl_link_state ==RTNL_LINK_INITIALIZED ) { +__dev_notify_flags (dev, old_flags,0U ); + }else { + dev->rtnl_link_state =RTNL_LINK_INITIALIZED ; +__dev_notify_flags (dev, old_flags, ~0U ); + }return 0 ; }EXPORT_SYMBOL (rtnl_configure_link);
net/core/skbuff.c +5 -5
@@ -3675,6 +3675,7 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,net_warn_ratelimited ("skb_segment: too many frags: %u %u\n" , pos, mss); + err = -EINVAL ; goto err; }
@@ -3713,11 +3714,10 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb, perform_csum_check:if (!csum) { -if (skb_has_shared_frag (nskb)) { - err =__skb_linearize (nskb); -if (err) - goto err; - } +if (skb_has_shared_frag (nskb) && +__skb_linearize (nskb)) + goto err; +if (!nskb->remcsum_offload) nskb->ip_summed =CHECKSUM_NONE ; SKB_GSO_CB(nskb)->csum =
net/ipv4/igmp.c +1 -2
@@ -1201,8 +1201,7 @@ static void igmpv3_del_delrec(struct in_device *in_dev, struct ip_mc_list *im)if (pmc) { im->interface = pmc->interface; im->crcount = in_dev->mr_qrv ?: net->ipv4.sysctl_igmp_qrv; - im->sfmode = pmc->sfmode; -if (pmc->sfmode ==MCAST_INCLUDE ) { +if (im->sfmode ==MCAST_INCLUDE ) { im->tomb = pmc->tomb; im->sources = pmc->sources;for (psf = im->sources; psf; psf = psf->sf_next)
net/ipv4/ip_output.c +2 -0
@@ -523,6 +523,8 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from) to->dev = from->dev; to->mark = from->mark; +skb_copy_hash (to, from); +/* Copy the flags to each fragment. */ IPCB (to)->flags =IPCB (from)->flags;
net/ipv4/ip_sockglue.c +5 -2
@@ -148,15 +148,18 @@ static void ip_cmsg_recv_dstaddr(struct msghdr *msg, struct sk_buff *skb) {struct sockaddr_in sin;const struct iphdr *iph =ip_hdr (skb); -__be16 *ports = (__be16 *)skb_transport_header (skb); +__be16 *ports; +int end; -if (skb_transport_offset (skb) +4 > (int )skb->len) + end =skb_transport_offset (skb) +4 ; +if (end >0 && !pskb_may_pull (skb, end))return ;/* All current transport protocols have the port numbers in the * first four bytes of the transport header and this function is * written with this assumption in mind. */ + ports = (__be16 *)skb_transport_header (skb); sin.sin_family =AF_INET ; sin.sin_addr.s_addr = iph->daddr;
net/ipv4/tcp_dctcp.c +16 -34
62 lines not on this page · raw message
net/ipv4/tcp_input.c +52 -13
152 lines not on this page · raw message
net/ipv4/tcp_output.c +25 -8
@@ -175,8 +175,13 @@ static void tcp_event_data_sent(struct tcp_sock *tp, }/* Account for an ACK we sent. */ -static inline void tcp_event_ack_sent (struct sock *sk,unsigned int pkts) +static inline void tcp_event_ack_sent (struct sock *sk,unsigned int pkts, +u32 rcv_nxt) { +struct tcp_sock *tp =tcp_sk (sk); + +if (unlikely (rcv_nxt != tp->rcv_nxt)) +return ;/* Special ACK sent by DCTCP to reflect ECN */ tcp_dec_quickack_mode (sk, pkts);inet_csk_clear_xmit_timer (sk,ICSK_TIME_DACK ); }
@@ -984,8 +989,8 @@ static void tcp_internal_pacing(struct sock *sk, const struct sk_buff *skb)* We are working here with either a clone of the original * SKB, or a fresh unique copy made by the retransmit engine. */ -static int tcp_transmit_skb (struct sock *sk,struct sk_buff *skb,int clone_it, -gfp_t gfp_mask) +static int __tcp_transmit_skb (struct sock *sk,struct sk_buff *skb, +int clone_it,gfp_t gfp_mask,u32 rcv_nxt) {const struct inet_connection_sock *icsk =inet_csk (sk);struct inet_sock *inet;
@@ -1057,7 +1062,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, th->source = inet->inet_sport; th->dest = inet->inet_dport; th->seq =htonl (tcb->seq); - th->ack_seq =htonl (tp->rcv_nxt); + th->ack_seq =htonl (rcv_nxt); *(((__be16 *)th) +6 ) =htons (((tcp_header_size >>2 ) <<12 ) | tcb->tcp_flags);
@@ -1098,7 +1103,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, icsk->icsk_af_ops->send_check (sk, skb);if (likely (tcb->tcp_flags &TCPHDR_ACK )) -tcp_event_ack_sent (sk,tcp_skb_pcount (skb)); +tcp_event_ack_sent (sk,tcp_skb_pcount (skb), rcv_nxt);if (skb->len != tcp_header_size) {tcp_event_data_sent (tp, sk);
@@ -1135,6 +1140,13 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,return err; } +static int tcp_transmit_skb (struct sock *sk,struct sk_buff *skb,int clone_it, +gfp_t gfp_mask) +{ +return __tcp_transmit_skb (sk, skb, clone_it, gfp_mask, +tcp_sk (sk)->rcv_nxt); +} +/* This routine just queues the buffer for sending. * * NOTE: probe0 timer is not checked, do not forget tcp_push_pending_frames,
@@ -3551,7 +3563,7 @@ void tcp_send_delayed_ack(struct sock *sk) }/* This routine sends an ack and also updates the window. */ -void tcp_send_ack (struct sock *sk) +void __tcp_send_ack (struct sock *sk,u32 rcv_nxt) {struct sk_buff *buff;
@@ -3586,9 +3598,14 @@ void tcp_send_ack(struct sock *sk)skb_set_tcp_pure_ack (buff);/* Send it off, this clears delayed acks for us. */ -tcp_transmit_skb (sk, buff,0 , (__force gfp_t )0 ); +__tcp_transmit_skb (sk, buff,0 , (__force gfp_t )0 , rcv_nxt); +} +EXPORT_SYMBOL_GPL (__tcp_send_ack); + +void tcp_send_ack (struct sock *sk) +{ +__tcp_send_ack (sk,tcp_sk (sk)->rcv_nxt); } -EXPORT_SYMBOL_GPL (tcp_send_ack);/* This routine sends a packet with an out of date sequence * number. It assumes the other end will try to ack it.
net/ipv6/datagram.c +5 -2
@@ -708,13 +708,16 @@ void ip6_datagram_recv_specific_ctl(struct sock *sk, struct msghdr *msg, }if (np->rxopt.bits.rxorigdstaddr) {struct sockaddr_in6 sin6; -__be16 *ports = (__be16 *)skb_transport_header (skb); +__be16 *ports; +int end; -if (skb_transport_offset (skb) +4 <= (int )skb->len) { + end =skb_transport_offset (skb) +4 ; +if (end <=0 ||pskb_may_pull (skb, end)) {/* All current transport protocols have the port numbers in the * first four bytes of the transport header and this function is * written with this assumption in mind. */ + ports = (__be16 *)skb_transport_header (skb); sin6.sin6_family =AF_INET6 ; sin6.sin6_addr =ipv6_hdr (skb)->daddr;
net/ipv6/icmp.c +3 -2
@@ -405,9 +405,10 @@ static int icmp6_iif(const struct sk_buff *skb)/* for local traffic to local address, skb dev is the loopback * device. Check if there is a dst attached to the skb and if so -* get the real device index. +* get the real device index. Same is needed for replies to a link +* local address on a device enslaved to an L3 master device */ -if (unlikely (iif ==LOOPBACK_IFINDEX )) { +if (unlikely (iif ==LOOPBACK_IFINDEX ||netif_is_l3_master (skb->dev))) {const struct rt6_info *rt6 =skb_rt6_info (skb);if (rt6)
net/ipv6/ip6_output.c +2 -0
@@ -595,6 +595,8 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from) to->dev = from->dev; to->mark = from->mark; +skb_copy_hash (to, from); +#ifdef CONFIG_NET_SCHED to->tc_index = from->tc_index;#endif
net/ipv6/mcast.c +1 -2
@@ -771,8 +771,7 @@ static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)if (pmc) { im->idev = pmc->idev; im->mca_crcount = idev->mc_qrv; - im->mca_sfmode = pmc->mca_sfmode; -if (pmc->mca_sfmode ==MCAST_INCLUDE ) { +if (im->mca_sfmode ==MCAST_INCLUDE ) { im->mca_tomb = pmc->mca_tomb; im->mca_sources = pmc->mca_sources;for (psf = im->mca_sources; psf; psf = psf->sf_next)
net/ipv6/tcp_ipv6.c +4 -2
@@ -918,7 +918,8 @@ static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb) &tcp_hashinfo,NULL ,0 , &ipv6h->saddr, th->source, &ipv6h->daddr, -ntohs (th->source),tcp_v6_iif (skb), +ntohs (th->source), +tcp_v6_iif_l3_slave (skb), tcp_v6_sdif(skb));if (!sk1) goto out;
@@ -1573,7 +1574,8 @@ static int tcp_v6_rcv(struct sk_buff *skb) skb,__tcp_hdrlen (th), &ipv6_hdr (skb)->saddr, th->source, &ipv6_hdr (skb)->daddr, -ntohs (th->dest),tcp_v6_iif (skb), +ntohs (th->dest), +tcp_v6_iif_l3_slave (skb), sdif);if (sk2) {struct inet_timewait_sock *tw =inet_twsk (sk);
net/tls/tls_sw.c +4 -3
@@ -135,9 +135,10 @@ static int alloc_sg(struct sock *sk, int len, struct scatterlist *sg, pfrag->offset += use; sge = sg + num_elem -1 ; -if (num_elem > first_coalesce &&sg_page (sg) == pfrag->page && - sg->offset + sg->length == orig_offset) { - sg->length += use; + +if (num_elem > first_coalesce &&sg_page (sge) == pfrag->page && + sge->offset + sge->length == orig_offset) { + sge->length += use; }else { sge++;sg_unmark_end (sge);