Linux 4.14.58
Greg KH
maintainerI'm announcing the release of the 4.14.58 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 | 2 - arch/alpha/kernel/osf_sys.c | 5 --- arch/arc/Kconfig | 2 - arch/arc/configs/axs101_defconfig | 1 arch/arc/configs/axs103_defconfig | 1 arch/arc/configs/axs103_smp_defconfig | 1 arch/arc/configs/haps_hs_defconfig | 1 arch/arc/configs/haps_hs_smp_defconfig | 1 arch/arc/configs/hsdk_defconfig | 1 arch/arc/configs/nsim_700_defconfig | 1 arch/arc/configs/nsim_hs_defconfig | 1 arch/arc/configs/nsim_hs_smp_defconfig | 1 arch/arc/configs/nsimosci_defconfig | 1 arch/arc/configs/nsimosci_hs_defconfig | 1 arch/arc/configs/nsimosci_hs_smp_defconfig | 1 arch/arc/include/asm/page.h | 2 - arch/arc/include/asm/pgtable.h | 2 - arch/arc/plat-hsdk/Kconfig | 2 + arch/powerpc/kernel/idle_book3s.S | 2 + arch/x86/events/intel/ds.c | 8 +++-- arch/x86/include/asm/apm.h | 6 ---- arch/x86/kernel/apm_32.c | 5 +++ arch/x86/kernel/cpu/mcheck/mce.c | 3 -- drivers/cpufreq/intel_pstate.c | 17 +++++++++++ drivers/cpufreq/pcc-cpufreq.c | 4 ++ drivers/gpu/drm/i915/i915_irq.c | 32 +++++++++++++++++++++- drivers/gpu/drm/nouveau/nouveau_backlight.c | 6 ++-- drivers/gpu/drm/nouveau/nouveau_connector.c | 9 ++++-- drivers/gpu/drm/nouveau/nouveau_connector.h | 36 ++++++++++++++++++++++--- drivers/gpu/drm/nouveau/nouveau_display.c | 10 +++++-- drivers/misc/cxl/api.c | 8 ++--- drivers/net/ethernet/broadcom/bcmsysport.c | 4 +- drivers/net/ethernet/broadcom/bcmsysport.h | 3 +- drivers/net/ethernet/broadcom/tg3.c | 9 ++++++ drivers/net/ethernet/mellanox/mlx4/en_rx.c | 8 ++++- drivers/net/hyperv/netvsc.c | 17 +++++++---- drivers/net/phy/phy_device.c | 7 +--- drivers/net/usb/asix_devices.c | 4 ++ drivers/net/usb/qmi_wwan.c | 1 drivers/ptp/ptp_chardev.c | 1 drivers/scsi/sd_zbc.c | 5 ++- drivers/usb/host/xhci.c | 40 +++++++++++++++++++++++++--- drivers/usb/host/xhci.h | 4 ++ drivers/vfio/pci/vfio_pci.c | 4 ++ drivers/vfio/vfio_iommu_spapr_tce.c | 8 ++--- fs/fat/inode.c | 20 +++++++++----- include/linux/sched/task.h | 2 - include/linux/skbuff.h | 10 +++---- include/net/ipv6.h | 2 - kernel/stop_machine.c | 6 +++- lib/rhashtable.c | 17 +++++++---- mm/huge_memory.c | 2 + mm/memcontrol.c | 2 - net/core/gen_stats.c | 16 +++++++++-- net/core/skbuff.c | 1 net/ipv4/fib_frontend.c | 1 net/ipv4/sysctl_net_ipv4.c | 5 ++- net/ipv4/tcp.c | 3 -- net/ipv6/Kconfig | 1 net/ipv6/ndisc.c | 2 - sound/core/rawmidi.c | 20 +++++++++----- sound/pci/hda/patch_conexant.c | 1 sound/pci/hda/patch_realtek.c | 1 virt/kvm/eventfd.c | 6 +++- 64 files changed, 294 insertions(+), 112 deletions(-)
Al Viro (2):
alpha: fix osf_wait4() breakage
cxl_getfile(): fix double-iput() on alloc_file() failures
Alexander Couzens (1):
net: usb: asix: replace mii_nway_restart in resume path
Alexey Brodkin (2):
ARC: Fix CONFIG_SWAP
ARC: configs: Remove CONFIG_INITRAMFS_SOURCE from defconfigs
Alexey Kardashevskiy (1):
vfio/spapr: Use IOMMU pageshift rather than pagesize
Arnd Bergmann (1):
ipv6: ila: select CONFIG_DST_CACHE
Colin Ian King (1):
ipv6: fix useless rol32 call on hash
Damien Le Moal (1):
scsi: sd_zbc: Fix variable type and bogus comment
David Ahern (1):
net/ipv4: Set oif in fib_compute_spec_dst
Davidlohr Bueso (1):
lib/rhashtable: consider param->min_size when setting initial table size
Dewet Thibaut (1):
x86/MCE: Remove min interval polling limitation
Florian Fainelli (1):
net: systemport: Fix CRC forwarding check for SYSTEMPORT Lite
Gautham R. Shenoy (1):
powerpc/powernv: Fix save/restore of SPRG3 on entry/exit from stop (idle)
Greg Kroah-Hartman (1):
Linux 4.14.58
Gustavo A. R. Silva (2):
vfio/pci: Fix potential Spectre v1
ptp: fix missing break in switch
Haiyang Zhang (1):
hv_netvsc: Fix napi reschedule while receive completion is busy
Heiner Kallweit (1):
net: phy: fix flag masking in __set_phy_supported
Hugh Dickins (2):
x86/events/intel/ds: Fix bts_interrupt_threshold alignment mm/huge_memory.c: fix data loss when splitting a file pmd
Isaac J. Manjarres (1):
stop_machine: Disable preemption when waking two stopper threads
Jing Xia (1):
mm: memcg: fix use after free in mem_cgroup_iter()
Lan Tianyu (1):
KVM/Eventfd: Avoid crash when assign and deassign specific eventfd in parallel.
Lorenzo Colitti (1):
net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort
Lyude Paul (2):
drm/nouveau: Use drm_connector_list_iter_* for iterating connectors drm/nouveau: Avoid looping through fake MST connectors
Matevz Vucnik (1):
qmi_wwan: add support for Quectel EG91
Mathias Nyman (1):
xhci: Fix perceived dead host due to runtime suspend race with event handler
OGAWA Hirofumi (1):
fat: fix memory allocation failure handling of match_strdup()
Po-Hsu Lin (1):
ALSA: hda: add mute led support for HP ProBook 455 G5
Rafael J. Wysocki (1):
cpufreq: intel_pstate: Register when ACPI PCCH is present
Sabrina Dubroca (1):
ipv6: make DAD fail with enhanced DAD when nonce length differs
Saeed Mahameed (1):
net/mlx4_en: Don't reuse RX page when XDP is set
Sanjeev Bansal (1):
tg3: Add higher cpu clock for 5762.
Stefano Brivio (2):
net: Don't copy pfmemalloc flag in __copy_skb_header()
skbuff: Unconditionally copy pfmemalloc in __skb_clone()
Takashi Iwai (1):
ALSA: rawmidi: Change resized buffers atomically
Toke Høiland-Jørgensen (1):
gen_stats: Fix netlink stats dumping in the presence of padding
Tyler Hicks (1):
ipv4: Return EINVAL when ping_group_range sysctl doesn't map to user ns
Ville Syrjälä (2):
x86/apm: Don't access __preempt_count with zeroed fs drm/i915: Fix hotplug irq ack on i965/g4x
Vineet Gupta (2):
ARCv2: [plat-hsdk]: Save accl reg pair by default
ARC: mm: allow mprotect to make stack mappings executable
YOKOTA Hiroshi (1):
ALSA: hda/realtek - Add Panasonic CF-SZ6 headset jack quirk
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 57 +SUBLEVEL = 58 EXTRAVERSION = NAME = Petit Gorille
arch/alpha/kernel/osf_sys.c +1 -4
@@ -1183,13 +1183,10 @@ SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru) SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options, struct rusage32 __user *, ur) { -unsigned int status =0 ;struct rusage r; -long err =kernel_wait4 (pid, &status, options, &r); +long err =kernel_wait4 (pid, ustatus, options, &r);if (err <=0 )return err; -if (put_user (status, ustatus)) -return -EFAULT ;if (!ur)return err;if (put_tv32 (&ur->ru_utime, &r.ru_utime))
arch/arc/Kconfig +1 -1
@@ -408,7 +408,7 @@ config ARC_HAS_DIV_REM config ARC_HAS_ACCL_REGS bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6)" - default n + default y help Depending on the configuration, CPU can contain accumulator reg-pair (also referred to as r58:r59). These can also be used by gcc as GPR so
arch/arc/configs/axs101_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../arc_initramfs/" CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set
arch/arc/configs/axs103_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/" CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set
arch/arc/configs/axs103_smp_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/" CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set
arch/arc/configs/haps_hs_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/" CONFIG_EXPERT=y CONFIG_PERF_EVENTS=y # CONFIG_COMPAT_BRK is not set
arch/arc/configs/haps_hs_smp_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/" CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set
arch/arc/configs/hsdk_defconfig +0 -1
@@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/" CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set
arch/arc/configs/nsim_700_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../arc_initramfs/" CONFIG_KALLSYMS_ALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y
arch/arc/configs/nsim_hs_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/" CONFIG_KALLSYMS_ALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y
arch/arc/configs/nsim_hs_smp_defconfig +0 -1
@@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/" CONFIG_KALLSYMS_ALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y
arch/arc/configs/nsimosci_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../arc_initramfs/" CONFIG_KALLSYMS_ALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y
arch/arc/configs/nsimosci_hs_defconfig +0 -1
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/" CONFIG_KALLSYMS_ALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y
arch/arc/configs/nsimosci_hs_smp_defconfig +0 -1
@@ -9,7 +9,6 @@ CONFIG_IKCONFIG_PROC=y # CONFIG_UTS_NS is not set # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/" CONFIG_PERF_EVENTS=y # CONFIG_COMPAT_BRK is not set CONFIG_KPROBES=y
arch/arc/include/asm/page.h +1 -1
@@ -105,7 +105,7 @@ typedef pte_t * pgtable_t;#define virt_addr_valid (kaddr) pfn_valid(virt_to_pfn(kaddr))/* Default Permissions for stack/heaps pages (Non Executable) */ -#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE) +#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)#define WANT_PAGE_VIRTUAL 1
arch/arc/include/asm/pgtable.h +1 -1
@@ -379,7 +379,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,/* Decode a PTE containing swap "identifier "into constituents */ #define __swp_type (pte_lookalike) (((pte_lookalike).val) & 0x1f) -#define __swp_offset (pte_lookalike) ((pte_lookalike).val << 13) +#define __swp_offset (pte_lookalike) ((pte_lookalike).val >> 13)/* NOPs, to keep generic kernel happy */ #define __pte_to_swp_entry (pte) ((swp_entry_t) { pte_val(pte) })
arch/arc/plat-hsdk/Kconfig +2 -0
@@ -7,5 +7,7 @@ menuconfig ARC_SOC_HSDK bool "ARC HS Development Kit SOC" + depends on ISA_ARCV2 + select ARC_HAS_ACCL_REGS select CLK_HSDK select RESET_HSDK
arch/powerpc/kernel/idle_book3s.S +2 -0
@@ -140,6 +140,8 @@ power9_restore_additional_sprs: ld r4, STOP_MMCR2(r13) mtspr SPRN_MMCR1, r3 mtspr SPRN_MMCR2, r4 + ld r4, PACA_SPRG_VDSO(r13) + mtspr SPRN_SPRG3, r4 blr /*
arch/x86/events/intel/ds.c +5 -3
@@ -410,9 +410,11 @@ static int alloc_bts_buffer(int cpu) ds->bts_buffer_base = (unsigned long ) cea;ds_update_cea (cea, buffer,BTS_BUFFER_SIZE ,PAGE_KERNEL ); ds->bts_index = ds->bts_buffer_base; - max =BTS_RECORD_SIZE * (BTS_BUFFER_SIZE /BTS_RECORD_SIZE ); - ds->bts_absolute_maximum = ds->bts_buffer_base + max; - ds->bts_interrupt_threshold = ds->bts_absolute_maximum - (max /16 ); + max =BTS_BUFFER_SIZE /BTS_RECORD_SIZE ; + ds->bts_absolute_maximum = ds->bts_buffer_base + + max *BTS_RECORD_SIZE ; + ds->bts_interrupt_threshold = ds->bts_absolute_maximum - + (max /16 ) *BTS_RECORD_SIZE ;return 0 ; }
arch/x86/include/asm/apm.h +0 -6
@@ -7,8 +7,6 @@#ifndef _ASM_X86_MACH_DEFAULT_APM_H#define _ASM_X86_MACH_DEFAULT_APM_H -#include <asm/nospec-branch.h> -#ifdef APM_ZERO_SEGS # define APM_DO_ZERO_SEGS \ "pushl %%ds\n\t" \
@@ -34,7 +32,6 @@ static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in,* N.B. We do NOT need a cld after the BIOS call * because we always save and restore the flags. */ -firmware_restrict_branch_speculation_start (); __asm__ __volatile__(APM_DO_ZERO_SEGS "pushl %%edi\n\t" "pushl %%ebp\n\t"
@@ -47,7 +44,6 @@ static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in, "=S" (*esi) : "a" (func), "b" (ebx_in), "c" (ecx_in) : "memory", "cc"); -firmware_restrict_branch_speculation_end (); } static inline bool apm_bios_call_simple_asm(u32 func, u32 ebx_in,
@@ -60,7 +56,6 @@ static inline bool apm_bios_call_simple_asm(u32 func, u32 ebx_in,* N.B. We do NOT need a cld after the BIOS call * because we always save and restore the flags. */ -firmware_restrict_branch_speculation_start (); __asm__ __volatile__(APM_DO_ZERO_SEGS "pushl %%edi\n\t" "pushl %%ebp\n\t"
@@ -73,7 +68,6 @@ static inline bool apm_bios_call_simple_asm(u32 func, u32 ebx_in, "=S" (si) : "a" (func), "b" (ebx_in), "c" (ecx_in) : "memory", "cc"); -firmware_restrict_branch_speculation_end ();return error; }
arch/x86/kernel/apm_32.c +5 -0
@@ -240,6 +240,7 @@#include <asm/olpc.h> #include <asm/paravirt.h> #include <asm/reboot.h> +#include <asm/nospec-branch.h> #if defined(CONFIG_APM_DISPLAY_BLANK ) && defined(CONFIG_VT )extern int (*console_blank_hook)(int );
@@ -614,11 +615,13 @@ static long __apm_bios_call(void *_call) gdt[0x40 /8 ] = bad_bios_desc;apm_irq_save (flags); +firmware_restrict_branch_speculation_start ();APM_DO_SAVE_SEGS ;apm_bios_call_asm (call->func, call->ebx, call->ecx, &call->eax, &call->ebx, &call->ecx, &call->edx, &call->esi);APM_DO_RESTORE_SEGS ; +firmware_restrict_branch_speculation_end ();apm_irq_restore (flags); gdt[0x40 /8 ] = save_desc_40;put_cpu ();
@@ -690,10 +693,12 @@ static long __apm_bios_call_simple(void *_call) gdt[0x40 /8 ] = bad_bios_desc;apm_irq_save (flags); +firmware_restrict_branch_speculation_start ();APM_DO_SAVE_SEGS ; error =apm_bios_call_simple_asm (call->func, call->ebx, call->ecx, &call->eax);APM_DO_RESTORE_SEGS ; +firmware_restrict_branch_speculation_end ();apm_irq_restore (flags); gdt[0x40 /8 ] = save_desc_40;put_cpu ();
arch/x86/kernel/cpu/mcheck/mce.c +0 -3
@@ -2150,9 +2150,6 @@ static ssize_t store_int_with_restart(struct device *s,if (check_interval == old_check_interval)return ret; -if (check_interval <1 ) - check_interval =1 ; -mutex_lock (&mce_sysfs_mutex);mce_restart ();mutex_unlock (&mce_sysfs_mutex);
drivers/cpufreq/intel_pstate.c +16 -1
@@ -2188,6 +2188,18 @@ static bool __init intel_pstate_no_acpi_pss(void)return true; } +static bool __init intel_pstate_no_acpi_pcch (void ) +{ +acpi_status status; +acpi_handle handle; + + status =acpi_get_handle (NULL ,"\\_SB" , &handle); +if (ACPI_FAILURE (status)) +return true; + +return !acpi_has_method (handle,"PCCH" ); +} +static bool __init intel_pstate_has_acpi_ppc (void ) {int i;
@@ -2247,7 +2259,10 @@ static bool __init intel_pstate_platform_pwr_mgmt_exists(void)switch (plat_info[idx].data) {case PSS : -return intel_pstate_no_acpi_pss (); +if (!intel_pstate_no_acpi_pss ()) +return false; + +return intel_pstate_no_acpi_pcch ();case PPC :return intel_pstate_has_acpi_ppc () && !force_load; }
drivers/cpufreq/pcc-cpufreq.c +4 -0
@@ -580,6 +580,10 @@ static int __init pcc_cpufreq_init(void) {int ret; +/* Skip initialization if another cpufreq driver is there. */ +if (cpufreq_get_current_driver ()) +return 0 ; +if (acpi_disabled)return 0 ;
drivers/gpu/drm/i915/i915_irq.c +30 -2
@@ -1786,10 +1786,38 @@ static void valleyview_pipestat_irq_handler(struct drm_i915_private *dev_priv,static u32 i9xx_hpd_irq_ack (struct drm_i915_private *dev_priv) { -u32 hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); +u32 hotplug_status =0 , hotplug_status_mask; +int i; + +if (IS_G4X (dev_priv) || +IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) + hotplug_status_mask =HOTPLUG_INT_STATUS_G4X | +DP_AUX_CHANNEL_MASK_INT_STATUS_G4X ; +else + hotplug_status_mask =HOTPLUG_INT_STATUS_I915 ; -if (hotplug_status) +/* +* We absolutely have to clear all the pending interrupt +* bits in PORT_HOTPLUG_STAT. Otherwise the ISR port +* interrupt bit won't have an edge, and the i965/g4x +* edge triggered IIR will not notice that an interrupt +* is still pending. We can't use PORT_HOTPLUG_EN to +* guarantee the edge as the act of toggling the enable +* bits can itself generate a new hotplug interrupt :( +*/ +for (i =0 ; i <10 ; i++) { +u32 tmp =I915_READ (PORT_HOTPLUG_STAT ) & hotplug_status_mask; + +if (tmp ==0 ) +return hotplug_status; + + hotplug_status |= tmp;I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); + } + +WARN_ONCE (1 , +"PORT_HOTPLUG_STAT did not clear (0x%08x)\n" , +I915_READ (PORT_HOTPLUG_STAT ));return hotplug_status; }
drivers/gpu/drm/nouveau/nouveau_backlight.c +4 -2
@@ -267,6 +267,7 @@ nouveau_backlight_init(struct drm_device *dev)struct nouveau_drm *drm =nouveau_drm (dev);struct nvif_device *device = &drm->client.device;struct drm_connector *connector; +struct drm_connector_list_iter conn_iter;INIT_LIST_HEAD (&drm->bl_connectors);
@@ -275,7 +276,8 @@ nouveau_backlight_init(struct drm_device *dev)return 0 ; } -list_for_each_entry (connector, &dev->mode_config.connector_list, head) { +drm_connector_list_iter_begin (dev, &conn_iter); +drm_for_each_connector_iter (connector, &conn_iter) {if (connector->connector_type !=DRM_MODE_CONNECTOR_LVDS && connector->connector_type != DRM_MODE_CONNECTOR_eDP)continue ;
@@ -292,7 +294,7 @@ nouveau_backlight_init(struct drm_device *dev)break ; } } - +drm_connector_list_iter_end (&conn_iter);return 0 ; }
drivers/gpu/drm/nouveau/nouveau_connector.c +7 -2
@@ -1208,14 +1208,19 @@ nouveau_connector_create(struct drm_device *dev, int index)struct nouveau_display *disp =nouveau_display (dev);struct nouveau_connector *nv_connector =NULL ;struct drm_connector *connector; +struct drm_connector_list_iter conn_iter;int type, ret =0 ;bool dummy; -list_for_each_entry (connector, &dev->mode_config.connector_list, head) { +drm_connector_list_iter_begin (dev, &conn_iter); +nouveau_for_each_non_mst_connector_iter (connector, &conn_iter) { nv_connector =nouveau_connector (connector); -if (nv_connector->index == index) +if (nv_connector->index == index) { +drm_connector_list_iter_end (&conn_iter);return connector; + } } +drm_connector_list_iter_end (&conn_iter); nv_connector =kzalloc (sizeof (*nv_connector),GFP_KERNEL );if (!nv_connector)
drivers/gpu/drm/nouveau/nouveau_connector.h +32 -4
@@ -33,6 +33,7 @@#include <drm/drm_encoder.h> #include <drm/drm_dp_helper.h> #include "nouveau_crtc.h" +#include "nouveau_encoder.h" struct nvkm_i2c_port ;
@@ -60,19 +61,46 @@ static inline struct nouveau_connector *nouveau_connector( return container_of(con, struct nouveau_connector, base); } +static inline bool +nouveau_connector_is_mst (struct drm_connector *connector) +{ +const struct nouveau_encoder *nv_encoder; +const struct drm_encoder *encoder; + +if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) +return false; + + nv_encoder =find_encoder (connector,DCB_OUTPUT_ANY ); +if (!nv_encoder) +return false; + + encoder = &nv_encoder->base.base; +return encoder->encoder_type ==DRM_MODE_ENCODER_DPMST ; +} + +#define nouveau_for_each_non_mst_connector_iter (connector, iter) \ + drm_for_each_connector_iter(connector, iter) \ + for_each_if(!nouveau_connector_is_mst(connector)) +static inline struct nouveau_connector *nouveau_crtc_connector_get (struct nouveau_crtc *nv_crtc) {struct drm_device *dev = nv_crtc->base.dev;struct drm_connector *connector; +struct drm_connector_list_iter conn_iter; +struct nouveau_connector *nv_connector =NULL ;struct drm_crtc *crtc =to_drm_crtc (nv_crtc); -list_for_each_entry (connector, &dev->mode_config.connector_list, head) { -if (connector->encoder && connector->encoder->crtc == crtc) -return nouveau_connector (connector); +drm_connector_list_iter_begin (dev, &conn_iter); +nouveau_for_each_non_mst_connector_iter (connector, &conn_iter) { +if (connector->encoder && connector->encoder->crtc == crtc) { + nv_connector =nouveau_connector (connector); +break ; + } } +drm_connector_list_iter_end (&conn_iter); -return NULL ; +return nv_connector; } struct drm_connector *
drivers/gpu/drm/nouveau/nouveau_display.c +8 -2
@@ -405,6 +405,7 @@ nouveau_display_init(struct drm_device *dev)struct nouveau_display *disp =nouveau_display (dev);struct nouveau_drm *drm =nouveau_drm (dev);struct drm_connector *connector; +struct drm_connector_list_iter conn_iter;int ret; ret = disp->init (dev);
@@ -412,10 +413,12 @@ nouveau_display_init(struct drm_device *dev)return ret;/* enable hotplug interrupts */ -list_for_each_entry (connector, &dev->mode_config.connector_list, head) { +drm_connector_list_iter_begin (dev, &conn_iter); +nouveau_for_each_non_mst_connector_iter (connector, &conn_iter) {struct nouveau_connector *conn =nouveau_connector (connector);nvif_notify_get (&conn->hpd); } +drm_connector_list_iter_end (&conn_iter);/* enable flip completion events */ nvif_notify_get (&drm->flip);
@@ -428,6 +431,7 @@ nouveau_display_fini(struct drm_device *dev, bool suspend)struct nouveau_display *disp =nouveau_display (dev);struct nouveau_drm *drm =nouveau_drm (dev);struct drm_connector *connector; +struct drm_connector_list_iter conn_iter;if (!suspend) {if (drm_drv_uses_atomic_modeset (dev))
@@ -440,10 +444,12 @@ nouveau_display_fini(struct drm_device *dev, bool suspend)nvif_notify_put (&drm->flip);/* disable hotplug interrupts */ -list_for_each_entry (connector, &dev->mode_config.connector_list, head) { +drm_connector_list_iter_begin (dev, &conn_iter); +nouveau_for_each_non_mst_connector_iter (connector, &conn_iter) {struct nouveau_connector *conn =nouveau_connector (connector);nvif_notify_put (&conn->hpd); } +drm_connector_list_iter_end (&conn_iter);drm_kms_helper_poll_disable (dev); disp->fini (dev);
drivers/misc/cxl/api.c +4 -4
@@ -102,15 +102,15 @@ static struct file *cxl_getfile(const char *name,d_instantiate (path.dentry, inode); file =alloc_file (&path,OPEN_FMODE (flags), fops); -if (IS_ERR (file)) - goto err_dput; +if (IS_ERR (file)) { +path_put (&path); + goto err_fs; + } file->f_flags = flags & (O_ACCMODE |O_NONBLOCK ); file->private_data = priv;return file; -err_dput: -path_put (&path); err_inode:iput (inode); err_fs:
drivers/net/ethernet/broadcom/bcmsysport.c +2 -2
@@ -1851,8 +1851,8 @@ static int bcm_sysport_open(struct net_device *dev)if (!priv->is_lite) priv->crc_fwd = !!(umac_readl (priv,UMAC_CMD ) &CMD_CRC_FWD );else - priv->crc_fwd = !!(gib_readl (priv,GIB_CONTROL ) & -GIB_FCS_STRIP ); + priv->crc_fwd = !((gib_readl (priv,GIB_CONTROL ) & +GIB_FCS_STRIP ) >>GIB_FCS_STRIP_SHIFT ); phydev =of_phy_connect (dev, priv->phy_dn, bcm_sysport_adj_link,0 , priv->phy_interface);
drivers/net/ethernet/broadcom/bcmsysport.h +2 -1
@@ -277,7 +277,8 @@ struct bcm_rsb {#define GIB_GTX_CLK_EXT_CLK (0 << GIB_GTX_CLK_SEL_SHIFT)#define GIB_GTX_CLK_125MHZ (1 << GIB_GTX_CLK_SEL_SHIFT)#define GIB_GTX_CLK_250MHZ (2 << GIB_GTX_CLK_SEL_SHIFT) -#define GIB_FCS_STRIP (1 << 6) +#define GIB_FCS_STRIP_SHIFT 6 +#define GIB_FCS_STRIP (1 << GIB_FCS_STRIP_SHIFT)#define GIB_LCL_LOOP_EN (1 << 7)#define GIB_LCL_LOOP_TXEN (1 << 8)#define GIB_RMT_LOOP_EN (1 << 9)
drivers/net/ethernet/broadcom/tg3.c +9 -0
@@ -9279,6 +9279,15 @@ static int tg3_chip_reset(struct tg3 *tp)tg3_restore_clk (tp); +/* Increase the core clock speed to fix tx timeout issue for 5762 +* with 100Mbps link speed. +*/ +if (tg3_asic_rev (tp) ==ASIC_REV_5762 ) { + val =tr32 (TG3_CPMU_CLCK_ORIDE_ENABLE ); +tw32 (TG3_CPMU_CLCK_ORIDE_ENABLE , val | +TG3_CPMU_MAC_ORIDE_ENABLE ); + } +/* Reprobe ASF enable state. */ tg3_flag_clear (tp,ENABLE_ASF ); tp->phy_flags &= ~(TG3_PHYFLG_1G_ON_VAUX_OK |
drivers/net/ethernet/mellanox/mlx4/en_rx.c +6 -2
@@ -472,10 +472,10 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv, {const struct mlx4_en_frag_info *frag_info = priv->frag_info;unsigned int truesize =0 ; +bool release = true;int nr, frag_size;struct page *page;dma_addr_t dma; -bool release;/* Collect used fragments while replacing them in the HW descriptors */ for (nr =0 ;; frags++) {
@@ -498,7 +498,11 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv, release =page_count (page) !=1 ||page_is_pfmemalloc (page) ||page_to_nid (page) !=numa_mem_id (); - }else { + }else if (!priv->rx_headroom) { +/* rx_headroom for non XDP setup is always 0. +* When XDP is set, the above condition will +* guarantee page is always released. +*/ u32 sz_align =ALIGN (frag_size,SMP_CACHE_BYTES ); frags->page_offset += sz_align;
drivers/net/hyperv/netvsc.c +10 -7
@@ -1250,6 +1250,7 @@ int netvsc_poll(struct napi_struct *napi, int budget)struct hv_device *device =netvsc_channel_to_device (channel);struct net_device *ndev =hv_get_drvdata (device);int work_done =0 ; +int ret;/* If starting a new interval */ if (!nvchan->desc)
@@ -1261,16 +1262,18 @@ int netvsc_poll(struct napi_struct *napi, int budget) nvchan->desc =hv_pkt_iter_next (channel, nvchan->desc); } -/* If send of pending receive completions suceeded -* and did not exhaust NAPI budget this time -* and not doing busy poll +/* Send any pending receive completions */ + ret =send_recv_completions (ndev, net_device, nvchan); + +/* If it did not exhaust NAPI budget this time +* and not doing busy poll * then re-enable host interrupts -* and reschedule if ring is not empty. +* and reschedule if ring is not empty +* or sending receive completion failed. */ -if (send_recv_completions (ndev, net_device, nvchan) ==0 && - work_done < budget && +if (work_done < budget &&napi_complete_done (napi, work_done) && -hv_end_read (&channel->inbound) && + (ret ||hv_end_read (&channel->inbound)) &&napi_schedule_prep (napi)) {hv_begin_read (&channel->inbound);__napi_schedule (napi);
drivers/net/phy/phy_device.c +2 -5
@@ -1686,11 +1686,8 @@ EXPORT_SYMBOL(genphy_loopback);static int __set_phy_supported (struct phy_device *phydev,u32 max_speed) { -/* The default values for phydev->supported are provided by the PHY -* driver "features" member, we want to reset to sane defaults first -* before supporting higher speeds. -*/ - phydev->supported &=PHY_DEFAULT_FEATURES ; + phydev->supported &= ~(PHY_1000BT_FEATURES |PHY_100BT_FEATURES | +PHY_10BT_FEATURES );switch (max_speed) {default :
drivers/net/usb/asix_devices.c +3 -1
@@ -642,10 +642,12 @@ static void ax88772_restore_phy(struct usbnet *dev) priv->presvd_phy_advertise);/* Restore BMCR */ +if (priv->presvd_phy_bmcr &BMCR_ANENABLE ) + priv->presvd_phy_bmcr |=BMCR_ANRESTART ; +asix_mdio_write_nopm (dev->net, dev->mii.phy_id,MII_BMCR , priv->presvd_phy_bmcr); -mii_nway_restart (&dev->mii); priv->presvd_phy_advertise =0 ; priv->presvd_phy_bmcr =0 ; }
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1252,6 +1252,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x1e0e, 0x9001, 5)}, /* SIMCom 7230E */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0125, 4)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0121, 4)}, /* Quectel EC21 Mini PCIe */ + {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */ {QMI_FIXED_INTF(0x2c7c, 0x0296, 4)}, /* Quectel BG96 */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0306, 4)}, /* Quectel EP06 Mini PCIe */
drivers/ptp/ptp_chardev.c +1 -0
@@ -89,6 +89,7 @@ int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin,case PTP_PF_PHYSYNC :if (chan !=0 )return -EINVAL ; +break ;default :return -EINVAL ; }
drivers/scsi/sd_zbc.c +3 -2
@@ -430,7 +430,8 @@ static int sd_zbc_check_capacity(struct scsi_disk *sdkp,* Check that all zones of the device are equal. The last zone can however * be smaller. The zone size must also be a power of two number of LBAs. * -* Returns the zone size in bytes upon success or an error code upon failure. +* Returns the zone size in number of blocks upon success or an error code +* upon failure. */ static s64 sd_zbc_check_zone_size (struct scsi_disk *sdkp) {
@@ -440,7 +441,7 @@ static s64 sd_zbc_check_zone_size(struct scsi_disk *sdkp)unsigned char *rec;unsigned int buf_len;unsigned int list_length; -int ret; +s64 ret;u8 same;/* Get a buffer */
drivers/usb/host/xhci.c +37 -3
@@ -856,6 +856,41 @@ static void xhci_disable_port_wake_on_bits(struct xhci_hcd *xhci)spin_unlock_irqrestore (&xhci->lock, flags); } +static bool xhci_pending_portevent (struct xhci_hcd *xhci) +{ +__le32 __iomem **port_array; +int port_index; +u32 status; +u32 portsc; + + status =readl (&xhci->op_regs->status); +if (status &STS_EINT ) +return true; +/* +* Checking STS_EINT is not enough as there is a lag between a change +* bit being set and the Port Status Change Event that it generated +* being written to the Event Ring. See note in xhci 1.1 section 4.19.2. +*/ + + port_index = xhci->num_usb2_ports; + port_array = xhci->usb2_ports; +while (port_index--) { + portsc =readl (port_array[port_index]); +if (portsc &PORT_CHANGE_MASK || + (portsc &PORT_PLS_MASK ) ==XDEV_RESUME ) +return true; + } + port_index = xhci->num_usb3_ports; + port_array = xhci->usb3_ports; +while (port_index--) { + portsc =readl (port_array[port_index]); +if (portsc &PORT_CHANGE_MASK || + (portsc &PORT_PLS_MASK ) ==XDEV_RESUME ) +return true; + } +return false; +} +/* * Stop HC (not bus-specific) *
@@ -955,7 +990,7 @@ EXPORT_SYMBOL_GPL(xhci_suspend);*/ int xhci_resume (struct xhci_hcd *xhci,bool hibernated) { -u32 command, temp =0 , status; +u32 command, temp =0 ;struct usb_hcd *hcd =xhci_to_hcd (xhci);struct usb_hcd *secondary_hcd;int retval =0 ;
@@ -1077,8 +1112,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) done:if (retval ==0 ) {/* Resume root hubs only when have pending events. */ - status =readl (&xhci->op_regs->status); -if (status &STS_EINT ) { +if (xhci_pending_portevent (xhci)) {usb_hcd_resume_root_hub (xhci->shared_hcd);usb_hcd_resume_root_hub (hcd); }
drivers/usb/host/xhci.h +4 -0
@@ -392,6 +392,10 @@ struct xhci_op_regs {#define PORT_PLC (1 << 22)/* port configure error change - port failed to configure its link partner */ #define PORT_CEC (1 << 23) +#define PORT_CHANGE_MASK (PORT_CSC | PORT_PEC | PORT_WRC | PORT_OCC | \ + PORT_RC | PORT_PLC | PORT_CEC) + +/* Cold Attach Status - xHC can set this bit to report device attached during * Sx state. Warm port reset should be perfomed to clear this bit and move port * to connected state.
drivers/vfio/pci/vfio_pci.c +4 -0
@@ -28,6 +28,7 @@#include <linux/uaccess.h> #include <linux/vfio.h> #include <linux/vgaarb.h> +#include <linux/nospec.h> #include "vfio_pci_private.h"
@@ -746,6 +747,9 @@ static long vfio_pci_ioctl(void *device_data,if (info.index >=VFIO_PCI_NUM_REGIONS + vdev->num_regions)return -EINVAL ; + info.index =array_index_nospec (info.index, +VFIO_PCI_NUM_REGIONS + + vdev->num_regions); i = info.index -VFIO_PCI_NUM_REGIONS ;
drivers/vfio/vfio_iommu_spapr_tce.c +4 -4
@@ -457,13 +457,13 @@ static void tce_iommu_unuse_page(struct tce_container *container, }static int tce_iommu_prereg_ua_to_hpa (struct tce_container *container, -unsigned long tce,unsigned long size, +unsigned long tce,unsigned long shift,unsigned long *phpa,struct mm_iommu_table_group_mem_t **pmem) {long ret =0 ;struct mm_iommu_table_group_mem_t *mem; - mem =mm_iommu_lookup (container->mm, tce, size); + mem =mm_iommu_lookup (container->mm, tce,1ULL << shift);if (!mem)return -EINVAL ;
@@ -487,7 +487,7 @@ static void tce_iommu_unuse_page_v2(struct tce_container *container,if (!pua)return ; - ret =tce_iommu_prereg_ua_to_hpa (container, *pua,IOMMU_PAGE_SIZE (tbl), + ret =tce_iommu_prereg_ua_to_hpa (container, *pua, tbl->it_page_shift, &hpa, &mem);if (ret) pr_debug("%s: tce %lx at #%lx was not cached, ret=%d\n",
@@ -609,7 +609,7 @@ static long tce_iommu_build_v2(struct tce_container *container, entry + i); ret =tce_iommu_prereg_ua_to_hpa (container, - tce,IOMMU_PAGE_SIZE (tbl), &hpa, &mem); + tce, tbl->it_page_shift, &hpa, &mem);if (ret)break ;
fs/fat/inode.c +13 -7
@@ -696,13 +696,21 @@ static void fat_set_state(struct super_block *sb,brelse (bh); } +static void fat_reset_iocharset (struct fat_mount_options *opts) +{ +if (opts->iocharset != fat_default_iocharset) { +/* Note: opts->iocharset can be NULL here */ +kfree (opts->iocharset); + opts->iocharset = fat_default_iocharset; + } +} +static void delayed_free (struct rcu_head *p) { struct msdos_sb_info *sbi = container_of(p, struct msdos_sb_info, rcu);unload_nls (sbi->nls_disk);unload_nls (sbi->nls_io); -if (sbi->options.iocharset != fat_default_iocharset) -kfree (sbi->options.iocharset); +fat_reset_iocharset (&sbi->options);kfree (sbi); }
@@ -1117,7 +1125,7 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat, opts->fs_fmask = opts->fs_dmask =current_umask (); opts->allow_utime =-1 ; opts->codepage = fat_default_codepage; - opts->iocharset = fat_default_iocharset; +fat_reset_iocharset (opts);if (is_vfat) { opts->shortname =VFAT_SFN_DISPLAY_WINNT |VFAT_SFN_CREATE_WIN95 ; opts->rodir =0 ;
@@ -1274,8 +1282,7 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat,/* vfat specific */ case Opt_charset: -if (opts->iocharset != fat_default_iocharset) -kfree (opts->iocharset); +fat_reset_iocharset (opts); iocharset =match_strdup (&args[0 ]);if (!iocharset)return -ENOMEM ;
@@ -1866,8 +1873,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,iput (fat_inode);unload_nls (sbi->nls_io);unload_nls (sbi->nls_disk); -if (sbi->options.iocharset != fat_default_iocharset) -kfree (sbi->options.iocharset); +fat_reset_iocharset (&sbi->options); sb->s_fs_info =NULL ;kfree (sbi);return error;
include/linux/sched/task.h +1 -1
@@ -75,7 +75,7 @@ extern long _do_fork(unsigned long, unsigned long, unsigned long, int __user *,extern long do_fork (unsigned long ,unsigned long ,unsigned long ,int __user *,int __user *);struct task_struct *fork_idle (int );extern pid_t kernel_thread (int (*fn)(void *),void *arg,unsigned long flags); -extern long kernel_wait4 (pid_t ,int *,int ,struct rusage *); +extern long kernel_wait4 (pid_t ,int __user *,int ,struct rusage *);extern void free_task (struct task_struct *tsk);
include/linux/skbuff.h +5 -5
@@ -624,6 +624,7 @@ typedef unsigned char *sk_buff_data_t;* @hash: the packet hash * @queue_mapping: Queue mapping for multiqueue devices * @xmit_more: More SKBs are pending for this queue +* @pfmemalloc: skbuff was allocated from PFMEMALLOC reserves * @ndisc_nodetype: router type (from link layer) * @ooo_okay: allow the mapping of a socket to a queue to be changed * @l4_hash: indicate hash is a canonical 4-tuple hash over transport
@@ -722,7 +723,7 @@ struct sk_buff { peeked:1, head_frag:1, xmit_more:1, - __unused:1; /* one bit hole */ + pfmemalloc:1;/* fields enclosed in headers_start/headers_end are copied * using a single memcpy() in __copy_skb_header()
@@ -741,31 +742,30 @@ struct sk_buff {__u8 __pkt_type_offset[0 ]; __u8 pkt_type:3; - __u8 pfmemalloc:1; __u8 ignore_df:1; - __u8 nf_trace:1; __u8 ip_summed:2; __u8 ooo_okay:1; + __u8 l4_hash:1; __u8 sw_hash:1; __u8 wifi_acked_valid:1; __u8 wifi_acked:1; - __u8 no_fcs:1;/* Indicates the inner headers are valid in the skbuff. */ __u8 encapsulation:1; __u8 encap_hdr_csum:1; __u8 csum_valid:1; + __u8 csum_complete_sw:1; __u8 csum_level:2; __u8 csum_not_inet:1; - __u8 dst_pending_confirm:1;#ifdef CONFIG_IPV6_NDISC_NODETYPE __u8 ndisc_nodetype:2;#endif __u8 ipvs_property:1; + __u8 inner_protocol_type:1; __u8 remcsum_offload:1;#ifdef CONFIG_NET_SWITCHDEV
include/net/ipv6.h +1 -1
@@ -795,7 +795,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,* to minimize possbility that any useful information to an * attacker is leaked. Only lower 20 bits are relevant. */ -rol32 (hash,16 ); + hash =rol32 (hash,16 ); flowlabel = (__force __be32 )hash &IPV6_FLOWLABEL_MASK ;
kernel/stop_machine.c +5 -1
@@ -270,7 +270,11 @@ static int cpu_stop_queue_two_works(int cpu1, struct cpu_stop_work *work1, goto retry; } -wake_up_q (&wakeq); +if (!err) { +preempt_disable (); +wake_up_q (&wakeq); +preempt_enable (); + }return err; }
lib/rhashtable.c +11 -6
@@ -878,8 +878,16 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_stop);static size_t rounded_hashtable_size (const struct rhashtable_params *params) { -return max (roundup_pow_of_two (params->nelem_hint *4 /3 ), - (unsigned long )params->min_size); +size_t retsize; + +if (params->nelem_hint) + retsize =max (roundup_pow_of_two (params->nelem_hint *4 /3 ), + (unsigned long )params->min_size); +else + retsize =max (HASH_DEFAULT_SIZE , + (unsigned long )params->min_size); + +return retsize; }static u32 rhashtable_jhash2 (const void *key,u32 length,u32 seed)
@@ -936,8 +944,6 @@ int rhashtable_init(struct rhashtable *ht,struct bucket_table *tbl;size_t size; - size =HASH_DEFAULT_SIZE ; -if ((!params->key_len && !params->obj_hashfn) || (params->obj_hashfn && !params->obj_cmpfn))return -EINVAL ;
@@ -964,8 +970,7 @@ int rhashtable_init(struct rhashtable *ht, ht->p.min_size =max_t (u16, ht->p.min_size,HASH_MIN_SIZE ); -if (params->nelem_hint) - size =rounded_hashtable_size (&ht->p); + size =rounded_hashtable_size (&ht->p);if (params->locks_mul) ht->p.locks_mul =roundup_pow_of_two (params->locks_mul);
mm/huge_memory.c +2 -0
@@ -2069,6 +2069,8 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd,if (vma_is_dax (vma))return ; page =pmd_page (_pmd); +if (!PageDirty (page) &&pmd_dirty (_pmd)) +set_page_dirty (page);if (!PageReferenced (page) &&pmd_young (_pmd))SetPageReferenced (page);page_remove_rmap (page, true);
mm/memcontrol.c +1 -1
@@ -879,7 +879,7 @@ static void invalidate_reclaim_iterators(struct mem_cgroup *dead_memcg)int nid;int i; -while ((memcg =parent_mem_cgroup (memcg))) { +for (; memcg; memcg =parent_mem_cgroup (memcg)) {for_each_node (nid) { mz =mem_cgroup_nodeinfo (memcg, nid);for (i =0 ; i <=DEF_PRIORITY ; i++) {
net/core/gen_stats.c +14 -2
@@ -77,8 +77,20 @@ gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type, d->lock = lock;spin_lock_bh (lock); } -if (d->tail) -return gnet_stats_copy (d, type,NULL ,0 , padattr); +if (d->tail) { +int ret =gnet_stats_copy (d, type,NULL ,0 , padattr); + +/* The initial attribute added in gnet_stats_copy() may be +* preceded by a padding attribute, in which case d->tail will +* end up pointing at the padding instead of the real attribute. +* Fix this so gnet_stats_finish_copy() adjusts the length of +* the right attribute. +*/ +if (ret ==0 && d->tail->nla_type == padattr) + d->tail = (struct nlattr *)((char *)d->tail + +NLA_ALIGN (d->tail->nla_len)); +return ret; + }return 0 ; }
net/core/skbuff.c +1 -0
@@ -858,6 +858,7 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb) n->cloned =1 ; n->nohdr =0 ; n->peeked =0 ; +C (pfmemalloc); n->destructor =NULL ;C (tail);C (end);
net/ipv4/fib_frontend.c +1 -0
@@ -290,6 +290,7 @@ __be32 fib_compute_spec_dst(struct sk_buff *skb)if (!ipv4_is_zeronet (ip_hdr (skb)->saddr)) {struct flowi4 fl4 = { .flowi4_iif =LOOPBACK_IFINDEX , + .flowi4_oif =l3mdev_master_ifindex_rcu (dev), .daddr =ip_hdr (skb)->saddr, .flowi4_tos =RT_TOS (ip_hdr (skb)->tos), .flowi4_scope = scope,
net/ipv4/sysctl_net_ipv4.c +3 -2
@@ -186,8 +186,9 @@ static int ipv4_ping_group_range(struct ctl_table *table, int write,if (write && ret ==0 ) { low =make_kgid (user_ns, urange[0 ]); high =make_kgid (user_ns, urange[1 ]); -if (!gid_valid (low) || !gid_valid (high) || - (urange[1 ] < urange[0 ]) ||gid_lt (high, low)) { +if (!gid_valid (low) || !gid_valid (high)) +return -EINVAL ; +if (urange[1 ] < urange[0 ] ||gid_lt (high, low)) { low =make_kgid (&init_user_ns,1 ); high =make_kgid (&init_user_ns,0 ); }
net/ipv4/tcp.c +1 -2
@@ -3415,8 +3415,7 @@ int tcp_abort(struct sock *sk, int err)struct request_sock *req =inet_reqsk (sk);local_bh_disable (); -inet_csk_reqsk_queue_drop_and_put (req->rsk_listener, - req); +inet_csk_reqsk_queue_drop (req->rsk_listener, req);local_bh_enable ();return 0 ; }
net/ipv6/Kconfig +1 -0
@@ -109,6 +109,7 @@ config IPV6_MIP6 config IPV6_ILA tristate "IPv6: Identifier Locator Addressing (ILA)" depends on NETFILTER + select DST_CACHE select LWTUNNEL ---help--- Support for IPv6 Identifier Locator Addressing (ILA).
net/ipv6/ndisc.c +1 -1
@@ -803,7 +803,7 @@ static void ndisc_recv_ns(struct sk_buff *skb)return ; } } -if (ndopts.nd_opts_nonce) +if (ndopts.nd_opts_nonce && ndopts.nd_opts_nonce->nd_opt_len ==1 )memcpy (&nonce, (u8 *)(ndopts.nd_opts_nonce +1 ),6 ); inc =ipv6_addr_is_multicast (daddr);
sound/core/rawmidi.c +14 -6
@@ -635,7 +635,7 @@ static int snd_rawmidi_info_select_user(struct snd_card *card,int snd_rawmidi_output_params (struct snd_rawmidi_substream *substream,struct snd_rawmidi_params * params) { -char *newbuf; +char *newbuf, *oldbuf;struct snd_rawmidi_runtime *runtime = substream->runtime;if (substream->append && substream->use_count >1 )
@@ -648,13 +648,17 @@ int snd_rawmidi_output_params(struct snd_rawmidi_substream *substream,return -EINVAL ; }if (params->buffer_size != runtime->buffer_size) { - newbuf =krealloc (runtime->buffer, params->buffer_size, -GFP_KERNEL ); + newbuf =kmalloc (params->buffer_size,GFP_KERNEL );if (!newbuf)return -ENOMEM ; +spin_lock_irq (&runtime->lock); + oldbuf = runtime->buffer; runtime->buffer = newbuf; runtime->buffer_size = params->buffer_size; runtime->avail = runtime->buffer_size; + runtime->appl_ptr = runtime->hw_ptr =0 ; +spin_unlock_irq (&runtime->lock); +kfree (oldbuf); } runtime->avail_min = params->avail_min; substream->active_sensing = !params->no_active_sensing;
@@ -665,7 +669,7 @@ EXPORT_SYMBOL(snd_rawmidi_output_params);int snd_rawmidi_input_params (struct snd_rawmidi_substream *substream,struct snd_rawmidi_params * params) { -char *newbuf; +char *newbuf, *oldbuf;struct snd_rawmidi_runtime *runtime = substream->runtime;snd_rawmidi_drain_input (substream);
@@ -676,12 +680,16 @@ int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream,return -EINVAL ; }if (params->buffer_size != runtime->buffer_size) { - newbuf =krealloc (runtime->buffer, params->buffer_size, -GFP_KERNEL ); + newbuf =kmalloc (params->buffer_size,GFP_KERNEL );if (!newbuf)return -ENOMEM ; +spin_lock_irq (&runtime->lock); + oldbuf = runtime->buffer; runtime->buffer = newbuf; runtime->buffer_size = params->buffer_size; + runtime->appl_ptr = runtime->hw_ptr =0 ; +spin_unlock_irq (&runtime->lock); +kfree (oldbuf); } runtime->avail_min = params->avail_min;return 0 ;
sound/pci/hda/patch_conexant.c +1 -0
@@ -965,6 +965,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {SND_PCI_QUIRK (0x103c ,0x8115 ,"HP Z1 Gen3" ,CXT_FIXUP_HP_GATE_MIC ),SND_PCI_QUIRK (0x103c ,0x814f ,"HP ZBook 15u G3" ,CXT_FIXUP_MUTE_LED_GPIO ),SND_PCI_QUIRK (0x103c ,0x822e ,"HP ProBook 440 G4" ,CXT_FIXUP_MUTE_LED_GPIO ), +SND_PCI_QUIRK (0x103c ,0x836e ,"HP ProBook 455 G5" ,CXT_FIXUP_MUTE_LED_GPIO ),SND_PCI_QUIRK (0x103c ,0x8299 ,"HP 800 G3 SFF" ,CXT_FIXUP_HP_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x103c ,0x829a ,"HP 800 G3 DM" ,CXT_FIXUP_HP_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x103c, 0x8455, "HP Z2 G4", CXT_FIXUP_HP_MIC_NO_PRESENCE),
sound/pci/hda/patch_realtek.c +1 -0
@@ -6402,6 +6402,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x10cf ,0x1629 ,"Lifebook U7x7" , ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),SND_PCI_QUIRK (0x10cf ,0x1845 ,"Lifebook U904" ,ALC269_FIXUP_LIFEBOOK_EXTMIC ),SND_PCI_QUIRK (0x10ec ,0x10f2 ,"Intel Reference board" ,ALC700_FIXUP_INTEL_REFERENCE ), +SND_PCI_QUIRK (0x10f7 ,0x8338 ,"Panasonic CF-SZ6" ,ALC269_FIXUP_HEADSET_MODE ),SND_PCI_QUIRK (0x144d ,0xc109 ,"Samsung Ativ book 9 (NP900X3G)" ,ALC269_FIXUP_INV_DMIC ),SND_PCI_QUIRK (0x144d ,0xc740 ,"Samsung Ativ book 8 (NP870Z5G)" ,ALC269_FIXUP_ATIV_BOOK_8 ), SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
virt/kvm/eventfd.c +5 -1
@@ -119,8 +119,12 @@ irqfd_shutdown(struct work_struct *work) {struct kvm_kernel_irqfd *irqfd = container_of(work, struct kvm_kernel_irqfd, shutdown); +struct kvm *kvm = irqfd->kvm;u64 cnt; +/* Make sure irqfd has been initalized in assign path. */ +synchronize_srcu (&kvm->irq_srcu); +/* * Synchronize with the wait-queue and unhook ourselves to prevent * further events.
@@ -387,7 +391,6 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args) idx =srcu_read_lock (&kvm->irq_srcu);irqfd_update (kvm, irqfd); -srcu_read_unlock (&kvm->irq_srcu, idx);list_add_tail (&irqfd->list, &kvm->irqfds.items);
@@ -421,6 +424,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args) }#endif +srcu_read_unlock (&kvm->irq_srcu, idx);return 0 ; fail: