Linux 4.19.63
Greg KH
maintainerI'm announcing the release of the 4.19.63 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.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
------------
Makefile | 3 arch/arm64/include/asm/assembler.h | 4 arch/powerpc/boot/xz_config.h | 20 ++ arch/powerpc/include/asm/cacheflush.h | 7 arch/powerpc/kernel/eeh.c | 15 + arch/powerpc/kernel/pci_of_scan.c | 2 arch/powerpc/kernel/signal_32.c | 3 arch/powerpc/kernel/signal_64.c | 5 arch/powerpc/mm/hugetlbpage.c | 8 + arch/powerpc/platforms/4xx/uic.c | 1 arch/powerpc/platforms/pseries/mobility.c | 9 + arch/powerpc/sysdev/xive/common.c | 7 arch/powerpc/xmon/xmon.c | 6 arch/sh/include/asm/io.h | 6 arch/um/include/asm/mmu_context.h | 2 arch/x86/kernel/cpu/bugs.c | 2 arch/x86/kernel/sysfb_efi.c | 46 +++++ block/bio-integrity.c | 8 - block/blk-core.c | 1 drivers/android/binder.c | 2 drivers/char/hpet.c | 3 drivers/fpga/Kconfig | 1 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 21 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 5 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 - drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 drivers/gpu/drm/bridge/sii902x.c | 5 drivers/gpu/drm/bridge/tc358767.c | 7 drivers/gpu/drm/drm_debugfs_crc.c | 9 - drivers/gpu/drm/drm_edid_load.c | 2 drivers/gpu/drm/msm/msm_drv.c | 14 + drivers/gpu/drm/panel/panel-simple.c | 9 + drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 drivers/gpu/drm/virtio/virtgpu_ioctl.c | 3 drivers/gpu/drm/virtio/virtgpu_vq.c | 2 drivers/gpu/host1x/bus.c | 3 drivers/i2c/busses/i2c-stm32f7.c | 26 +-- drivers/iio/adc/stm32-dfsdm-adc.c | 6 drivers/iio/adc/stm32-dfsdm-core.c | 8 - drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 drivers/infiniband/hw/mlx5/mad.c | 60 ++++--- drivers/infiniband/sw/rxe/rxe_resp.c | 5 drivers/infiniband/sw/rxe/rxe_verbs.h | 1 drivers/infiniband/ulp/ipoib/ipoib_main.c | 34 ++-- drivers/mailbox/mailbox.c | 6 drivers/memstick/core/memstick.c | 13 + drivers/mfd/arizona-core.c | 2 drivers/mfd/hi655x-pmic.c | 2 drivers/mfd/madera-core.c | 1 drivers/mfd/mfd-core.c | 1 drivers/misc/mei/hw-me-regs.h | 3 drivers/misc/mei/pci-me.c | 3 drivers/mmc/host/sdhci-pci-o2micro.c | 12 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 19 +- drivers/nvdimm/bus.c | 96 +++++++----- drivers/nvdimm/nd-core.h | 3 drivers/pci/controller/dwc/pci-dra7xx.c | 1 drivers/pci/controller/pcie-mobiveil.c | 22 ++ drivers/pci/controller/pcie-xilinx-nwl.c | 11 - drivers/pci/pci-driver.c | 13 - drivers/pci/pci-sysfs.c | 2 drivers/phy/renesas/phy-rcar-gen2.c | 2 drivers/pinctrl/pinctrl-rockchip.c | 1 drivers/staging/vt6656/main_usb.c | 42 +++-- drivers/tty/serial/8250/8250_port.c | 3 drivers/tty/serial/cpm_uart/cpm_uart_core.c | 17 +- drivers/tty/serial/digicolor-usart.c | 6 drivers/tty/serial/imx.c | 23 +- drivers/tty/serial/max310x.c | 51 +++--- drivers/tty/serial/msm_serial.c | 4 drivers/tty/serial/serial_core.c | 7 drivers/tty/serial/serial_mctrl_gpio.c | 14 + drivers/tty/serial/sh-sci.c | 33 +++- drivers/usb/core/hub.c | 28 ++- drivers/usb/gadget/function/f_fs.c | 6 drivers/usb/host/hwa-hc.c | 2 drivers/usb/host/pci-quirks.c | 31 ++- fs/9p/vfs_addr.c | 6 fs/btrfs/inode.c | 24 ++- fs/dlm/lowcomms.c | 18 +- fs/f2fs/segment.c | 5 fs/notify/fanotify/fanotify.c | 5 fs/notify/inotify/inotify_fsnotify.c | 8 - fs/open.c | 19 ++ fs/proc/base.c | 28 ++- fs/proc/task_mmu.c | 23 ++ fs/proc/task_nommu.c | 6 include/linux/cred.h | 7 include/linux/host1x.h | 2 kernel/cred.c | 21 ++ kernel/locking/lockdep_proc.c | 8 - mm/gup.c | 12 + mm/kmemleak.c | 2 mm/memory.c | 4 mm/mmu_notifier.c | 2 mm/nommu.c | 3 mm/swap.c | 13 + net/vmw_vsock/hyperv_transport.c | 44 +---- scripts/genksyms/keywords.c | 4 scripts/genksyms/parse.y | 2 scripts/kallsyms.c | 3 scripts/recordmcount.h | 3 sound/ac97/bus.c | 13 - sound/pci/hda/patch_conexant.c | 1 sound/usb/line6/podhd.c | 2 tools/iio/iio_utils.c | 4 tools/perf/builtin-stat.c | 2 tools/perf/builtin-top.c | 8 - tools/perf/tests/mmap-thread-lookup.c | 2 tools/perf/ui/browsers/hists.c | 15 + tools/perf/util/annotate.c | 6 tools/perf/util/session.c | 3 115 files changed, 855 insertions(+), 358 deletions(-)
Alex Williamson (1):
PCI: Return error if cannot probe VF
Alexander Usyskin (1):
mei: me: add mule creek canyon (EHL) device ids
Alexey Kardashevskiy (1):
powerpc/pci/of: Fix OF flags parsing for 64bit BARs
Andrzej Pietrasiewicz (1):
usb: gadget: Zero ffs_io_data
Andy Lutomirski (1):
mm/gup.c: remove some BUG_ONs from get_gate_page()
Aneesh Kumar K.V (1):
powerpc/mm: Handle page table allocation failures
Arnd Bergmann (3):
mfd: arizona: Fix undefined behavior
cxgb4: reduce kernel stack usage in cudbg_collect_mem_region() locking/lockdep: Hide unused 'class' variable
Axel Lin (1):
mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk
Bastien Nocera (1):
iio: iio-utils: Fix possible incorrect mask calculation
Bharat Kumar Gogada (1):
PCI: xilinx-nwl: Fix Multi MSI data programming
Christian Lamparter (1):
powerpc/4xx/uic: clear pending interrupt after irq type/pol change
Christoph Hellwig (1):
9p: pass the correct prototype to read_cache_page
Christophe Leroy (1):
tty: serial: cpm_uart - fix init when SMC is relocated
Dan Williams (1):
libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl()
Daniel Gomez (1):
mfd: madera: Add missing of table registration
Daniel Vetter (2):
drm/crc-debugfs: User irqsafe spinlock in drm_crtc_add_crc_entry drm/crc-debugfs: Also sprinkle irqrestore over early exits
David Riley (1):
drm/virtio: Add memory barriers for capset cache.
David Windsor (1):
dlm: check if workqueues are NULL before flushing/destroying
Ding Xiang (1):
ALSA: ac97: Fix double free of ac97_codec_device
Dmitry Vyukov (1):
mm/kmemleak.c: fix check for softirq context
Douglas Anderson (1):
drm/rockchip: Properly adjust to a true clock in adjusted_mode
Fabien Dessenne (2):
iio: adc: stm32-dfsdm: manage the get_irq error case
iio: adc: stm32-dfsdm: missing error case during probe
Fabrice Gasnier (1):
i2c: stm32f7: fix the get_irq error cases
Gautham R. Shenoy (1):
powerpc/xive: Fix loop exit-condition in xive_find_target_in_mask()
Geert Uytterhoeven (2):
serial: sh-sci: Terminate TX DMA during buffer flushing
serial: sh-sci: Fix TX DMA buffer flushing and workqueue races
Gen Zhang (1):
drm/edid: Fix a missing-check bug in drm_load_edid_firmware()
Greg Kroah-Hartman (1):
Linux 4.19.63
Guenter Roeck (1):
mm/gup.c: mark undo_dev_pagemap as __maybe_unused
Hans de Goede (1):
x86/sysfb_efi: Add quirks for some devices with swapped width and height
Hariprasad Kelam (1):
drm/amd/display: fix compilation error
Hou Zhiqiang (4):
PCI: mobiveil: Fix PCI base address in MEM/IO outbound windows
PCI: mobiveil: Fix the Class Code field
PCI: mobiveil: Initialize Primary/Secondary/Subordinate bus numbers
PCI: mobiveil: Use the 1st inbound window for MEM inbound transactions
Hridya Valsaraju (1):
binder: prevent transactions to context manager from its own process.
Hui Wang (1):
ALSA: hda - Add a conexant codec entry to let mute led work
Ira Weiny (1):
mm/swap: fix release_pages() when releasing devmap pages
James Morse (1):
arm64: assembler: Switch ESB-instruction with a vanilla nop if !ARM64_HAS_RAS
Jean-Philippe Brucker (1):
mm/mmu_notifier: use hlist_add_head_rcu()
Johannes Berg (1):
um: Silence lockdep complaint about mmap_sem
Jorge Ramirez-Ortiz (1):
tty: serial: msm_serial: avoid system lockup condition
Josef Bacik (1):
block: init flush rq ref count to 1
Jyri Sarha (1):
drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz
Kai-Heng Feng (1):
ALSA: line6: Fix wrong altsetting for LINE6_PODHD500_1
Kefeng Wang (2):
tty/serial: digicolor: Fix digicolor-usart already registered warning
hpet: Fix division by zero in hpet_time_div()
Konstantin Khlebnikov (6):
proc: use down_read_killable mmap_sem for /proc/pid/smaps_rollup
proc: use down_read_killable mmap_sem for /proc/pid/pagemap
proc: use down_read_killable mmap_sem for /proc/pid/clear_refs
proc: use down_read_killable mmap_sem for /proc/pid/map_files
proc: use down_read_killable mmap_sem for /proc/pid/maps
mm: use down_read_killable for locking mmap_sem in access_remote_vm
Konstantin Taranov (1):
RDMA/rxe: Fill in wc byte_len with IB_WC_RECV_RDMA_WITH_IMM
Leo Yan (5):
perf stat: Fix use-after-freed pointer detected by the smatch tool perf top: Fix potential NULL pointer dereference detected by the smatch tool perf session: Fix potential NULL pointer dereference found by the smatch tool perf annotate: Fix dereferencing freed memory found by the smatch tool perf hists browser: Fix potential NULL pointer dereference found by the smatch tool
Linus Torvalds (1):
access: avoid the RCU grace period for the temporary subjective credentials
Liu, Changcheng (1):
RDMA/i40iw: Set queue pair state when being queried
Marek Vasut (1):
PCI: sysfs: Ignore lockdep for remove attribute
Masahiro Yamada (1):
powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h
Michael Neuling (1):
powerpc/tm: Fix oops on sigreturn on systems without TM
Nathan Chancellor (1):
kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS
Nathan Lynch (1):
powerpc/pseries/mobility: prevent cpu hotplug during DT update
Naveen N. Rao (2):
powerpc/xmon: Fix disabling tracing while in xmon
recordmcount: Fix spurious mcount entries on powerpc
Nicholas Kazlauskas (2):
drm/amd/display: Fill prescale_params->scale for RGB565 drm/amd/display: Always allocate initial connector state state
Numfor Mbiziwo-Tiapo (1):
perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning
Oak Zeng (2):
drm/amdkfd: Fix a potential memory leak
drm/amdkfd: Fix sdma queue map issue
Ocean Chen (1):
f2fs: avoid out-of-range memory access
Oliver O'Halloran (1):
powerpc/eeh: Handle hugepages in ioremap space
Parav Pandit (1):
IB/mlx5: Fixed reporting counters on 2nd port for Dual port RoCE
Paul Hsieh (1):
drm/amd/display: Disable ABM before destroy ABM struct
Peter Ujfalusi (1):
drm/panel: simple: Fix panel_simple_dsi_probe
Phong Tran (1):
usb: wusbcore: fix unbalanced get/put cluster_id
Qian Cai (1):
powerpc/cacheflush: fix variable set but not used
Qu Wenruo (1):
btrfs: inode: Don't compress if NODATASUM or NODATACOW set
Quentin Deslandes (1):
staging: vt6656: use meaningful error code during buffer allocation
Raul E Rangel (1):
mmc: sdhci: sdhci-pci-o2micro: Check if controller supports 8-bit width
Rautkoski Kimmo EXT (1):
serial: 8250: Fix TX interrupt handling condition
Robert Hancock (1):
mfd: core: Set fwnode for created devices
Ryan Kennedy (1):
usb: pci-quirks: Correct AMD PLL quirk detection
Sam Ravnborg (1):
sh: prevent warnings when using iounmap
Sean Paul (1):
drm/msm: Depopulate platform on probe failure
Serge Semin (2):
tty: max310x: Fix invalid baudrate divisors calculator
tty: serial_core: Set port active bit in uart_port_activate
Sergey Organov (1):
serial: imx: fix locking in set_termios()
Shakeel Butt (1):
memcg, fsnotify: no oom-kill for remote memcg charging
Stefan Roese (1):
serial: mctrl_gpio: Check if GPIO property exisits before requesting it
Sunil Muthuswamy (1):
hvsock: fix epollout hang from race condition
Thierry Reding (1):
gpu: host1x: Increase maximum DMA segment size
Thinh Nguyen (1):
usb: core: hub: Disable hub-initiated U1/U2
Tiecheng Zhou (1):
drm/amdgpu/sriov: Need to initialize the HDP_NONSURFACE_BAStE
Tomi Valkeinen (1):
drm/bridge: tc358767: read display_props in get_modes()
Valentine Fatiev (1):
IB/ipoib: Add child to parent list only if device initialized
Vasily Gorbik (1):
kallsyms: exclude kasan local symbols on s390
Wang Hai (1):
memstick: Fix error cleanup path of memstick_init
Wen Yang (1):
pinctrl: rockchip: fix leaked of_node references
Wenwen Wang (1):
block/bio-integrity: fix a memory leak bug
Will Deacon (1):
genksyms: Teach parser about 128-bit built-in types
Yoshihiro Shimoda (1):
phy: renesas: rcar-gen2: Fix memory leak at error paths
YueHaibing (2):
PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB
fpga-manager: altera-ps-spi: Fix build error
Yuyang Du (1):
locking/lockdep: Fix lock used or unused stats error
Zhenzhong Duan (1):
x86/speculation/mds: Apply more accurate check on hypervisor platform
morten petersen (1):
mailbox: handle failed named mailbox channel request
Greg KH
maintainerMakefile +2 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 62 +SUBLEVEL = 63 EXTRAVERSION = NAME = "People's Front"
@@ -491,6 +491,7 @@ ifneq ($(GCC_TOOLCHAIN),) CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN) endif CLANG_FLAGS += -no-integrated-as +CLANG_FLAGS += -Werror=unknown-warning-option KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_AFLAGS += $(CLANG_FLAGS) export CLANG_FLAGS
arch/arm64/include/asm/assembler.h +4 -0
@@ -112,7 +112,11 @@* RAS Error Synchronization barrier */ .macro esb +#ifdef CONFIG_ARM64_RAS_EXTN hint #16 +#else + nop +#endif .endm/*
arch/powerpc/boot/xz_config.h +20 -0
@@ -20,10 +20,30 @@ static inline uint32_t swab32p(void *p)#ifdef __LITTLE_ENDIAN__#define get_le32 (p) (*((uint32_t *) (p))) +#define cpu_to_be32 (x) swab32(x) +static inline u32 be32_to_cpup (const u32 *p) +{ +return swab32p ((u32 *)p); +}#else #define get_le32 (p) swab32p(p) +#define cpu_to_be32 (x) (x) +static inline u32 be32_to_cpup (const u32 *p) +{ +return *p; +}#endif +static inline uint32_t get_unaligned_be32 (const void *p) +{ +return be32_to_cpup (p); +} + +static inline void put_unaligned_be32 (u32 val,void *p) +{ + *((u32 *)p) =cpu_to_be32 (val); +} +#define memeq (a, b, size) (memcmp(a, b, size) == 0)#define memzero (buf, size) memset(buf, 0, size)
arch/powerpc/include/asm/cacheflush.h +5 -2
@@ -32,9 +32,12 @@* not expect this type of fault. flush_cache_vmap is not exactly the right * place to put this, but it seems to work well enough. */ -#define flush_cache_vmap (start, end) do { asm volatile("ptesync" ::: "memory"); } while (0) +static inline void flush_cache_vmap (unsigned long start,unsigned long end) +{ + asmvolatile ("ptesync" :::"memory" ); +}#else -#define flush_cache_vmap (start, end) do { } while (0) +static inline void flush_cache_vmap (unsigned long start,unsigned long end) { }#endif #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
arch/powerpc/kernel/eeh.c +12 -3
@@ -360,10 +360,19 @@ static inline unsigned long eeh_token_to_phys(unsigned long token) ptep =find_init_mm_pte (token, &hugepage_shift);if (!ptep)return token; -WARN_ON (hugepage_shift); - pa =pte_pfn (*ptep) <<PAGE_SHIFT ; -return pa | (token & (PAGE_SIZE -1 )); + pa =pte_pfn (*ptep); + +/* On radix we can do hugepage mappings for io, so handle that */ +if (hugepage_shift) { + pa <<= hugepage_shift; + pa |= token & ((1ul << hugepage_shift) -1 ); + }else { + pa <<=PAGE_SHIFT ; + pa |= token & (PAGE_SIZE -1 ); + } + +return pa; }/*
arch/powerpc/kernel/pci_of_scan.c +2 -0
@@ -45,6 +45,8 @@ unsigned int pci_parse_of_flags(u32 addr0, int bridge)if (addr0 &0x02000000 ) { flags =IORESOURCE_MEM |PCI_BASE_ADDRESS_SPACE_MEMORY ; flags |= (addr0 >>22 ) &PCI_BASE_ADDRESS_MEM_TYPE_64 ; +if (flags &PCI_BASE_ADDRESS_MEM_TYPE_64 ) + flags |=IORESOURCE_MEM_64 ; flags |= (addr0 >>28 ) &PCI_BASE_ADDRESS_MEM_TYPE_1M ;if (addr0 &0x40000000 ) flags |=IORESOURCE_PREFETCH
arch/powerpc/kernel/signal_32.c +3 -0
@@ -1202,6 +1202,9 @@ SYSCALL_DEFINE0(rt_sigreturn) goto bad;if (MSR_TM_ACTIVE (msr_hi<<32 )) { +/* Trying to start TM on non TM system */ +if (!cpu_has_feature (CPU_FTR_TM )) + goto bad;/* We only recheckpoint on return if we're * transaction. */
arch/powerpc/kernel/signal_64.c +5 -0
@@ -750,6 +750,11 @@ SYSCALL_DEFINE0(rt_sigreturn)if (MSR_TM_ACTIVE (msr)) {/* We recheckpoint on return. */ struct ucontext __user *uc_transact; + +/* Trying to start TM on non TM system */ +if (!cpu_has_feature (CPU_FTR_TM )) + goto badframe; +if (__get_user (uc_transact, &uc->uc_link)) goto badframe; if (restore_tm_sigcontexts(current, &uc->uc_mcontext,
arch/powerpc/mm/hugetlbpage.c +8 -0
@@ -150,6 +150,8 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz }else { pdshift =PUD_SHIFT ; pu =pud_alloc (mm, pg, addr); +if (!pu) +return NULL ;if (pshift ==PUD_SHIFT )return (pte_t *)pu;else if (pshift >PMD_SHIFT ) {
@@ -158,6 +160,8 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz }else { pdshift =PMD_SHIFT ; pm =pmd_alloc (mm, pu, addr); +if (!pm) +return NULL ;if (pshift ==PMD_SHIFT )/* 16MB hugepage */ return (pte_t *)pm;
@@ -174,12 +178,16 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz }else { pdshift =PUD_SHIFT ; pu =pud_alloc (mm, pg, addr); +if (!pu) +return NULL ;if (pshift >=PUD_SHIFT ) { ptl =pud_lockptr (mm, pu); hpdp = (hugepd_t *)pu; }else { pdshift =PMD_SHIFT ; pm =pmd_alloc (mm, pu, addr); +if (!pm) +return NULL ; ptl =pmd_lockptr (mm, pm); hpdp = (hugepd_t *)pm; }
arch/powerpc/platforms/4xx/uic.c +1 -0
@@ -158,6 +158,7 @@ static int uic_set_irq_type(struct irq_data *d, unsigned int flow_type)mtdcr (uic->dcrbase +UIC_PR , pr);mtdcr (uic->dcrbase +UIC_TR , tr); +mtdcr (uic->dcrbase +UIC_SR , ~mask);raw_spin_unlock_irqrestore (&uic->lock, flags);
arch/powerpc/platforms/pseries/mobility.c +9 -0
@@ -9,6 +9,7 @@* 2 as published by the Free Software Foundation. */ +#include <linux/cpu.h> #include <linux/kernel.h> #include <linux/kobject.h> #include <linux/smp.h>
@@ -344,11 +345,19 @@ void post_mobility_fixup(void)if (rc)printk (KERN_ERR "Post-mobility activate-fw failed: %d\n" , rc); +/* +* We don't want CPUs to go online/offline while the device +* tree is being updated. +*/ +cpus_read_lock (); + rc =pseries_devicetree_update (MIGRATION_SCOPE );if (rc)printk (KERN_ERR "Post-mobility device tree update " "failed: %d\n" , rc); +cpus_read_unlock (); +/* Possibly switch to a new RFI flush type */ pseries_setup_rfi_flush ();
arch/powerpc/sysdev/xive/common.c +3 -4
@@ -483,7 +483,7 @@ static int xive_find_target_in_mask(const struct cpumask *mask,* Now go through the entire mask until we find a valid * target. */ -for (;;) { + do { /* * We re-check online as the fallback case passes us * an untested affinity mask
@@ -491,12 +491,11 @@ static int xive_find_target_in_mask(const struct cpumask *mask,if (cpu_online (cpu) &&xive_try_pick_target (cpu))return cpu; cpu =cpumask_next (cpu, mask); -if (cpu == first) -break ;/* Wrap around */ if (cpu >= nr_cpu_ids) cpu =cpumask_first (mask); - } + }while (cpu != first); +return -1 ; }
arch/powerpc/xmon/xmon.c +4 -2
@@ -466,8 +466,10 @@ static int xmon_core(struct pt_regs *regs, int fromipi)local_irq_save (flags);hard_irq_disable (); - tracing_enabled =tracing_is_on (); -tracing_off (); +if (!fromipi) { + tracing_enabled =tracing_is_on (); +tracing_off (); + } bp =in_breakpoint_table (regs->nip, &offset);if (bp !=NULL ) {
arch/sh/include/asm/io.h +5 -1
@@ -371,7 +371,11 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }#define ioremap_nocache ioremap#define ioremap_uc ioremap -#define iounmap __iounmap + +static inline void iounmap (void __iomem *addr) +{ +__iounmap (addr); +}/* * Convert a physical pointer to a virtual kernel pointer for /dev/mem
arch/um/include/asm/mmu_context.h +1 -1
@@ -53,7 +53,7 @@ static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)* when the new ->mm is used for the first time. */ __switch_mm (&new->context.id); -down_write (&new->mmap_sem); +down_write_nested (&new->mmap_sem,1 );uml_setup_stubs (new);up_write (&new->mmap_sem); }
arch/x86/kernel/cpu/bugs.c +1 -1
@@ -1196,7 +1196,7 @@ static ssize_t l1tf_show_state(char *buf)static ssize_t mds_show_state (char *buf) { -if (!hypervisor_is_type (X86_HYPER_NATIVE )) { +if (boot_cpu_has (X86_FEATURE_HYPERVISOR )) {return sprintf (buf,"%s; SMT Host state unknown\n" , mds_strings[mds_mitigation]); }
arch/x86/kernel/sysfb_efi.c +46 -0
55 lines not on this page · raw message
block/bio-integrity.c +6 -2
@@ -291,8 +291,12 @@ bool bio_integrity_prep(struct bio *bio) ret =bio_integrity_add_page (bio,virt_to_page (buf), bytes, offset); -if (ret ==0 ) -return false; +if (ret ==0 ) { +printk (KERN_ERR "could not attach integrity payload\n" ); +kfree (buf); + status =BLK_STS_RESOURCE ; + goto err_end_io; + }if (ret < bytes)break ;
block/blk-core.c +1 -0
@@ -198,6 +198,7 @@ void blk_rq_init(struct request_queue *q, struct request *rq) rq->internal_tag =-1 ; rq->start_time_ns =ktime_get_ns (); rq->part =NULL ; +refcount_set (&rq->ref,1 ); }EXPORT_SYMBOL (blk_rq_init);
drivers/android/binder.c +1 -1
@@ -2838,7 +2838,7 @@ static void binder_transaction(struct binder_proc *proc,else return_error =BR_DEAD_REPLY ;mutex_unlock (&context->context_mgr_node_lock); -if (target_node && target_proc == proc) { +if (target_node && target_proc->pid == proc->pid) {binder_user_error ("%d:%d got transaction to context manager from process owning it\n" , proc->pid, thread->pid); return_error =BR_FAILED_REPLY ;
drivers/char/hpet.c +1 -2
@@ -570,8 +570,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets,unsigned long long m; m = hpets->hp_tick_freq + (dis >>1 ); -do_div (m, dis); -return (unsigned long )m; +return div64_ul (m, dis); } static int
drivers/fpga/Kconfig +1 -0
@@ -39,6 +39,7 @@ config ALTERA_PR_IP_CORE_PLAT config FPGA_MGR_ALTERA_PS_SPI tristate "Altera FPGA Passive Serial over SPI" depends on SPI + select BITREVERSE help FPGA manager driver support for Altera Arria/Cyclone/Stratix using the passive serial interface over SPI.
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +3 -0
@@ -1037,6 +1037,9 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) tmp =RREG32_SOC15 (HDP ,0 , mmHDP_HOST_PATH_CNTL);WREG32_SOC15 (HDP ,0 , mmHDP_HOST_PATH_CNTL, tmp); +WREG32_SOC15 (HDP ,0 , mmHDP_NONSURFACE_BASE, (adev->gmc.vram_start >>8 )); +WREG32_SOC15 (HDP ,0 , mmHDP_NONSURFACE_BASE_HI, (adev->gmc.vram_start >>40 )); +/* After HDP is initialized, flush HDP.*/ adev->nbio_funcs->hdp_flush (adev,NULL );
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +12 -9
@@ -1268,12 +1268,17 @@ int amdkfd_fence_wait_timeout(unsigned int *fence_addr,return 0 ; } -static int unmap_sdma_queues (struct device_queue_manager *dqm, -unsigned int sdma_engine) +static int unmap_sdma_queues (struct device_queue_manager *dqm) { -return pm_send_unmap_queue (&dqm->packets,KFD_QUEUE_TYPE_SDMA , -KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES ,0 , false, - sdma_engine); +int i, retval =0 ; + +for (i =0 ; i < dqm->dev->device_info->num_sdma_engines; i++) { + retval =pm_send_unmap_queue (&dqm->packets,KFD_QUEUE_TYPE_SDMA , +KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES ,0 , false, i); +if (retval) +return retval; + } +return retval; }/* dqm->lock mutex has to be locked before calling this function */
@@ -1312,10 +1317,8 @@ static int unmap_queues_cpsch(struct device_queue_manager *dqm,pr_debug ("Before destroying queues, sdma queue count is : %u\n" , dqm->sdma_queue_count); -if (dqm->sdma_queue_count >0 ) { -unmap_sdma_queues (dqm,0 ); -unmap_sdma_queues (dqm,1 ); - } +if (dqm->sdma_queue_count >0 ) +unmap_sdma_queues (dqm); retval =pm_send_unmap_queue (&dqm->packets,KFD_QUEUE_TYPE_COMPUTE , filter, filter_param, false,0 );
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c +4 -1
@@ -75,6 +75,7 @@ static int init_mqd(struct mqd_manager *mm, void **mqd,struct v9_mqd *m;struct kfd_dev *kfd = mm->dev; + *mqd_mem_obj =NULL ;/* From V9, for CWSR, the control stack is located on the next page * boundary after the mqd, we will use the gtt allocation function * instead of sub-allocation function.
@@ -92,8 +93,10 @@ static int init_mqd(struct mqd_manager *mm, void **mqd, }else retval =kfd_gtt_sa_allocate (mm->dev,sizeof (struct v9_mqd ), mqd_mem_obj); -if (retval !=0 ) +if (retval) { +kfree (*mqd_mem_obj);return -ENOMEM ; + } m = (struct v9_mqd *) (*mqd_mem_obj)->cpu_ptr; addr = (*mqd_mem_obj)->gpu_addr;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +7 -3
@@ -3644,6 +3644,13 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm, {struct amdgpu_device *adev = dm->ddev->dev_private; +/* +* Some of the properties below require access to state, like bpc. +* Allocate some default initial connector state with our reset helper. +*/ +if (aconnector->base.funcs->reset) + aconnector->base.funcs->reset (&aconnector->base); + aconnector->connector_id = link_index; aconnector->dc_link = link; aconnector->base.interlace_allowed = false;
@@ -3811,9 +3818,6 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm, &aconnector->base, &amdgpu_dm_connector_helper_funcs); -if (aconnector->base.funcs->reset) - aconnector->base.funcs->reset (&aconnector->base); - amdgpu_dm_connector_init_helper( dm, aconnector,
drivers/gpu/drm/amd/display/dc/dce/dce_abm.c +2 -0
@@ -474,6 +474,8 @@ void dce_abm_destroy(struct abm **abm) {struct dce_abm *abm_dce =TO_DCE_ABM (*abm); + abm_dce->base.funcs->set_abm_immediate_disable (*abm); +kfree (abm_dce); *abm =NULL ; }
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +3 -0
@@ -242,6 +242,9 @@ static void build_prescale_params(struct ipp_prescale_params *prescale_params, prescale_params->mode =IPP_PRESCALE_MODE_FIXED_UNSIGNED ;switch (plane_state->format) { +case SURFACE_PIXEL_FORMAT_GRPH_RGB565 : + prescale_params->scale =0x2082 ; +break ;case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888 :case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 : prescale_params->scale =0x2020 ;
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +1 -0
@@ -23,6 +23,7 @@* */ +#include <linux/delay.h> #include "dm_services.h" #include "core_types.h" #include "resource.h"
drivers/gpu/drm/bridge/sii902x.c +3 -2
@@ -261,10 +261,11 @@ static void sii902x_bridge_mode_set(struct drm_bridge *bridge,struct regmap *regmap = sii902x->regmap;u8 buf[HDMI_INFOFRAME_SIZE (AVI )];struct hdmi_avi_infoframe frame; +u16 pixel_clock_10kHz = adj->clock /10 ;int ret; - buf[0 ] = adj->clock; - buf[1 ] = adj->clock >>8 ; + buf[0 ] = pixel_clock_10kHz &0xff ; + buf[1 ] = pixel_clock_10kHz >>8 ; buf[2 ] = adj->vrefresh; buf[3 ] =0x00 ; buf[4 ] = adj->hdisplay;
drivers/gpu/drm/bridge/tc358767.c +7 -0
@@ -1149,6 +1149,13 @@ static int tc_connector_get_modes(struct drm_connector *connector)struct tc_data *tc =connector_to_tc (connector);struct edid *edid;unsigned int count; +int ret; + + ret =tc_get_display_props (tc); +if (ret <0 ) { +dev_err (tc->dev,"failed to read display props: %d\n" , ret); +return 0 ; + }if (tc->panel && tc->panel->funcs && tc->panel->funcs->get_modes) { count = tc->panel->funcs->get_modes (tc->panel);
drivers/gpu/drm/drm_debugfs_crc.c +5 -4
@@ -379,12 +379,13 @@ int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame,struct drm_crtc_crc *crc = &crtc->crc;struct drm_crtc_crc_entry *entry;int head, tail; +unsigned long flags; -spin_lock (&crc->lock); +spin_lock_irqsave (&crc->lock, flags);/* Caller may not have noticed yet that userspace has stopped reading */ if (!crc->entries) { -spin_unlock (&crc->lock); +spin_unlock_irqrestore (&crc->lock, flags);return -EINVAL ; }
@@ -395,7 +396,7 @@ int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame,bool was_overflow = crc->overflow; crc->overflow = true; -spin_unlock (&crc->lock); +spin_unlock_irqrestore (&crc->lock, flags);if (!was_overflow)DRM_ERROR ("Overflow of CRC buffer, userspace reads too slow.\n" );
@@ -411,7 +412,7 @@ int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame, head = (head +1 ) & (DRM_CRC_ENTRIES_NR -1 ); crc->head = head; -spin_unlock (&crc->lock); +spin_unlock_irqrestore (&crc->lock, flags);wake_up_interruptible (&crc->wq);
drivers/gpu/drm/drm_edid_load.c +2 -0
@@ -290,6 +290,8 @@ struct edid *drm_load_edid_firmware(struct drm_connector *connector)* the last one found one as a fallback. */ fwstr =kstrdup (edid_firmware,GFP_KERNEL ); +if (!fwstr) +return ERR_PTR (-ENOMEM ); edidstr = fwstr;while ((edidname =strsep (&edidstr,"," ))) {
drivers/gpu/drm/msm/msm_drv.c +11 -3
@@ -1321,16 +1321,24 @@ static int msm_pdev_probe(struct platform_device *pdev) ret =add_gpu_components (&pdev->dev, &match);if (ret) -return ret; + goto fail;/* on all devices that I am aware of, iommu's which can map * any address the cpu can see are used: */ ret =dma_set_mask_and_coherent (&pdev->dev, ~0 );if (ret) -return ret; + goto fail; + + ret =component_master_add_with_match (&pdev->dev, &msm_drm_ops, match); +if (ret) + goto fail; -return component_master_add_with_match (&pdev->dev, &msm_drm_ops, match); +return 0 ; + +fail: +of_platform_depopulate (&pdev->dev); +return ret; }static int msm_pdev_remove (struct platform_device *pdev)
drivers/gpu/drm/panel/panel-simple.c +8 -1
@@ -2803,7 +2803,14 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi) dsi->format = desc->format; dsi->lanes = desc->lanes; -return mipi_dsi_attach (dsi); + err =mipi_dsi_attach (dsi); +if (err) { +struct panel_simple *panel =dev_get_drvdata (&dsi->dev); + +drm_panel_remove (&panel->base); + } + +return err; }static int panel_simple_dsi_remove (struct mipi_dsi_device *dsi)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +2 -1
@@ -880,7 +880,8 @@ static bool vop_crtc_mode_fixup(struct drm_crtc *crtc,struct vop *vop =to_vop (crtc); adjusted_mode->clock = -clk_round_rate (vop->dclk, mode->clock *1000 ) /1000 ; +DIV_ROUND_UP (clk_round_rate (vop->dclk, mode->clock *1000 ), +1000 );return true; }
drivers/gpu/drm/virtio/virtgpu_ioctl.c +3 -0
@@ -528,6 +528,9 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev,if (!ret)return -EBUSY ; +/* is_valid check must proceed before copy of the cache entry. */ +smp_rmb (); + ptr = cache_ent->caps_cache; copy_exit:
drivers/gpu/drm/virtio/virtgpu_vq.c +2 -0
@@ -588,6 +588,8 @@ static void virtio_gpu_cmd_capset_cb(struct virtio_gpu_device *vgdev, cache_ent->id == le32_to_cpu(cmd->capset_id)) {memcpy (cache_ent->caps_cache, resp->capset_data, cache_ent->size); +/* Copy must occur before is_valid is signalled. */ +smp_wmb ();atomic_set (&cache_ent->is_valid,1 );break ; }
drivers/gpu/host1x/bus.c +3 -0
@@ -423,6 +423,9 @@ static int host1x_device_add(struct host1x *host1x,of_dma_configure (&device->dev, host1x->dev->of_node, true); + device->dev.dma_parms = &device->dma_parms; +dma_set_max_seg_size (&device->dev,SZ_4M ); + err =host1x_device_parse_dt (device, driver);if (err <0 ) {kfree (device);
drivers/i2c/busses/i2c-stm32f7.c +14 -12
@@ -24,7 +24,6 @@#include <linux/module.h> #include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_irq.h> #include <linux/of_platform.h> #include <linux/platform_device.h> #include <linux/reset.h>
@@ -1782,15 +1781,14 @@ static struct i2c_algorithm stm32f7_i2c_algo = {static int stm32f7_i2c_probe (struct platform_device *pdev) { -struct device_node *np = pdev->dev.of_node;struct stm32f7_i2c_dev *i2c_dev;const struct stm32f7_i2c_setup *setup;struct resource *res; -u32 irq_error, irq_event, clk_rate, rise_time, fall_time; +u32 clk_rate, rise_time, fall_time;struct i2c_adapter *adap;struct reset_control *rst;dma_addr_t phy_addr; -int ret; +int irq_error, irq_event, ret; i2c_dev =devm_kzalloc (&pdev->dev,sizeof (*i2c_dev),GFP_KERNEL );if (!i2c_dev)
@@ -1802,16 +1800,20 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)return PTR_ERR (i2c_dev->base); phy_addr = (dma_addr_t )res->start; - irq_event =irq_of_parse_and_map (np,0 ); -if (!irq_event) { -dev_err (&pdev->dev,"IRQ event missing or invalid\n" ); -return -EINVAL ; + irq_event =platform_get_irq (pdev,0 ); +if (irq_event <=0 ) { +if (irq_event != -EPROBE_DEFER ) +dev_err (&pdev->dev,"Failed to get IRQ event: %d\n" , + irq_event); +return irq_event ? : -ENOENT ; } - irq_error =irq_of_parse_and_map (np,1 ); -if (!irq_error) { -dev_err (&pdev->dev,"IRQ error missing or invalid\n" ); -return -EINVAL ; + irq_error =platform_get_irq (pdev,1 ); +if (irq_error <=0 ) { +if (irq_error != -EPROBE_DEFER ) +dev_err (&pdev->dev,"Failed to get IRQ error: %d\n" , + irq_error); +return irq_error ? : -ENOENT ; } i2c_dev->clk =devm_clk_get (&pdev->dev,NULL );
drivers/iio/adc/stm32-dfsdm-adc.c +6 -0
@@ -1144,6 +1144,12 @@ static int stm32_dfsdm_adc_probe(struct platform_device *pdev)* So IRQ associated to filter instance 0 is dedicated to the Filter 0. */ irq =platform_get_irq (pdev,0 ); +if (irq <0 ) { +if (irq != -EPROBE_DEFER ) +dev_err (dev,"Failed to get IRQ: %d\n" , irq); +return irq; + } + ret =devm_request_irq (dev, irq, stm32_dfsdm_irq,0 , pdev->name, adc);if (ret <0 ) {
drivers/iio/adc/stm32-dfsdm-core.c +6 -2
@@ -213,6 +213,8 @@ static int stm32_dfsdm_parse_of(struct platform_device *pdev, } priv->dfsdm.phys_base = res->start; priv->dfsdm.base =devm_ioremap_resource (&pdev->dev, res); +if (IS_ERR (priv->dfsdm.base)) +return PTR_ERR (priv->dfsdm.base);/* * "dfsdm" clock is mandatory for DFSDM peripheral clocking.
@@ -222,8 +224,10 @@ static int stm32_dfsdm_parse_of(struct platform_device *pdev,*/ priv->clk =devm_clk_get (&pdev->dev,"dfsdm" );if (IS_ERR (priv->clk)) { -dev_err (&pdev->dev,"No stm32_dfsdm_clk clock found\n" ); -return -EINVAL ; + ret =PTR_ERR (priv->clk); +if (ret != -EPROBE_DEFER ) +dev_err (&pdev->dev,"Failed to get clock (%d)\n" , ret); +return ret; } priv->aclk =devm_clk_get (&pdev->dev,"audio" );
drivers/infiniband/hw/i40iw/i40iw_verbs.c +2 -0
@@ -806,6 +806,8 @@ static int i40iw_query_qp(struct ib_qp *ibqp,struct i40iw_qp *iwqp =to_iwqp (ibqp);struct i40iw_sc_qp *qp = &iwqp->sc_qp; + attr->qp_state = iwqp->ibqp_state; + attr->cur_qp_state = attr->qp_state; attr->qp_access_flags =0 ; attr->cap.max_send_wr = qp->qp_uk.sq_size; attr->cap.max_recv_wr = qp->qp_uk.rq_size;
drivers/infiniband/hw/mlx5/mad.c +36 -24
113 lines not on this page · raw message
drivers/infiniband/sw/rxe/rxe_resp.c +4 -1
@@ -435,6 +435,7 @@ static enum resp_states check_rkey(struct rxe_qp *qp, qp->resp.va =reth_va (pkt); qp->resp.rkey =reth_rkey (pkt); qp->resp.resid =reth_len (pkt); + qp->resp.length =reth_len (pkt); } access = (pkt->mask &RXE_READ_MASK ) ?IB_ACCESS_REMOTE_READ :IB_ACCESS_REMOTE_WRITE ;
@@ -859,7 +860,9 @@ static enum resp_states do_complete(struct rxe_qp *qp, pkt->mask & RXE_WRITE_MASK) ?IB_WC_RECV_RDMA_WITH_IMM :IB_WC_RECV ; wc->vendor_err =0 ; - wc->byte_len = wqe->dma.length - wqe->dma.resid; + wc->byte_len = (pkt->mask &RXE_IMMDT_MASK && + pkt->mask &RXE_WRITE_MASK ) ? + qp->resp.length : wqe->dma.length - wqe->dma.resid;/* fields after byte_len are different between kernel and user * space
drivers/infiniband/sw/rxe/rxe_verbs.h +1 -0
@@ -212,6 +212,7 @@ struct rxe_resp_info {struct rxe_mem *mr;u32 resid;u32 rkey; +u32 length;u64 atomic_orig;/* SRQ only */
drivers/infiniband/ulp/ipoib/ipoib_main.c +20 -14
@@ -1892,12 +1892,6 @@ static void ipoib_child_init(struct net_device *ndev)struct ipoib_dev_priv *priv =ipoib_priv (ndev);struct ipoib_dev_priv *ppriv =ipoib_priv (priv->parent); -dev_hold (priv->parent); - -down_write (&ppriv->vlan_rwsem); -list_add_tail (&priv->list, &ppriv->child_intfs); -up_write (&ppriv->vlan_rwsem); - priv->max_ib_mtu = ppriv->max_ib_mtu;set_bit (IPOIB_FLAG_SUBINTERFACE , &priv->flags);memcpy (priv->dev->dev_addr, ppriv->dev->dev_addr,INFINIBAND_ALEN );
@@ -1940,6 +1934,17 @@ static int ipoib_ndo_init(struct net_device *ndev)if (rc) {pr_warn ("%s: failed to initialize device: %s port %d (ret = %d)\n" , priv->ca->name, priv->dev->name, priv->port, rc); +return rc; + } + +if (priv->parent) { +struct ipoib_dev_priv *ppriv =ipoib_priv (priv->parent); + +dev_hold (priv->parent); + +down_write (&ppriv->vlan_rwsem); +list_add_tail (&priv->list, &ppriv->child_intfs); +up_write (&ppriv->vlan_rwsem); }return 0 ;
@@ -1957,6 +1962,14 @@ static void ipoib_ndo_uninit(struct net_device *dev)*/ WARN_ON (!list_empty (&priv->child_intfs)); +if (priv->parent) { +struct ipoib_dev_priv *ppriv =ipoib_priv (priv->parent); + +down_write (&ppriv->vlan_rwsem); +list_del (&priv->list); +up_write (&ppriv->vlan_rwsem); + } +ipoib_neigh_hash_uninit (dev);ipoib_ib_dev_cleanup (dev);
@@ -1968,15 +1981,8 @@ static void ipoib_ndo_uninit(struct net_device *dev) priv->wq =NULL ; } -if (priv->parent) { -struct ipoib_dev_priv *ppriv =ipoib_priv (priv->parent); - -down_write (&ppriv->vlan_rwsem); -list_del (&priv->list); -up_write (&ppriv->vlan_rwsem); - +if (priv->parent)dev_put (priv->parent); - } }static int ipoib_set_vf_link_state (struct net_device *dev,int vf,int link_state)
drivers/mailbox/mailbox.c +4 -2
@@ -391,11 +391,13 @@ struct mbox_chan *mbox_request_channel_byname(struct mbox_client *cl,of_property_for_each_string (np,"mbox-names" , prop, mbox_name) {if (!strncmp (name, mbox_name,strlen (name))) -break ; +return mbox_request_channel (cl, index); index++; } -return mbox_request_channel (cl, index); +dev_err (cl->dev,"%s() could not locate channel named \"%s\"\n" , + __func__, name); +return ERR_PTR (-EINVAL ); }EXPORT_SYMBOL_GPL (mbox_request_channel_byname);
drivers/memstick/core/memstick.c +9 -4
@@ -629,13 +629,18 @@ static int __init memstick_init(void)return -ENOMEM ; rc =bus_register (&memstick_bus_type); -if (!rc) - rc =class_register (&memstick_host_class); +if (rc) + goto error_destroy_workqueue; -if (!rc) -return 0 ; + rc =class_register (&memstick_host_class); +if (rc) + goto error_bus_unregister; + +return 0 ; +error_bus_unregister:bus_unregister (&memstick_bus_type); +error_destroy_workqueue:destroy_workqueue (workqueue);return rc;
drivers/mfd/arizona-core.c +1 -1
@@ -996,7 +996,7 @@ int arizona_dev_init(struct arizona *arizona)unsigned int reg, val;int (*apply_patch)(struct arizona *) =NULL ;const struct mfd_cell *subdevs =NULL ; -int n_subdevs, ret, i; +int n_subdevs =0 , ret, i;dev_set_drvdata (arizona->dev, arizona);mutex_init (&arizona->clk_lock);
drivers/mfd/hi655x-pmic.c +2 -0
@@ -112,6 +112,8 @@ static int hi655x_pmic_probe(struct platform_device *pdev) pmic->regmap =devm_regmap_init_mmio_clk (dev,NULL , base, &hi655x_regmap_config); +if (IS_ERR (pmic->regmap)) +return PTR_ERR (pmic->regmap);regmap_read (pmic->regmap,HI655X_BUS_ADDR (HI655X_VER_REG ), &pmic->ver);if ((pmic->ver <PMU_VER_START ) || (pmic->ver >PMU_VER_END )) {
drivers/mfd/madera-core.c +1 -0
@@ -278,6 +278,7 @@ const struct of_device_id madera_of_match[] = { { .compatible = "cirrus,wm1840", .data = (void *)WM1840 }, {} }; +MODULE_DEVICE_TABLE (of, madera_of_match);EXPORT_SYMBOL_GPL (madera_of_match);static int madera_get_reset_gpio (struct madera *madera)
drivers/mfd/mfd-core.c +1 -0
@@ -179,6 +179,7 @@ static int mfd_add_device(struct device *parent, int id,for_each_child_of_node (parent->of_node, np) {if (of_device_is_compatible (np, cell->of_compatible)) { pdev->dev.of_node = np; + pdev->dev.fwnode = &np->fwnode;break ; } }
drivers/misc/mei/hw-me-regs.h +3 -0
@@ -141,6 +141,9 @@#define MEI_DEV_ID_ICP_LP 0x34E0/* Ice Lake Point LP */ +#define MEI_DEV_ID_MCC 0x4B70/* Mule Creek Canyon (EHL) */ +#define MEI_DEV_ID_MCC_4 0x4B75/* Mule Creek Canyon 4 (EHL) */ +/* * MEI HW Section */
drivers/misc/mei/pci-me.c +3 -0
@@ -107,6 +107,9 @@ static const struct pci_device_id mei_me_pci_tbl[] = { {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_MCC, MEI_ME_PCH12_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_MCC_4, MEI_ME_PCH8_CFG)}, +/* required last entry */ {0, } };
drivers/mmc/host/sdhci-pci-o2micro.c +11 -1
@@ -290,11 +290,21 @@ int sdhci_pci_o2_probe_slot(struct sdhci_pci_slot *slot) {struct sdhci_pci_chip *chip;struct sdhci_host *host; -u32 reg; +u32 reg, caps;int ret; chip = slot->chip; host = slot->host; + + caps =sdhci_readl (host,SDHCI_CAPABILITIES ); + +/* +* mmc_select_bus_width() will test the bus to determine the actual bus +* width. +*/ +if (caps &SDHCI_CAN_DO_8BIT ) + host->mmc->caps |=MMC_CAP_8_BIT_DATA ; +switch (chip->pdev->device) {case PCI_DEVICE_ID_O2_SDS0 :case PCI_DEVICE_ID_O2_SEABIRD0 :
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c +13 -6
@@ -1065,14 +1065,12 @@ static void cudbg_t4_fwcache(struct cudbg_init *pdbg_init, } } -static int cudbg_collect_mem_region (struct cudbg_init *pdbg_init, -struct cudbg_buffer *dbg_buff, -struct cudbg_error *cudbg_err, -u8 mem_type) +static unsigned long cudbg_mem_region_size (struct cudbg_init *pdbg_init, +struct cudbg_error *cudbg_err, +u8 mem_type) {struct adapter *padap = pdbg_init->adap;struct cudbg_meminfo mem_info; -unsigned long size;u8 mc_idx;int rc;
@@ -1086,7 +1084,16 @@ static int cudbg_collect_mem_region(struct cudbg_init *pdbg_init,if (rc)return rc; - size = mem_info.avail[mc_idx].limit - mem_info.avail[mc_idx].base; +return mem_info.avail[mc_idx].limit - mem_info.avail[mc_idx].base; +} + +static int cudbg_collect_mem_region (struct cudbg_init *pdbg_init, +struct cudbg_buffer *dbg_buff, +struct cudbg_error *cudbg_err, +u8 mem_type) +{ +unsigned long size =cudbg_mem_region_size (pdbg_init, cudbg_err, mem_type); +return cudbg_read_fw_mem (pdbg_init, dbg_buff, mem_type, size, cudbg_err); }
drivers/nvdimm/bus.c +58 -38
156 lines not on this page · raw message
drivers/nvdimm/nd-core.h +2 -1
@@ -25,10 +25,11 @@ extern int nvdimm_major;struct nvdimm_bus {struct nvdimm_bus_descriptor *nd_desc; -wait_queue_head_t probe_wait; +wait_queue_head_t wait;struct list_head list;struct device dev;int id, probe_active; +atomic_t ioctl_active;struct list_head mapping_list;struct mutex reconfig_mutex;struct badrange badrange;
drivers/pci/controller/dwc/pci-dra7xx.c +1 -0
@@ -26,6 +26,7 @@#include <linux/types.h> #include <linux/mfd/syscon.h> #include <linux/regmap.h> +#include <linux/gpio/consumer.h> #include "../../pci.h" #include "pcie-designware.h"
drivers/pci/controller/pcie-mobiveil.c +16 -6
@@ -508,6 +508,12 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie)return err; } +/* setup bus numbers */ + value =csr_readl (pcie,PCI_PRIMARY_BUS ); + value &=0xff000000 ; + value |=0x00ff0100 ; +csr_writel (pcie, value,PCI_PRIMARY_BUS ); +/* * program Bus Master Enable Bit in Command Register in PAB Config * Space
@@ -547,7 +553,7 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) resource_size(pcie->ob_io_res));/* memory inbound translation window */ -program_ib_windows (pcie,WIN_NUM_1 ,0 ,MEM_WINDOW_TYPE ,IB_WIN_SIZE ); +program_ib_windows (pcie,WIN_NUM_0 ,0 ,MEM_WINDOW_TYPE ,IB_WIN_SIZE );/* Get the I/O and memory ranges from DT */ resource_list_for_each_entry_safe (win, tmp, &pcie->resources) {
@@ -559,11 +565,18 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie)if (type) {/* configure outbound translation window */ program_ob_windows (pcie, pcie->ob_wins_configured, - win->res->start,0 , type, -resource_size (win->res)); + win->res->start, + win->res->start - win->offset, + type,resource_size (win->res)); } } +/* fixup for PCIe class register */ + value =csr_readl (pcie,PAB_INTP_AXI_PIO_CLASS ); + value &=0xff ; + value |= (PCI_CLASS_BRIDGE_PCI <<16 ); +csr_writel (pcie, value,PAB_INTP_AXI_PIO_CLASS ); +/* setup MSI hardware registers */ mobiveil_pcie_enable_msi (pcie);
@@ -804,9 +817,6 @@ static int mobiveil_pcie_probe(struct platform_device *pdev) goto error; } -/* fixup for PCIe class register */ -csr_writel (pcie,0x060402ab ,PAB_INTP_AXI_PIO_CLASS ); -/* initialize the IRQ domains */ ret =mobiveil_pcie_init_irq_domain (pcie);if (ret) {
drivers/pci/controller/pcie-xilinx-nwl.c +5 -6
@@ -483,15 +483,13 @@ static int nwl_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,int i;mutex_lock (&msi->lock); - bit =bitmap_find_next_zero_area (msi->bitmap,INT_PCI_MSI_NR ,0 , - nr_irqs,0 ); -if (bit >=INT_PCI_MSI_NR ) { + bit =bitmap_find_free_region (msi->bitmap,INT_PCI_MSI_NR , +get_count_order (nr_irqs)); +if (bit <0 ) {mutex_unlock (&msi->lock);return -ENOSPC ; } -bitmap_set (msi->bitmap, bit, nr_irqs); -for (i =0 ; i < nr_irqs; i++) { irq_domain_set_info(domain, virq + i, bit + i, &nwl_irq_chip, domain->host_data, handle_simple_irq,
@@ -509,7 +507,8 @@ static void nwl_irq_domain_free(struct irq_domain *domain, unsigned int virq,struct nwl_msi *msi = &pcie->msi;mutex_lock (&msi->lock); -bitmap_clear (msi->bitmap, data->hwirq, nr_irqs); +bitmap_release_region (msi->bitmap, data->hwirq, +get_count_order (nr_irqs));mutex_unlock (&msi->lock); }
drivers/pci/pci-driver.c +7 -6
@@ -414,6 +414,9 @@ static int pci_device_probe(struct device *dev)struct pci_dev *pci_dev =to_pci_dev (dev);struct pci_driver *drv =to_pci_driver (dev->driver); +if (!pci_device_can_probe (pci_dev)) +return -ENODEV ; +pci_assign_irq (pci_dev); error =pcibios_alloc_irq (pci_dev);
@@ -421,12 +424,10 @@ static int pci_device_probe(struct device *dev)return error;pci_dev_get (pci_dev); -if (pci_device_can_probe (pci_dev)) { - error =__pci_device_probe (drv, pci_dev); -if (error) { -pcibios_free_irq (pci_dev); -pci_dev_put (pci_dev); - } + error =__pci_device_probe (drv, pci_dev); +if (error) { +pcibios_free_irq (pci_dev); +pci_dev_put (pci_dev); }return error;
drivers/pci/pci-sysfs.c +1 -1
@@ -478,7 +478,7 @@ static ssize_t remove_store(struct device *dev, struct device_attribute *attr,pci_stop_and_remove_bus_device_locked (to_pci_dev (dev));return count; } -static struct device_attribute dev_remove_attr =__ATTR (remove, +static struct device_attribute dev_remove_attr =__ATTR_IGNORE_LOCKDEP (remove, (S_IWUSR |S_IWGRP ),NULL , remove_store);
drivers/phy/renesas/phy-rcar-gen2.c +2 -0
@@ -288,6 +288,7 @@ static int rcar_gen2_phy_probe(struct platform_device *pdev) error =of_property_read_u32 (np,"reg" , &channel_num);if (error || channel_num >2 ) {dev_err (dev,"Invalid \"reg\" property\n" ); +of_node_put (np);return error; } channel->select_mask = select_mask[channel_num];
@@ -303,6 +304,7 @@ static int rcar_gen2_phy_probe(struct platform_device *pdev) &rcar_gen2_phy_ops);if (IS_ERR (phy->phy)) {dev_err (dev,"Failed to create PHY\n" ); +of_node_put (np);return PTR_ERR (phy->phy); }phy_set_drvdata (phy->phy, phy);
drivers/pinctrl/pinctrl-rockchip.c +1 -0
@@ -3172,6 +3172,7 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank, base, &rockchip_regmap_config); } +of_node_put (node); } bank->irq =irq_of_parse_and_map (bank->of_node,0 );
drivers/staging/vt6656/main_usb.c +28 -14
99 lines not on this page · raw message
drivers/tty/serial/8250/8250_port.c +2 -1
@@ -1874,7 +1874,8 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) status =serial8250_rx_chars (up, status); }serial8250_modem_status (up); -if ((!up->dma || up->dma->tx_err) && (status &UART_LSR_THRE )) +if ((!up->dma || up->dma->tx_err) && (status &UART_LSR_THRE ) && + (up->ier &UART_IER_THRI ))serial8250_tx_chars (up);spin_unlock_irqrestore (&port->lock, flags);
drivers/tty/serial/cpm_uart/cpm_uart_core.c +11 -6
@@ -407,7 +407,16 @@ static int cpm_uart_startup(struct uart_port *port)clrbits16 (&pinfo->sccp->scc_sccm,UART_SCCM_RX ); }cpm_uart_initbd (pinfo); -cpm_line_cr_cmd (pinfo,CPM_CR_INIT_TRX ); +if (IS_SMC (pinfo)) { +out_be32 (&pinfo->smcup->smc_rstate,0 ); +out_be32 (&pinfo->smcup->smc_tstate,0 ); +out_be16 (&pinfo->smcup->smc_rbptr, +in_be16 (&pinfo->smcup->smc_rbase)); +out_be16 (&pinfo->smcup->smc_tbptr, +in_be16 (&pinfo->smcup->smc_tbase)); + }else { +cpm_line_cr_cmd (pinfo,CPM_CR_INIT_TRX ); + } }/* Install interrupt handler. */ retval =request_irq (port->irq, cpm_uart_int,0 ,"cpm_uart" , port);
@@ -861,16 +870,14 @@ static void cpm_uart_init_smc(struct uart_cpm_port *pinfo) (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);/* -* In case SMC1 is being relocated... +* In case SMC is being relocated... */ -#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH )out_be16 (&up->smc_rbptr,in_be16 (&pinfo->smcup->smc_rbase));out_be16 (&up->smc_tbptr,in_be16 (&pinfo->smcup->smc_tbase));out_be32 (&up->smc_rstate,0 );out_be32 (&up->smc_tstate,0 );out_be16 (&up->smc_brkcr,1 );/* number of break chars */ out_be16 (&up->smc_brkec,0 ); -#endif /* Set up the uart parameters in the * parameter ram.
@@ -884,8 +891,6 @@ static void cpm_uart_init_smc(struct uart_cpm_port *pinfo)out_be16 (&up->smc_brkec,0 );out_be16 (&up->smc_brkcr,1 ); -cpm_line_cr_cmd (pinfo,CPM_CR_INIT_TRX ); -/* Set UART mode, 8 bit, no parity, one stop. * Enable receive and transmit. */
drivers/tty/serial/digicolor-usart.c +5 -1
@@ -541,7 +541,11 @@ static int __init digicolor_uart_init(void)if (ret)return ret; -return platform_driver_register (&digicolor_uart_platform); + ret =platform_driver_register (&digicolor_uart_platform); +if (ret) +uart_unregister_driver (&digicolor_uart); + +return ret; }module_init (digicolor_uart_init);
drivers/tty/serial/imx.c +13 -10
@@ -382,6 +382,7 @@ static void imx_uart_ucrs_restore(struct imx_port *sport, }#endif +/* called with port.lock taken and irqs caller dependent */ static void imx_uart_rts_active (struct imx_port *sport,u32 *ucr2) { *ucr2 &= ~(UCR2_CTSC |UCR2_CTS );
@@ -390,6 +391,7 @@ static void imx_uart_rts_active(struct imx_port *sport, u32 *ucr2)mctrl_gpio_set (sport->gpios, sport->port.mctrl); } +/* called with port.lock taken and irqs caller dependent */ static void imx_uart_rts_inactive (struct imx_port *sport,u32 *ucr2) { *ucr2 &= ~UCR2_CTSC ;
@@ -399,6 +401,7 @@ static void imx_uart_rts_inactive(struct imx_port *sport, u32 *ucr2)mctrl_gpio_set (sport->gpios, sport->port.mctrl); } +/* called with port.lock taken and irqs caller dependent */ static void imx_uart_rts_auto (struct imx_port *sport,u32 *ucr2) { *ucr2 |=UCR2_CTSC ;
@@ -1554,6 +1557,16 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, old_csize =CS8 ; } +del_timer_sync (&sport->timer); + +/* +* Ask the core to calculate the divisor for us. +*/ + baud =uart_get_baud_rate (port, termios, old,50 , port->uartclk /16 ); + quot =uart_get_divisor (port, baud); + +spin_lock_irqsave (&sport->port.lock, flags); +if ((termios->c_cflag &CSIZE ) ==CS8 ) ucr2 =UCR2_WS |UCR2_SRST |UCR2_IRTS ;else
@@ -1597,16 +1610,6 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, ucr2 |=UCR2_PROE ; } -del_timer_sync (&sport->timer); - -/* -* Ask the core to calculate the divisor for us. -*/ - baud =uart_get_baud_rate (port, termios, old,50 , port->uartclk /16 ); - quot =uart_get_divisor (port, baud); - -spin_lock_irqsave (&sport->port.lock, flags); - sport->port.read_status_mask =0 ;if (termios->c_iflag &INPCK ) sport->port.read_status_mask |= (URXD_FRMERR |URXD_PRERR );
drivers/tty/serial/max310x.c +31 -20
68 lines not on this page · raw message
drivers/tty/serial/msm_serial.c +4 -0
@@ -383,10 +383,14 @@ static void msm_request_rx_dma(struct msm_port *msm_port, resource_size_t base)static inline void msm_wait_for_xmitr (struct uart_port *port) { +unsigned int timeout =500000 ; +while (!(msm_read (port,UART_SR ) &UART_SR_TX_EMPTY )) {if (msm_read (port,UART_ISR ) &UART_ISR_TX_READY )break ;udelay (1 ); +if (!timeout--) +break ; }msm_write (port,UART_CR_CMD_RESET_TX_READY ,UART_CR ); }
drivers/tty/serial/serial_core.c +6 -1
@@ -1738,6 +1738,7 @@ static int uart_port_activate(struct tty_port *port, struct tty_struct *tty) { struct uart_state *state = container_of(port, struct uart_state, port);struct uart_port *uport; +int ret; uport =uart_port_check (state);if (!uport || uport->flags &UPF_DEAD )
@@ -1748,7 +1749,11 @@ static int uart_port_activate(struct tty_port *port, struct tty_struct *tty)/* * Start up the serial port. */ -return uart_startup (tty, state,0 ); + ret =uart_startup (tty, state,0 ); +if (ret >0 ) +tty_port_set_active (port,1 ); + +return ret; }static const char *uart_type (struct uart_port *port)
drivers/tty/serial/serial_mctrl_gpio.c +14 -0
@@ -12,6 +12,7 @@#include <linux/termios.h> #include <linux/serial_core.h> #include <linux/module.h> +#include <linux/property.h> #include "serial_mctrl_gpio.h"
@@ -115,6 +116,19 @@ struct mctrl_gpios *mctrl_gpio_init_noauto(struct device *dev, unsigned int idx)for (i =0 ; i <UART_GPIO_MAX ; i++) {enum gpiod_flags flags; +char *gpio_str; +bool present; + +/* Check if GPIO property exists and continue if not */ + gpio_str =kasprintf (GFP_KERNEL ,"%s-gpios" , + mctrl_gpios_desc[i].name); +if (!gpio_str) +continue ; + + present =device_property_present (dev, gpio_str); +kfree (gpio_str); +if (!present) +continue ;if (mctrl_gpios_desc[i].dir_out) flags =GPIOD_OUT_LOW ;
drivers/tty/serial/sh-sci.c +24 -9
@@ -1376,6 +1376,7 @@ static void work_fn_tx(struct work_struct *work)struct circ_buf *xmit = &port->state->xmit;unsigned long flags;dma_addr_t buf; +int head, tail;/* * DMA is idle now.
@@ -1385,16 +1386,23 @@ static void work_fn_tx(struct work_struct *work)* consistent xmit buffer state. */ spin_lock_irq (&port->lock); - buf = s->tx_dma_addr + (xmit->tail & (UART_XMIT_SIZE -1 )); + head = xmit->head; + tail = xmit->tail; + buf = s->tx_dma_addr + (tail & (UART_XMIT_SIZE -1 )); s->tx_dma_len = min_t(unsigned int, -CIRC_CNT (xmit->head, xmit->tail,UART_XMIT_SIZE ), -CIRC_CNT_TO_END (xmit->head, xmit->tail,UART_XMIT_SIZE )); -spin_unlock_irq (&port->lock); +CIRC_CNT (head, tail,UART_XMIT_SIZE ), +CIRC_CNT_TO_END (head, tail,UART_XMIT_SIZE )); +if (!s->tx_dma_len) { +/* Transmit buffer has been flushed */ +spin_unlock_irq (&port->lock); +return ; + } desc =dmaengine_prep_slave_single (chan, buf, s->tx_dma_len,DMA_MEM_TO_DEV ,DMA_PREP_INTERRUPT |DMA_CTRL_ACK );if (!desc) { +spin_unlock_irq (&port->lock);dev_warn (port->dev,"Failed preparing Tx DMA descriptor\n" ); goto switch_to_pio; }
@@ -1402,18 +1410,18 @@ static void work_fn_tx(struct work_struct *work)dma_sync_single_for_device (chan->device->dev, buf, s->tx_dma_len,DMA_TO_DEVICE ); -spin_lock_irq (&port->lock); desc->callback = sci_dma_tx_complete; desc->callback_param = s; -spin_unlock_irq (&port->lock); s->cookie_tx =dmaengine_submit (desc);if (dma_submit_error (s->cookie_tx)) { +spin_unlock_irq (&port->lock);dev_warn (port->dev,"Failed submitting Tx DMA descriptor\n" ); goto switch_to_pio; } +spin_unlock_irq (&port->lock);dev_dbg (port->dev,"%s: %p: %d...%d, cookie %d\n" , - __func__, xmit->buf, xmit->tail, xmit->head, s->cookie_tx); + __func__, xmit->buf, tail, head, s->cookie_tx);dma_async_issue_pending (chan);return ;
@@ -1633,11 +1641,18 @@ static void sci_free_dma(struct uart_port *port)static void sci_flush_buffer (struct uart_port *port) { +struct sci_port *s =to_sci_port (port); +/* * In uart_flush_buffer(), the xmit circular buffer has just been -* cleared, so we have to reset tx_dma_len accordingly. +* cleared, so we have to reset tx_dma_len accordingly, and stop any +* pending transfers */ -to_sci_port (port)->tx_dma_len =0 ; + s->tx_dma_len =0 ; +if (s->chan_tx) { +dmaengine_terminate_async (s->chan_tx); + s->cookie_tx = -EINVAL ; + } }#else /* !CONFIG_SERIAL_SH_SCI_DMA */ static inline void sci_request_dma (struct uart_port *port)
drivers/usb/core/hub.c +16 -12
@@ -3961,6 +3961,9 @@ static int usb_set_lpm_timeout(struct usb_device *udev,* control transfers to set the hub timeout or enable device-initiated U1/U2 * will be successful. * +* If the control transfer to enable device-initiated U1/U2 entry fails, then +* hub-initiated U1/U2 will be disabled. +* * If we cannot set the parent hub U1/U2 timeout, we attempt to let the xHCI * driver know about it. If that call fails, it should be harmless, and just * take up more slightly more bus bandwidth for unnecessary U1/U2 exit latency.
@@ -4015,23 +4018,24 @@ static void usb_enable_link_state(struct usb_hcd *hcd, struct usb_device *udev,* host know that this link state won't be enabled. */ hcd->driver->disable_usb3_lpm_timeout (hcd, udev, state); - }else { -/* Only a configured device will accept the Set Feature -* U1/U2_ENABLE -*/ -if (udev->actconfig) -usb_set_device_initiated_lpm (udev, state, true); +return ; + } -/* As soon as usb_set_lpm_timeout(timeout) returns 0, the -* hub-initiated LPM is enabled. Thus, LPM is enabled no -* matter the result of usb_set_device_initiated_lpm(). -* The only difference is whether device is able to initiate -* LPM. -*/ +/* Only a configured device will accept the Set Feature +* U1/U2_ENABLE +*/ +if (udev->actconfig && +usb_set_device_initiated_lpm (udev, state, true) ==0 ) {if (state ==USB3_LPM_U1 ) udev->usb3_lpm_u1_enabled =1 ;else if (state ==USB3_LPM_U2 ) udev->usb3_lpm_u2_enabled =1 ; + }else { +/* Don't request U1/U2 entry if the device +* cannot transition to U1/U2. +*/ +usb_set_lpm_timeout (udev, state,0 ); + hcd->driver->disable_usb3_lpm_timeout (hcd, udev, state); } }
drivers/usb/gadget/function/f_fs.c +4 -2
@@ -1101,11 +1101,12 @@ static ssize_t ffs_epfile_write_iter(struct kiocb *kiocb, struct iov_iter *from)ENTER ();if (!is_sync_kiocb (kiocb)) { - p =kmalloc (sizeof (io_data),GFP_KERNEL ); + p =kzalloc (sizeof (io_data),GFP_KERNEL );if (unlikely (!p))return -ENOMEM ; p->aio = true; }else { +memset (p,0 ,sizeof (*p)); p->aio = false; }
@@ -1137,11 +1138,12 @@ static ssize_t ffs_epfile_read_iter(struct kiocb *kiocb, struct iov_iter *to)ENTER ();if (!is_sync_kiocb (kiocb)) { - p =kmalloc (sizeof (io_data),GFP_KERNEL ); + p =kzalloc (sizeof (io_data),GFP_KERNEL );if (unlikely (!p))return -ENOMEM ; p->aio = true; }else { +memset (p,0 ,sizeof (*p)); p->aio = false; }
drivers/usb/host/hwa-hc.c +1 -1
@@ -159,7 +159,7 @@ static int hwahc_op_start(struct usb_hcd *usb_hcd)return result; error_set_cluster_id: -wusb_cluster_id_put (wusbhc->cluster_id); +wusb_cluster_id_put (addr); error_cluster_id_get: goto out;
drivers/usb/host/pci-quirks.c +19 -12
@@ -205,7 +205,7 @@ int usb_amd_find_chipset_info(void) {unsigned long flags;struct amd_chipset_info info; -int ret; +int need_pll_quirk =0 ;spin_lock_irqsave (&amd_lock, flags);
@@ -219,21 +219,28 @@ int usb_amd_find_chipset_info(void)spin_unlock_irqrestore (&amd_lock, flags);if (!amd_chipset_sb_type_init (&info)) { - ret =0 ; goto commit; } -/* Below chipset generations needn't enable AMD PLL quirk */ -if (info.sb_type.gen ==AMD_CHIPSET_UNKNOWN || - info.sb_type.gen ==AMD_CHIPSET_SB600 || - info.sb_type.gen ==AMD_CHIPSET_YANGTZE || - (info.sb_type.gen ==AMD_CHIPSET_SB700 && - info.sb_type.rev >0x3b )) { +switch (info.sb_type.gen) { +case AMD_CHIPSET_SB700 : + need_pll_quirk = info.sb_type.rev <=0x3B ; +break ; +case AMD_CHIPSET_SB800 : +case AMD_CHIPSET_HUDSON2 : +case AMD_CHIPSET_BOLTON : + need_pll_quirk =1 ; +break ; +default : + need_pll_quirk =0 ; +break ; + } + +if (!need_pll_quirk) {if (info.smbus_dev) {pci_dev_put (info.smbus_dev); info.smbus_dev =NULL ; } - ret =0 ; goto commit; }
@@ -252,7 +259,7 @@ int usb_amd_find_chipset_info(void) } } - ret = info.probe_result =1 ; + need_pll_quirk = info.probe_result =1 ;printk (KERN_DEBUG "QUIRK: Enable AMD PLL fix\n" ); commit:
@@ -263,7 +270,7 @@ int usb_amd_find_chipset_info(void)/* Mark that we where here */ amd_chipset.probe_count++; - ret = amd_chipset.probe_result; + need_pll_quirk = amd_chipset.probe_result;spin_unlock_irqrestore (&amd_lock, flags);
@@ -277,7 +284,7 @@ int usb_amd_find_chipset_info(void)spin_unlock_irqrestore (&amd_lock, flags); } -return ret; +return need_pll_quirk; }EXPORT_SYMBOL_GPL (usb_amd_find_chipset_info);
fs/9p/vfs_addr.c +4 -2
@@ -50,8 +50,9 @@* @page: structure to page * */ -static int v9fs_fid_readpage (struct p9_fid *fid,struct page *page) +static int v9fs_fid_readpage (void *data,struct page *page) { +struct p9_fid *fid = data;struct inode *inode = page->mapping->host;struct bio_vec bvec = {.bv_page = page, .bv_len =PAGE_SIZE };struct iov_iter to;
@@ -122,7 +123,8 @@ static int v9fs_vfs_readpages(struct file *filp, struct address_space *mapping,if (ret ==0 )return ret; - ret =read_cache_pages (mapping, pages, (void *)v9fs_vfs_readpage, filp); + ret =read_cache_pages (mapping, pages, v9fs_fid_readpage, + filp->private_data);p9_debug (P9_DEBUG_VFS ," = %d\n" , ret);return ret; }
fs/btrfs/inode.c +23 -1
@@ -388,10 +388,31 @@ static noinline int add_async_extent(struct async_cow *cow,return 0 ; } +/* +* Check if the inode has flags compatible with compression +*/ +static inline bool inode_can_compress (struct inode *inode) +{ +if (BTRFS_I (inode)->flags &BTRFS_INODE_NODATACOW || +BTRFS_I (inode)->flags &BTRFS_INODE_NODATASUM ) +return false; +return true; +} + +/* +* Check if the inode needs to be submitted to compression, based on mount +* options, defragmentation, properties or heuristics. +*/ static inline int inode_need_compress (struct inode *inode,u64 start,u64 end) {struct btrfs_fs_info *fs_info =btrfs_sb (inode->i_sb); +if (!inode_can_compress (inode)) { +WARN (IS_ENABLED (CONFIG_BTRFS_DEBUG ), +KERN_ERR "BTRFS: unexpected compression for ino %llu\n" , +btrfs_ino (BTRFS_I (inode))); +return 0 ; + }/* force compress */ if (btrfs_test_opt (fs_info,FORCE_COMPRESS ))return 1 ;
@@ -1596,7 +1617,8 @@ static int run_delalloc_range(void *private_data, struct page *locked_page, }else if (BTRFS_I (inode)->flags &BTRFS_INODE_PREALLOC && !force_cow) { ret =run_delalloc_nocow (inode, locked_page, start, end, page_started,0 , nr_written); - }else if (!inode_need_compress (inode, start, end)) { + }else if (!inode_can_compress (inode) || + !inode_need_compress (inode, start, end)) { ret =cow_file_range (inode, locked_page, start, end, end, page_started, nr_written,1 ,NULL ); }else {
fs/dlm/lowcomms.c +12 -6
@@ -1630,8 +1630,10 @@ static void clean_writequeues(void)static void work_stop (void ) { -destroy_workqueue (recv_workqueue); -destroy_workqueue (send_workqueue); +if (recv_workqueue) +destroy_workqueue (recv_workqueue); +if (send_workqueue) +destroy_workqueue (send_workqueue); }static int work_start (void )
@@ -1691,13 +1693,17 @@ static void work_flush(void)struct hlist_node *n;struct connection *con; -flush_workqueue (recv_workqueue); -flush_workqueue (send_workqueue); +if (recv_workqueue) +flush_workqueue (recv_workqueue); +if (send_workqueue) +flush_workqueue (send_workqueue); do { ok = 1; foreach_conn(stop_conn); - flush_workqueue(recv_workqueue); - flush_workqueue(send_workqueue); + if (recv_workqueue) + flush_workqueue(recv_workqueue); + if (send_workqueue) + flush_workqueue(send_workqueue); for (i = 0; i < CONN_HASH_SIZE && ok; i++) { hlist_for_each_entry_safe(con, n, &connection_hash[i], list) {
fs/f2fs/segment.c +5 -0
@@ -3261,6 +3261,11 @@ static int read_compacted_summaries(struct f2fs_sb_info *sbi) seg_i =CURSEG_I (sbi, i); segno =le32_to_cpu (ckpt->cur_data_segno[i]); blk_off =le16_to_cpu (ckpt->cur_data_blkoff[i]); +if (blk_off >ENTRIES_IN_SUM ) { +f2fs_bug_on (sbi,1 ); +f2fs_put_page (page,1 ); +return -EFAULT ; + } seg_i->next_segno = segno;reset_curseg (sbi, i,0 ); seg_i->alloc_type = ckpt->alloc_type[i];
fs/notify/fanotify/fanotify.c +4 -1
@@ -148,10 +148,13 @@ struct fanotify_event_info *fanotify_alloc_event(struct fsnotify_group *group,/* * For queues with unlimited length lost events are not expected and * can possibly have security implications. Avoid losing events when -* memory is short. +* memory is short. For the limited size queues, avoid OOM killer in the +* target monitoring memcg as it may have security repercussion. */ if (group->max_events ==UINT_MAX ) gfp |= __GFP_NOFAIL; +else + gfp |= __GFP_RETRY_MAYFAIL;/* Whoever is interested in the event, pays for the allocation. */ memalloc_use_memcg (group->memcg);
fs/notify/inotify/inotify_fsnotify.c +6 -2
@@ -99,9 +99,13 @@ int inotify_handle_event(struct fsnotify_group *group, i_mark = container_of(inode_mark, struct inotify_inode_mark, fsn_mark); -/* Whoever is interested in the event, pays for the allocation. */ +/* +* Whoever is interested in the event, pays for the allocation. Do not +* trigger OOM killer in the target monitoring memcg as it may have +* security repercussion. +*/ memalloc_use_memcg (group->memcg); - event =kmalloc (alloc_len,GFP_KERNEL_ACCOUNT ); + event =kmalloc (alloc_len,GFP_KERNEL_ACCOUNT | __GFP_RETRY_MAYFAIL);memalloc_unuse_memcg ();if (unlikely (!event)) {
fs/open.c +19 -0
@@ -373,6 +373,25 @@ long do_faccessat(int dfd, const char __user *filename, int mode) override_cred->cap_permitted; } +/* +* The new set of credentials can *only* be used in +* task-synchronous circumstances, and does not need +* RCU freeing, unless somebody then takes a separate +* reference to it. +* +* NOTE! This is _only_ true because this credential +* is used purely for override_creds() that installs +* it as the subjective cred. Other threads will be +* accessing ->real_cred, not the subjective cred. +* +* If somebody _does_ make a copy of this (using the +* 'get_current_cred()' function), that will clear the +* non_rcu field, because now that other user may be +* expecting RCU freeing. But normal thread-synchronous +* cred accesses will keep things non-RCY. +*/ + override_cred->non_rcu =1 ; + old_cred =override_creds (override_cred); retry: res =user_path_at (dfd, filename, lookup_flags, &path);
fs/proc/base.c +22 -6
@@ -1960,9 +1960,12 @@ static int map_files_d_revalidate(struct dentry *dentry, unsigned int flags) goto out;if (!dname_to_vma_addr (dentry, &vm_start, &vm_end)) { -down_read (&mm->mmap_sem); - exact_vma_exists = !!find_exact_vma (mm, vm_start, vm_end); -up_read (&mm->mmap_sem); + status =down_read_killable (&mm->mmap_sem); +if (!status) { + exact_vma_exists = !!find_exact_vma (mm, vm_start, + vm_end); +up_read (&mm->mmap_sem); + } }mmput (mm);
@@ -2008,8 +2011,11 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)if (rc) goto out_mmput; + rc =down_read_killable (&mm->mmap_sem); +if (rc) + goto out_mmput; + rc = -ENOENT ; -down_read (&mm->mmap_sem); vma =find_exact_vma (mm, vm_start, vm_end);if (vma && vma->vm_file) { *path = vma->vm_file->f_path;
@@ -2105,7 +2111,11 @@ static struct dentry *proc_map_files_lookup(struct inode *dir,if (!mm) goto out_put_task; -down_read (&mm->mmap_sem); + result =ERR_PTR (-EINTR ); +if (down_read_killable (&mm->mmap_sem)) + goto out_put_mm; + + result =ERR_PTR (-ENOENT ); vma =find_exact_vma (mm, vm_start, vm_end);if (!vma) goto out_no_vma;
@@ -2116,6 +2126,7 @@ static struct dentry *proc_map_files_lookup(struct inode *dir, out_no_vma:up_read (&mm->mmap_sem); +out_put_mm:mmput (mm); out_put_task:put_task_struct (task);
@@ -2157,7 +2168,12 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) mm =get_task_mm (task);if (!mm) goto out_put_task; -down_read (&mm->mmap_sem); + + ret =down_read_killable (&mm->mmap_sem); +if (ret) { +mmput (mm); + goto out_put_task; + } nr_files =0 ;
fs/proc/task_mmu.c +18 -5
@@ -166,7 +166,11 @@ static void *m_start(struct seq_file *m, loff_t *ppos)if (!mm || !mmget_not_zero (mm))return NULL ; -down_read (&mm->mmap_sem); +if (down_read_killable (&mm->mmap_sem)) { +mmput (mm); +return ERR_PTR (-EINTR ); + } +hold_task_mempolicy (priv); priv->tail_vma =get_gate_vma (mm);
@@ -826,7 +830,10 @@ static int show_smaps_rollup(struct seq_file *m, void *v)memset (&mss,0 ,sizeof (mss)); -down_read (&mm->mmap_sem); + ret =down_read_killable (&mm->mmap_sem); +if (ret) + goto out_put_mm; +hold_task_mempolicy (priv);for (vma = priv->mm->mmap; vma; vma = vma->vm_next) {
@@ -843,8 +850,9 @@ static int show_smaps_rollup(struct seq_file *m, void *v)release_task_mempolicy (priv);up_read (&mm->mmap_sem); -mmput (mm); +out_put_mm: +mmput (mm); out_put_task:put_task_struct (priv->task); priv->task =NULL ;
@@ -1127,7 +1135,10 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf, goto out_mm; } -down_read (&mm->mmap_sem); +if (down_read_killable (&mm->mmap_sem)) { + count = -EINTR ; + goto out_mm; + }tlb_gather_mmu (&tlb, mm,0 ,-1 );if (type ==CLEAR_REFS_SOFT_DIRTY ) {for (vma = mm->mmap; vma; vma = vma->vm_next) {
@@ -1531,7 +1542,9 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,/* overflow ? */ if (end < start_vaddr || end > end_vaddr) end = end_vaddr; -down_read (&mm->mmap_sem); + ret =down_read_killable (&mm->mmap_sem); +if (ret) + goto out_free; ret =walk_page_range (start_vaddr, end, &pagemap_walk);up_read (&mm->mmap_sem); start_vaddr = end;
fs/proc/task_nommu.c +5 -1
@@ -211,7 +211,11 @@ static void *m_start(struct seq_file *m, loff_t *pos)if (!mm || !mmget_not_zero (mm))return NULL ; -down_read (&mm->mmap_sem); +if (down_read_killable (&mm->mmap_sem)) { +mmput (mm); +return ERR_PTR (-EINTR ); + } +/* start from the Nth VMA */ for (p =rb_first (&mm->mm_rb); p; p =rb_next (p))if (n-- ==0 )
include/linux/cred.h +6 -1
@@ -150,7 +150,11 @@ struct cred {struct user_struct *user;/* real user ID subscription */ struct user_namespace *user_ns;/* user_ns the caps and keyrings are relative to. */ struct group_info *group_info;/* supplementary groups for euid/fsgid */ -struct rcu_head rcu;/* RCU deletion hook */ +/* RCU deletion */ +union { +int non_rcu;/* Can we skip RCU deletion? */ +struct rcu_head rcu;/* RCU deletion hook */ + }; } __randomize_layout;extern void __put_cred (struct cred *);
@@ -248,6 +252,7 @@ static inline const struct cred *get_cred(const struct cred *cred) {struct cred *nonconst_cred = (struct cred *) cred;validate_creds (cred); + nonconst_cred->non_rcu =0 ;return get_new_cred (nonconst_cred); }
include/linux/host1x.h +2 -0
@@ -310,6 +310,8 @@ struct host1x_device {struct list_head clients;bool registered; + +struct device_dma_parameters dma_parms; };static inline struct host1x_device *to_host1x_device (struct device *dev)
kernel/cred.c +19 -2
@@ -147,7 +147,10 @@ void __put_cred(struct cred *cred)BUG_ON (cred == current->cred);BUG_ON (cred == current->real_cred); -call_rcu (&cred->rcu, put_cred_rcu); +if (cred->non_rcu) +put_cred_rcu (&cred->rcu); +else +call_rcu (&cred->rcu, put_cred_rcu); }EXPORT_SYMBOL (__put_cred);
@@ -258,6 +261,7 @@ struct cred *prepare_creds(void) old = task->cred;memcpy (new, old,sizeof (struct cred )); + new->non_rcu =0 ;atomic_set (&new->usage,1 );set_cred_subscribers (new,0 );get_group_info (new->group_info);
@@ -537,7 +541,19 @@ const struct cred *override_creds(const struct cred *new)validate_creds (old);validate_creds (new); -get_cred (new); + +/* +* NOTE! This uses 'get_new_cred()' rather than 'get_cred()'. +* +* That means that we do not clear the 'non_rcu' flag, since +* we are only installing the cred into the thread-synchronous +* '->cred' pointer, not the '->real_cred' pointer that is +* visible to other threads under RCU. +* +* Also note that we did validate_creds() manually, not depending +* on the validation in 'get_cred()'. +*/ +get_new_cred ((struct cred *)new);alter_cred_subscribers (new,1 );rcu_assign_pointer (current->cred, new);alter_cred_subscribers (old,-1 );
@@ -620,6 +636,7 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)validate_creds (old); *new = *old; + new->non_rcu =0 ;atomic_set (&new->usage,1 );set_cred_subscribers (new,0 );get_uid (new->user);
kernel/locking/lockdep_proc.c +5 -3
@@ -200,7 +200,6 @@ static void lockdep_stats_debug_show(struct seq_file *m)static int lockdep_stats_show (struct seq_file *m,void *v) { -struct lock_class *class;unsigned long nr_unused =0 , nr_uncategorized =0 , nr_irq_safe =0 , nr_irq_unsafe =0 , nr_softirq_safe = 0, nr_softirq_unsafe = 0,
@@ -210,6 +209,9 @@ static int lockdep_stats_show(struct seq_file *m, void *v) nr_hardirq_read_safe =0 , nr_hardirq_read_unsafe =0 , sum_forward_deps =0 ; +#ifdef CONFIG_PROVE_LOCKING +struct lock_class *class; +list_for_each_entry (class, &all_lock_classes, lock_entry) {if (class->usage_mask ==0 )
@@ -241,12 +243,12 @@ static int lockdep_stats_show(struct seq_file *m, void *v)if (class->usage_mask &LOCKF_ENABLED_HARDIRQ_READ ) nr_hardirq_read_unsafe++; -#ifdef CONFIG_PROVE_LOCKING sum_forward_deps +=lockdep_count_forward_deps (class); -#endif }#ifdef CONFIG_DEBUG_LOCKDEP DEBUG_LOCKS_WARN_ON (debug_atomic_read (nr_unused_locks) != nr_unused); +#endif +#endif seq_printf (m," lock-classes: %11lu [max: %lu]\n" , nr_lock_classes,MAX_LOCKDEP_KEYS );
mm/gup.c +8 -4
@@ -458,11 +458,14 @@ static int get_gate_page(struct mm_struct *mm, unsigned long address, pgd =pgd_offset_k (address); else pgd =pgd_offset_gate (mm, address); -BUG_ON (pgd_none (*pgd)); +if (pgd_none (*pgd)) +return -EFAULT ; p4d =p4d_offset (pgd, address); -BUG_ON (p4d_none (*p4d)); +if (p4d_none (*p4d)) +return -EFAULT ; pud =pud_offset (p4d, address); -BUG_ON (pud_none (*pud)); +if (pud_none (*pud)) +return -EFAULT ; pmd =pmd_offset (pud, address);if (!pmd_present (*pmd))return -EFAULT ;
@@ -1367,7 +1370,8 @@ static inline pte_t gup_get_pte(pte_t *ptep) }#endif -static void undo_dev_pagemap (int *nr,int nr_start,struct page **pages) +static void __maybe_unused undo_dev_pagemap (int *nr,int nr_start, +struct page **pages) {while ((*nr) - nr_start) {struct page *page = pages[--(*nr)];
mm/kmemleak.c +1 -1
@@ -576,7 +576,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,if (in_irq ()) { object->pid =0 ;strncpy (object->comm,"hardirq" ,sizeof (object->comm)); - }else if (in_softirq ()) { + }else if (in_serving_softirq ()) { object->pid =0 ;strncpy (object->comm,"softirq" ,sizeof (object->comm)); }else {
mm/memory.c +3 -1
@@ -4491,7 +4491,9 @@ int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,void *old_buf = buf;int write = gup_flags &FOLL_WRITE ; -down_read (&mm->mmap_sem); +if (down_read_killable (&mm->mmap_sem)) +return 0 ; +/* ignore errors, just check how much was successfully transferred */ while (len) {int bytes, ret, offset;
mm/mmu_notifier.c +1 -1
@@ -316,7 +316,7 @@ static int do_mmu_notifier_register(struct mmu_notifier *mn,* thanks to mm_take_all_locks(). */ spin_lock (&mm->mmu_notifier_mm->lock); -hlist_add_head (&mn->hlist, &mm->mmu_notifier_mm->list); +hlist_add_head_rcu (&mn->hlist, &mm->mmu_notifier_mm->list);spin_unlock (&mm->mmu_notifier_mm->lock);mm_drop_all_locks (mm);
mm/nommu.c +2 -1
@@ -1779,7 +1779,8 @@ int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,struct vm_area_struct *vma;int write = gup_flags &FOLL_WRITE ; -down_read (&mm->mmap_sem); +if (down_read_killable (&mm->mmap_sem)) +return 0 ;/* the access must start within one of the target process's mappings */ vma =find_vma (mm, addr);
mm/swap.c +9 -4
@@ -740,15 +740,20 @@ void release_pages(struct page **pages, int nr)if (is_huge_zero_page (page))continue ; -/* Device public page can not be huge page */ -if (is_device_public_page (page)) { +if (is_zone_device_page (page)) {if (locked_pgdat) {spin_unlock_irqrestore (&locked_pgdat->lru_lock, flags); locked_pgdat =NULL ; } -put_devmap_managed_page (page); -continue ; +/* +* ZONE_DEVICE pages that return 'false' from +* put_devmap_managed_page() do not require special +* processing, and instead, expect a call to +* put_page_testzero(). +*/ +if (put_devmap_managed_page (page)) +continue ; } page =compound_head (page);
net/vmw_vsock/hyperv_transport.c +11 -33
75 lines not on this page · raw message
scripts/genksyms/keywords.c +4 -0
@@ -24,6 +24,10 @@ static struct resword { { "__volatile__", VOLATILE_KEYW }, { "__builtin_va_list", VA_LIST_KEYW }, + { "__int128", BUILTIN_INT_KEYW }, + { "__int128_t", BUILTIN_INT_KEYW }, + { "__uint128_t", BUILTIN_INT_KEYW }, +// According to rth, c99 defines "_Bool", __restrict", __restrict__", "restrict". KAO { "_Bool", BOOL_KEYW }, { "_restrict", RESTRICT_KEYW },
scripts/genksyms/parse.y +2 -0
@@ -76,6 +76,7 @@ static void record_compound(struct string_list **keyw, %token ATTRIBUTE_KEYW %token AUTO_KEYW %token BOOL_KEYW +%token BUILTIN_INT_KEYW %token CHAR_KEYW %token CONST_KEYW %token DOUBLE_KEYW
@@ -263,6 +264,7 @@ simple_type_specifier: | VOID_KEYW | BOOL_KEYW | VA_LIST_KEYW + | BUILTIN_INT_KEYW | TYPE { (*$1)->tag = SYM_TYPEDEF; $$ = $1; } ;
scripts/kallsyms.c +3 -0
@@ -152,6 +152,9 @@ static int read_symbol(FILE *in, struct sym_entry *s)/* exclude debugging symbols */ else if (stype == 'N' || stype == 'n')return -1 ; +/* exclude s390 kasan local symbols */ + else if (!strncmp(sym, ".LASANPC", 8)) +return -1 ;/* include the type field in the symbol name, so that it gets * compressed together */
scripts/recordmcount.h +2 -1
@@ -326,7 +326,8 @@ static uint_t *sift_rel_mcount(uint_t *mlocp,if (!mcountsym) mcountsym =get_mcountsym (sym0, relp, str0); -if (mcountsym ==Elf_r_sym (relp) && !is_fake_mcount (relp)) { +if (mcountsym && mcountsym ==Elf_r_sym (relp) && + !is_fake_mcount (relp)) {uint_t const addend =_w (_w (relp->r_offset) - recval + mcount_adjust); mrelp->r_offset = _w(offbase
sound/ac97/bus.c +4 -9
@@ -125,17 +125,12 @@ static int ac97_codec_add(struct ac97_controller *ac97_ctrl, int idx, vendor_id); ret =device_add (&codec->dev); -if (ret) - goto err_free_codec; +if (ret) { +put_device (&codec->dev); +return ret; + }return 0 ; -err_free_codec: -of_node_put (codec->dev.of_node); -put_device (&codec->dev); -kfree (codec); - ac97_ctrl->codecs[idx] =NULL ; - -return ret; } unsigned int snd_ac97_bus_scan_one(struct ac97_controller *adrv,
sound/pci/hda/patch_conexant.c +1 -0
@@ -1096,6 +1096,7 @@ static int patch_conexant_auto(struct hda_codec *codec)*/ static const struct hda_device_id snd_hda_id_conexant[] = { +HDA_CODEC_ENTRY (0x14f11f86 ,"CX8070" , patch_conexant_auto),HDA_CODEC_ENTRY (0x14f12008 ,"CX8200" , patch_conexant_auto),HDA_CODEC_ENTRY (0x14f15045 ,"CX20549 (Venice)" , patch_conexant_auto),HDA_CODEC_ENTRY (0x14f15047 ,"CX20551 (Waikiki)" , patch_conexant_auto),
sound/usb/line6/podhd.c +1 -1
@@ -417,7 +417,7 @@ static const struct line6_properties podhd_properties_table[] = { .name = "POD HD500", .capabilities =LINE6_CAP_PCM | LINE6_CAP_HWMON, - .altsetting = 1, + .altsetting = 0, .ep_ctrl_r = 0x81, .ep_ctrl_w = 0x01, .ep_audio_r = 0x86,
tools/iio/iio_utils.c +2 -2
@@ -159,9 +159,9 @@ int iioutils_get_type(unsigned *is_signed, unsigned *bytes, unsigned *bits_used, *be = (endianchar =='b' ); *bytes = padint /8 ;if (*bits_used ==64 ) - *mask = ~0 ; + *mask = ~(0ULL );else - *mask = (1ULL << *bits_used) -1 ; + *mask = (1ULL << *bits_used) -1ULL ; *is_signed = (signchar =='s' );if (fclose (sysfsfp)) {
tools/perf/builtin-stat.c +1 -1
@@ -2497,8 +2497,8 @@ static int add_default_attributes(void)fprintf (stderr,"Cannot set up top down events %s: %d\n" , str, err); -free (str);parse_events_print_error (&errinfo, str); +free (str);return -1 ; } }else {
tools/perf/builtin-top.c +6 -2
@@ -99,7 +99,7 @@ static void perf_top__resize(struct perf_top *top)static int perf_top__parse_source (struct perf_top *top,struct hist_entry *he) { -struct perf_evsel *evsel =hists_to_evsel (he->hists); +struct perf_evsel *evsel;struct symbol *sym;struct annotation *notes;struct map *map;
@@ -108,6 +108,8 @@ static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he)if (!he || !he->ms.sym)return -1 ; + evsel =hists_to_evsel (he->hists); + sym = he->ms.sym; map = he->ms.map;
@@ -224,7 +226,7 @@ static void perf_top__record_precise_ip(struct perf_top *top,static void perf_top__show_details (struct perf_top *top) {struct hist_entry *he = top->sym_filter_entry; -struct perf_evsel *evsel =hists_to_evsel (he->hists); +struct perf_evsel *evsel;struct annotation *notes;struct symbol *symbol;int more;
@@ -232,6 +234,8 @@ static void perf_top__show_details(struct perf_top *top)if (!he)return ; + evsel =hists_to_evsel (he->hists); + symbol = he->ms.sym; notes =symbol__annotation (symbol);
tools/perf/tests/mmap-thread-lookup.c +1 -1
@@ -52,7 +52,7 @@ static void *thread_fn(void *arg) {struct thread_data *td = arg;ssize_t ret; -int go; +int go =0 ;if (thread_init (td))return NULL ;
tools/perf/ui/browsers/hists.c +11 -4
@@ -633,7 +633,11 @@ int hist_browser__run(struct hist_browser *browser, const char *help,switch (key) {case K_TIMER : {u64 nr_entries; - hbt->timer (hbt->arg); + +WARN_ON_ONCE (!hbt); + +if (hbt) + hbt->timer (hbt->arg);if (hist_browser__has_filter (browser) || symbol_conf.report_hierarchy)
@@ -2707,7 +2711,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, {struct hists *hists =evsel__hists (evsel);struct hist_browser *browser =perf_evsel_browser__new (evsel, hbt, env, annotation_opts); -struct branch_info *bi; +struct branch_info *bi =NULL ;#define MAX_OPTIONS 16char *options[MAX_OPTIONS ];struct popup_action actions[MAX_OPTIONS ];
@@ -2973,7 +2977,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, goto skip_annotation;if (sort__mode ==SORT_MODE__BRANCH ) { - bi = browser->he_selection->branch_info; + +if (browser->he_selection) + bi = browser->he_selection->branch_info;if (bi ==NULL ) goto skip_annotation;
@@ -3144,7 +3150,8 @@ static int perf_evsel_menu__run(struct perf_evsel_menu *menu,switch (key) {case K_TIMER : - hbt->timer (hbt->arg); +if (hbt) + hbt->timer (hbt->arg); if (!menu->lost_events_warned && menu->lost_events &&
tools/perf/util/annotate.c +2 -4
@@ -1079,16 +1079,14 @@ static int disasm_line__parse(char *line, const char **namep, char **rawp) *namep =strdup (name);if (*namep ==NULL ) - goto out_free_name; + goto out; (*rawp)[0 ] = tmp; *rawp =ltrim (*rawp);return 0 ; -out_free_name: -free ((void *)namep); - *namep =NULL ; +out:return -1 ; }
tools/perf/util/session.c +3 -0
@@ -1141,6 +1141,9 @@ static void dump_read(struct perf_evsel *evsel, union perf_event *event) evsel ?perf_evsel__name (evsel) :"FAIL" , event->read.value); +if (!evsel) +return ; + read_format = evsel->attr.read_format;if (read_format &PERF_FORMAT_TOTAL_TIME_ENABLED )