Linux 4.14.85
Greg KH
maintainerI'm announcing the release of the 4.14.85 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/net/can/holt_hi311x.txt | 2 Documentation/sysctl/fs.txt | 36 +++ MAINTAINERS | 1 Makefile | 10 - arch/arm/Makefile | 2 arch/arm/boot/compressed/Makefile | 2 arch/arm/boot/dts/exynos5420-peach-pit.dts | 4 arch/arm/boot/dts/exynos5800-peach-pi.dts | 4 arch/arm/firmware/trusted_foundations.c | 14 - arch/arm64/Makefile | 2 arch/powerpc/include/asm/io.h | 20 -- arch/powerpc/kvm/trace.h | 8 arch/powerpc/kvm/trace_booke.h | 9 arch/powerpc/kvm/trace_hv.h | 9 arch/powerpc/kvm/trace_pr.h | 9 arch/powerpc/mm/numa.c | 2 arch/s390/mm/gmap.c | 2 arch/x86/events/intel/uncore_snb.c | 115 +++++++++++- crypto/simd.c | 5 drivers/base/core.c | 2 drivers/block/floppy.c | 3 drivers/bus/arm-cci.c | 2 drivers/clk/samsung/clk-exynos5250.c | 6 drivers/cpufreq/imx6q-cpufreq.c | 7 drivers/firmware/efi/arm-init.c | 4 drivers/firmware/efi/arm-runtime.c | 2 drivers/firmware/efi/libstub/Makefile | 3 drivers/firmware/efi/memmap.c | 3 drivers/gpio/gpiolib.c | 5 drivers/gpu/drm/ast/ast_drv.c | 21 ++ drivers/gpu/drm/ast/ast_mode.c | 3 drivers/gpu/drm/mediatek/mtk_hdmi.c | 5 drivers/infiniband/core/verbs.c | 5 drivers/infiniband/hw/hfi1/user_sdma.c | 87 ++++----- drivers/infiniband/hw/hfi1/user_sdma.h | 3 drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 drivers/input/joystick/xpad.c | 45 ++-- drivers/input/mouse/synaptics.c | 4 drivers/mmc/host/sdhci-pci-core.c | 7 drivers/mtd/nand/atmel/nand-controller.c | 11 - drivers/mtd/ubi/build.c | 1 drivers/mtd/ubi/eba.c | 4 drivers/mtd/ubi/fastmap.c | 20 ++ drivers/mtd/ubi/ubi.h | 11 + drivers/mtd/ubi/vmt.c | 1 drivers/mtd/ubi/vtbl.c | 16 + drivers/net/can/dev.c | 48 +++-- drivers/net/can/flexcan.c | 4 drivers/net/can/rx-offload.c | 51 +++++ drivers/net/can/spi/hi311x.c | 2 drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 1 drivers/net/usb/lan78xx.c | 42 ++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 40 +++- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 - drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 5 drivers/nfc/nfcmrvl/uart.c | 5 drivers/of/base.c | 25 ++ drivers/pci/endpoint/pci-ep-cfs.c | 14 - drivers/pinctrl/meson/pinctrl-meson.c | 2 drivers/power/supply/twl4030_charger.c | 5 drivers/rtc/rtc-omap.c | 3 drivers/rtc/rtc-pcf2127.c | 3 drivers/tty/n_tty.c | 20 +- drivers/tty/tty_buffer.c | 6 drivers/usb/core/hub.c | 4 drivers/usb/dwc3/core.c | 1 drivers/usb/dwc3/gadget.c | 8 drivers/usb/host/xhci-hub.c | 66 +++++- drivers/usb/host/xhci-pci.c | 5 drivers/usb/host/xhci-ring.c | 38 +++ drivers/usb/host/xhci.c | 6 drivers/usb/host/xhci.h | 67 +++--- fs/9p/vfs_dir.c | 11 - fs/bfs/inode.c | 9 fs/gfs2/ops_fstype.c | 2 fs/namei.c | 53 +++++ include/linux/can/dev.h | 1 include/linux/can/rx-offload.h | 7 include/linux/fs.h | 2 include/linux/integrity.h | 1 include/linux/of.h | 8 include/linux/pfn_t.h | 2 include/net/sock.h | 1 kernel/debug/kdb/kdb_io.c | 15 - kernel/debug/kdb/kdb_private.h | 2 kernel/debug/kdb/kdb_support.c | 10 - kernel/rcu/tree.c | 9 kernel/sysctl.c | 18 + mm/memory.c | 34 +++ mm/page_alloc.c | 20 -- mm/shmem.c | 4 mm/slab.c | 4 mm/slab_common.c | 12 - mm/z3fold.c | 101 ++++++---- net/can/raw.c | 15 - net/core/sock.c | 2 net/ieee802154/6lowpan/6lowpan_i.h | 4 net/ieee802154/6lowpan/reassembly.c | 14 - net/ipv4/tcp.c | 11 - net/llc/af_llc.c | 11 - net/sctp/associola.c | 10 - net/sunrpc/auth_generic.c | 8 security/integrity/evm/evm.h | 2 security/integrity/evm/evm_crypto.c | 75 ++++++- security/integrity/evm/evm_main.c | 29 +-- security/integrity/iint.c | 3 security/integrity/ima/ima_api.c | 67 ++++-- security/integrity/ima/ima_appraise.c | 31 +-- security/integrity/ima/ima_crypto.c | 10 + security/integrity/ima/ima_main.c | 77 +++++--- security/integrity/integrity.h | 18 + security/selinux/ss/policydb.c | 2 sound/core/oss/pcm_oss.c | 6 sound/core/oss/pcm_plugin.c | 6 tools/power/cpupower/bench/Makefile | 2 tools/power/cpupower/lib/cpufreq.c | 2 tools/power/cpupower/lib/cpuidle.c | 2 tools/power/cpupower/lib/cpupower.c | 4 tools/power/cpupower/lib/cpupower_intern.h | 2 121 files changed, 1253 insertions(+), 513 deletions(-)
Aaron Ma (2):
usb: xhci: fix timeout for transition from RExit to U0
usb: xhci: fix uninitialized completion when USB3 port got wrong status
Alexander Aring (1):
net: ieee802154: 6lowpan: fix frag reassembly
Alexandre Belloni (1):
rtc: omap: fix error path when pinctrl_register fails
Alistair Strachan (1):
efi/libstub: arm: support building with clang
Andrew Price (1):
gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd
Andy Shevchenko (1):
usb: dwc3: core: Clean up ULPI device
Aneesh Kumar K.V (1):
mm/memory.c: recheck page table entry with page table lock held
Anson Huang (1):
cpufreq: imx6q: add return value check for voltage scale
Ard Biesheuvel (2):
crypto: simd - correctly take reqsize of wrapped skcipher into account efi/arm: Revert deferred unmap of early memmap mapping
Cherian, George (1):
xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc
Dennis Wassenberg (1):
usb: core: Fix hub port connection events lost
Dmitry Kasatkin (1):
ima: re-introduce own integrity cache lock
Dmitry Torokhov (1):
Input: synaptics - avoid using uninitialized variable when probing
Dmitry Vyukov (1):
mm: don't warn about large allocations for slab
Dominique Martinet (1):
v9fs_dir_readdir: fix double-free on p9stat_read error
Emmanuel Grumbach (2):
iwlwifi: mvm: support sta_statistics() even on older firmware
iwlwifi: mvm: fix regulatory domain update when the firmware starts
Eran Ben Elisha (1):
net/mlx4_core: Fix wrong calculation of free counters
Eric Dumazet (2):
llc: do not use sk_eat_skb()
tcp: do not release socket ownership in tcp_close()
Felipe Balbi (1):
usb: dwc3: gadget: fix ISOC TRB type on unaligned transfers
Francis Therien (1):
Input: xpad - add PDP device id 0x02a4
Greg Hackmann (1):
arm64: remove no-op -p linker flag
Greg Kroah-Hartman (3):
MAINTAINERS: Add Sasha as a stable branch maintainer
tty: wipe buffer if not echoing data
Linux 4.14.85
Janosch Frank (1):
s390/mm: Check for valid vma before zapping in gmap_discard
Jeffy Chen (1):
driver core: Move device_links_purge() after bus_remove_device()
Jens Axboe (1):
floppy: fix race condition in __floppy_read_block_0()
Jerome Brunet (1):
pinctrl: meson: fix pinconf bias disable
Johan Hovold (6):
of: add helper to lookup compatible child node
NFC: nfcmrvl_uart: fix OF child-node lookup
net: bcmgenet: fix OF child-node lookup drm/mediatek: fix OF sibling-node lookup
power: supply: twl4030-charger: fix OF sibling-node lookup
mtd: rawnand: atmel: fix OF child-node lookup
Kan Liang (1):
perf/x86/intel/uncore: Add more IMC PCI IDs for KabyLake and CoffeeLake CPUs
Konstantin Khlebnikov (1):
tools/power/cpupower: fix compilation with STATIC=true
Krzysztof Kozlowski (1):
ARM: dts: exynos: Fix invalid node referenced by i2c20 alias in Peach Pit and Pi
Leo Sperling (1):
Input: xpad - fix some coding style issues
Linus Torvalds (1):
tty: wipe buffer.
Luca Coelho (1):
iwlwifi: mvm: don't use SAR Geo if basic SAR is not used
Lukas Wunner (1):
can: hi311x: Use level-triggered interrupt
Marc Kleine-Budde (4):
can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb()
can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length
can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds
can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb
Marc Zyngier (1):
xhci: Allow more than 32 quirks
Marcus Folkesson (1):
Input: xpad - avoid using __set_bit() for capabilities
Marek Szyprowski (1):
clk: samsung: exynos5250: Add missing clocks for FIMC LITE SYSMMU devices
Mathias Nyman (1):
usb: xhci: Prevent bus suspend if a port connect change or polling state is detected
Matt Chen (1):
iwlwifi: fix wrong WGDS_WIFI_DATA_SIZE
Matthew Garrett (1):
EVM: Add support for portable signature format
Michael Ellerman (1):
powerpc/io: Fix the IO workarounds code to work with Radix
Michael J. Ruhl (1):
IB/hfi1: Eliminate races in the SDMA send error path
Michal Hocko (1):
mm, page_alloc: check for max order in hot path
Mimi Zohar (2):
ima: always measure and audit files in policy
ima: re-initialize iint->atomic_flags
Mustafa Ismail (1):
i40iw: Fix memory leak in error path of create QP
Niklas Cassel (1):
PCI: endpoint: Populate func_no before calling pci_epc_add_epf()
Oleksij Rempel (2):
can: rx-offload: introduce can_rx_offload_get_echo_skb() and can_rx_offload_queue_sorted() functions
can: rx-offload: rename can_rx_offload_irq_queue_err_skb() to can_rx_offload_queue_tail()
Oliver Hartkopp (1):
can: raw: check for CAN FD capable netdev in raw_sendmsg()
Parav Pandit (1):
IB/core: Perform modify QP on real one
Paul E. McKenney (1):
rcu: Make need_resched() respond to urgent RCU-QS needs
Phil Elwell (1):
lan78xx: Read MAC address from DT if present
Prarit Bhargava (1):
kdb: Use strscpy with destination buffer size
Rafał Miłecki (1):
brcmfmac: fix reporting support for 160 MHz channels
Rajat Jain (1):
mmc: sdhci-pci: Try "cd" for card-detect lookup before using NULL
Ramses Ramírez (1):
Input: xpad - add support for Xbox1 PDP Camo series gamepad
Richard Weinberger (1):
ubi: fastmap: Check each mapping only once
Salvatore Mesoraca (1):
namei: allow restricted O_CREAT of FIFOs and regular files
Sandeep Singh (1):
xhci: Add check for invalid byte size error when UAS devices are connected.
Satheesh Rajendran (1):
powerpc/numa: Suppress "VPHN is not supported" messages
Scott Wood (1):
KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
Sebastien Boisvert (1):
include/linux/pfn_t.h: force '~' to be parsed as an unary operator
Stefan Agner (5):
ARM: 8766/1: drop no-thumb-interwork in EABI mode
ARM: 8767/1: add support for building ARM kernel with clang
bus: arm-cci: remove unnecessary unreachable()
ARM: trusted_foundations: do not use naked function
kbuild: allow to use GCC toolchain not in Clang search path
Takashi Iwai (1):
ALSA: oss: Use kvzalloc() for local buffer allocations
Tetsuo Handa (2):
selinux: Add __GFP_NOWARN to allocation at str_read()
bfs: add sanity check at bfs_fill_super()
Thinh Nguyen (1):
usb: dwc3: gadget: Properly check last unaligned/zero chain TRB
Thomas Zimmermann (1):
drm/ast: Remove existing framebuffers before loading driver
Trond Myklebust (1):
SUNRPC: Fix a bogus get/put in generic_key_to_expire()
Vitaly Wool (1):
z3fold: fix possible reclaim races
Vladimir Zapolskiy (1):
gpio: don't free unallocated ida on gpiochip_add_data_with_key() error path
Xin Long (1):
sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer
Xulin Sun (1):
rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write
Y.C. Chen (2):
drm/ast: change resolution may cause screen blurred drm/ast: fixed cursor may disappear sometimes
Yufen Yu (1):
tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset
Greg KH
maintainerDocumentation/devicetree/bindings/net/can/holt_hi311x.txt +1 -1
@@ -18,7 +18,7 @@ Example: reg = <1>; clocks = <&clk32m>; interrupt-parent = <&gpio4>; - interrupts = <13 IRQ_TYPE_EDGE_RISING>; + interrupts = <13 IRQ_TYPE_LEVEL_HIGH>; vdd-supply = <®5v0>; xceiver-supply = <®5v0>; };
Documentation/sysctl/fs.txt +36 -0
@@ -34,7 +34,9 @@ Currently, these files are in /proc/sys/fs: - overflowgid - pipe-user-pages-hard - pipe-user-pages-soft +- protected_fifos - protected_hardlinks +- protected_regular - protected_symlinks - suid_dumpable - super-max
@@ -182,6 +184,24 @@ applied. ============================================================== +protected_fifos: + +The intent of this protection is to avoid unintentional writes to +an attacker-controlled FIFO, where a program expected to create a regular +file. + +When set to "0", writing to FIFOs is unrestricted. + +When set to "1" don't allow O_CREAT open on FIFOs that we don't own +in world writable sticky directories, unless they are owned by the +owner of the directory. + +When set to "2" it also applies to group writable sticky directories. + +This protection is based on the restrictions in Openwall. + +============================================================== + protected_hardlinks: A long-standing class of security issues is the hardlink-based
@@ -202,6 +222,22 @@ This protection is based on the restrictions in Openwall and grsecurity. ============================================================== +protected_regular: + +This protection is similar to protected_fifos, but it +avoids writes to an attacker-controlled regular file, where a program +expected to create one. + +When set to "0", writing to regular files is unrestricted. + +When set to "1" don't allow O_CREAT open on regular files that we +don't own in world writable sticky directories, unless they are +owned by the owner of the directory. + +When set to "2" it also applies to group writable sticky directories. + +============================================================== + protected_symlinks: A long-standing class of security issues is the symlink-based
MAINTAINERS +1 -0
@@ -12662,6 +12662,7 @@ F: arch/alpha/kernel/srm_env.c STABLE BRANCH M: Greg Kroah-Hartman <[email protected]> +M: Sasha Levin <[email protected]> L: [email protected] S: Supported F: Documentation/process/stable-kernel-rules.rst
Makefile +6 -4
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 84 +SUBLEVEL = 85 EXTRAVERSION = NAME = Petit Gorille
@@ -480,13 +480,15 @@ endif ifeq ($(cc-name),clang) ifneq ($(CROSS_COMPILE),) CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) -GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..) +GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD))) +CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR) +GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) endif ifneq ($(GCC_TOOLCHAIN),) CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN) endif -KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) -KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) +KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX) +KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX) KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) endif
arch/arm/Makefile +1 -1
@@ -106,7 +106,7 @@ tune-$(CONFIG_CPU_V6K) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) tune-y := $(tune-y) ifeq ($(CONFIG_AEABI),y) -CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp +CFLAGS_ABI :=-mabi=aapcs-linux -mfpu=vfp else CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) endif
arch/arm/boot/compressed/Makefile +1 -1
@@ -113,7 +113,7 @@ CFLAGS_fdt_ro.o := $(nossp_flags) CFLAGS_fdt_rw.o := $(nossp_flags) CFLAGS_fdt_wip.o := $(nossp_flags) -ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj) +ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj) asflags-y := -DZIMAGE # Supply kernel BSS size to the decompressor via a linker symbol.
arch/arm/boot/dts/exynos5420-peach-pit.dts +2 -2
@@ -31,7 +31,7 @@ aliases { /* Assign 20 so we don't get confused w/ builtin ones */ - i2c20 = "/spi@12d40000/cros-ec@0/i2c-tunnel"; + i2c20 = &i2c_tunnel; }; backlight: backlight {
@@ -952,7 +952,7 @@ samsung,spi-feedback-delay = <1>; }; - i2c-tunnel { + i2c_tunnel: i2c-tunnel { compatible = "google,cros-ec-i2c-tunnel"; #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/exynos5800-peach-pi.dts +2 -2
@@ -29,7 +29,7 @@ aliases { /* Assign 20 so we don't get confused w/ builtin ones */ - i2c20 = "/spi@12d40000/cros-ec@0/i2c-tunnel"; + i2c20 = &i2c_tunnel; }; backlight: backlight {
@@ -921,7 +921,7 @@ samsung,spi-feedback-delay = <1>; }; - i2c-tunnel { + i2c_tunnel: i2c-tunnel { compatible = "google,cros-ec-i2c-tunnel"; #address-cells = <1>; #size-cells = <0>;
arch/arm/firmware/trusted_foundations.c +9 -5
@@ -31,21 +31,25 @@static unsigned long cpu_boot_addr; -static void __naked tf_generic_smc (u32 type,u32 arg1,u32 arg2) +static void tf_generic_smc (u32 type,u32 arg1,u32 arg2) { + register u32 r0 asm("r0") = type; + register u32 r1 asm("r1") = arg1; + register u32 r2 asm("r2") = arg2; + asmvolatile (".arch_extension sec\n\t" -"stmfd sp!, {r4 - r11, lr}\n\t" +"stmfd sp!, {r4 - r11}\n\t" __asmeq("%0", "r0") __asmeq("%1", "r1") __asmeq("%2", "r2") "mov r3, #0\n\t" "mov r4, #0\n\t" "smc #0\n\t" - "ldmfd sp!, {r4 - r11, pc}" + "ldmfd sp!, {r4 - r11}\n\t" : - : "r" (type), "r" (arg1), "r" (arg2) - : "memory"); + : "r" (r0), "r" (r1), "r" (r2) + : "memory", "r3", "r12", "lr"); }static int tf_set_cpu_boot_addr (int cpu,unsigned long boot_addr)
arch/arm64/Makefile +1 -1
@@ -10,7 +10,7 @@ # # Copyright (C) 1995-2001 by Russell King -LDFLAGS_vmlinux :=-p --no-undefined -X +LDFLAGS_vmlinux :=--no-undefined -X CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) GZFLAGS :=-9
arch/powerpc/include/asm/io.h +7 -13
@@ -287,19 +287,13 @@ extern void _memcpy_toio(volatile void __iomem *dest, const void *src,* their hooks, a bitfield is reserved for use by the platform near the * top of MMIO addresses (not PIO, those have to cope the hard way). * -* This bit field is 12 bits and is at the top of the IO virtual -* addresses PCI_IO_INDIRECT_TOKEN_MASK. +* The highest address in the kernel virtual space are: * -* The kernel virtual space is thus: +* d0003fffffffffff # with Hash MMU +* c00fffffffffffff # with Radix MMU * -* 0xD000000000000000 : vmalloc -* 0xD000080000000000 : PCI PHB IO space -* 0xD000080080000000 : ioremap -* 0xD0000fffffffffff : end of ioremap region -* -* Since the top 4 bits are reserved as the region ID, we use thus -* the next 12 bits and keep 4 bits available for the future if the -* virtual address space is ever to be extended. +* The top 4 bits are reserved as the region ID on hash, leaving us 8 bits +* that can be used for the field. * * The direct IO mapping operations will then mask off those bits * before doing the actual access, though that only happen when
@@ -311,8 +305,8 @@ extern void _memcpy_toio(volatile void __iomem *dest, const void *src,*/ #ifdef CONFIG_PPC_INDIRECT_MMIO -#define PCI_IO_IND_TOKEN_MASK 0x0fff000000000000ul -#define PCI_IO_IND_TOKEN_SHIFT 48 +#define PCI_IO_IND_TOKEN_SHIFT 52 +#define PCI_IO_IND_TOKEN_MASK (0xfful << PCI_IO_IND_TOKEN_SHIFT)#define PCI_FIX_ADDR (addr) \ ((PCI_IO_ADDR)(((unsigned long)(addr)) & ~PCI_IO_IND_TOKEN_MASK))#define PCI_GET_ADDR_TOKEN (addr) \
arch/powerpc/kvm/trace.h +6 -2
@@ -6,8 +6,6 @@#undef TRACE_SYSTEM#define TRACE_SYSTEM kvm -#define TRACE_INCLUDE_PATH . -#define TRACE_INCLUDE_FILE trace/* * Tracepoint for guest mode entry.
@@ -120,4 +118,10 @@ TRACE_EVENT(kvm_check_requests,#endif /* _TRACE_KVM_H */ /* This part must be outside protection */ +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE + +#define TRACE_INCLUDE_PATH . +#define TRACE_INCLUDE_FILE trace +#include <trace/define_trace.h>
arch/powerpc/kvm/trace_booke.h +7 -2
@@ -6,8 +6,6 @@#undef TRACE_SYSTEM#define TRACE_SYSTEM kvm_booke -#define TRACE_INCLUDE_PATH . -#define TRACE_INCLUDE_FILE trace_booke#define kvm_trace_symbol_exit \ {0, "CRITICAL"}, \
@@ -218,4 +216,11 @@ TRACE_EVENT(kvm_booke_queue_irqprio,#endif /* This part must be outside protection */ + +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE + +#define TRACE_INCLUDE_PATH . +#define TRACE_INCLUDE_FILE trace_booke +#include <trace/define_trace.h>
arch/powerpc/kvm/trace_hv.h +7 -2
@@ -9,8 +9,6 @@#undef TRACE_SYSTEM#define TRACE_SYSTEM kvm_hv -#define TRACE_INCLUDE_PATH . -#define TRACE_INCLUDE_FILE trace_hv#define kvm_trace_symbol_hcall \ {H_REMOVE, "H_REMOVE"}, \
@@ -497,4 +495,11 @@ TRACE_EVENT(kvmppc_run_vcpu_exit,#endif /* _TRACE_KVM_HV_H */ /* This part must be outside protection */ + +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE + +#define TRACE_INCLUDE_PATH . +#define TRACE_INCLUDE_FILE trace_hv +#include <trace/define_trace.h>
arch/powerpc/kvm/trace_pr.h +7 -2
@@ -8,8 +8,6 @@#undef TRACE_SYSTEM#define TRACE_SYSTEM kvm_pr -#define TRACE_INCLUDE_PATH . -#define TRACE_INCLUDE_FILE trace_pr TRACE_EVENT(kvm_book3s_reenter, TP_PROTO(int r, struct kvm_vcpu *vcpu),
@@ -272,4 +270,11 @@ TRACE_EVENT(kvm_unmap_hva,#endif /* _TRACE_KVM_H */ /* This part must be outside protection */ + +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE + +#define TRACE_INCLUDE_PATH . +#define TRACE_INCLUDE_FILE trace_pr +#include <trace/define_trace.h>
arch/powerpc/mm/numa.c +1 -1
@@ -1261,7 +1261,7 @@ static long vphn_get_associativity(unsigned long cpu,switch (rc) {case H_FUNCTION : -printk (KERN_INFO +printk_once (KERN_INFO "VPHN is not supported. Disabling polling...\n" );stop_topology_update ();break ;
arch/s390/mm/gmap.c +2 -0
@@ -689,6 +689,8 @@ void gmap_discard(struct gmap *gmap, unsigned long from, unsigned long to) vmaddr |= gaddr & ~PMD_MASK ;/* Find vma in the parent mm */ vma =find_vma (gmap->mm, vmaddr); +if (!vma) +continue ; size =min (to - gaddr,PMD_SIZE - (gaddr & ~PMD_MASK ));zap_page_range (vma, vmaddr, size); }
arch/x86/events/intel/uncore_snb.c +114 -1
133 lines not on this page · raw message
crypto/simd.c +3 -2
@@ -126,8 +126,9 @@ static int simd_skcipher_init(struct crypto_skcipher *tfm) ctx->cryptd_tfm = cryptd_tfm; - reqsize =sizeof (struct skcipher_request ); - reqsize +=crypto_skcipher_reqsize (&cryptd_tfm->base); + reqsize =crypto_skcipher_reqsize (cryptd_skcipher_child (cryptd_tfm)); + reqsize =max (reqsize,crypto_skcipher_reqsize (&cryptd_tfm->base)); + reqsize +=sizeof (struct skcipher_request );crypto_skcipher_set_reqsize (tfm, reqsize);
drivers/base/core.c +1 -1
@@ -1973,7 +1973,6 @@ void device_del(struct device *dev)blocking_notifier_call_chain (&dev->bus->p->bus_notifier,BUS_NOTIFY_DEL_DEVICE , dev); -device_links_purge (dev);dpm_sysfs_remove (dev);if (parent)klist_del (&dev->p->knode_parent);
@@ -2001,6 +2000,7 @@ void device_del(struct device *dev)device_pm_remove (dev);driver_deferred_probe_del (dev);device_remove_properties (dev); +device_links_purge (dev);/* Notify the platform of the removal, in case they * need to do anything...
drivers/block/floppy.c +2 -1
@@ -4146,10 +4146,11 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive) bio.bi_end_io = floppy_rb0_cb;bio_set_op_attrs (&bio,REQ_OP_READ ,0 ); +init_completion (&cbdata.complete); +submit_bio (&bio);process_fd_request (); -init_completion (&cbdata.complete);wait_for_completion (&cbdata.complete);__free_page (page);
drivers/bus/arm-cci.c +0 -2
@@ -2103,8 +2103,6 @@ asmlinkage void __naked cci_enable_port_for_self(void) [sizeof_struct_cpu_port] "i" (sizeof(struct cpu_port)), [sizeof_struct_ace_port] "i" (sizeof(struct cci_ace_port)), [offsetof_port_phys] "i" (offsetof(struct cci_ace_port, phys)) ); - -unreachable (); }/**
drivers/clk/samsung/clk-exynos5250.c +6 -0
@@ -560,6 +560,8 @@ static const struct samsung_gate_clock exynos5250_gate_clks[] __initconst = { 0),GATE (CLK_GSCL3 ,"gscl3" ,"mout_aclk266_gscl_sub" ,GATE_IP_GSCL ,3 ,0 ,0 ), +GATE (CLK_CAMIF_TOP ,"camif_top" ,"mout_aclk266_gscl_sub" , +GATE_IP_GSCL ,4 ,0 ,0 ),GATE (CLK_GSCL_WA ,"gscl_wa" ,"div_gscl_wa" ,GATE_IP_GSCL ,5 ,0 ,0 ),GATE (CLK_GSCL_WB ,"gscl_wb" ,"div_gscl_wb" ,GATE_IP_GSCL ,6 ,0 ,0 ), GATE(CLK_SMMU_GSCL0, "smmu_gscl0", "mout_aclk266_gscl_sub",
@@ -570,6 +572,10 @@ static const struct samsung_gate_clock exynos5250_gate_clks[] __initconst = { GATE_IP_GSCL, 9, 0, 0),GATE (CLK_SMMU_GSCL3 ,"smmu_gscl3" ,"mout_aclk266_gscl_sub" ,GATE_IP_GSCL ,10 ,0 ,0 ), +GATE (CLK_SMMU_FIMC_LITE0 ,"smmu_fimc_lite0" ,"mout_aclk266_gscl_sub" , +GATE_IP_GSCL ,11 ,0 ,0 ), +GATE (CLK_SMMU_FIMC_LITE1 ,"smmu_fimc_lite1" ,"mout_aclk266_gscl_sub" , +GATE_IP_GSCL ,12 ,0 ,0 ),GATE (CLK_FIMD1 ,"fimd1" ,"mout_aclk200_disp1_sub" ,GATE_IP_DISP1 ,0 ,0 , 0),
drivers/cpufreq/imx6q-cpufreq.c +6 -1
@@ -135,8 +135,13 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index)/* Ensure the arm clock divider is what we expect */ ret =clk_set_rate (arm_clk, new_freq *1000 );if (ret) { +int ret1; +dev_err (cpu_dev,"failed to set clock rate: %d\n" , ret); -regulator_set_voltage_tol (arm_reg, volt_old,0 ); + ret1 =regulator_set_voltage_tol (arm_reg, volt_old,0 ); +if (ret1) +dev_warn (cpu_dev, +"failed to restore vddarm voltage: %d\n" , ret1);return ret; }
drivers/firmware/efi/arm-init.c +4 -0
@@ -265,6 +265,10 @@ void __init efi_init(void) (params.mmap & ~PAGE_MASK)));init_screen_info (); + +/* ARM does not permit early mappings to persist across paging_init() */ +if (IS_ENABLED (CONFIG_ARM )) +efi_memmap_unmap (); }static int __init register_gop_device (void )
drivers/firmware/efi/arm-runtime.c +1 -1
@@ -122,7 +122,7 @@ static int __init arm_enable_runtime_services(void) {u64 mapsize; -if (!efi_enabled (EFI_BOOT ) || !efi_enabled (EFI_MEMMAP )) { +if (!efi_enabled (EFI_BOOT )) {pr_info ("EFI services will not be available.\n" );return 0 ; }
drivers/firmware/efi/libstub/Makefile +2 -1
@@ -13,7 +13,8 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -O2 \ cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) -fpie cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) \ - -fno-builtin -fpic -mno-single-pic-base + -fno-builtin -fpic \ + $(call cc-option,-mno-single-pic-base) cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt
drivers/firmware/efi/memmap.c +3 -0
@@ -118,6 +118,9 @@ int __init efi_memmap_init_early(struct efi_memory_map_data *data)void __init efi_memmap_unmap (void ) { +if (!efi_enabled (EFI_MEMMAP )) +return ; +if (!efi.memmap.late) {unsigned long size;
drivers/gpio/gpiolib.c +3 -2
@@ -1166,7 +1166,7 @@ int gpiochip_add_data(struct gpio_chip *chip, void *data) gdev->descs =kcalloc (chip->ngpio,sizeof (gdev->descs[0 ]),GFP_KERNEL );if (!gdev->descs) { status = -ENOMEM ; - goto err_free_gdev; + goto err_free_ida; }if (chip->ngpio ==0 ) {
@@ -1298,8 +1298,9 @@ int gpiochip_add_data(struct gpio_chip *chip, void *data)kfree (gdev->label); err_free_descs:kfree (gdev->descs); -err_free_gdev: +err_free_ida:ida_simple_remove (&gpio_ida, gdev->id); +err_free_gdev:/* failures here can mean systems won't boot... */ pr_err("%s: GPIOs %d..%d (%s) failed to register\n", __func__, gdev->base, gdev->base + gdev->ngpio - 1,
drivers/gpu/drm/ast/ast_drv.c +21 -0
@@ -60,8 +60,29 @@ static const struct pci_device_id pciidlist[] = {MODULE_DEVICE_TABLE (pci, pciidlist); +static void ast_kick_out_firmware_fb (struct pci_dev *pdev) +{ +struct apertures_struct *ap; +bool primary = false; + + ap =alloc_apertures (1 ); +if (!ap) +return ; + + ap->ranges[0 ].base =pci_resource_start (pdev,0 ); + ap->ranges[0 ].size =pci_resource_len (pdev,0 ); + +#ifdef CONFIG_X86 + primary = pdev->resource[PCI_ROM_RESOURCE ].flags &IORESOURCE_ROM_SHADOW ; +#endif +drm_fb_helper_remove_conflicting_framebuffers (ap,"astdrmfb" , primary); +kfree (ap); +} +static int ast_pci_probe (struct pci_dev *pdev,const struct pci_device_id *ent) { +ast_kick_out_firmware_fb (pdev); +return drm_get_pci_dev (pdev, ent, &driver); }
drivers/gpu/drm/ast/ast_mode.c +2 -1
@@ -568,6 +568,7 @@ static int ast_crtc_do_set_base(struct drm_crtc *crtc, }ast_bo_unreserve (bo); +ast_set_offset_reg (crtc);ast_set_start_address_crt1 (crtc, (u32 )gpu_addr);return 0 ;
@@ -1254,7 +1255,7 @@ static int ast_cursor_move(struct drm_crtc *crtc,ast_set_index_reg (ast,AST_IO_CRTC_PORT ,0xc7 , ((y >>8 ) &0x07 ));/* dummy write to fire HWC */ -ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xCB ,0xFF ,0x00 ); +ast_show_cursor (crtc);return 0 ; }
drivers/gpu/drm/mediatek/mtk_hdmi.c +3 -2
@@ -1446,8 +1446,7 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, }/* The CEC module handles HDMI hotplug detection */ - cec_np =of_find_compatible_node (np->parent,NULL , -"mediatek,mt8173-cec" ); + cec_np =of_get_compatible_child (np->parent,"mediatek,mt8173-cec" );if (!cec_np) {dev_err (dev,"Failed to find CEC node\n" );return -EINVAL ;
@@ -1457,8 +1456,10 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,if (!cec_pdev) {dev_err (hdmi->dev,"Waiting for CEC device %pOF\n" , cec_np); +of_node_put (cec_np);return -EPROBE_DEFER ; } +of_node_put (cec_np); hdmi->cec_dev = &cec_pdev->dev;/*
drivers/infiniband/core/verbs.c +3 -2
@@ -1285,7 +1285,7 @@ EXPORT_SYMBOL(ib_resolve_eth_dmac);/** * ib_modify_qp_with_udata - Modifies the attributes for the specified QP. -* @qp: The QP to modify. +* @ib_qp: The QP to modify. * @attr: On input, specifies the QP attributes to modify. On output, * the current values of selected QP attributes are returned. * @attr_mask: A bit-mask used to specify which attributes of the QP
@@ -1294,9 +1294,10 @@ EXPORT_SYMBOL(ib_resolve_eth_dmac);* are being modified. * It returns 0 on success and returns appropriate error code on error. */ -int ib_modify_qp_with_udata (struct ib_qp *qp,struct ib_qp_attr *attr, +int ib_modify_qp_with_udata (struct ib_qp *ib_qp,struct ib_qp_attr *attr,int attr_mask,struct ib_udata *udata) { +struct ib_qp *qp = ib_qp->real_qp;int ret;if (attr_mask &IB_QP_AV ) {
drivers/infiniband/hw/hfi1/user_sdma.c +39 -48
172 lines not on this page · raw message
drivers/infiniband/hw/hfi1/user_sdma.h +0 -3
@@ -196,8 +196,6 @@ struct user_sdma_request {/* Writeable fields shared with interrupt */ u64 seqcomp____cacheline_aligned_in_smp ;u64 seqsubmitted; -/* status of the last txreq completed */ -int status;/* Send side fields */ struct list_head txps____cacheline_aligned_in_smp ;
@@ -219,7 +217,6 @@ struct user_sdma_request {u16 tididx;/* progress index moving along the iovs array */ u8 iov_idx; -u8 done;u8 has_error;struct user_sdma_iovec iovs[MAX_VECTORS_PER_REQ ];
drivers/infiniband/hw/i40iw/i40iw_verbs.c +1 -1
@@ -631,6 +631,7 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd,return ERR_PTR (-ENOMEM ); iwqp = (struct i40iw_qp *)mem; + iwqp->allocated_buffer = mem; qp = &iwqp->sc_qp; qp->back_qp = (void *)iwqp; qp->push_idx =I40IW_INVALID_PUSH_PAGE_INDEX ;
@@ -659,7 +660,6 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd, goto error; } - iwqp->allocated_buffer = mem; iwqp->iwdev = iwdev; iwqp->iwpd = iwpd; iwqp->ibqp.qp_num = qp_num;
drivers/input/joystick/xpad.c +28 -17
135 lines not on this page · raw message
drivers/input/mouse/synaptics.c +1 -3
@@ -99,9 +99,7 @@ static int synaptics_mode_cmd(struct psmouse *psmouse, u8 mode)int synaptics_detect (struct psmouse *psmouse,bool set_properties) {struct ps2dev *ps2dev = &psmouse->ps2dev; -u8 param[4 ]; - - param[0 ] =0 ; +u8 param[4 ] = {0 };ps2_command (ps2dev, param,PSMOUSE_CMD_SETRES );ps2_command (ps2dev, param,PSMOUSE_CMD_SETRES );
drivers/mmc/host/sdhci-pci-core.c +6 -1
@@ -1607,8 +1607,13 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot( host->mmc->caps2 |=MMC_CAP2_NO_PRESCAN_POWERUP ;if (slot->cd_idx >=0 ) { - ret =mmc_gpiod_request_cd (host->mmc,NULL , slot->cd_idx, + ret =mmc_gpiod_request_cd (host->mmc,"cd" , slot->cd_idx, slot->cd_override_level,0 ,NULL ); +if (ret && ret != -EPROBE_DEFER ) + ret =mmc_gpiod_request_cd (host->mmc,NULL , + slot->cd_idx, + slot->cd_override_level, +0 ,NULL );if (ret == -EPROBE_DEFER ) goto remove;
drivers/mtd/nand/atmel/nand-controller.c +7 -4
@@ -2077,8 +2077,7 @@ atmel_hsmc_nand_controller_legacy_init(struct atmel_hsmc_nand_controller *nc)int ret; nand_np = dev->of_node; - nfc_np =of_find_compatible_node (dev->of_node,NULL , -"atmel,sama5d3-nfc" ); + nfc_np =of_get_compatible_child (dev->of_node,"atmel,sama5d3-nfc" );if (!nfc_np) {dev_err (dev,"Could not find device node for sama5d3-nfc\n" );return -ENODEV ;
@@ -2492,15 +2491,19 @@ static int atmel_nand_controller_probe(struct platform_device *pdev) }if (caps->legacy_of_bindings) { +struct device_node *nfc_node;u32 ale_offs =21 ;/* * If we are parsing legacy DT props and the DT contains a * valid NFC node, forward the request to the sama5 logic. */ -if (of_find_compatible_node (pdev->dev.of_node,NULL , -"atmel,sama5d3-nfc" )) + nfc_node =of_get_compatible_child (pdev->dev.of_node, +"atmel,sama5d3-nfc" ); +if (nfc_node) { caps = &atmel_sama5_nand_caps; +of_node_put (nfc_node); + }/* * Even if the compatible says we are dealing with an
drivers/mtd/ubi/build.c +1 -0
@@ -526,6 +526,7 @@ void ubi_free_internal_volumes(struct ubi_device *ubi)for (i = ubi->vtbl_slots; i < ubi->vtbl_slots +UBI_INT_VOL_COUNT ; i++) {ubi_eba_replace_table (ubi->volumes[i],NULL ); +ubi_fastmap_destroy_checkmap (ubi->volumes[i]);kfree (ubi->volumes[i]); } }
drivers/mtd/ubi/eba.c +4 -0
@@ -517,6 +517,9 @@ static int check_mapping(struct ubi_device *ubi, struct ubi_volume *vol, int lnuif (!ubi->fast_attach)return 0 ; +if (!vol->checkmap ||test_bit (lnum, vol->checkmap)) +return 0 ; + vidb =ubi_alloc_vid_buf (ubi,GFP_NOFS );if (!vidb)return -ENOMEM ;
@@ -551,6 +554,7 @@ static int check_mapping(struct ubi_device *ubi, struct ubi_volume *vol, int lnu goto out_free; } +set_bit (lnum, vol->checkmap); err =0 ; out_free:
drivers/mtd/ubi/fastmap.c +20 -0
@@ -1101,6 +1101,26 @@ int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai, goto out; } +int ubi_fastmap_init_checkmap (struct ubi_volume *vol,int leb_count) +{ +struct ubi_device *ubi = vol->ubi; + +if (!ubi->fast_attach) +return 0 ; + + vol->checkmap =kcalloc (BITS_TO_LONGS (leb_count),sizeof (unsigned long ), +GFP_KERNEL ); +if (!vol->checkmap) +return -ENOMEM ; + +return 0 ; +} + +void ubi_fastmap_destroy_checkmap (struct ubi_volume *vol) +{ +kfree (vol->checkmap); +} +/** * ubi_write_fastmap - writes a fastmap. * @ubi: UBI device object
drivers/mtd/ubi/ubi.h +11 -0
@@ -334,6 +334,9 @@ struct ubi_eba_leb_desc {* @changing_leb: %1 if the atomic LEB change ioctl command is in progress * @direct_writes: %1 if direct writes are enabled for this volume * +* @checkmap: bitmap to remember which PEB->LEB mappings got checked, +* protected by UBI LEB lock tree. +* * The @corrupted field indicates that the volume's contents is corrupted. * Since UBI protects only static volumes, this field is not relevant to * dynamic volumes - it is user's responsibility to assure their data
@@ -377,6 +380,10 @@ struct ubi_volume { unsigned int updating:1; unsigned int changing_leb:1; unsigned int direct_writes:1; + +#ifdef CONFIG_MTD_UBI_FASTMAP +unsigned long *checkmap; +#endif };/**
@@ -965,8 +972,12 @@ size_t ubi_calc_fm_size(struct ubi_device *ubi);int ubi_update_fastmap (struct ubi_device *ubi);int ubi_scan_fastmap (struct ubi_device *ubi,struct ubi_attach_info *ai,struct ubi_attach_info *scan_ai); +int ubi_fastmap_init_checkmap (struct ubi_volume *vol,int leb_count); +void ubi_fastmap_destroy_checkmap (struct ubi_volume *vol);#else static inline int ubi_update_fastmap (struct ubi_device *ubi) {return 0 ; } +int static inline ubi_fastmap_init_checkmap (struct ubi_volume *vol,int leb_count) {return 0 ; } +static inline void ubi_fastmap_destroy_checkmap (struct ubi_volume *vol) {}#endif /* block.c */
drivers/mtd/ubi/vmt.c +1 -0
@@ -139,6 +139,7 @@ static void vol_release(struct device *dev) struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev);ubi_eba_replace_table (vol,NULL ); +ubi_fastmap_destroy_checkmap (vol);kfree (vol); }
drivers/mtd/ubi/vtbl.c +15 -1
@@ -534,7 +534,7 @@ static int init_volumes(struct ubi_device *ubi,const struct ubi_attach_info *ai, const struct ubi_vtbl_record *vtbl) { - int i, reserved_pebs = 0; + int i, err, reserved_pebs = 0;struct ubi_ainf_volume *av;struct ubi_volume *vol;
@@ -620,6 +620,16 @@ static int init_volumes(struct ubi_device *ubi, (long long )(vol->used_ebs -1 ) * vol->usable_leb_size; vol->used_bytes += av->last_data_size; vol->last_eb_bytes = av->last_data_size; + +/* +* We use ubi->peb_count and not vol->reserved_pebs because +* we want to keep the code simple. Otherwise we'd have to +* resize/check the bitmap upon volume resize too. +* Allocating a few bytes more does not hurt. +*/ + err =ubi_fastmap_init_checkmap (vol, ubi->peb_count); +if (err) +return err; }/* And add the layout volume */
@@ -645,6 +655,9 @@ static int init_volumes(struct ubi_device *ubi, reserved_pebs += vol->reserved_pebs; ubi->vol_count +=1 ; vol->ubi = ubi; + err =ubi_fastmap_init_checkmap (vol,UBI_LAYOUT_VOLUME_EBS ); +if (err) +return err;if (reserved_pebs > ubi->avail_pebs) { ubi_err(ubi, "not enough PEBs, required %d, available %d",
@@ -849,6 +862,7 @@ int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *ai) out_free:vfree (ubi->vtbl);for (i =0 ; i < ubi->vtbl_slots +UBI_INT_VOL_COUNT ; i++) { +ubi_fastmap_destroy_checkmap (ubi->volumes[i]);kfree (ubi->volumes[i]); ubi->volumes[i] =NULL ; }
drivers/net/can/dev.c +35 -13
63 lines not on this page · raw message
drivers/net/can/flexcan.c +2 -2
@@ -599,7 +599,7 @@ static void flexcan_irq_bus_err(struct net_device *dev, u32 reg_esr)if (tx_errors) dev->stats.tx_errors++; -can_rx_offload_irq_queue_err_skb (&priv->offload, skb); +can_rx_offload_queue_tail (&priv->offload, skb); }static void flexcan_irq_state (struct net_device *dev,u32 reg_esr)
@@ -639,7 +639,7 @@ static void flexcan_irq_state(struct net_device *dev, u32 reg_esr)if (unlikely (new_state ==CAN_STATE_BUS_OFF ))can_bus_off (dev); -can_rx_offload_irq_queue_err_skb (&priv->offload, skb); +can_rx_offload_queue_tail (&priv->offload, skb); }static inline struct flexcan_priv *rx_offload_to_priv (struct can_rx_offload *offload)
drivers/net/can/rx-offload.c +49 -2
63 lines not on this page · raw message
drivers/net/can/spi/hi311x.c +1 -1
@@ -760,7 +760,7 @@ static int hi3110_open(struct net_device *net) {struct hi3110_priv *priv =netdev_priv (net);struct spi_device *spi = priv->spi; -unsigned long flags =IRQF_ONESHOT |IRQF_TRIGGER_RISING ; +unsigned long flags =IRQF_ONESHOT |IRQF_TRIGGER_HIGH ;int ret; ret =open_candev (net);
drivers/net/ethernet/broadcom/genet/bcmmii.c +1 -1
@@ -360,7 +360,7 @@ static struct device_node *bcmgenet_mii_of_find_mdio(struct bcmgenet_priv *priv)if (!compat)return NULL ; - priv->mdio_dn =of_find_compatible_node (dn,NULL , compat); + priv->mdio_dn =of_get_compatible_child (dn, compat);kfree (compat);if (!priv->mdio_dn) {dev_err (kdev,"unable to find MDIO bus node\n" );
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +0 -1
@@ -611,7 +611,6 @@ int mlx4_init_resource_tracker(struct mlx4_dev *dev)MLX4_MAX_PORTS ; else res_alloc->guaranteed[t] = 0; - res_alloc->res_free -= res_alloc->guaranteed[t];break ;default :break ;
drivers/net/usb/lan78xx.c +20 -22
60 lines not on this page · raw message
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +2 -1
@@ -6098,7 +6098,8 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,* for subsequent chanspecs. */ channel->flags =IEEE80211_CHAN_NO_HT40 | -IEEE80211_CHAN_NO_80MHZ ; +IEEE80211_CHAN_NO_80MHZ | +IEEE80211_CHAN_NO_160MHZ ; ch.bw =BRCMU_CHAN_BW_20 ; cfg->d11inf.encchspec (&ch); chaninfo = ch.chspec;
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +30 -10
@@ -590,7 +590,7 @@ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm)#define ACPI_WRDS_WIFI_DATA_SIZE (IWL_MVM_SAR_TABLE_SIZE + 2)#define ACPI_EWRD_WIFI_DATA_SIZE ((IWL_MVM_SAR_PROFILE_NUM - 1) * \ IWL_MVM_SAR_TABLE_SIZE + 3) -#define ACPI_WGDS_WIFI_DATA_SIZE 18 +#define ACPI_WGDS_WIFI_DATA_SIZE 19#define ACPI_WGDS_NUM_BANDS 2#define ACPI_WGDS_TABLE_SIZE 3
@@ -964,7 +964,7 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)IWL_DEBUG_RADIO (mvm,"Sending GEO_TX_POWER_LIMIT\n" );BUILD_BUG_ON (IWL_NUM_GEO_PROFILES *ACPI_WGDS_NUM_BANDS * -ACPI_WGDS_TABLE_SIZE !=ACPI_WGDS_WIFI_DATA_SIZE ); +ACPI_WGDS_TABLE_SIZE +1 !=ACPI_WGDS_WIFI_DATA_SIZE );for (i =0 ; i <IWL_NUM_GEO_PROFILES ; i++) { struct iwl_per_chain_offset *chain =
@@ -997,6 +997,11 @@ static int iwl_mvm_sar_get_ewrd_table(struct iwl_mvm *mvm)return -ENOENT ; } +static int iwl_mvm_sar_get_wgds_table (struct iwl_mvm *mvm) +{ +return -ENOENT ; +} +static int iwl_mvm_sar_geo_init (struct iwl_mvm *mvm) {return 0 ;
@@ -1023,8 +1028,11 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm)IWL_DEBUG_RADIO (mvm,"WRDS SAR BIOS table invalid or unavailable. (%d)\n" , ret); -/* if not available, don't fail and don't bother with EWRD */ -return 0 ; +/* +* If not available, don't fail and don't bother with EWRD. +* Return 1 to tell that we can't use WGDS either. +*/ +return 1 ; } ret =iwl_mvm_sar_get_ewrd_table (mvm);
@@ -1037,9 +1045,13 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm)/* choose profile 1 (WRDS) as default for both chains */ ret =iwl_mvm_sar_select_profile (mvm,1 ,1 ); -/* if we don't have profile 0 from BIOS, just skip it */ +/* +* If we don't have profile 0 from BIOS, just skip it. This +* means that SAR Geo will not be enabled either, even if we +* have other valid profiles. +*/ if (ret == -ENOENT ) -return 0 ; +return 1 ;return ret; }
@@ -1229,11 +1241,19 @@ int iwl_mvm_up(struct iwl_mvm *mvm)iwl_mvm_unref (mvm,IWL_MVM_REF_UCODE_DOWN ); ret =iwl_mvm_sar_init (mvm); -if (ret) - goto error; +if (ret ==0 ) { + ret =iwl_mvm_sar_geo_init (mvm); + }else if (ret >0 && !iwl_mvm_sar_get_wgds_table (mvm)) { +/* +* If basic SAR is not available, we check for WGDS, +* which should *not* be available either. If it is +* available, issue an error, because we can't use SAR +* Geo without basic SAR. +*/ +IWL_ERR (mvm,"BIOS contains WGDS but no WRDS\n" ); + } - ret =iwl_mvm_sar_geo_init (mvm); -if (ret) +if (ret <0 ) goto error;iwl_mvm_leds_sync (mvm);
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +6 -6
@@ -328,8 +328,12 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy, goto out; } -if (changed) - *changed = (resp->status ==MCC_RESP_NEW_CHAN_PROFILE ); +if (changed) { +u32 status =le32_to_cpu (resp->status); + + *changed = (status ==MCC_RESP_NEW_CHAN_PROFILE || + status ==MCC_RESP_ILLEGAL ); + } regd = iwl_parse_nvm_mcc_info(mvm->trans->dev, mvm->cfg, __le32_to_cpu(resp->n_channels),
@@ -4189,10 +4193,6 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw, sinfo->filled |=BIT (NL80211_STA_INFO_SIGNAL_AVG ); } -if (!fw_has_capa (&mvm->fw->ucode_capa, -IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS )) -return ; -/* if beacon filtering isn't on mac80211 does it anyway */ if (!(vif->driver_flags &IEEE80211_VIF_BEACON_FILTER ))return ;
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +2 -3
@@ -732,9 +732,8 @@ iwl_mvm_update_mcc(struct iwl_mvm *mvm, const char *alpha2, }IWL_DEBUG_LAR (mvm, -"MCC response status: 0x%x. new MCC: 0x%x ('%c%c') change: %d n_chans: %d\n" , - status, mcc, mcc >>8 , mcc &0xff , - !!(status ==MCC_RESP_NEW_CHAN_PROFILE ), n_channels); +"MCC response status: 0x%x. new MCC: 0x%x ('%c%c') n_chans: %d\n" , + status, mcc, mcc >>8 , mcc &0xff , n_channels); exit:iwl_free_resp (&cmd);
drivers/nfc/nfcmrvl/uart.c +2 -3
@@ -73,10 +73,9 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node,struct device_node *matched_node;int ret; - matched_node =of_find_compatible_node (node,NULL ,"marvell,nfc-uart" ); + matched_node =of_get_compatible_child (node,"marvell,nfc-uart" );if (!matched_node) { - matched_node =of_find_compatible_node (node,NULL , -"mrvl,nfc-uart" ); + matched_node =of_get_compatible_child (node,"mrvl,nfc-uart" );if (!matched_node)return -ENODEV ; }
drivers/of/base.c +25 -0
@@ -737,6 +737,31 @@ struct device_node *of_get_next_available_child(const struct device_node *node, }EXPORT_SYMBOL (of_get_next_available_child); +/** +* of_get_compatible_child - Find compatible child node +* @parent: parent node +* @compatible: compatible string +* +* Lookup child node whose compatible property contains the given compatible +* string. +* +* Returns a node pointer with refcount incremented, use of_node_put() on it +* when done; or NULL if not found. +*/ +struct device_node *of_get_compatible_child (const struct device_node *parent, +const char *compatible) +{ +struct device_node *child; + +for_each_child_of_node (parent, child) { +if (of_device_is_compatible (child, compatible)) +break ; + } + +return child; +} +EXPORT_SYMBOL (of_get_compatible_child); +/** * of_get_child_by_name - Find the child node by name for a given parent * @node: parent node
drivers/pci/endpoint/pci-ep-cfs.c +6 -8
@@ -97,16 +97,10 @@ static int pci_epc_epf_link(struct config_item *epc_item, {int ret;u32 func_no =0 ; -struct pci_epc *epc; -struct pci_epf *epf;struct pci_epf_group *epf_group =to_pci_epf_group (epf_item);struct pci_epc_group *epc_group =to_pci_epc_group (epc_item); - - epc = epc_group->epc; - epf = epf_group->epf; - ret =pci_epc_add_epf (epc, epf); -if (ret) - goto err_add_epf; +struct pci_epc *epc = epc_group->epc; +struct pci_epf *epf = epf_group->epf; func_no =find_first_zero_bit (&epc_group->function_num_map,BITS_PER_LONG );
@@ -116,6 +110,10 @@ static int pci_epc_epf_link(struct config_item *epc_item,set_bit (func_no, &epc_group->function_num_map); epf->func_no = func_no; + ret =pci_epc_add_epf (epc, epf); +if (ret) + goto err_add_epf; + ret =pci_epf_bind (epf);if (ret) goto err_epf_bind;
drivers/pinctrl/meson/pinctrl-meson.c +1 -1
@@ -273,7 +273,7 @@ static int meson_pinconf_set(struct pinctrl_dev *pcdev, unsigned int pin,dev_dbg (pc->dev,"pin %u: disable bias\n" , pin);meson_calc_reg_and_bit (bank, pin,REG_PULL , ®, &bit); - ret =regmap_update_bits (pc->reg_pull, reg, + ret =regmap_update_bits (pc->reg_pullen, reg,BIT (bit),0 );if (ret)return ret;
drivers/power/supply/twl4030_charger.c +3 -2
@@ -996,12 +996,13 @@ static int twl4030_bci_probe(struct platform_device *pdev)if (bci->dev->of_node) {struct device_node *phynode; - phynode =of_find_compatible_node (bci->dev->of_node->parent, -NULL ,"ti,twl4030-usb" ); + phynode =of_get_compatible_child (bci->dev->of_node->parent, +"ti,twl4030-usb" );if (phynode) { bci->usb_nb.notifier_call = twl4030_bci_usb_ncb; bci->transceiver =devm_usb_get_phy_by_node ( bci->dev, phynode, &bci->usb_nb); +of_node_put (phynode);if (IS_ERR (bci->transceiver)) { ret =PTR_ERR (bci->transceiver);if (ret == -EPROBE_DEFER )
drivers/rtc/rtc-omap.c +2 -1
@@ -823,7 +823,8 @@ static int omap_rtc_probe(struct platform_device *pdev) rtc->pctldev =pinctrl_register (&rtc_pinctrl_desc, &pdev->dev, rtc);if (IS_ERR (rtc->pctldev)) {dev_err (&pdev->dev,"Couldn't register pinctrl driver\n" ); -return PTR_ERR (rtc->pctldev); + ret =PTR_ERR (rtc->pctldev); + goto err; }if (rtc->is_pmic_controller) {
drivers/rtc/rtc-pcf2127.c +3 -0
@@ -248,6 +248,9 @@ static int pcf2127_i2c_gather_write(void *context,memcpy (buf +1 , val, val_size); ret =i2c_master_send (client, buf, val_size +1 ); + +kfree (buf); +if (ret != val_size +1 )return ret <0 ? ret : -EIO ;
drivers/tty/n_tty.c +17 -3
@@ -154,17 +154,28 @@ static inline unsigned char *echo_buf_addr(struct n_tty_data *ldata, size_t i)return &ldata->echo_buf[i & (N_TTY_BUF_SIZE -1 )]; } +/* If we are not echoing the data, perhaps this is a secret so erase it */ +static void zero_buffer (struct tty_struct *tty,u8 *buffer,int size) +{ +bool icanon = !!L_ICANON (tty); +bool no_echo = !L_ECHO (tty); + +if (icanon && no_echo) +memset (buffer,0x00 , size); +} +static int tty_copy_to_user (struct tty_struct *tty,void __user *to,size_t tail,size_t n) {struct n_tty_data *ldata = tty->disc_data;size_t size =N_TTY_BUF_SIZE - tail; -const void *from =read_buf_addr (ldata, tail); +void *from =read_buf_addr (ldata, tail);int uncopied;if (n > size) {tty_audit_add_data (tty, from, size); uncopied =copy_to_user (to, from, size); +zero_buffer (tty, from, size - uncopied);if (uncopied)return uncopied; to += size;
@@ -173,7 +184,9 @@ static int tty_copy_to_user(struct tty_struct *tty, void __user *to, }tty_audit_add_data (tty, from, n); -return copy_to_user (to, from, n); + uncopied =copy_to_user (to, from, n); +zero_buffer (tty, from, n - uncopied); +return uncopied; }/**
@@ -1962,11 +1975,12 @@ static int copy_from_read_buf(struct tty_struct *tty, n =min (head - ldata->read_tail,N_TTY_BUF_SIZE - tail); n =min (*nr, n);if (n) { -const unsigned char *from =read_buf_addr (ldata, tail); +unsigned char *from =read_buf_addr (ldata, tail); retval =copy_to_user (*b, from, n); n -= retval; is_eof = n ==1 && *from ==EOF_CHAR (tty);tty_audit_add_data (tty, from, n); +zero_buffer (tty, from, n);smp_store_release (&ldata->read_tail, ldata->read_tail + n);/* Turn single EOF into zero-length read */ if (L_EXTPROC(tty) && ldata->icanon && is_eof &&
drivers/tty/tty_buffer.c +5 -1
@@ -467,11 +467,15 @@ receive_buf(struct tty_port *port, struct tty_buffer *head, int count) {unsigned char *p =char_buf_ptr (head, head->read);char *f =NULL ; +int n;if (~head->flags &TTYB_NORMAL ) f =flag_buf_ptr (head, head->read); -return port->client_ops->receive_buf (port, p, f, count); + n = port->client_ops->receive_buf (port, p, f, count); +if (n >0 ) +memset (p,0 , n); +return n; }/**
drivers/usb/core/hub.c +3 -1
@@ -2815,7 +2815,9 @@ static int hub_port_reset(struct usb_hub *hub, int port1, USB_PORT_FEAT_C_BH_PORT_RESET);usb_clear_port_feature (hub->hdev, port1,USB_PORT_FEAT_C_PORT_LINK_STATE ); -usb_clear_port_feature (hub->hdev, port1, + +if (udev) +usb_clear_port_feature (hub->hdev, port1,USB_PORT_FEAT_C_CONNECTION );/*
drivers/usb/dwc3/core.c +1 -0
@@ -1276,6 +1276,7 @@ static int dwc3_probe(struct platform_device *pdev) err5:dwc3_event_buffers_cleanup (dwc); +dwc3_ulpi_exit (dwc); err4:dwc3_free_scratch_buffers (dwc);
drivers/usb/dwc3/gadget.c +4 -4
@@ -1088,7 +1088,7 @@ static void dwc3_prepare_one_trb_sg(struct dwc3_ep *dep,/* Now prepare one extra TRB to align transfer size */ trb = &dep->trb_pool[dep->trb_enqueue];__dwc3_prepare_one_trb (dep, trb, dwc->bounce_addr, - maxp - rem, false,0 , + maxp - rem, false,1 , req->request.stream_id, req->request.short_not_ok, req->request.no_interrupt);
@@ -1120,7 +1120,7 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep,/* Now prepare one extra TRB to align transfer size */ trb = &dep->trb_pool[dep->trb_enqueue];__dwc3_prepare_one_trb (dep, trb, dwc->bounce_addr, maxp - rem, - false,0 , req->request.stream_id, + false,1 , req->request.stream_id, req->request.short_not_ok, req->request.no_interrupt); } else if (req->request.zero && req->request.length &&
@@ -1136,7 +1136,7 @@ static void dwc3_prepare_one_trb_linear(struct dwc3_ep *dep,/* Now prepare one extra TRB to handle ZLP */ trb = &dep->trb_pool[dep->trb_enqueue];__dwc3_prepare_one_trb (dep, trb, dwc->bounce_addr,0 , - false,0 , req->request.stream_id, + false,1 , req->request.stream_id, req->request.short_not_ok, req->request.no_interrupt); }else {
@@ -2249,7 +2249,7 @@ static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep,* with one TRB pending in the ring. We need to manually clear HWO bit * from that TRB. */ -if ((req->zero || req->unaligned) && (trb->ctrl &DWC3_TRB_CTRL_HWO )) { +if ((req->zero || req->unaligned) && !(trb->ctrl &DWC3_TRB_CTRL_CHN )) { trb->ctrl &= ~DWC3_TRB_CTRL_HWO ;return 1 ; }
drivers/usb/host/xhci-hub.c +49 -17
123 lines not on this page · raw message
drivers/usb/host/xhci-pci.c +5 -0
@@ -236,6 +236,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)if (pdev->vendor ==PCI_VENDOR_ID_TI && pdev->device ==0x8241 ) xhci->quirks |=XHCI_LIMIT_ENDPOINT_INTERVAL_7 ; +if ((pdev->vendor ==PCI_VENDOR_ID_BROADCOM || + pdev->vendor ==PCI_VENDOR_ID_CAVIUM ) && + pdev->device ==0x9026 ) + xhci->quirks |=XHCI_RESET_PLL_ON_DISCONNECT ; +if (xhci->quirks &XHCI_RESET_ON_RESUME )xhci_dbg_trace (xhci, trace_xhci_dbg_quirks,"QUIRK: Resetting on resume" );
drivers/usb/host/xhci-ring.c +36 -2
@@ -1568,6 +1568,35 @@ static void handle_device_notification(struct xhci_hcd *xhci,usb_wakeup_notification (udev->parent, udev->portnum); } +/* +* Quirk hanlder for errata seen on Cavium ThunderX2 processor XHCI +* Controller. +* As per ThunderX2errata-129 USB 2 device may come up as USB 1 +* If a connection to a USB 1 device is followed by another connection +* to a USB 2 device. +* +* Reset the PHY after the USB device is disconnected if device speed +* is less than HCD_USB3. +* Retry the reset sequence max of 4 times checking the PLL lock status. +* +*/ +static void xhci_cavium_reset_phy_quirk (struct xhci_hcd *xhci) +{ +struct usb_hcd *hcd =xhci_to_hcd (xhci); +u32 pll_lock_check; +u32 retry_count =4 ; + +do { +/* Assert PHY reset */ +writel (0x6F , hcd->regs +0x1048 ); +udelay (10 ); +/* De-assert the PHY reset */ +writel (0x7F , hcd->regs +0x1048 ); +udelay (200 ); + pll_lock_check =readl (hcd->regs +0x1070 ); + }while (!(pll_lock_check &0x1 ) && --retry_count); +} +static void handle_port_status (struct xhci_hcd *xhci,union xhci_trb *event) {
@@ -1717,7 +1746,7 @@ static void handle_port_status(struct xhci_hcd *xhci,* RExit to a disconnect state). If so, let the the driver know it's * out of the RExit state. */ -if (!DEV_SUPERSPEED_ANY (portsc) && +if (!DEV_SUPERSPEED_ANY (portsc) && hcd->speed <HCD_USB3 &&test_and_clear_bit (faked_port_index, &bus_state->rexit_ports)) {complete (&bus_state->rexit_done[faked_port_index]);
@@ -1725,9 +1754,13 @@ static void handle_port_status(struct xhci_hcd *xhci, goto cleanup; } -if (hcd->speed <HCD_USB3 ) +if (hcd->speed <HCD_USB3 ) {xhci_test_and_clear_bit (xhci, port_array, faked_port_index,PORT_PLC ); +if ((xhci->quirks &XHCI_RESET_PLL_ON_DISCONNECT ) && + (portsc &PORT_CSC ) && !(portsc &PORT_CONNECT )) +xhci_cavium_reset_phy_quirk (xhci); + } cleanup:/* Update event ring dequeue pointer before dropping the lock */
@@ -2335,6 +2368,7 @@ static int handle_tx_event(struct xhci_hcd *xhci, goto cleanup;case COMP_RING_UNDERRUN :case COMP_RING_OVERRUN : +case COMP_STOPPED_LENGTH_INVALID : goto cleanup;default : xhci_err(xhci, "ERROR Transfer event for unknown stream ring slot %u ep %u\n",
drivers/usb/host/xhci.c +3 -3
@@ -43,8 +43,8 @@ static int link_quirk;module_param (link_quirk, int,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (link_quirk,"Don't clear the chain bit on a link TRB" ); -static unsigned int quirks; -module_param (quirks, uint,S_IRUGO ); +static unsigned long long quirks; +module_param (quirks, ullong,S_IRUGO );MODULE_PARM_DESC (quirks,"Bit flags for quirks to be enabled as default" );static bool td_on_ring (struct xhci_td *td,struct xhci_ring *ring)
@@ -4956,7 +4956,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)return retval;xhci_dbg (xhci,"Called HCD init\n" ); -xhci_info (xhci,"hcc params 0x%08x hci version 0x%x quirks 0x%08x\n" , +xhci_info (xhci,"hcc params 0x%08x hci version 0x%x quirks 0x%016llx\n" , xhci->hcc_params, xhci->hci_version, xhci->quirks);return 0 ;
drivers/usb/host/xhci.h +35 -32
87 lines not on this page · raw message
fs/9p/vfs_dir.c +0 -11
@@ -76,15 +76,6 @@ static inline int dt_type(struct p9_wstat *mistat)return rettype; } -static void p9stat_init (struct p9_wstat *stbuf) -{ - stbuf->name =NULL ; - stbuf->uid =NULL ; - stbuf->gid =NULL ; - stbuf->muid =NULL ; - stbuf->extension =NULL ; -} -/** * v9fs_alloc_rdir_buf - Allocate buffer used for read and readdir * @filp: opened file structure
@@ -145,12 +136,10 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx) rdir->tail = n; }while (rdir->head < rdir->tail) { -p9stat_init (&st); err =p9stat_read (fid->clnt, rdir->buf + rdir->head, rdir->tail - rdir->head, &st);if (err) {p9_debug (P9_DEBUG_VFS ,"returned %d\n" , err); -p9stat_free (&st);return -EIO ; } reclen = st.size+2 ;
fs/bfs/inode.c +6 -3
@@ -350,7 +350,8 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent) s->s_magic =BFS_MAGIC ; -if (le32_to_cpu (bfs_sb->s_start) >le32_to_cpu (bfs_sb->s_end)) { +if (le32_to_cpu (bfs_sb->s_start) >le32_to_cpu (bfs_sb->s_end) || +le32_to_cpu (bfs_sb->s_start) <BFS_BSIZE ) {printf ("Superblock is corrupted\n" ); goto out1; }
@@ -359,9 +360,11 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)sizeof (struct bfs_inode ) +BFS_ROOT_INO -1 ; imap_len = (info->si_lasti /8 ) +1 ; - info->si_imap =kzalloc (imap_len,GFP_KERNEL ); -if (!info->si_imap) + info->si_imap =kzalloc (imap_len,GFP_KERNEL | __GFP_NOWARN); +if (!info->si_imap) { +printf ("Cannot allocate %u bytes\n" , imap_len); goto out1; + }for (i =0 ; i <BFS_ROOT_INO ; i++)set_bit (i, info->si_imap);
fs/gfs2/ops_fstype.c +1 -1
@@ -72,13 +72,13 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb)if (!sdp)return NULL ; - sb->s_fs_info = sdp; sdp->sd_vfs = sb; sdp->sd_lkstats = alloc_percpu(struct gfs2_pcpu_lkstats);if (!sdp->sd_lkstats) {kfree (sdp);return NULL ; } + sb->s_fs_info = sdp;set_bit (SDF_NOJOURNALID , &sdp->sd_flags);gfs2_tune_init (&sdp->sd_tune);
fs/namei.c +50 -3
71 lines not on this page · raw message
include/linux/can/dev.h +1 -0
@@ -163,6 +163,7 @@ void can_change_state(struct net_device *dev, struct can_frame *cf,void can_put_echo_skb (struct sk_buff *skb,struct net_device *dev,unsigned int idx); +struct sk_buff *__can_get_echo_skb (struct net_device *dev,unsigned int idx,u8 *len_ptr);unsigned int can_get_echo_skb (struct net_device *dev,unsigned int idx);void can_free_echo_skb (struct net_device *dev,unsigned int idx);
include/linux/can/rx-offload.h +6 -1
@@ -41,7 +41,12 @@ int can_rx_offload_add_timestamp(struct net_device *dev, struct can_rx_offload *int can_rx_offload_add_fifo (struct net_device *dev,struct can_rx_offload *offload,unsigned int weight);int can_rx_offload_irq_offload_timestamp (struct can_rx_offload *offload,u64 reg);int can_rx_offload_irq_offload_fifo (struct can_rx_offload *offload); -int can_rx_offload_irq_queue_err_skb (struct can_rx_offload *offload,struct sk_buff *skb); +int can_rx_offload_queue_sorted (struct can_rx_offload *offload, +struct sk_buff *skb,u32 timestamp); +unsigned int can_rx_offload_get_echo_skb (struct can_rx_offload *offload, +unsigned int idx,u32 timestamp); +int can_rx_offload_queue_tail (struct can_rx_offload *offload, +struct sk_buff *skb);void can_rx_offload_reset (struct can_rx_offload *offload);void can_rx_offload_del (struct can_rx_offload *offload);void can_rx_offload_enable (struct can_rx_offload *offload);
include/linux/fs.h +2 -0
@@ -72,6 +72,8 @@ extern struct inodes_stat_t inodes_stat;extern int leases_enable, lease_break_time;extern int sysctl_protected_symlinks;extern int sysctl_protected_hardlinks; +extern int sysctl_protected_fifos; +extern int sysctl_protected_regular;typedef __kernel_rwf_t rwf_t ;
include/linux/integrity.h +1 -0
@@ -14,6 +14,7 @@enum integrity_status {INTEGRITY_PASS =0 , +INTEGRITY_PASS_IMMUTABLE ,INTEGRITY_FAIL ,INTEGRITY_NOLABEL ,INTEGRITY_NOXATTRS ,
include/linux/of.h +8 -0
@@ -288,6 +288,8 @@ extern struct device_node *of_get_next_child(const struct device_node *node,extern struct device_node *of_get_next_available_child (const struct device_node *node,struct device_node *prev); +extern struct device_node *of_get_compatible_child (const struct device_node *parent, +const char *compatible);extern struct device_node *of_get_child_by_name (const struct device_node *node,const char *name);
@@ -625,6 +627,12 @@ static inline bool of_have_populated_dt(void)return false; } +static inline struct device_node *of_get_compatible_child (const struct device_node *parent, +const char *compatible) +{ +return NULL ; +} +static inline struct device_node *of_get_child_by_name (const struct device_node *node,const char *name)
include/linux/pfn_t.h +1 -1
@@ -10,7 +10,7 @@* PFN_DEV - pfn is not covered by system memmap by default * PFN_MAP - pfn has a dynamic page mapping established by a device driver */ -#define PFN_FLAGS_MASK (((u64) ~PAGE_MASK) << (BITS_PER_LONG_LONG - PAGE_SHIFT)) +#define PFN_FLAGS_MASK (((u64) (~PAGE_MASK)) << (BITS_PER_LONG_LONG - PAGE_SHIFT))#define PFN_SG_CHAIN (1ULL << (BITS_PER_LONG_LONG - 1))#define PFN_SG_LAST (1ULL << (BITS_PER_LONG_LONG - 2))#define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
include/net/sock.h +1 -0
@@ -1452,6 +1452,7 @@ static inline void lock_sock(struct sock *sk)lock_sock_nested (sk,0 ); } +void __release_sock (struct sock *sk);void release_sock (struct sock *sk);/* BH context may only use the following locking interface. */
kernel/debug/kdb/kdb_io.c +9 -6
@@ -216,7 +216,7 @@ static char *kdb_read(char *buffer, size_t bufsize)int count;int i;int diag, dtab_count; -int key; +int key, buf_size, ret; diag =kdbgetintenv ("DTABCOUNT" , &dtab_count);
@@ -336,9 +336,8 @@ static char *kdb_read(char *buffer, size_t bufsize)else p_tmp = tmpbuffer; len =strlen (p_tmp); - count =kallsyms_symbol_complete (p_tmp, -sizeof (tmpbuffer) - - (p_tmp - tmpbuffer)); + buf_size =sizeof (tmpbuffer) - (p_tmp - tmpbuffer); + count =kallsyms_symbol_complete (p_tmp, buf_size);if (tab ==2 && count >0 ) {kdb_printf ("\n%d symbols are found." , count);if (count > dtab_count) {
@@ -350,9 +349,13 @@ static char *kdb_read(char *buffer, size_t bufsize) }kdb_printf ("\n" );for (i =0 ; i < count; i++) { -if (WARN_ON (!kallsyms_symbol_next (p_tmp, i))) + ret =kallsyms_symbol_next (p_tmp, i, buf_size); +if (WARN_ON (!ret))break ; -kdb_printf ("%s " , p_tmp); +if (ret != -E2BIG ) +kdb_printf ("%s " , p_tmp); +else +kdb_printf ("%s... " , p_tmp); *(p_tmp + len) ='\0' ; }if (i >= dtab_count)
kernel/debug/kdb/kdb_private.h +1 -1
@@ -83,7 +83,7 @@ typedef struct __ksymtab {unsigned long sym_start;unsigned long sym_end; } kdb_symtab_t; -extern int kallsyms_symbol_next (char *prefix_name,int flag); +extern int kallsyms_symbol_next (char *prefix_name,int flag,int buf_size);extern int kallsyms_symbol_complete (char *prefix_name,int max_len);/* Exported Symbols for kernel loadable modules to use. */
kernel/debug/kdb/kdb_support.c +5 -5
@@ -221,11 +221,13 @@ int kallsyms_symbol_complete(char *prefix_name, int max_len)* Parameters: * prefix_name prefix of a symbol name to lookup * flag 0 means search from the head, 1 means continue search. +* buf_size maximum length that can be written to prefix_name +* buffer * Returns: * 1 if a symbol matches the given prefix. * 0 if no string found */ -int kallsyms_symbol_next (char *prefix_name,int flag) +int kallsyms_symbol_next (char *prefix_name,int flag,int buf_size) {int prefix_len =strlen (prefix_name);static loff_t pos;
@@ -235,10 +237,8 @@ int kallsyms_symbol_next(char *prefix_name, int flag) pos =0 ;while ((name =kdb_walk_kallsyms (&pos))) { -if (strncmp (name, prefix_name, prefix_len) ==0 ) { -strncpy (prefix_name, name,strlen (name)+1 ); -return 1 ; - } +if (!strncmp (name, prefix_name, prefix_len)) +return strscpy (prefix_name, name, buf_size); }return 0 ; }
kernel/rcu/tree.c +9 -0
@@ -2772,6 +2772,15 @@ void rcu_check_callbacks(int user)rcu_bh_qs (); }rcu_preempt_check_callbacks (); +/* The load-acquire pairs with the store-release setting to true. */ +if (smp_load_acquire (this_cpu_ptr (&rcu_dynticks.rcu_urgent_qs))) { +/* Idle and userspace execution already are quiescent states. */ +if (!rcu_is_cpu_rrupt_from_idle () && !user) { +set_tsk_need_resched (current); +set_preempt_need_resched (); + } +__this_cpu_write (rcu_dynticks.rcu_urgent_qs, false); + }if (rcu_pending ())invoke_rcu_core ();if (user)
kernel/sysctl.c +18 -0
@@ -1793,6 +1793,24 @@ static struct ctl_table fs_table[] = { .extra1 = &zero, .extra2 = &one, }, + { + .procname = "protected_fifos", + .data = &sysctl_protected_fifos, + .maxlen = sizeof(int), + .mode = 0600, + .proc_handler = proc_dointvec_minmax, + .extra1 = &zero, + .extra2 = &two, + }, + { + .procname = "protected_regular", + .data = &sysctl_protected_regular, + .maxlen = sizeof(int), + .mode = 0600, + .proc_handler = proc_dointvec_minmax, + .extra1 = &zero, + .extra2 = &two, + }, { .procname = "suid_dumpable", .data = &suid_dumpable,
mm/memory.c +30 -4
@@ -3697,10 +3697,36 @@ static int do_fault(struct vm_fault *vmf)struct vm_area_struct *vma = vmf->vma;int ret; -/* The VMA was not fully populated on mmap() or missing VM_DONTEXPAND */ -if (!vma->vm_ops->fault) - ret =VM_FAULT_SIGBUS ; -else if (!(vmf->flags &FAULT_FLAG_WRITE )) +/* +* The VMA was not fully populated on mmap() or missing VM_DONTEXPAND +*/ +if (!vma->vm_ops->fault) { +/* +* If we find a migration pmd entry or a none pmd entry, which +* should never happen, return SIGBUS +*/ +if (unlikely (!pmd_present (*vmf->pmd))) + ret =VM_FAULT_SIGBUS ; +else { + vmf->pte =pte_offset_map_lock (vmf->vma->vm_mm, + vmf->pmd, + vmf->address, + &vmf->ptl); +/* +* Make sure this is not a temporary clearing of pte +* by holding ptl and checking again. A R/M/W update +* of pte involves: take ptl, clearing the pte so that +* we don't have concurrent modification by hardware +* followed by an update. +*/ +if (unlikely (pte_none (*vmf->pte))) + ret =VM_FAULT_SIGBUS ; +else + ret =VM_FAULT_NOPAGE ; + +pte_unmap_unlock (vmf->pte, vmf->ptl); + } + }else if (!(vmf->flags &FAULT_FLAG_WRITE )) ret =do_read_fault (vmf);else if (!(vma->vm_flags &VM_SHARED )) ret =do_cow_fault (vmf);
mm/page_alloc.c +9 -11
@@ -3867,17 +3867,6 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,unsigned int cpuset_mems_cookie;int reserve_flags; -/* -* In the slowpath, we sanity check order to avoid ever trying to -* reclaim >= MAX_ORDER areas which will never succeed. Callers may -* be using allocators in order of preference for an area that is -* too large. -*/ -if (order >=MAX_ORDER ) { -WARN_ON_ONCE (!(gfp_mask & __GFP_NOWARN)); -return NULL ; - } -/* * We also sanity check to catch abuse of atomic reserves being used by * callers that are not in atomic context.
@@ -4179,6 +4168,15 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, int preferred_nid,gfp_t alloc_mask;/* The gfp_t that was actually used for allocation */ struct alloc_context ac = { }; +/* +* There are several places where we assume that the order value is sane +* so bail out early if the request is out of bound. +*/ +if (unlikely (order >=MAX_ORDER )) { +WARN_ON_ONCE (!(gfp_mask & __GFP_NOWARN)); +return NULL ; + } + gfp_mask &= gfp_allowed_mask; alloc_mask = gfp_mask;if (!prepare_alloc_pages (gfp_mask, order, preferred_nid, nodemask, &ac, &alloc_mask, &alloc_flags))
mm/shmem.c +1 -3
@@ -2590,9 +2590,7 @@ static loff_t shmem_file_llseek(struct file *file, loff_t offset, int whence)inode_lock (inode);/* We're holding i_mutex so we can access i_size directly */ -if (offset <0 ) - offset = -EINVAL ; -else if (offset >= inode->i_size) +if (offset <0 || offset >= inode->i_size) offset = -ENXIO ;else { start = offset >>PAGE_SHIFT ;
mm/slab.c +4 -0
@@ -3670,6 +3670,8 @@ __do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller)struct kmem_cache *cachep;void *ret; +if (unlikely (size >KMALLOC_MAX_CACHE_SIZE )) +return NULL ; cachep =kmalloc_slab (size, flags);if (unlikely (ZERO_OR_NULL_PTR (cachep)))return cachep;
@@ -3705,6 +3707,8 @@ static __always_inline void *__do_kmalloc(size_t size, gfp_t flags,struct kmem_cache *cachep;void *ret; +if (unlikely (size >KMALLOC_MAX_CACHE_SIZE )) +return NULL ; cachep =kmalloc_slab (size, flags);if (unlikely (ZERO_OR_NULL_PTR (cachep)))return cachep;
mm/slab_common.c +6 -6
@@ -971,18 +971,18 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags) {int index; -if (unlikely (size >KMALLOC_MAX_SIZE )) { -WARN_ON_ONCE (!(flags & __GFP_NOWARN)); -return NULL ; - } -if (size <=192 ) {if (!size)return ZERO_SIZE_PTR ; index = size_index[size_index_elem (size)]; - }else + }else { +if (unlikely (size >KMALLOC_MAX_CACHE_SIZE )) { +WARN_ON (1 ); +return NULL ; + } index =fls (size -1 ); + }#ifdef CONFIG_ZONE_DMA if (unlikely ((flags &GFP_DMA )))
mm/z3fold.c +62 -39
180 lines not on this page · raw message
net/can/raw.c +8 -7
@@ -745,18 +745,19 @@ static int raw_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) }else ifindex = ro->ifindex; -if (ro->fd_frames) { + dev =dev_get_by_index (sock_net (sk), ifindex); +if (!dev) +return -ENXIO ; + + err = -EINVAL ; +if (ro->fd_frames && dev->mtu ==CANFD_MTU ) {if (unlikely (size !=CANFD_MTU && size !=CAN_MTU )) -return -EINVAL ; + goto put_dev; }else {if (unlikely (size !=CAN_MTU )) -return -EINVAL ; + goto put_dev; } - dev =dev_get_by_index (sock_net (sk), ifindex); -if (!dev) -return -ENXIO ; - skb =sock_alloc_send_skb (sk, size +sizeof (struct can_skb_priv ), msg->msg_flags &MSG_DONTWAIT , &err);if (!skb)
net/core/sock.c +1 -1
@@ -2242,7 +2242,7 @@ static void __lock_sock(struct sock *sk)finish_wait (&sk->sk_lock.wq, &wait); } -static void __release_sock (struct sock *sk) +void __release_sock (struct sock *sk) __releases(&sk->sk_lock.slock) __acquires(&sk->sk_lock.slock) {
net/ieee802154/6lowpan/6lowpan_i.h +2 -2
@@ -20,8 +20,8 @@ typedef unsigned __bitwise lowpan_rx_result;struct frag_lowpan_compare_key {u16 tag;u16 d_size; -const struct ieee802154_addr src; -const struct ieee802154_addr dst; +struct ieee802154_addr src; +struct ieee802154_addr dst; };/* Equivalent of ipv4 struct ipq
net/ieee802154/6lowpan/reassembly.c +7 -7
@@ -75,14 +75,14 @@ fq_find(struct net *net, const struct lowpan_802154_cb *cb, {struct netns_ieee802154_lowpan *ieee802154_lowpan =net_ieee802154_lowpan (net); -struct frag_lowpan_compare_key key = { - .tag = cb->d_tag, - .d_size = cb->d_size, - .src = *src, - .dst = *dst, - }; +struct frag_lowpan_compare_key key = {};struct inet_frag_queue *q; + key.tag = cb->d_tag; + key.d_size = cb->d_size; + key.src = *src; + key.dst = *dst; + q =inet_frag_find (&ieee802154_lowpan->frags, &key);if (!q)return NULL ;
@@ -372,7 +372,7 @@ int lowpan_frag_rcv(struct sk_buff *skb, u8 frag_type)struct lowpan_frag_queue *fq;struct net *net =dev_net (skb->dev);struct lowpan_802154_cb *cb =lowpan_802154_cb (skb); -struct ieee802154_hdr hdr; +struct ieee802154_hdr hdr = {};int err;if (ieee802154_hdr_peek_addrs (skb, &hdr) <0 )
net/ipv4/tcp.c +3 -8
@@ -2217,16 +2217,10 @@ void tcp_close(struct sock *sk, long timeout)sock_hold (sk);sock_orphan (sk); -/* It is the last release_sock in its life. It will remove backlog. */ -release_sock (sk); - - -/* Now socket is owned by kernel and we acquire BH lock -* to finish close. No need to check for user refs. -*/ local_bh_disable ();bh_lock_sock (sk); -WARN_ON (sock_owned_by_user (sk)); +/* remove backlog if any, without releasing ownership. */ +__release_sock (sk);percpu_counter_inc (sk->sk_prot->orphan_count);
@@ -2295,6 +2289,7 @@ void tcp_close(struct sock *sk, long timeout) out:bh_unlock_sock (sk);local_bh_enable (); +release_sock (sk);sock_put (sk); }EXPORT_SYMBOL (tcp_close);
net/llc/af_llc.c +4 -7
@@ -730,7 +730,6 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,struct sk_buff *skb =NULL ;struct sock *sk = sock->sk;struct llc_sock *llc =llc_sk (sk); -unsigned long cpu_flags;size_t copied =0 ;u32 peek_seq =0 ;u32 *seq, skb_len;
@@ -855,9 +854,8 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, goto copy_uaddr;if (!(flags &MSG_PEEK )) { -spin_lock_irqsave (&sk->sk_receive_queue.lock, cpu_flags); -sk_eat_skb (sk, skb); -spin_unlock_irqrestore (&sk->sk_receive_queue.lock, cpu_flags); +skb_unlink (skb, &sk->sk_receive_queue); +kfree_skb (skb); *seq =0 ; }
@@ -878,9 +876,8 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,llc_cmsg_rcv (msg, skb);if (!(flags &MSG_PEEK )) { -spin_lock_irqsave (&sk->sk_receive_queue.lock, cpu_flags); -sk_eat_skb (sk, skb); -spin_unlock_irqrestore (&sk->sk_receive_queue.lock, cpu_flags); +skb_unlink (skb, &sk->sk_receive_queue); +kfree_skb (skb); *seq =0 ; }
net/sctp/associola.c +7 -3
@@ -497,8 +497,9 @@ void sctp_assoc_set_primary(struct sctp_association *asoc,void sctp_assoc_rm_peer (struct sctp_association *asoc,struct sctp_transport *peer) { -struct list_head *pos; -struct sctp_transport *transport; +struct sctp_transport *transport; +struct list_head *pos; +struct sctp_chunk *ch;pr_debug ("%s: association:%p addr:%pISpc\n" , __func__, asoc, &peer->ipaddr.sa);
@@ -562,7 +563,6 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc,*/ if (!list_empty (&peer->transmitted)) {struct sctp_transport *active = asoc->peer.active_path; -struct sctp_chunk *ch;/* Reset the transport of each chunk on this list */ list_for_each_entry(ch, &peer->transmitted,
@@ -584,6 +584,10 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc,sctp_transport_hold (active); } +list_for_each_entry (ch, &asoc->outqueue.out_chunk_list, list) +if (ch->transport == peer) + ch->transport =NULL ; + asoc->peer.transport_count--;sctp_transport_free (peer);
net/sunrpc/auth_generic.c +1 -7
@@ -281,13 +281,7 @@ static bool generic_key_to_expire(struct rpc_cred *cred) { struct auth_cred *acred = &container_of(cred, struct generic_cred, gc_base)->acred; -bool ret; - -get_rpccred (cred); - ret =test_bit (RPC_CRED_KEY_EXPIRE_SOON , &acred->ac_flags); -put_rpccred (cred); - -return ret; +return test_bit (RPC_CRED_KEY_EXPIRE_SOON , &acred->ac_flags); }static const struct rpc_credops generic_credops = {
security/integrity/evm/evm.h +1 -1
@@ -48,7 +48,7 @@ int evm_calc_hmac(struct dentry *dentry, const char *req_xattr_name, size_t req_xattr_value_len, char *digest);int evm_calc_hash (struct dentry *dentry,const char *req_xattr_name,const char *req_xattr_value, -size_t req_xattr_value_len,char *digest); +size_t req_xattr_value_len,char type,char *digest);int evm_init_hmac (struct inode *inode,const struct xattr *xattr,char *hmac_val);int evm_init_secfs (void );
security/integrity/evm/evm_crypto.c +66 -9
144 lines not on this page · raw message
security/integrity/evm/evm_main.c +19 -10
@@ -31,7 +31,7 @@int evm_initialized;static char *integrity_status_msg[] = { -"pass" ,"fail" ,"no_label" ,"no_xattrs" ,"unknown" +"pass" ,"pass_immutable" ,"fail" ,"no_label" ,"no_xattrs" ,"unknown" };char *evm_hmac ="hmac(sha1)" ;char *evm_hash ="sha1" ;
@@ -120,7 +120,8 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry,enum integrity_status evm_status =INTEGRITY_PASS ;int rc, xattr_len; -if (iint && iint->evm_status ==INTEGRITY_PASS ) +if (iint && (iint->evm_status ==INTEGRITY_PASS || + iint->evm_status ==INTEGRITY_PASS_IMMUTABLE ))return iint->evm_status;/* if status is not PASS, try to check again - against -ENOMEM */
@@ -161,22 +162,26 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry, rc = -EINVAL ;
Lines of this file are not shown. View the raw message.
security/integrity/ima/ima_api.c +42 -25
67 lines not on this page · raw message
security/integrity/ima/ima_appraise.c +17 -14
Lines of this file are not shown. View the raw message.
security/integrity/ima/ima_main.c +51 -26
77 lines not on this page · raw message
tools/power/cpupower/lib/cpupower_intern.h +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.