Linux 4.14.140
Greg KH
maintainerI'm announcing the release of the 4.14.140 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:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/sysctl/net.txt | 8 + Makefile | 2 arch/arm/net/bpf_jit_32.c | 2 arch/arm64/include/asm/efi.h | 6 arch/arm64/include/asm/pgtable.h | 4 arch/arm64/kernel/ftrace.c | 21 +- arch/arm64/kernel/hw_breakpoint.c | 7 arch/arm64/kernel/return_address.c | 3 arch/arm64/kernel/stacktrace.c | 3 arch/arm64/net/bpf_jit_comp.c | 2 arch/mips/net/bpf_jit.c | 2 arch/mips/net/ebpf_jit.c | 2 arch/powerpc/net/bpf_jit_comp.c | 2 arch/powerpc/net/bpf_jit_comp64.c | 2 arch/s390/net/bpf_jit_comp.c | 2 arch/sh/kernel/hw_breakpoint.c | 1 arch/sparc/net/bpf_jit_comp_32.c | 2 arch/sparc/net/bpf_jit_comp_64.c | 2 arch/x86/include/asm/pgtable_64.h | 22 +-- arch/x86/mm/pgtable.c | 8 - arch/x86/net/bpf_jit_comp.c | 2 arch/xtensa/kernel/setup.c | 1 drivers/ata/libahci_platform.c | 3 drivers/ata/libata-zpodd.c | 2 drivers/clk/at91/clk-generated.c | 2 drivers/clk/renesas/renesas-cpg-mssr.c | 16 -- drivers/gpu/drm/bridge/Kconfig | 1 drivers/gpu/drm/msm/msm_drv.c | 3 drivers/hid/hid-holtek-kbd.c | 9 - drivers/hid/usbhid/hiddev.c | 12 + drivers/iio/adc/max9611.c | 2 drivers/infiniband/core/mad.c | 20 +- drivers/infiniband/core/user_mad.c | 6 drivers/input/joystick/iforce/iforce-usb.c | 5 drivers/input/mouse/trackpoint.h | 3 drivers/input/tablet/kbtab.c | 6 drivers/iommu/amd_iommu_init.c | 2 drivers/irqchip/irq-gic-v3-its.c | 2 drivers/irqchip/irq-imx-gpcv2.c | 1 drivers/mmc/host/sdhci-of-arasan.c | 3 drivers/net/bonding/bond_main.c | 4 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 7 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 2 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 17 +- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 97 ++++--------- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 drivers/net/team/team.c | 4 drivers/net/usb/pegasus.c | 2 drivers/net/xen-netback/netback.c | 2 drivers/scsi/hpsa.c | 12 + drivers/scsi/mpt3sas/mpt3sas_base.c | 12 - drivers/scsi/qla2xxx/qla_init.c | 2 drivers/staging/comedi/drivers/dt3000.c | 8 - drivers/usb/class/cdc-acm.c | 12 - drivers/usb/core/file.c | 10 - drivers/usb/core/message.c | 4 drivers/usb/gadget/udc/renesas_usb3.c | 5 drivers/usb/serial/option.c | 10 + drivers/xen/xen-pciback/conf_space_capability.c | 3 fs/ocfs2/xattr.c | 3 include/asm-generic/getorder.h | 50 ++---- include/kvm/arm_vgic.h | 1 include/linux/filter.h | 1 include/net/tcp.h | 3 include/net/xfrm.h | 1 kernel/bpf/core.c | 77 +++++++++- mm/memcontrol.c | 39 +++-- mm/usercopy.c | 2 net/bridge/netfilter/ebtables.c | 28 ++- net/core/sysctl_net_core.c | 75 +++++++++- net/netfilter/nf_conntrack_core.c | 16 +- net/packet/af_packet.c | 7 net/sctp/sm_sideeffect.c | 2 net/socket.c | 9 - net/xfrm/xfrm_device.c | 10 - net/xfrm/xfrm_policy.c | 138 ------------------- net/xfrm/xfrm_state.c | 5 scripts/Makefile.modpost | 2 sound/pci/hda/hda_generic.c | 21 ++ sound/pci/hda/hda_generic.h | 1 sound/pci/hda/hda_intel.c | 3 sound/pci/hda/patch_conexant.c | 15 -- sound/pci/hda/patch_realtek.c | 11 - tools/perf/util/header.c | 9 + virt/kvm/arm/arm.c | 10 + virt/kvm/arm/vgic/vgic-v2.c | 11 + virt/kvm/arm/vgic/vgic-v3.c | 7 virt/kvm/arm/vgic/vgic.c | 11 + virt/kvm/arm/vgic/vgic.h | 2 90 files changed, 531 insertions(+), 462 deletions(-)
Alan Stern (1):
USB: core: Fix races in character device registration and deregistraion
Bob Ham (1):
USB: serial: option: add the BroadMobi BM818 card
Codrin Ciubotariu (1):
clk: at91: generated: Truncate divisor to GENERATED_MAX_DIV + 1
Daniel Borkmann (4):
bpf: get rid of pure_initcall dependency to enable jits
bpf: restrict access to core bpf sysctls
bpf: add bpf_jit_limit knob to restrict unpriv allocations
bpf: fix bpf_jit_limit knob for PAGE_SIZE >= 64K
Denis Kirjanov (1):
net: usb: pegasus: fix improper read if get_registers() fail
Dirk Morris (1):
netfilter: conntrack: Use consistent ct id hash calculation
Don Brace (1):
scsi: hpsa: correct scsi command status issue after reset
Eric Dumazet (1):
net/packet: fix race in tpacket_snd()
Florian Westphal (2):
netfilter: ebtables: also count base chain policies
xfrm: policy: remove pcpu policy cache
Geert Uytterhoeven (1):
clk: renesas: cpg-mssr: Fix reset control race condition
Greg Kroah-Hartman (1):
Linux 4.14.140
Gustavo A. R. Silva (1):
sh: kernel: hw_breakpoint: Fix missing break in switch statement
Hillf Danton (2):
HID: hiddev: avoid opening a disconnected device
HID: hiddev: do cleanup in failure of opening a device
Hui Wang (2):
ALSA: hda - Add a generic reboot_notify
ALSA: hda - Let all conexant codec enter D3 when rebooting
Huy Nguyen (1):
net/mlx5e: Only support tx/rx pause setting for port owner
Ian Abbott (2):
staging: comedi: dt3000: Fix signed integer overflow 'divider * base'
staging: comedi: dt3000: Fix rounding up of timer divisor
Isaac J. Manjarres (1):
mm/usercopy: use memory range to be accessed for wraparound check
Jack Morgenstein (1):
IB/mad: Fix use-after-free in ib mad completion handling
Jacopo Mondi (1):
iio: adc: max9611: Fix temperature reading in probe
Jeffrey Hugo (1):
drm: msm: Fix add_gpu_components
Jia-Ju Bai (1):
scsi: qla2xxx: Fix possible fcport null-pointer dereferences
Joerg Roedel (1):
iommu/amd: Move iommu_init_pci() to .init section
Kees Cook (1):
libata: zpodd: Fix small read overflow in zpodd_get_mech_type()
Lucas Stach (1):
irqchip/irq-imx-gpcv2: Forward irq type to parent
Manish Chopra (1):
bnx2x: Fix VF's VLAN reconfiguration in reload.
Marc Zyngier (1):
KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block
Masahiro Yamada (1):
kbuild: modpost: handle KBUILD_EXTRA_SYMBOLS only for external modules
Masami Hiramatsu (1):
arm64: unwind: Prohibit probing on return_address()
Max Filippov (1):
xtensa: add missing isync to the cpu_reset TLB code
Maxim Mikityanskiy (1):
net/mlx5e: Use flow keys dissector to parse packets for ARFS
Michal Simek (1):
mmc: sdhci-of-arasan: Do now show error message in case of deffered probe
Miles Chen (1):
mm/memcontrol.c: fix use after free in mem_cgroup_iter()
Miquel Raynal (1):
ata: libahci: do not complain in case of deferred probe
Nadav Amit (1):
x86/mm: Use WRITE_ONCE() when setting PTEs
Nianyao Tang (1):
irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail
Numfor Mbiziwo-Tiapo (1):
perf header: Fix use of unitialized value warning
Oliver Neukum (5):
HID: holtek: test for sanity of intfdata
Input: kbtab - sanity check for endpoint type
Input: iforce - add sanity checks
usb: cdc-acm: make sure a refcount is taken early enough
USB: CDC: fix sanity checks in CDC union parser
Qian Cai (3):
arm64/efi: fix variable 'si' set but not used arm64/mm: fix variable 'pud' set but not used
asm-generic: fix -Wtype-limits compiler warnings
Rogan Dawes (1):
USB: serial: option: add D-Link DWM-222 device ID
Ross Lagerwall (1):
xen/netback: Reset nr_frags before freeing skb
Sasha Levin (1):
Revert "tcp: Clear sk_send_head after purging the write queue"
Suganath Prabu (1):
scsi: mpt3sas: Use 63-bit DMA addressing on SAS35 HBA
Takashi Iwai (1):
ALSA: hda - Apply workaround for another AMD chip 1022:1487
Tony Lindgren (1):
USB: serial: option: Add Motorola modem UARTs
Tony Luck (1):
IB/core: Add mitigation for Spectre V1
Vince Weaver (1):
perf header: Fix divide by zero error if f_header.attr_size==0
Wenwen Wang (2):
ALSA: hda - Fix a memory leak bug
net/mlx4_en: fix a memory leak bug
Will Deacon (2):
arm64: compat: Allow single-byte watchpoints on all addresses
arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side
Xin Long (1):
sctp: fix the transport error_count check
Yoshiaki Okamoto (1):
USB: serial: option: Add support for ZTE MF871A
Yoshihiro Shimoda (1):
usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role"
YueHaibing (6):
xen/pciback: remove set but not used variable 'old_state' drm/bridge: lvds-encoder: Fix build error while CONFIG_DRM_KMS_HELPER=m
ocfs2: remove set but not used variable 'last_hash'
Input: psmouse - fix build error of multiple definition
team: Add vlan tx offload to hw_enc_features
bonding: Add vlan tx offload to hw_enc_features
Greg KH
maintainerDocumentation/sysctl/net.txt +8 -0
@@ -91,6 +91,14 @@ Values : 0 - disable JIT kallsyms export (default value) 1 - enable JIT kallsyms export for privileged users only +bpf_jit_limit +------------- + +This enforces a global limit for memory allocations to the BPF JIT +compiler in order to reject unprivileged JIT requests once it has +been surpassed. bpf_jit_limit contains the value of the global limit +in bytes. + dev_weight --------------
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 139 +SUBLEVEL = 140 EXTRAVERSION = NAME = Petit Gorille
arch/arm/net/bpf_jit_32.c +0 -2
@@ -25,8 +25,6 @@#include "bpf_jit_32.h" -int bpf_jit_enable__read_mostly ; -/* * eBPF prog stack layout: *
arch/arm64/include/asm/efi.h +5 -1
@@ -89,7 +89,11 @@ static inline unsigned long efi_get_max_initrd_addr(unsigned long dram_base, ((protocol##_t *)instance)->f(instance, ##__VA_ARGS__) #define alloc_screen_info(x...) &screen_info -#define free_screen_info(x...) + +static inline void free_screen_info (efi_system_table_t *sys_table_arg, +struct screen_info *si) +{ +}/* redeclare as 'hidden' so the compiler will generate relative references */ extern struct screen_info screen_info __attribute__((__visibility__("hidden")));
arch/arm64/include/asm/pgtable.h +2 -2
@@ -394,8 +394,8 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, PMD_TYPE_SECT)#if defined(CONFIG_ARM64_64K_PAGES ) ||CONFIG_PGTABLE_LEVELS <3 -#define pud_sect (pud) (0) -#define pud_table (pud) (1) +static inline bool pud_sect (pud_t pud) {return false; } +static inline bool pud_table (pud_t pud) {return true; }#else #define pud_sect (pud) ((pud_val(pud) & PUD_TYPE_MASK) == \ PUD_TYPE_SECT)
arch/arm64/kernel/ftrace.c +12 -9
@@ -76,7 +76,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)if (offset < -SZ_128M || offset >=SZ_128M ) {#ifdef CONFIG_ARM64_MODULE_PLTS -struct plt_entry trampoline; +struct plt_entry trampoline, *dst;struct module *mod;/*
@@ -104,24 +104,27 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)* is added in the future, but for now, the pr_err() below * deals with a theoretical issue only. */ + dst = mod->arch.ftrace_trampoline; trampoline =get_plt_entry (addr); -if (!plt_entries_equal (mod->arch.ftrace_trampoline, - &trampoline)) { -if (!plt_entries_equal (mod->arch.ftrace_trampoline, - &(struct plt_entry ){})) { +if (!plt_entries_equal (dst, &trampoline)) { +if (!plt_entries_equal (dst, &(struct plt_entry ){})) {pr_err ("ftrace: far branches to multiple entry points unsupported inside a single module\n" );return -EINVAL ; }/* point the trampoline to our ftrace entry point */ module_disable_ro (mod); - *mod->arch.ftrace_trampoline = trampoline; + *dst = trampoline;module_enable_ro (mod, true); -/* update trampoline before patching in the branch */ -smp_wmb (); +/* +* Ensure updated trampoline is visible to instruction +* fetch before we patch in the branch. +*/ +flush_icache_range ((unsigned long )&dst[0 ], + (unsigned long )&dst[1 ]); } - addr = (unsigned long )(void *)mod->arch.ftrace_trampoline; + addr = (unsigned long )dst;#else /* CONFIG_ARM64_MODULE_PLTS */ return -EINVAL ;#endif /* CONFIG_ARM64_MODULE_PLTS */
arch/arm64/kernel/hw_breakpoint.c +4 -3
@@ -548,13 +548,14 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)/* Aligned */ break ;case 1 : -/* Allow single byte watchpoint. */ -if (info->ctrl.len ==ARM_BREAKPOINT_LEN_1 ) -break ;case 2 :/* Allow halfword watchpoints and breakpoints. */ if (info->ctrl.len ==ARM_BREAKPOINT_LEN_2 )break ; +case 3 : +/* Allow single byte watchpoint. */ +if (info->ctrl.len ==ARM_BREAKPOINT_LEN_1 ) +break ;default :return -EINVAL ; }
arch/arm64/kernel/return_address.c +3 -0
@@ -11,6 +11,7 @@#include <linux/export.h> #include <linux/ftrace.h> +#include <linux/kprobes.h> #include <asm/stack_pointer.h> #include <asm/stacktrace.h>
@@ -32,6 +33,7 @@ static int save_return_addr(struct stackframe *frame, void *d)return 0 ; } } +NOKPROBE_SYMBOL (save_return_addr);void *return_address (unsigned int level) {
@@ -55,3 +57,4 @@ void *return_address(unsigned int level)return NULL ; }EXPORT_SYMBOL_GPL (return_address); +NOKPROBE_SYMBOL (return_address);
arch/arm64/kernel/stacktrace.c +3 -0
@@ -18,6 +18,7 @@#include <linux/kernel.h> #include <linux/export.h> #include <linux/ftrace.h> +#include <linux/kprobes.h> #include <linux/sched.h> #include <linux/sched/debug.h> #include <linux/sched/task_stack.h>
@@ -85,6 +86,7 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)return 0 ; } +NOKPROBE_SYMBOL (unwind_frame); void notrace walk_stackframe(struct task_struct *tsk, struct stackframe *frame,int (*fn)(struct stackframe *,void *),void *data)
@@ -99,6 +101,7 @@ void notrace walk_stackframe(struct task_struct *tsk, struct stackframe *frame,break ; } } +NOKPROBE_SYMBOL (walk_stackframe);#ifdef CONFIG_STACKTRACE struct stack_trace_data {
arch/arm64/net/bpf_jit_comp.c +0 -2
@@ -31,8 +31,6 @@#include "bpf_jit.h" -int bpf_jit_enable__read_mostly ; -#define TMP_REG_1 (MAX_BPF_JIT_REG + 0)#define TMP_REG_2 (MAX_BPF_JIT_REG + 1)#define TCALL_CNT (MAX_BPF_JIT_REG + 2)
arch/mips/net/bpf_jit.c +0 -2
@@ -1207,8 +1207,6 @@ static int build_body(struct jit_ctx *ctx)return 0 ; } -int bpf_jit_enable__read_mostly ; -void bpf_jit_compile (struct bpf_prog *fp) {struct jit_ctx ctx;
arch/mips/net/ebpf_jit.c +0 -2
@@ -177,8 +177,6 @@ static u32 b_imm(unsigned int tgt, struct jit_ctx *ctx) (ctx->idx *4 ) -4 ; } -int bpf_jit_enable__read_mostly ; -enum which_ebpf_reg { src_reg, src_reg_no_fp,
arch/powerpc/net/bpf_jit_comp.c +0 -2
@@ -18,8 +18,6 @@#include "bpf_jit32.h" -int bpf_jit_enable__read_mostly ; -static inline void bpf_flush_icache (void *start,void *end) {smp_wmb ();
arch/powerpc/net/bpf_jit_comp64.c +0 -2
@@ -21,8 +21,6 @@#include "bpf_jit64.h" -int bpf_jit_enable__read_mostly ; -static void bpf_jit_fill_ill_insns (void *area,unsigned int size) {memset32 (area,BREAKPOINT_INSTRUCTION , size/4 );
arch/s390/net/bpf_jit_comp.c +0 -2
@@ -30,8 +30,6 @@#include <asm/set_memory.h> #include "bpf_jit.h" -int bpf_jit_enable__read_mostly ; -struct bpf_jit {u32 seen;/* Flags to remember seen eBPF instructions */ u32 seen_reg[16 ];/* Array to remember which registers are used */
arch/sh/kernel/hw_breakpoint.c +1 -0
@@ -161,6 +161,7 @@ int arch_bp_generic_fields(int sh_len, int sh_type,switch (sh_type) {case SH_BREAKPOINT_READ : *gen_type =HW_BREAKPOINT_R ; +break ;case SH_BREAKPOINT_WRITE : *gen_type =HW_BREAKPOINT_W ;break ;
arch/sparc/net/bpf_jit_comp_32.c +0 -2
@@ -11,8 +11,6 @@#include "bpf_jit_32.h" -int bpf_jit_enable__read_mostly ; -static inline bool is_simm13 (unsigned int value) {return value +0x1000 <0x2000 ;
arch/sparc/net/bpf_jit_comp_64.c +0 -2
@@ -12,8 +12,6 @@#include "bpf_jit_64.h" -int bpf_jit_enable__read_mostly ; -static inline bool is_simm13 (unsigned int value) {return value +0x1000 <0x2000 ;
arch/x86/include/asm/pgtable_64.h +11 -11
@@ -56,15 +56,15 @@ struct mm_struct;void set_pte_vaddr_p4d (p4d_t *p4d_page,unsigned long vaddr,pte_t new_pte);void set_pte_vaddr_pud (pud_t *pud_page,unsigned long vaddr,pte_t new_pte); -static inline void native_pte_clear (struct mm_struct *mm,unsigned long addr, -pte_t *ptep) +static inline void native_set_pte (pte_t *ptep,pte_t pte) { - *ptep =native_make_pte (0 ); +WRITE_ONCE (*ptep, pte); } -static inline void native_set_pte (pte_t *ptep,pte_t pte) +static inline void native_pte_clear (struct mm_struct *mm,unsigned long addr, +pte_t *ptep) { - *ptep = pte; +native_set_pte (ptep,native_make_pte (0 )); }static inline void native_set_pte_atomic (pte_t *ptep,pte_t pte)
@@ -74,7 +74,7 @@ static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)static inline void native_set_pmd (pmd_t *pmdp,pmd_t pmd) { - *pmdp = pmd; +WRITE_ONCE (*pmdp, pmd); }static inline void native_pmd_clear (pmd_t *pmd)
@@ -110,7 +110,7 @@ static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp)static inline void native_set_pud (pud_t *pudp,pud_t pud) { - *pudp = pud; +WRITE_ONCE (*pudp, pud); }static inline void native_pud_clear (pud_t *pud)
@@ -220,9 +220,9 @@ static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd)static inline void native_set_p4d (p4d_t *p4dp,p4d_t p4d) {#if defined(CONFIG_PAGE_TABLE_ISOLATION ) && !defined(CONFIG_X86_5LEVEL ) - p4dp->pgd =pti_set_user_pgd (&p4dp->pgd, p4d.pgd); +WRITE_ONCE (p4dp->pgd,pti_set_user_pgd (&p4dp->pgd, p4d.pgd));#else - *p4dp = p4d; +WRITE_ONCE (*p4dp, p4d);#endif }
@@ -238,9 +238,9 @@ static inline void native_p4d_clear(p4d_t *p4d)static inline void native_set_pgd (pgd_t *pgdp,pgd_t pgd) {#ifdef CONFIG_PAGE_TABLE_ISOLATION - *pgdp =pti_set_user_pgd (pgdp, pgd); +WRITE_ONCE (*pgdp,pti_set_user_pgd (pgdp, pgd));#else - *pgdp = pgd; +WRITE_ONCE (*pgdp, pgd);#endif }
arch/x86/mm/pgtable.c +4 -4
@@ -260,7 +260,7 @@ static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp)if (pgd_val (pgd) !=0 ) {pmd_t *pmd = (pmd_t *)pgd_page_vaddr (pgd); - pgdp[i] =native_make_pgd (0 ); +pgd_clear (&pgdp[i]);paravirt_release_pmd (pgd_val (pgd) >>PAGE_SHIFT );pmd_free (mm, pmd);
@@ -430,7 +430,7 @@ int ptep_set_access_flags(struct vm_area_struct *vma,int changed = !pte_same (*ptep, entry);if (changed && dirty) - *ptep = entry; +set_pte (ptep, entry);return changed; }
@@ -445,7 +445,7 @@ int pmdp_set_access_flags(struct vm_area_struct *vma,VM_BUG_ON (address & ~HPAGE_PMD_MASK );if (changed && dirty) { - *pmdp = entry; +set_pmd (pmdp, entry);/* * We had a write-protection fault here and changed the pmd * to to more permissive. No need to flush the TLB for that,
@@ -465,7 +465,7 @@ int pudp_set_access_flags(struct vm_area_struct *vma, unsigned long address,VM_BUG_ON (address & ~HPAGE_PUD_MASK );if (changed && dirty) { - *pudp = entry; +set_pud (pudp, entry);/* * We had a write-protection fault here and changed the pud * to to more permissive. No need to flush the TLB for that,
arch/x86/net/bpf_jit_comp.c +0 -2
@@ -16,8 +16,6 @@#include <asm/nospec-branch.h> #include <linux/bpf.h> -int bpf_jit_enable__read_mostly ; -/* * assembly code in arch/x86/net/bpf_jit.S */
arch/xtensa/kernel/setup.c +1 -0
@@ -508,6 +508,7 @@ void cpu_reset(void)"add %2, %2, %7\n\t" "addi %0, %0, -1\n\t" "bnez %0, 1b\n\t" +"isync\n\t" /* Jump to identity mapping */ "jx %3\n" "2:\n\t"
drivers/ata/libahci_platform.c +3 -0
@@ -300,6 +300,9 @@ static int ahci_platform_get_phy(struct ahci_host_priv *hpriv, u32 port, hpriv->phys[port] =NULL ; rc =0 ;break ; +case -EPROBE_DEFER : +/* Do not complain yet */ +break ;default : dev_err(dev,
drivers/ata/libata-zpodd.c +1 -1
@@ -56,7 +56,7 @@ static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev)unsigned int ret;struct rm_feature_desc *desc;struct ata_taskfile tf; -static const char cdb[] = {GPCMD_GET_CONFIGURATION , +static const char cdb[ATAPI_CDB_LEN ] = {GPCMD_GET_CONFIGURATION ,2 ,/* only 1 feature descriptor requested */ 0 ,3 ,/* 3, removable medium feature */ 0 ,0 ,0 ,/* reserved */
drivers/clk/at91/clk-generated.c +2 -0
@@ -153,6 +153,8 @@ static int clk_generated_determine_rate(struct clk_hw *hw,continue ; div =DIV_ROUND_CLOSEST (parent_rate, req->rate); +if (div >GENERATED_MAX_DIV +1 ) + div =GENERATED_MAX_DIV +1 ;clk_generated_best_diff (req, parent, parent_rate, div, &best_diff, &best_rate);
drivers/clk/renesas/renesas-cpg-mssr.c +2 -14
@@ -522,17 +522,11 @@ static int cpg_mssr_reset(struct reset_controller_dev *rcdev,unsigned int reg = id /32 ;unsigned int bit = id %32 ;u32 bitmask =BIT (bit); -unsigned long flags; -u32 value;dev_dbg (priv->dev,"reset %u%02u\n" , reg, bit);/* Reset module */ -spin_lock_irqsave (&priv->rmw_lock, flags); - value =readl (priv->base +SRCR (reg)); - value |= bitmask; -writel (value, priv->base +SRCR (reg)); -spin_unlock_irqrestore (&priv->rmw_lock, flags); +writel (bitmask, priv->base +SRCR (reg));/* Wait for at least one cycle of the RCLK clock (@ ca. 32 kHz) */ udelay (35 );
@@ -549,16 +543,10 @@ static int cpg_mssr_assert(struct reset_controller_dev *rcdev, unsigned long id)unsigned int reg = id /32 ;unsigned int bit = id %32 ;u32 bitmask =BIT (bit); -unsigned long flags; -u32 value;dev_dbg (priv->dev,"assert %u%02u\n" , reg, bit); -spin_lock_irqsave (&priv->rmw_lock, flags); - value =readl (priv->base +SRCR (reg)); - value |= bitmask; -writel (value, priv->base +SRCR (reg)); -spin_unlock_irqrestore (&priv->rmw_lock, flags); +writel (bitmask, priv->base +SRCR (reg));return 0 ; }
drivers/gpu/drm/bridge/Kconfig +1 -0
@@ -35,6 +35,7 @@ config DRM_DUMB_VGA_DAC config DRM_LVDS_ENCODER tristate "Transparent parallel to LVDS encoder support" depends on OF + select DRM_KMS_HELPER select DRM_PANEL_BRIDGE help Support for transparent parallel to LVDS encoders that don't require
drivers/gpu/drm/msm/msm_drv.c +2 -1
@@ -1060,7 +1060,8 @@ static int add_gpu_components(struct device *dev,if (!np)return 0 ; -drm_of_component_match_add (dev, matchptr, compare_of, np); +if (of_device_is_available (np)) +drm_of_component_match_add (dev, matchptr, compare_of, np);of_node_put (np);
drivers/hid/hid-holtek-kbd.c +7 -2
@@ -126,9 +126,14 @@ static int holtek_kbd_input_event(struct input_dev *dev, unsigned int type,/* Locate the boot interface, to receive the LED change events */ struct usb_interface *boot_interface =usb_ifnum_to_if (usb_dev,0 ); +struct hid_device *boot_hid; +struct hid_input *boot_hid_input; -struct hid_device *boot_hid =usb_get_intfdata (boot_interface); -struct hid_input *boot_hid_input =list_first_entry (&boot_hid->inputs, +if (unlikely (boot_interface ==NULL )) +return -ENODEV ; + + boot_hid =usb_get_intfdata (boot_interface); + boot_hid_input =list_first_entry (&boot_hid->inputs, struct hid_input, list); return boot_hid_input->input->event(boot_hid_input->input, type, code,
drivers/hid/usbhid/hiddev.c +12 -0
@@ -297,6 +297,14 @@ static int hiddev_open(struct inode *inode, struct file *file)spin_unlock_irq (&list->hiddev->list_lock);mutex_lock (&hiddev->existancelock); +/* +* recheck exist with existance lock held to +* avoid opening a disconnected device +*/ +if (!list->hiddev->exist) { + res = -ENODEV ; + goto bail_unlock; + }if (!list->hiddev->open++)if (list->hiddev->exist) {struct hid_device *hid = hiddev->hid;
@@ -313,6 +321,10 @@ static int hiddev_open(struct inode *inode, struct file *file)hid_hw_power (hid,PM_HINT_NORMAL ); bail_unlock:mutex_unlock (&hiddev->existancelock); + +spin_lock_irq (&list->hiddev->list_lock); +list_del (&list->node); +spin_unlock_irq (&list->hiddev->list_lock); bail: file->private_data =NULL ;vfree (list);
drivers/iio/adc/max9611.c +1 -1
@@ -484,7 +484,7 @@ static int max9611_init(struct max9611_dev *max9611)if (ret)return ret; - regval = ret &MAX9611_TEMP_MASK ; + regval &=MAX9611_TEMP_MASK ; if ((regval > MAX9611_TEMP_MAX_POS && regval < MAX9611_TEMP_MIN_NEG) ||
drivers/infiniband/core/mad.c +10 -10
@@ -3170,18 +3170,18 @@ static int ib_mad_port_open(struct ib_device *device,if (has_smi) cq_size *=2 ; + port_priv->pd =ib_alloc_pd (device,0 ); +if (IS_ERR (port_priv->pd)) { +dev_err (&device->dev,"Couldn't create ib_mad PD\n" ); + ret =PTR_ERR (port_priv->pd); + goto error3; + } + port_priv->cq =ib_alloc_cq (port_priv->device, port_priv, cq_size,0 ,IB_POLL_WORKQUEUE );if (IS_ERR (port_priv->cq)) {dev_err (&device->dev,"Couldn't create ib_mad CQ\n" ); ret =PTR_ERR (port_priv->cq); - goto error3; - } - - port_priv->pd =ib_alloc_pd (device,0 ); -if (IS_ERR (port_priv->pd)) { -dev_err (&device->dev,"Couldn't create ib_mad PD\n" ); - ret =PTR_ERR (port_priv->pd); goto error4; }
@@ -3224,11 +3224,11 @@ static int ib_mad_port_open(struct ib_device *device, error7:destroy_mad_qp (&port_priv->qp_info[0 ]); error6: -ib_dealloc_pd (port_priv->pd); -error4:ib_free_cq (port_priv->cq);cleanup_recv_queue (&port_priv->qp_info[1 ]);cleanup_recv_queue (&port_priv->qp_info[0 ]); +error4: +ib_dealloc_pd (port_priv->pd); error3:kfree (port_priv);
@@ -3258,8 +3258,8 @@ static int ib_mad_port_close(struct ib_device *device, int port_num)destroy_workqueue (port_priv->wq);destroy_mad_qp (&port_priv->qp_info[1 ]);destroy_mad_qp (&port_priv->qp_info[0 ]); -ib_dealloc_pd (port_priv->pd);ib_free_cq (port_priv->cq); +ib_dealloc_pd (port_priv->pd);cleanup_recv_queue (&port_priv->qp_info[1 ]);cleanup_recv_queue (&port_priv->qp_info[0 ]);/* XXX: Handle deallocation of MAD registration tables */
drivers/infiniband/core/user_mad.c +5 -1
@@ -49,6 +49,7 @@#include <linux/sched.h> #include <linux/semaphore.h> #include <linux/slab.h> +#include <linux/nospec.h> #include <linux/uaccess.h>
@@ -856,11 +857,14 @@ static int ib_umad_unreg_agent(struct ib_umad_file *file, u32 __user *arg)if (get_user (id, arg))return -EFAULT ; +if (id >=IB_UMAD_MAX_AGENTS ) +return -EINVAL ;mutex_lock (&file->port->file_mutex);mutex_lock (&file->mutex); -if (id >=IB_UMAD_MAX_AGENTS || !__get_agent (file, id)) { + id =array_index_nospec (id,IB_UMAD_MAX_AGENTS ); +if (!__get_agent (file, id)) { ret = -EINVAL ; goto out; }
drivers/input/joystick/iforce/iforce-usb.c +5 -0
@@ -145,7 +145,12 @@ static int iforce_usb_probe(struct usb_interface *intf,return -ENODEV ; epirq = &interface->endpoint[0 ].desc; +if (!usb_endpoint_is_int_in (epirq)) +return -ENODEV ; + epout = &interface->endpoint[1 ].desc; +if (!usb_endpoint_is_int_out (epout)) +return -ENODEV ;if (!(iforce =kzalloc (sizeof (struct iforce ) +32 ,GFP_KERNEL ))) goto fail;
drivers/input/mouse/trackpoint.h +2 -1
@@ -161,7 +161,8 @@ struct trackpoint_data {#ifdef CONFIG_MOUSE_PS2_TRACKPOINT int trackpoint_detect (struct psmouse *psmouse,bool set_properties);#else -inline int trackpoint_detect (struct psmouse *psmouse,bool set_properties) +static inline int trackpoint_detect (struct psmouse *psmouse, +bool set_properties) {return -ENOSYS ; }
drivers/input/tablet/kbtab.c +4 -2
@@ -125,6 +125,10 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *iif (intf->cur_altsetting->desc.bNumEndpoints <1 )return -ENODEV ; + endpoint = &intf->cur_altsetting->endpoint[0 ].desc; +if (!usb_endpoint_is_int_in (endpoint)) +return -ENODEV ; + kbtab =kzalloc (sizeof (struct kbtab ),GFP_KERNEL ); input_dev =input_allocate_device ();if (!kbtab || !input_dev)
@@ -163,8 +167,6 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *iinput_set_abs_params (input_dev,ABS_Y ,0 ,0x1750 ,4 ,0 );input_set_abs_params (input_dev,ABS_PRESSURE ,0 ,0xff ,0 ,0 ); - endpoint = &intf->cur_altsetting->endpoint[0 ].desc; - usb_fill_int_urb(kbtab->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress), kbtab->data, 8,
drivers/iommu/amd_iommu_init.c +1 -1
@@ -1692,7 +1692,7 @@ static const struct attribute_group *amd_iommu_groups[] = { NULL, }; -static int iommu_init_pci (struct amd_iommu *iommu) +static int __init iommu_init_pci (struct amd_iommu *iommu) {int cap_ptr = iommu->cap_ptr;u32 range, misc, low, high;
drivers/irqchip/irq-gic-v3-its.c +1 -1
@@ -2631,7 +2631,7 @@ static int its_vpe_init(struct its_vpe *vpe)if (!its_alloc_vpe_table (vpe_id)) {its_vpe_id_free (vpe_id); -its_free_pending_table (vpe->vpt_page); +its_free_pending_table (vpt_page);return -ENOMEM ; }
drivers/irqchip/irq-imx-gpcv2.c +1 -0
@@ -145,6 +145,7 @@ static struct irq_chip gpcv2_irqchip_data_chip = { .irq_unmask = imx_gpcv2_irq_unmask, .irq_set_wake = imx_gpcv2_irq_set_wake, .irq_retrigger = irq_chip_retrigger_hierarchy, + .irq_set_type = irq_chip_set_type_parent,#ifdef CONFIG_SMP .irq_set_affinity = irq_chip_set_affinity_parent,#endif
drivers/mmc/host/sdhci-of-arasan.c +2 -1
@@ -638,7 +638,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev) ret =mmc_of_parse (host->mmc);if (ret) { -dev_err (&pdev->dev,"parsing dt failed (%d)\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_err (&pdev->dev,"parsing dt failed (%d)\n" , ret); goto unreg_clk; }
drivers/net/bonding/bond_main.c +3 -1
@@ -1108,7 +1108,9 @@ static void bond_compute_features(struct bonding *bond) done: bond_dev->vlan_features = vlan_features; - bond_dev->hw_enc_features = enc_features |NETIF_F_GSO_ENCAP_ALL ; + bond_dev->hw_enc_features = enc_features |NETIF_F_GSO_ENCAP_ALL | +NETIF_F_HW_VLAN_CTAG_TX | +NETIF_F_HW_VLAN_STAG_TX ; bond_dev->gso_max_segs = gso_max_segs;netif_set_gso_max_size (bond_dev, gso_max_size);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +4 -3
@@ -3057,12 +3057,13 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode, bool keep_link)/* if VF indicate to PF this function is going down (PF will delete sp * elements and clear initializations */ -if (IS_VF (bp)) +if (IS_VF (bp)) { +bnx2x_clear_vlan_info (bp);bnx2x_vfpf_close_vf (bp); -else if (unload_mode !=UNLOAD_RECOVERY ) + }else if (unload_mode !=UNLOAD_RECOVERY ) {/* if this is a normal/close unload need to clean up chip*/ bnx2x_chip_cleanup (bp, unload_mode, keep_link); -else { + }else {/* Send the UNLOAD_REQUEST to the MCP */ bnx2x_send_unload_req (bp, unload_mode);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +2 -0
@@ -425,6 +425,8 @@ void bnx2x_set_reset_global(struct bnx2x *bp);void bnx2x_disable_close_the_gate (struct bnx2x *bp);int bnx2x_init_hw_func_cnic (struct bnx2x *bp); +void bnx2x_clear_vlan_info (struct bnx2x *bp); +/** * bnx2x_sp_event - handle ramrods completion. *
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +12 -5
@@ -8488,11 +8488,21 @@ int bnx2x_set_vlan_one(struct bnx2x *bp, u16 vlan,return rc; } +void bnx2x_clear_vlan_info (struct bnx2x *bp) +{ +struct bnx2x_vlan_entry *vlan; + +/* Mark that hw forgot all entries */ +list_for_each_entry (vlan, &bp->vlan_reg, link) + vlan->hw = false; + + bp->vlan_cnt =0 ; +} +static int bnx2x_del_all_vlans (struct bnx2x *bp) {struct bnx2x_vlan_mac_obj *vlan_obj = &bp->sp_objs[0 ].vlan_obj;unsigned long ramrod_flags =0 , vlan_flags =0 ; -struct bnx2x_vlan_entry *vlan;int rc;__set_bit (RAMROD_COMP_WAIT , &ramrod_flags);
@@ -8501,10 +8511,7 @@ static int bnx2x_del_all_vlans(struct bnx2x *bp)if (rc)return rc; -/* Mark that hw forgot all entries */ -list_for_each_entry (vlan, &bp->vlan_reg, link) - vlan->hw = false; - bp->vlan_cnt =0 ; +bnx2x_clear_vlan_info (bp);return 0 ; }
drivers/net/ethernet/mellanox/mlx4/en_rx.c +2 -1
@@ -1193,7 +1193,7 @@ int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv) err =mlx4_qp_alloc (mdev->dev, priv->base_qpn, rss_map->indir_qp);if (err) {en_err (priv,"Failed to allocate RSS indirection QP\n" ); - goto rss_err; + goto qp_alloc_err; } rss_map->indir_qp->event = mlx4_en_sqp_event;
@@ -1247,6 +1247,7 @@ int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv) MLX4_QP_STATE_RST, NULL, 0, 0, rss_map->indir_qp);mlx4_qp_remove (mdev->dev, rss_map->indir_qp);mlx4_qp_free (mdev->dev, rss_map->indir_qp); +qp_alloc_err:kfree (rss_map->indir_qp); rss_map->indir_qp =NULL ; rss_err:
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c +34 -63
161 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +3 -0
@@ -1400,6 +1400,9 @@ static int mlx5e_set_pauseparam(struct net_device *netdev,struct mlx5_core_dev *mdev = priv->mdev;int err; +if (!MLX5_CAP_GEN (mdev, vport_group_manager)) +return -EOPNOTSUPP ; +if (pauseparam->autoneg)return -EINVAL ;
drivers/net/team/team.c +3 -1
@@ -1014,7 +1014,9 @@ static void __team_compute_features(struct team *team) } team->dev->vlan_features = vlan_features; - team->dev->hw_enc_features = enc_features |NETIF_F_GSO_ENCAP_ALL ; + team->dev->hw_enc_features = enc_features |NETIF_F_GSO_ENCAP_ALL | +NETIF_F_HW_VLAN_CTAG_TX | +NETIF_F_HW_VLAN_STAG_TX ; team->dev->hard_header_len = max_hard_header_len; team->dev->priv_flags &= ~IFF_XMIT_DST_RELEASE ;
drivers/net/usb/pegasus.c +1 -1
@@ -285,7 +285,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int loc, int val)static int read_eprom_word (pegasus_t *pegasus,__u8 index,__u16 *retdata) {int i; -__u8 tmp; +__u8 tmp =0 ;__le16 retdatai;int ret;
drivers/net/xen-netback/netback.c +2 -0
@@ -927,6 +927,7 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,skb_shinfo (skb)->nr_frags =MAX_SKB_FRAGS ; nskb =xenvif_alloc_skb (0 );if (unlikely (nskb ==NULL )) { +skb_shinfo (skb)->nr_frags =0 ;kfree_skb (skb);xenvif_tx_err (queue, &txreq, extra_count, idx);if (net_ratelimit ())
@@ -942,6 +943,7 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,if (xenvif_set_skb_gso (queue->vif, skb, gso)) {/* Failure in xenvif_set_skb_gso is fatal. */ +skb_shinfo (skb)->nr_frags =0 ;kfree_skb (skb);kfree_skb (nskb);break ;
drivers/scsi/hpsa.c +11 -1
@@ -2266,6 +2266,8 @@ static int handle_ioaccel_mode2_error(struct ctlr_info *h,case IOACCEL2_SERV_RESPONSE_COMPLETE :switch (c2->error_data.status) {case IOACCEL2_STATUS_SR_TASK_COMP_GOOD : +if (cmd) + cmd->result =0 ;break ;case IOACCEL2_STATUS_SR_TASK_COMP_CHK_COND : cmd->result |=SAM_STAT_CHECK_CONDITION ;
@@ -2425,8 +2427,10 @@ static void process_ioaccel2_completion(struct ctlr_info *h,/* check for good status */ if (likely (c2->error_data.serv_response ==0 && - c2->error_data.status ==0 )) + c2->error_data.status ==0 )) { + cmd->result =0 ;return hpsa_cmd_free_and_done (h, c, cmd); + }/* * Any RAID offload error results in retry which will use
@@ -5494,6 +5498,12 @@ static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd) } c =cmd_tagged_alloc (h, cmd); +/* +* This is necessary because the SML doesn't zero out this field during +* error recovery. +*/ + cmd->result =0 ; +/* * Call alternate submit routine for I/O accelerated commands. * Retries always go down the normal I/O path.
drivers/scsi/mpt3sas/mpt3sas_base.c +7 -5
@@ -1724,9 +1724,11 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev) {struct sysinfo s;u64 consistent_dma_mask; +/* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */ +int dma_mask = (ioc->hba_mpi_version_belonged >MPI2_VERSION ) ?63 :64 ;if (ioc->dma_mask) - consistent_dma_mask =DMA_BIT_MASK (64 ); + consistent_dma_mask =DMA_BIT_MASK (dma_mask);else consistent_dma_mask =DMA_BIT_MASK (32 );
@@ -1734,11 +1736,11 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev)const uint64_t required_mask =dma_get_required_mask (&pdev->dev);if ((required_mask >DMA_BIT_MASK (32 )) && - !pci_set_dma_mask (pdev,DMA_BIT_MASK (64 )) && + !pci_set_dma_mask (pdev,DMA_BIT_MASK (dma_mask)) && !pci_set_consistent_dma_mask (pdev, consistent_dma_mask)) { ioc->base_add_sg_single = &_base_add_sg_single_64; ioc->sge_size =sizeof (Mpi2SGESimple64_t); - ioc->dma_mask =64 ; + ioc->dma_mask = dma_mask; goto out; } }
@@ -1764,7 +1766,7 @@ static int _base_change_consistent_dma_mask(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev) { - if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { + if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(ioc->dma_mask))) { if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) return -ENODEV; }
@@ -3477,7 +3479,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc) total_sz += sz; }while (ioc->rdpq_array_enable && (++i < ioc->reply_queue_count)); -if (ioc->dma_mask ==64 ) { +if (ioc->dma_mask >32 ) {if (_base_change_consistent_dma_mask (ioc, ioc->pdev) !=0 ) { pr_warn(MPT3SAS_FMT "no suitable consistent DMA mask for %s\n",
drivers/scsi/qla2xxx/qla_init.c +1 -1
@@ -4252,7 +4252,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)ql_log (ql_log_warn, vha,0xd049 ,"Failed to allocate ct_sns request.\n" );kfree (fcport); - fcport =NULL ; +return NULL ; }INIT_WORK (&fcport->del_work, qla24xx_delete_sess_fn);INIT_LIST_HEAD (&fcport->gnl_entry);
drivers/staging/comedi/drivers/dt3000.c +4 -4
@@ -351,9 +351,9 @@ static irqreturn_t dt3k_interrupt(int irq, void *d)static int dt3k_ns_to_timer (unsigned int timer_base,unsigned int *nanosec,unsigned int flags) { -int divider, base, prescale; +unsigned int divider, base, prescale; -/* This function needs improvment */ +/* This function needs improvement */ /* Don't know if divider==0 works. */ for (prescale =0 ; prescale <16 ; prescale++) {
@@ -367,7 +367,7 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec, divider = (*nanosec) / base;break ;case CMDF_ROUND_UP : - divider = (*nanosec) / base; + divider =DIV_ROUND_UP (*nanosec, base);break ; }if (divider <65536 ) {
@@ -377,7 +377,7 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec, } prescale =15 ; - base = timer_base * (1 << prescale); + base = timer_base * (prescale +1 ); divider =65535 ; *nanosec = divider * base;return (prescale <<16 ) | (divider);
drivers/usb/class/cdc-acm.c +7 -5
@@ -1342,10 +1342,6 @@ static int acm_probe(struct usb_interface *intf,if (acm ==NULL ) goto alloc_fail; - minor =acm_alloc_minor (acm); -if (minor <0 ) - goto alloc_fail1; - ctrlsize =usb_endpoint_maxp (epctrl); readsize =usb_endpoint_maxp (epread) * (quirks ==SINGLE_RX_URB ?1 :2 );
@@ -1353,6 +1349,13 @@ static int acm_probe(struct usb_interface *intf, acm->writesize =usb_endpoint_maxp (epwrite) *20 ; acm->control = control_interface; acm->data = data_interface; + +usb_get_intf (acm->control);/* undone in destruct() */ + + minor =acm_alloc_minor (acm); +if (minor <0 ) + goto alloc_fail1; + acm->minor = minor; acm->dev = usb_dev;if (h.usb_cdc_acm_descriptor)
@@ -1501,7 +1504,6 @@ static int acm_probe(struct usb_interface *intf,usb_driver_claim_interface (&acm_driver, data_interface, acm);usb_set_intfdata (data_interface, acm); -usb_get_intf (control_interface); tty_dev =tty_port_register_device (&acm->port, acm_tty_driver, minor, &control_interface->dev);if (IS_ERR (tty_dev)) {
drivers/usb/core/file.c +5 -5
@@ -193,9 +193,10 @@ int usb_register_dev(struct usb_interface *intf, intf->minor = minor;break ; } -up_write (&minor_rwsem); -if (intf->minor <0 ) +if (intf->minor <0 ) { +up_write (&minor_rwsem);return -EXFULL ; + }/* create a usb class device for this usb interface */ snprintf (name,sizeof (name), class_driver->name, minor - minor_base);
@@ -203,12 +204,11 @@ int usb_register_dev(struct usb_interface *intf,MKDEV (USB_MAJOR , minor), class_driver, "%s", kbasename(name));if (IS_ERR (intf->usb_dev)) { -down_write (&minor_rwsem); usb_minors[minor] =NULL ; intf->minor =-1 ; -up_write (&minor_rwsem); retval =PTR_ERR (intf->usb_dev); } +up_write (&minor_rwsem);return retval; }EXPORT_SYMBOL_GPL (usb_register_dev);
@@ -234,12 +234,12 @@ void usb_deregister_dev(struct usb_interface *intf,return ;dev_dbg (&intf->dev,"removing %d minor\n" , intf->minor); +device_destroy (usb_class->class,MKDEV (USB_MAJOR , intf->minor));down_write (&minor_rwsem); usb_minors[intf->minor] =NULL ;up_write (&minor_rwsem); -device_destroy (usb_class->class,MKDEV (USB_MAJOR , intf->minor)); intf->usb_dev =NULL ; intf->minor =-1 ;destroy_usb_class ();
drivers/usb/core/message.c +2 -2
@@ -2143,14 +2143,14 @@ int cdc_parse_cdc_header(struct usb_cdc_parsed_header *hdr, (struct usb_cdc_dmm_desc *)buffer;break ;case USB_CDC_MDLM_TYPE : -if (elength <sizeof (struct usb_cdc_mdlm_desc *)) +if (elength <sizeof (struct usb_cdc_mdlm_desc )) goto next_desc;if (desc)return -EINVAL ; desc = (struct usb_cdc_mdlm_desc *)buffer;break ;case USB_CDC_MDLM_DETAIL_TYPE : -if (elength <sizeof (struct usb_cdc_mdlm_detail_desc *)) +if (elength <sizeof (struct usb_cdc_mdlm_detail_desc )) goto next_desc;if (detail)return -EINVAL ;
drivers/usb/gadget/udc/renesas_usb3.c +3 -2
@@ -21,6 +21,7 @@#include <linux/pm_runtime.h> #include <linux/sizes.h> #include <linux/slab.h> +#include <linux/string.h> #include <linux/sys_soc.h> #include <linux/uaccess.h> #include <linux/usb/ch9.h>
@@ -2315,9 +2316,9 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr,if (usb3->forced_b_device)return -EBUSY ; -if (!strncmp (buf,"host" ,strlen ("host" ))) +if (sysfs_streq (buf,"host" )) new_mode_is_host = true; -else if (!strncmp (buf,"peripheral" ,strlen ("peripheral" ))) +else if (sysfs_streq (buf,"peripheral" )) new_mode_is_host = false;else return -EINVAL ;
drivers/usb/serial/option.c +10 -0
@@ -971,6 +971,11 @@ static const struct usb_device_id option_ids[] = { { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7B) }, { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7C) }, +/* Motorola devices */ + { USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x2a70, 0xff, 0xff, 0xff) }, /* mdm6600 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x2e0a, 0xff, 0xff, 0xff) }, /* mdm9600 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x4281, 0x0a, 0x00, 0xfc) }, /* mdm ram dl */ + { USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x900e, 0xff, 0xff, 0xff) }, /* mdm qc dl */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) },
@@ -1552,6 +1557,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff), /* Telewell TW-LTE 4G v2 */ .driver_info = RSVD(2) }, { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) }, /* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */ + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1481, 0xff, 0x00, 0x00) }, /* ZTE MF871A */ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
@@ -1954,11 +1960,15 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(4) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff), /* D-Link DWM-222 */ .driver_info = RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e3d, 0xff), /* D-Link DWM-222 A2 */ + .driver_info = RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */ { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2031, 0xff), /* Olicard 600 */ .driver_info = RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2060, 0xff), /* BroadMobi BM818 */ + .driver_info = RSVD(4) }, { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) }, /* OLICARD300 - MT6225 */ { USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) }, { USB_DEVICE(VIATELECOM_VENDOR_ID, VIATELECOM_PRODUCT_CDS7) },
drivers/xen/xen-pciback/conf_space_capability.c +1 -2
@@ -116,13 +116,12 @@ static int pm_ctrl_write(struct pci_dev *dev, int offset, u16 new_value, {int err;u16 old_value; -pci_power_t new_state, old_state; +pci_power_t new_state; err =pci_read_config_word (dev, offset, &old_value);if (err) goto out; - old_state = (pci_power_t)(old_value &PCI_PM_CTRL_STATE_MASK ); new_state = (pci_power_t)(new_value &PCI_PM_CTRL_STATE_MASK ); new_value &=PM_OK_BITS ;
fs/ocfs2/xattr.c +0 -3
@@ -3832,7 +3832,6 @@ static int ocfs2_xattr_bucket_find(struct inode *inode,u16 blk_per_bucket =ocfs2_blocks_per_xattr_bucket (inode->i_sb);int low_bucket =0 , bucket, high_bucket;struct ocfs2_xattr_bucket *search; -u32 last_hash;u64 blkno, lower_blkno =0 ; search =ocfs2_xattr_bucket_new (inode);
@@ -3876,8 +3875,6 @@ static int ocfs2_xattr_bucket_find(struct inode *inode,if (xh->xh_count) xe = &xh->xh_entries[le16_to_cpu (xh->xh_count) -1 ]; - last_hash =le32_to_cpu (xe->xe_name_hash); -/* record lower_blkno which may be the insert place. */ lower_blkno = blkno;
include/asm-generic/getorder.h +20 -30
63 lines not on this page · raw message
include/kvm/arm_vgic.h +1 -0
@@ -315,6 +315,7 @@ int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu);void kvm_vgic_load (struct kvm_vcpu *vcpu);void kvm_vgic_put (struct kvm_vcpu *vcpu); +void kvm_vgic_vmcr_sync (struct kvm_vcpu *vcpu);#define irqchip_in_kernel (k) (!!((k)->arch.vgic.in_kernel))#define vgic_initialized (k) ((k)->arch.vgic.initialized)
include/linux/filter.h +1 -0
@@ -729,6 +729,7 @@ struct sock *do_sk_redirect_map(struct sk_buff *skb);extern int bpf_jit_enable;extern int bpf_jit_harden;extern int bpf_jit_kallsyms; +extern long bpf_jit_limit;typedef void (*bpf_jit_fill_hole_t )(void *area,unsigned int size);
include/net/tcp.h +0 -3
@@ -1613,8 +1613,6 @@ static inline void tcp_init_send_head(struct sock *sk) sk->sk_send_head =NULL ; } -static inline void tcp_init_send_head (struct sock *sk); -/* write queue abstraction */ static inline void tcp_write_queue_purge (struct sock *sk) {
@@ -1623,7 +1621,6 @@ static inline void tcp_write_queue_purge(struct sock *sk)tcp_chrono_stop (sk,TCP_CHRONO_BUSY );while ((skb =__skb_dequeue (&sk->sk_write_queue)) !=NULL )sk_wmem_free_skb (sk, skb); -tcp_init_send_head (sk);sk_mem_reclaim (sk);tcp_clear_all_retrans_hints (tcp_sk (sk));tcp_init_send_head (sk);
include/net/xfrm.h +0 -1
@@ -323,7 +323,6 @@ int xfrm_policy_register_afinfo(const struct xfrm_policy_afinfo *afinfo, int famvoid xfrm_policy_unregister_afinfo (const struct xfrm_policy_afinfo *afinfo);void km_policy_notify (struct xfrm_policy *xp,int dir,const struct km_event *c); -void xfrm_policy_cache_flush (void );void km_state_notify (struct xfrm_state *x,const struct km_event *c);struct xfrm_tmpl ;
kernel/bpf/core.c +67 -10
139 lines not on this page · raw message
mm/memcontrol.c +29 -10
@@ -871,26 +871,45 @@ void mem_cgroup_iter_break(struct mem_cgroup *root,css_put (&prev->css); } -static void invalidate_reclaim_iterators (struct mem_cgroup *dead_memcg) +static void __invalidate_reclaim_iterators (struct mem_cgroup *from, +struct mem_cgroup *dead_memcg) { -struct mem_cgroup *memcg = dead_memcg;struct mem_cgroup_reclaim_iter *iter;struct mem_cgroup_per_node *mz;int nid;int i; -for (; memcg; memcg =parent_mem_cgroup (memcg)) { -for_each_node (nid) { - mz =mem_cgroup_nodeinfo (memcg, nid); -for (i =0 ; i <=DEF_PRIORITY ; i++) { - iter = &mz->iter[i]; -cmpxchg (&iter->position, - dead_memcg,NULL ); - } +for_each_node (nid) { + mz =mem_cgroup_nodeinfo (from, nid); +for (i =0 ; i <=DEF_PRIORITY ; i++) { + iter = &mz->iter[i]; +cmpxchg (&iter->position, + dead_memcg,NULL ); } } } +static void invalidate_reclaim_iterators (struct mem_cgroup *dead_memcg) +{ +struct mem_cgroup *memcg = dead_memcg; +struct mem_cgroup *last; + +do { +__invalidate_reclaim_iterators (memcg, dead_memcg); + last = memcg; + }while ((memcg =parent_mem_cgroup (memcg))); + +/* +* When cgruop1 non-hierarchy mode is used, +* parent_mem_cgroup() does not walk all the way up to the +* cgroup root (root_mem_cgroup). So we have to handle +* dead_memcg from cgroup root separately. +*/ +if (last != root_mem_cgroup) +__invalidate_reclaim_iterators (root_mem_cgroup, + dead_memcg); +} +/* * Iteration constructs for visiting all cgroups (under a tree). If * loops are exited prematurely (break), mem_cgroup_iter_break() must
mm/usercopy.c +1 -1
@@ -121,7 +121,7 @@ static inline const char *check_kernel_text_object(const void *ptr,static inline const char *check_bogus_address (const void *ptr,unsigned long n) {/* Reject if object wraps past end of memory. */ -if ((unsigned long )ptr + n < (unsigned long )ptr) +if ((unsigned long )ptr + (n -1 ) < (unsigned long )ptr)return "<wrapped address>" ;/* Reject if NULL or ZERO-allocation. */
net/bridge/netfilter/ebtables.c +17 -11
@@ -1779,20 +1779,28 @@ static int compat_calc_entry(const struct ebt_entry *e,return 0 ; } +static int ebt_compat_init_offsets (unsigned int number) +{ +if (number >INT_MAX ) +return -EINVAL ; + +/* also count the base chain policies */ + number +=NF_BR_NUMHOOKS ; + +return xt_compat_init_offsets (NFPROTO_BRIDGE , number); +}static int compat_table_info (const struct ebt_table_info *info,struct compat_ebt_replace *newinfo) {unsigned int size = info->entries_size;const void *entries = info->entries; +int ret; newinfo->entries_size = size; -if (info->nentries) { -int ret =xt_compat_init_offsets (NFPROTO_BRIDGE , - info->nentries); -if (ret) -return ret; - } + ret =ebt_compat_init_offsets (info->nentries); +if (ret) +return ret;return EBT_ENTRY_ITERATE (entries, size, compat_calc_entry, info, entries, newinfo);
@@ -2240,11 +2248,9 @@ static int compat_do_replace(struct net *net, void __user *user,xt_compat_lock (NFPROTO_BRIDGE ); -if (tmp.nentries) { - ret =xt_compat_init_offsets (NFPROTO_BRIDGE , tmp.nentries); -if (ret <0 ) - goto out_unlock; - } + ret =ebt_compat_init_offsets (tmp.nentries); +if (ret <0 ) + goto out_unlock; ret =compat_copy_entries (entries_tmp, tmp.entries_size, &state);if (ret <0 )
net/core/sysctl_net_core.c +68 -7
112 lines not on this page · raw message
net/netfilter/nf_conntrack_core.c +8 -8
@@ -307,13 +307,12 @@ EXPORT_SYMBOL_GPL(nf_ct_invert_tuple);* table location, we assume id gets exposed to userspace. * * Following nf_conn items do not change throughout lifetime -* of the nf_conn after it has been committed to main hash table: +* of the nf_conn: * * 1. nf_conn address -* 2. nf_conn->ext address -* 3. nf_conn->master address (normally NULL) -* 4. tuple -* 5. the associated net namespace +* 2. nf_conn->master address (normally NULL) +* 3. the associated net namespace +* 4. the original direction tuple */ u32 nf_ct_get_id (const struct nf_conn *ct) {
@@ -323,9 +322,10 @@ u32 nf_ct_get_id(const struct nf_conn *ct)net_get_random_once (&ct_id_seed,sizeof (ct_id_seed)); a = (unsigned long )ct; - b = (unsigned long )ct->master ^net_hash_mix (nf_ct_net (ct)); - c = (unsigned long )ct->ext; - d = (unsigned long )siphash (&ct->tuplehash,sizeof (ct->tuplehash), + b = (unsigned long )ct->master; + c = (unsigned long )nf_ct_net (ct); + d = (unsigned long )siphash (&ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple, +sizeof (ct->tuplehash[IP_CT_DIR_ORIGINAL ].tuple), &ct_id_seed);#ifdef CONFIG_64BIT return siphash_4u64 ((u64 )a, (u64 )b, (u64 )c, (u64 )d, &ct_id_seed);
net/packet/af_packet.c +7 -0
@@ -2654,6 +2654,13 @@ static int tpacket_snd(struct packet_sock *po, struct msghdr *msg)mutex_lock (&po->pg_vec_lock); +/* packet_sendmsg() check on tx_ring.pg_vec was lockless, +* we need to confirm it under protection of pg_vec_lock. +*/ +if (unlikely (!po->tx_ring.pg_vec)) { + err = -EBUSY ; + goto out; + }if (likely (saddr ==NULL )) { dev =packet_cached_dev_get (po); proto = po->num;
net/sctp/sm_sideeffect.c +1 -1
@@ -541,7 +541,7 @@ static void sctp_do_8_2_transport_strike(struct sctp_cmd_seq *commands,*/ if (net->sctp.pf_enable && (transport->state ==SCTP_ACTIVE ) && - (asoc->pf_retrans < transport->pathmaxrxt) && + (transport->error_count < transport->pathmaxrxt) && (transport->error_count > asoc->pf_retrans)) { sctp_assoc_control_transport(asoc, transport,
net/socket.c +0 -9
@@ -2656,15 +2656,6 @@ static int __init sock_init(void)core_initcall (sock_init);/* early initcall */ -static int __init jit_init (void ) -{ -#ifdef CONFIG_BPF_JIT_ALWAYS_ON - bpf_jit_enable =1 ; -#endif -return 0 ; -} -pure_initcall (jit_init); -#ifdef CONFIG_PROC_FS void socket_seq_show (struct seq_file *seq) {
net/xfrm/xfrm_device.c +0 -10
@@ -153,12 +153,6 @@ static int xfrm_dev_register(struct net_device *dev)return NOTIFY_DONE ; } -static int xfrm_dev_unregister (struct net_device *dev) -{ -xfrm_policy_cache_flush (); -return NOTIFY_DONE ; -} -static int xfrm_dev_feat_change (struct net_device *dev) {if ((dev->features &NETIF_F_HW_ESP ) && !dev->xfrmdev_ops)
@@ -178,7 +172,6 @@ static int xfrm_dev_down(struct net_device *dev)if (dev->features &NETIF_F_HW_ESP )xfrm_dev_state_flush (dev_net (dev), dev, true); -xfrm_policy_cache_flush ();return NOTIFY_DONE ; }
@@ -190,9 +183,6 @@ static int xfrm_dev_event(struct notifier_block *this, unsigned long event, voidcase NETDEV_REGISTER :return xfrm_dev_register (dev); -case NETDEV_UNREGISTER : -return xfrm_dev_unregister (dev); -case NETDEV_FEAT_CHANGE :return xfrm_dev_feat_change (dev);
net/xfrm/xfrm_policy.c +1 -137
191 lines not on this page · raw message
net/xfrm/xfrm_state.c +2 -3
@@ -735,10 +735,9 @@ int xfrm_state_flush(struct net *net, u8 proto, bool task_valid) } out:spin_unlock_bh (&net->xfrm.xfrm_state_lock); -if (cnt) { +if (cnt) err =0 ; -xfrm_policy_cache_flush (); - } +return err; }EXPORT_SYMBOL (xfrm_state_flush);
scripts/Makefile.modpost +1 -1
@@ -75,7 +75,7 @@ modpost = scripts/mod/modpost \ $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \ $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ - $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \ + $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
sound/pci/hda/hda_generic.c +20 -1
@@ -5896,6 +5896,24 @@ void snd_hda_gen_free(struct hda_codec *codec) }EXPORT_SYMBOL_GPL (snd_hda_gen_free); +/** +* snd_hda_gen_reboot_notify - Make codec enter D3 before rebooting +* @codec: the HDA codec +* +* This can be put as patch_ops reboot_notify function. +*/ +void snd_hda_gen_reboot_notify (struct hda_codec *codec) +{ +/* Make the codec enter D3 to avoid spurious noises from the internal +* speaker during (and after) reboot +*/ +snd_hda_codec_set_power_to_all (codec, codec->core.afg,AC_PWRST_D3 ); +snd_hda_codec_write (codec, codec->core.afg,0 , +AC_VERB_SET_POWER_STATE ,AC_PWRST_D3 ); +msleep (10 ); +} +EXPORT_SYMBOL_GPL (snd_hda_gen_reboot_notify); +#ifdef CONFIG_PM /** * snd_hda_gen_check_power_status - check the loopback power save state
@@ -5923,6 +5941,7 @@ static const struct hda_codec_ops generic_patch_ops = { .init = snd_hda_gen_init, .free = snd_hda_gen_free, .unsol_event = snd_hda_jack_unsol_event, + .reboot_notify = snd_hda_gen_reboot_notify,#ifdef CONFIG_PM .check_power_status = snd_hda_gen_check_power_status,#endif
@@ -5945,7 +5964,7 @@ static int snd_hda_parse_generic_codec(struct hda_codec *codec) err =snd_hda_parse_pin_defcfg (codec, &spec->autocfg,NULL ,0 );if (err <0 ) -return err; + goto error; err =snd_hda_gen_parse_auto_config (codec, &spec->autocfg);if (err <0 )
sound/pci/hda/hda_generic.h +1 -0
@@ -323,6 +323,7 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec, struct auto_pin_cfg *cfg);int snd_hda_gen_build_controls (struct hda_codec *codec);int snd_hda_gen_build_pcms (struct hda_codec *codec); +void snd_hda_gen_reboot_notify (struct hda_codec *codec);/* standard jack event callbacks */ void snd_hda_gen_hp_automute(struct hda_codec *codec,
sound/pci/hda/hda_intel.c +3 -0
@@ -2577,6 +2577,9 @@ static const struct pci_device_id azx_ids[] = {/* AMD, X370 & co */ { PCI_DEVICE(0x1022, 0x1457), .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_AMD_SB }, + /* AMD, X570 & co */ + { PCI_DEVICE(0x1022, 0x1487), + .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_AMD_SB }, /* AMD Stoney */ { PCI_DEVICE(0x1022, 0x157a), .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB |
sound/pci/hda/patch_conexant.c +1 -14
@@ -210,23 +210,10 @@ static void cx_auto_reboot_notify(struct hda_codec *codec) {struct conexant_spec *spec = codec->spec; -switch (codec->core.vendor_id) { -case 0x14f12008 :/* CX8200 */ -case 0x14f150f2 :/* CX20722 */ -case 0x14f150f4 :/* CX20724 */ -break ; -default : -return ; - } -/* Turn the problematic codec into D3 to avoid spurious noises from the internal speaker during (and after) reboot */ cx_auto_turn_eapd (codec, spec->num_eapds, spec->eapds, false); - -snd_hda_codec_set_power_to_all (codec, codec->core.afg,AC_PWRST_D3 ); -snd_hda_codec_write (codec, codec->core.afg,0 , -AC_VERB_SET_POWER_STATE ,AC_PWRST_D3 ); -msleep (10 ); +snd_hda_gen_reboot_notify (codec); }static void cx_auto_free (struct hda_codec *codec)
sound/pci/hda/patch_realtek.c +1 -10
@@ -810,15 +810,6 @@ static void alc_reboot_notify(struct hda_codec *codec)alc_shutup (codec); } -/* power down codec to D3 at reboot/shutdown; set as reboot_notify ops */ -static void alc_d3_at_reboot (struct hda_codec *codec) -{ -snd_hda_codec_set_power_to_all (codec, codec->core.afg,AC_PWRST_D3 ); -snd_hda_codec_write (codec, codec->core.afg,0 , -AC_VERB_SET_POWER_STATE ,AC_PWRST_D3 ); -msleep (10 ); -} -#define alc_free snd_hda_gen_free#ifdef CONFIG_PM
@@ -4937,7 +4928,7 @@ static void alc_fixup_tpt440_dock(struct hda_codec *codec,struct alc_spec *spec = codec->spec;if (action ==HDA_FIXUP_ACT_PRE_PROBE ) { - spec->reboot_notify = alc_d3_at_reboot;/* reduce noise */ + spec->reboot_notify = snd_hda_gen_reboot_notify;/* reduce noise */ spec->parse_flags =HDA_PINCFG_NO_HP_FIXUP ; codec->power_save_node =0 ;/* avoid click noises */ snd_hda_apply_pincfgs (codec, pincfgs);
tools/perf/util/header.c +8 -1
@@ -2901,6 +2901,13 @@ int perf_session__read_header(struct perf_session *session) file->path); } +if (f_header.attr_size ==0 ) { +pr_err ("ERROR: The %s file's attr size field is 0 which is unexpected.\n" +"Was the 'perf record' command properly terminated?\n" , + file->path); +return -EINVAL ; + } + nr_attrs = f_header.attrs.size / f_header.attr_size;lseek (fd, f_header.attrs.offset,SEEK_SET );
@@ -2983,7 +2990,7 @@ int perf_event__synthesize_attr(struct perf_tool *tool, size +=sizeof (struct perf_event_header ); size += ids *sizeof (u64); - ev =malloc (size); + ev =zalloc (size);if (ev ==NULL )return -ENOMEM ;
virt/kvm/arm/arm.c +10 -0
@@ -317,6 +317,16 @@ int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu)void kvm_arch_vcpu_blocking (struct kvm_vcpu *vcpu) {kvm_timer_schedule (vcpu); +/* +* If we're about to block (most likely because we've just hit a +* WFI), we need to sync back the state of the GIC CPU interface +* so that we have the lastest PMR and group enables. This ensures +* that kvm_arch_vcpu_runnable has up-to-date data to decide +* whether we have pending interrupts. +*/ +preempt_disable (); +kvm_vgic_vmcr_sync (vcpu); +preempt_enable (); }void kvm_arch_vcpu_unblocking (struct kvm_vcpu *vcpu)
virt/kvm/arm/vgic/vgic-v2.c +10 -1
@@ -407,10 +407,19 @@ void vgic_v2_load(struct kvm_vcpu *vcpu)writel_relaxed (cpu_if->vgic_vmcr, vgic->vctrl_base +GICH_VMCR ); } -void vgic_v2_put (struct kvm_vcpu *vcpu) +void vgic_v2_vmcr_sync (struct kvm_vcpu *vcpu) {struct vgic_v2_cpu_if *cpu_if = &vcpu->arch.vgic_cpu.vgic_v2;struct vgic_dist *vgic = &vcpu->kvm->arch.vgic; cpu_if->vgic_vmcr =readl_relaxed (vgic->vctrl_base +GICH_VMCR ); } + +void vgic_v2_put (struct kvm_vcpu *vcpu) +{ +struct vgic_v2_cpu_if *cpu_if = &vcpu->arch.vgic_cpu.vgic_v2; +struct vgic_dist *vgic = &vcpu->kvm->arch.vgic; + +vgic_v2_vmcr_sync (vcpu); + cpu_if->vgic_apr =readl_relaxed (vgic->vctrl_base +GICH_APR ); +}
virt/kvm/arm/vgic/vgic-v3.c +6 -1
@@ -547,10 +547,15 @@ void vgic_v3_load(struct kvm_vcpu *vcpu)kvm_call_hyp (__vgic_v3_write_vmcr, cpu_if->vgic_vmcr); } -void vgic_v3_put (struct kvm_vcpu *vcpu) +void vgic_v3_vmcr_sync (struct kvm_vcpu *vcpu) {struct vgic_v3_cpu_if *cpu_if = &vcpu->arch.vgic_cpu.vgic_v3;if (likely (cpu_if->vgic_sre)) cpu_if->vgic_vmcr =kvm_call_hyp (__vgic_v3_read_vmcr); } + +void vgic_v3_put (struct kvm_vcpu *vcpu) +{ +vgic_v3_vmcr_sync (vcpu); +}
virt/kvm/arm/vgic/vgic.c +11 -0
@@ -764,6 +764,17 @@ void kvm_vgic_put(struct kvm_vcpu *vcpu)vgic_v3_put (vcpu); } +void kvm_vgic_vmcr_sync (struct kvm_vcpu *vcpu) +{ +if (unlikely (!irqchip_in_kernel (vcpu->kvm))) +return ; + +if (kvm_vgic_global_state.type ==VGIC_V2 ) +vgic_v2_vmcr_sync (vcpu); +else +vgic_v3_vmcr_sync (vcpu); +} +int kvm_vgic_vcpu_pending_irq (struct kvm_vcpu *vcpu) {struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
virt/kvm/arm/vgic/vgic.h +2 -0
@@ -168,6 +168,7 @@ int vgic_register_dist_iodev(struct kvm *kvm, gpa_t dist_base_address,void vgic_v2_init_lrs (void );void vgic_v2_load (struct kvm_vcpu *vcpu);void vgic_v2_put (struct kvm_vcpu *vcpu); +void vgic_v2_vmcr_sync (struct kvm_vcpu *vcpu);static inline void vgic_get_irq_kref (struct vgic_irq *irq) {
@@ -195,6 +196,7 @@ bool vgic_v3_check_base(struct kvm *kvm);void vgic_v3_load (struct kvm_vcpu *vcpu);void vgic_v3_put (struct kvm_vcpu *vcpu); +void vgic_v3_vmcr_sync (struct kvm_vcpu *vcpu);bool vgic_has_its (struct kvm *kvm);int kvm_vgic_register_its_device (void );