Linux 4.14.259
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.259 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/Kconfig | 3 arch/arm/Kconfig.debug | 44 ++++--- arch/arm/boot/dts/imx6ull-pinfunc.h | 2 arch/arm/boot/dts/socfpga_arria10_socdk_qspi.dts | 2 arch/arm/boot/dts/socfpga_arria5_socdk.dts | 2 arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 2 arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 2 arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 2 arch/arm/boot/dts/socfpga_cyclone5_sodia.dts | 2 arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 4 arch/arm/mm/copypage-fa.c | 35 ++--- arch/arm/mm/copypage-feroceon.c | 98 ++++++++-------- arch/arm/mm/copypage-v4mc.c | 19 +-- arch/arm/mm/copypage-v4wb.c | 41 +++--- arch/arm/mm/copypage-v4wt.c | 37 +++--- arch/arm/mm/copypage-xsc3.c | 71 +++++------ arch/arm/mm/copypage-xscale.c | 71 +++++------ arch/x86/Kconfig | 6 - arch/x86/mm/ioremap.c | 4 arch/x86/platform/efi/quirks.c | 3 drivers/ata/libata-scsi.c | 15 ++ drivers/block/xen-blkfront.c | 15 ++ drivers/char/agp/parisc-agp.c | 6 - drivers/dma/st_fdma.c | 2 drivers/firmware/scpi_pm_domain.c | 10 + drivers/gpu/drm/msm/dsi/dsi_host.c | 2 drivers/hwmon/dell-smm-hwmon.c | 7 - drivers/i2c/busses/i2c-rk3x.c | 4 drivers/input/touchscreen/of_touchscreen.c | 18 +-- drivers/md/persistent-data/dm-btree-remove.c | 2 drivers/net/ethernet/broadcom/bcmsysport.c | 5 drivers/net/ethernet/broadcom/bcmsysport.h | 1 drivers/net/ethernet/intel/igbvf/netdev.c | 1 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 3 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 6 - drivers/net/usb/lan78xx.c | 6 - drivers/net/wireless/marvell/mwifiex/cmdevt.c | 4 drivers/net/wireless/marvell/mwifiex/fw.h | 8 - drivers/net/xen-netback/common.h | 1 drivers/net/xen-netback/rx.c | 77 ++++++++---- drivers/net/xen-netfront.c | 125 +++++++++++++++------ drivers/pci/msi.c | 15 +- drivers/scsi/scsi_debug.c | 4 drivers/soc/tegra/fuse/fuse-tegra.c | 2 drivers/soc/tegra/fuse/fuse.h | 2 drivers/tty/hvc/hvc_xen.c | 30 ++++- drivers/usb/gadget/composite.c | 6 - drivers/usb/gadget/legacy/dbgp.c | 6 - drivers/usb/gadget/legacy/inode.c | 6 - drivers/usb/serial/option.c | 8 + fs/fuse/dir.c | 2 fs/nfsd/nfs4state.c | 9 + kernel/audit.c | 21 +-- kernel/time/timekeeping.c | 3 kernel/trace/tracing_map.c | 3 lib/Kconfig.debug | 6 - net/bpf/test_run.c | 17 ++ net/ipv6/sit.c | 1 net/mac80211/agg-tx.c | 2 net/netlink/af_netlink.c | 5 net/nfc/netlink.c | 6 - net/packet/af_packet.c | 5 scripts/recordmcount.pl | 2 tools/testing/selftests/bpf/test_verifier.c | 18 +++ 65 files changed, 575 insertions(+), 374 deletions(-)
Alyssa Ross (1):
dmaengine: st_fdma: fix MODULE_ALIAS
Ard Biesheuvel (1):
x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol
Armin Wolf (1):
hwmon: (dell-smm) Fix warning on /proc/i8k creation error
Chen Jun (1):
tracing: Fix a kmemleak false positive in tracing_map
Cyril Novikov (1):
ixgbe: set X550 MDIO speed before talking to PHY
Daniel Borkmann (1):
bpf: fix panic due to oob in bpf_prog_test_run_skb
Daniele Palmas (1):
USB: serial: option: add Telit FN990 compositions
Dinh Nguyen (1):
ARM: socfpga: dts: fix qspi node compatible
Eric Dumazet (1):
sit: do not call ipip6_dev_free() from sit_init_net()
Erik Ekman (1):
net/mlx4_en: Update reported link modes for 1/10G
Fabio Estevam (1):
ARM: dts: imx6ull-pinfunc: Fix CSI_DATA07__ESAI_TX0 pad name
Felix Fietkau (1):
mac80211: send ADDBA requests using the tid/queue of the aggregation session
Florian Fainelli (1):
net: systemport: Add global locking for descriptor lifecycle
George Kennedy (2):
libata: if T_LENGTH is zero, dma direction should be DMA_NONE
scsi: scsi_debug: Sanity check block descriptor length in resp_mode_select()
Greg Kroah-Hartman (2):
USB: gadget: bRequestType is a bitfield, not a enum Linux 4.14.259
Harshit Mogalapalli (1):
net: netlink: af_netlink: Prevent empty skb by adding a check on len.
Helge Deller (1):
parisc/agp: Annotate parisc agp init functions with __init
J. Bruce Fields (1):
nfsd: fix use-after-free due to delegation race
Jerome Marchand (1):
recordmcount.pl: look for jgnop instruction as well as bcrl on s390
Joe Thornber (1):
dm btree remove: fix use after free in rebalance_children()
Juergen Gross (5):
xen/blkfront: harden blkfront against event channel storms xen/netfront: harden netfront against event channel storms xen/console: harden hvc_xen against event channel storms xen/netback: fix rx queue stall detection xen/netback: don't queue unlimited number of packages
Letu Ren (1):
igbvf: fix double free in igbvf_probe
Miklos Szeredi (1):
fuse: annotate lock in fuse_reverse_inval_entry()
Nathan Chancellor (4):
soc/tegra: fuse: Fix bitwise vs. logical OR warning
net: lan78xx: Avoid unnecessary self assignment
mwifiex: Remove unnecessary braces from HostCmd_SET_SEQ_NO_BSS_INFO
Input: touchscreen - avoid bitwise vs logical OR warning
Nicolas Pitre (1):
ARM: 8805/2: remove unneeded naked function usage
Ondrej Jirman (1):
i2c: rk3x: Handle a spurious start completion interrupt flag
Paul Moore (1):
audit: improve robustness of the audit queue handling
Philip Chen (1):
drm/msm/dsi: set default num_data_lanes
Stefan Agner (1):
ARM: 8800/1: use choice for kernel unwinders
Stefan Roese (1):
PCI/MSI: Mask MSI-X vectors only on success
Sudeep Holla (1):
firmware: arm_scpi: Fix string overflow in SCPI genpd driver
Tadeusz Struk (1):
nfc: fix segfault in nfc_genl_dump_devices_done
Thomas Gleixner (1):
PCI/MSI: Clear PCI_MSIX_FLAGS_MASKALL on error
Tom Lendacky (1):
x86/sme: Explicitly map new EFI memmap table as encrypted
Willem de Bruijn (1):
net/packet: rx_owner_map depends on pg_vec
Yu Liao (1):
timekeeping: Really make sure wall_to_monotonic isn't positive
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 258 +SUBLEVEL = 259 EXTRAVERSION = NAME = Petit Gorille
arch/Kconfig +3 -0
@@ -980,4 +980,7 @@ config HAVE_ARCH_COMPILER_H linux/compiler-*.h in order to override macro definitions that those headers generally provide. +config ARCH_USE_MEMREMAP_PROT + bool + source "kernel/gcov/Kconfig"
arch/arm/Kconfig.debug +28 -16
58 lines not on this page · raw message
arch/arm/boot/dts/imx6ull-pinfunc.h +1 -1
@@ -51,6 +51,6 @@#define MX6ULL_PAD_CSI_DATA04__ESAI_TX_FS 0x01F4 0x0480 0x0000 0x9 0x0#define MX6ULL_PAD_CSI_DATA05__ESAI_TX_CLK 0x01F8 0x0484 0x0000 0x9 0x0#define MX6ULL_PAD_CSI_DATA06__ESAI_TX5_RX0 0x01FC 0x0488 0x0000 0x9 0x0 -#define MX6ULL_PAD_CSI_DATA07__ESAI_T0 0x0200 0x048C 0x0000 0x9 0x0 +#define MX6ULL_PAD_CSI_DATA07__ESAI_TX0 0x0200 0x048C 0x0000 0x9 0x0#endif /* __DTS_IMX6ULL_PINFUNC_H */
arch/arm/boot/dts/socfpga_arria10_socdk_qspi.dts +1 -1
@@ -23,7 +23,7 @@ flash0: n25q00@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "n25q00aa"; + compatible = "micron,mt25qu02g", "jedec,spi-nor"; reg = <0>; spi-max-frequency = <100000000>;
arch/arm/boot/dts/socfpga_arria5_socdk.dts +1 -1
@@ -131,7 +131,7 @@ flash: flash@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "n25q256a"; + compatible = "micron,n25q256a", "jedec,spi-nor"; reg = <0>; spi-max-frequency = <100000000>;
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts +1 -1
@@ -136,7 +136,7 @@ flash0: n25q00@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "n25q00"; + compatible = "micron,mt25qu02g", "jedec,spi-nor"; reg = <0>; /* chip select */ spi-max-frequency = <100000000>;
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +1 -1
@@ -181,7 +181,7 @@ flash: flash@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "n25q00"; + compatible = "micron,mt25qu02g", "jedec,spi-nor"; reg = <0>; spi-max-frequency = <100000000>;
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts +1 -1
@@ -87,7 +87,7 @@ flash: flash@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "n25q256a"; + compatible = "micron,n25q256a", "jedec,spi-nor"; reg = <0>; spi-max-frequency = <100000000>; m25p,fast-read;
arch/arm/boot/dts/socfpga_cyclone5_sodia.dts +1 -1
@@ -128,7 +128,7 @@ flash0: n25q512a@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "n25q512a"; + compatible = "micron,n25q512a", "jedec,spi-nor"; reg = <0>; spi-max-frequency = <100000000>;
arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts +2 -2
@@ -249,7 +249,7 @@ n25q128@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "n25q128"; + compatible = "micron,n25q128", "jedec,spi-nor"; reg = <0>; /* chip select */ spi-max-frequency = <100000000>; m25p,fast-read;
@@ -266,7 +266,7 @@ n25q00@1 { #address-cells = <1>; #size-cells = <1>; - compatible = "n25q00"; + compatible = "micron,mt25qu02g", "jedec,spi-nor"; reg = <1>; /* chip select */ spi-max-frequency = <100000000>; m25p,fast-read;
arch/arm/mm/copypage-fa.c +17 -18
@@ -17,26 +17,25 @@/* * Faraday optimised copy_user_page */ -static void __naked -fa_copy_user_page (void *kto,const void *kfrom) +static void fa_copy_user_page (void *kto,const void *kfrom) { - asm("\ -stmfd sp!, {r4, lr} @ 2\n\ -mov r2, %0 @ 1\n\ -1: ldmia r1!, {r3, r4, ip, lr} @ 4\n\ -stmia r0, {r3, r4, ip, lr} @ 4\n\ -mcr p15, 0, r0, c7, c14, 1 @ 1 clean and invalidate D line\n\ -add r0, r0, #16 @ 1\n\ -ldmia r1!, {r3, r4, ip, lr} @ 4\n\ -stmia r0, {r3, r4, ip, lr} @ 4\n\ -mcr p15, 0, r0, c7, c14, 1 @ 1 clean and invalidate D line\n\ -add r0, r0, #16 @ 1\n\ -subs r2, r2, #1 @ 1\n\ +int tmp; + + asmvolatile ("\ +1: ldmia %1!, {r3, r4, ip, lr} @ 4\n\ +stmia %0, {r3, r4, ip, lr} @ 4\n\ +mcr p15, 0, %0, c7, c14, 1 @ 1 clean and invalidate D line\n\ +add %0, %0, #16 @ 1\n\ +ldmia %1!, {r3, r4, ip, lr} @ 4\n\ +stmia %0, {r3, r4, ip, lr} @ 4\n\ +mcr p15, 0, %0, c7, c14, 1 @ 1 clean and invalidate D line\n\ +add %0, %0, #16 @ 1\n\ +subs %2, %2, #1 @ 1\n\ bne 1b @ 1\n\ -mcr p15, 0, r2, c7, c10, 4 @ 1 drain WB\n\ -ldmfd sp!, {r4, pc} @ 3" - : - :"I" (PAGE_SIZE /32 )); +mcr p15, 0, %2, c7, c10, 4 @ 1 drain WB" + :"+&r" (kto),"+&r" (kfrom),"=&r" (tmp) + :"2" (PAGE_SIZE /32 ) + :"r3" ,"r4" ,"ip" ,"lr" ); } void fa_copy_user_highpage(struct page *to, struct page *from,
arch/arm/mm/copypage-feroceon.c +48 -50
106 lines not on this page · raw message
arch/arm/mm/copypage-v4mc.c +9 -10
@@ -40,12 +40,11 @@ static DEFINE_RAW_SPINLOCK(minicache_lock);* instruction. If your processor does not supply this, you have to write your * own copy_user_highpage that does the right thing. */ -static void __naked -mc_copy_user_page (void *from,void *to) +static void mc_copy_user_page (void *from,void *to) { - asm volatile( - "stmfd sp!, {r4, lr} @ 2\n\ - mov r4, %2 @ 1\n\ +int tmp; + + asm volatile ("\ ldmia %0!, {r2, r3, ip, lr} @ 4\n\ 1: mcr p15, 0, %1, c7, c6, 1 @ 1 invalidate D line\n\ stmia %1!, {r2, r3, ip, lr} @ 4\n\
@@ -55,13 +54,13 @@ mc_copy_user_page(void *from, void *to) mcr p15, 0, %1, c7, c6, 1 @ 1 invalidate D line\n\ stmia %1!, {r2, r3, ip, lr} @ 4\n\ ldmia %0!, {r2, r3, ip, lr} @ 4\n\ - subs r4, r4, #1 @ 1\n\ + subs %2, %2, #1 @ 1\n\ stmia %1!, {r2, r3, ip, lr} @ 4\n\ ldmneia %0!, {r2, r3, ip, lr} @ 4\n\ - bne 1b @ 1\n\ - ldmfd sp!, {r4, pc} @ 3" - : - : "r" (from), "r" (to), "I" (PAGE_SIZE / 64)); + bne 1b @ " + : "+&r" (from), "+&r" (to), "=&r" (tmp) + : "2" (PAGE_SIZE / 64) + : "r2", "r3", "ip", "lr"); } void v4_mc_copy_user_highpage(struct page *to, struct page *from,
arch/arm/mm/copypage-v4wb.c +20 -21
49 lines not on this page · raw message
arch/arm/mm/copypage-v4wt.c +18 -19
@@ -20,27 +20,26 @@* dirty data in the cache. However, we do have to ensure that * subsequent reads are up to date. */ -static void __naked -v4wt_copy_user_page (void *kto,const void *kfrom) +static void v4wt_copy_user_page (void *kto,const void *kfrom) { - asm("\ -stmfd sp!, {r4, lr} @ 2\n\ -mov r2, %2 @ 1\n\ -ldmia r1!, {r3, r4, ip, lr} @ 4\n\ -1: stmia r0!, {r3, r4, ip, lr} @ 4\n\ -ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\ -stmia r0!, {r3, r4, ip, lr} @ 4\n\ -ldmia r1!, {r3, r4, ip, lr} @ 4\n\ -stmia r0!, {r3, r4, ip, lr} @ 4\n\ -ldmia r1!, {r3, r4, ip, lr} @ 4\n\ -subs r2, r2, #1 @ 1\n\ -stmia r0!, {r3, r4, ip, lr} @ 4\n\ -ldmneia r1!, {r3, r4, ip, lr} @ 4\n\ +int tmp; + + asmvolatile ("\ +ldmia %1!, {r3, r4, ip, lr} @ 4\n\ +1: stmia %0!, {r3, r4, ip, lr} @ 4\n\ +ldmia %1!, {r3, r4, ip, lr} @ 4+1\n\ +stmia %0!, {r3, r4, ip, lr} @ 4\n\ +ldmia %1!, {r3, r4, ip, lr} @ 4\n\ +stmia %0!, {r3, r4, ip, lr} @ 4\n\ +ldmia %1!, {r3, r4, ip, lr} @ 4\n\ +subs %2, %2, #1 @ 1\n\ +stmia %0!, {r3, r4, ip, lr} @ 4\n\ +ldmneia %1!, {r3, r4, ip, lr} @ 4\n\ bne 1b @ 1\n\ -mcr p15, 0, r2, c7, c7, 0 @ flush ID cache\n\ -ldmfd sp!, {r4, pc} @ 3" - : - :"r" (kto),"r" (kfrom),"I" (PAGE_SIZE /64 )); +mcr p15, 0, %2, c7, c7, 0 @ flush ID cache" + :"+&r" (kto),"+&r" (kfrom),"=&r" (tmp) + :"2" (PAGE_SIZE /64 ) + :"r3" ,"r4" ,"ip" ,"lr" ); } void v4wt_copy_user_highpage(struct page *to, struct page *from,
arch/arm/mm/copypage-xsc3.c +31 -40
92 lines not on this page · raw message
arch/arm/mm/copypage-xscale.c +35 -36
87 lines not on this page · raw message
arch/x86/Kconfig +2 -4
@@ -1449,6 +1449,7 @@ config ARCH_HAS_MEM_ENCRYPT config AMD_MEM_ENCRYPT bool "AMD Secure Memory Encryption (SME) support" depends on X86_64 && CPU_SUP_AMD + select ARCH_USE_MEMREMAP_PROT ---help--- Say yes to enable support for the encryption of system memory. This requires an AMD processor that supports Secure Memory
@@ -1467,10 +1468,6 @@ config AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT If set to N, then the encryption of system memory can be activated with the mem_encrypt=on command line option. -config ARCH_USE_MEMREMAP_PROT - def_bool y - depends on AMD_MEM_ENCRYPT - # Common NUMA Features config NUMA bool "Numa Memory Allocation and Scheduler Support"
@@ -1903,6 +1900,7 @@ config EFI depends on ACPI select UCS2_STRING select EFI_RUNTIME_WRAPPERS + select ARCH_USE_MEMREMAP_PROT ---help--- This enables the kernel to use EFI runtime services that are available (such as the EFI variable services).
arch/x86/mm/ioremap.c +2 -2
@@ -626,7 +626,7 @@ bool phys_mem_access_encrypted(unsigned long phys_addr, unsigned long size)return arch_memremap_can_ram_remap (phys_addr, size,0 ); } -#ifdef CONFIG_ARCH_USE_MEMREMAP_PROT +#ifdef CONFIG_AMD_MEM_ENCRYPT /* Remap memory with encryption */ void __init *early_memremap_encrypted (resource_size_t phys_addr,unsigned long size)
@@ -668,7 +668,7 @@ void __init *early_memremap_decrypted_wp(resource_size_t phys_addr,return early_memremap_prot (phys_addr, size, __PAGE_KERNEL_NOENC_WP); } -#endif /* CONFIG_ARCH_USE_MEMREMAP_PROT */ +#endif /* CONFIG_AMD_MEM_ENCRYPT */ static pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)] __page_aligned_bss;
arch/x86/platform/efi/quirks.c +2 -1
@@ -276,7 +276,8 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)return ; } - new =early_memremap (new_phys, new_size); + new =early_memremap_prot (new_phys, new_size, +pgprot_val (pgprot_encrypted (FIXMAP_PAGE_NORMAL )));if (!new) {pr_err ("Failed to map new boot services memmap\n" );return ;
drivers/ata/libata-scsi.c +13 -2
@@ -3182,8 +3182,19 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc) goto invalid_fld; } -if (ata_is_ncq (tf->protocol) && (cdb[2 + cdb_offset] &0x3 ) ==0 ) - tf->protocol =ATA_PROT_NCQ_NODATA ; +if ((cdb[2 + cdb_offset] &0x3 ) ==0 ) { +/* +* When T_LENGTH is zero (No data is transferred), dir should +* be DMA_NONE. +*/ +if (scmd->sc_data_direction !=DMA_NONE ) { + fp =2 + cdb_offset; + goto invalid_fld; + } + +if (ata_is_ncq (tf->protocol)) + tf->protocol =ATA_PROT_NCQ_NODATA ; + }/* enable LBA */ tf->flags |=ATA_TFLAG_LBA ;
drivers/block/xen-blkfront.c +12 -3
@@ -1566,9 +1566,12 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)unsigned long flags;struct blkfront_ring_info *rinfo = (struct blkfront_ring_info *)dev_id;struct blkfront_info *info = rinfo->dev_info; +unsigned int eoiflag =XEN_EOI_FLAG_SPURIOUS ; -if (unlikely (info->connected !=BLKIF_STATE_CONNECTED )) +if (unlikely (info->connected !=BLKIF_STATE_CONNECTED )) { +xen_irq_lateeoi (irq,XEN_EOI_FLAG_SPURIOUS );return IRQ_HANDLED ; + }spin_lock_irqsave (&rinfo->ring_lock, flags); again:
@@ -1584,6 +1587,8 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)unsigned long id;unsigned int op; + eoiflag =0 ; +RING_COPY_RESPONSE (&rinfo->ring, i, &bret); id = bret.id;
@@ -1699,6 +1704,8 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)spin_unlock_irqrestore (&rinfo->ring_lock, flags); +xen_irq_lateeoi (irq, eoiflag); +return IRQ_HANDLED ; err:
@@ -1706,6 +1713,8 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)spin_unlock_irqrestore (&rinfo->ring_lock, flags); +/* No EOI in order to avoid further interrupts. */ +pr_alert ("%s disabled for further use\n" , info->gd->disk_name);return IRQ_HANDLED ; }
@@ -1745,8 +1754,8 @@ static int setup_blkring(struct xenbus_device *dev,if (err) goto fail; - err =bind_evtchn_to_irqhandler (rinfo->evtchn, blkif_interrupt,0 , -"blkif" , rinfo); + err =bind_evtchn_to_irqhandler_lateeoi (rinfo->evtchn, blkif_interrupt, +0 ,"blkif" , rinfo);if (err <=0 ) {xenbus_dev_fatal (dev, err,"bind_evtchn_to_irqhandler failed" );
drivers/char/agp/parisc-agp.c +3 -3
@@ -285,7 +285,7 @@ agp_ioc_init(void __iomem *ioc_regs)return 0 ; } -static int +static int __init lba_find_capability (int cap) {struct _parisc_agp_info *info = &parisc_agp_info;
@@ -370,7 +370,7 @@ parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa)return error; } -static int +static int __init find_quicksilver (struct device *dev,void *data) {struct parisc_device **lba = data;
@@ -382,7 +382,7 @@ find_quicksilver(struct device *dev, void *data)return 0 ; } -static int +static int __init parisc_agp_init (void ) {extern struct sba_device *sba_list;
drivers/dma/st_fdma.c +1 -1
@@ -886,4 +886,4 @@ MODULE_LICENSE("GPL v2");MODULE_DESCRIPTION ("STMicroelectronics FDMA engine driver" );MODULE_AUTHOR ("Ludovic.barre <[email protected]>" );MODULE_AUTHOR ("Peter Griffin <[email protected]>" ); -MODULE_ALIAS ("platform: " DRIVER_NAME ); +MODULE_ALIAS ("platform:" DRIVER_NAME );
drivers/firmware/scpi_pm_domain.c +7 -3
@@ -27,7 +27,6 @@ struct scpi_pm_domain {struct generic_pm_domain genpd;struct scpi_ops *ops;u32 domain; -char name[30 ]; };/*
@@ -121,8 +120,13 @@ static int scpi_pm_domain_probe(struct platform_device *pdev) scpi_pd->domain = i; scpi_pd->ops = scpi_ops; -sprintf (scpi_pd->name,"%s.%d" , np->name, i); - scpi_pd->genpd.name = scpi_pd->name; + scpi_pd->genpd.name =devm_kasprintf (dev,GFP_KERNEL , +"%s.%d" , np->name, i); +if (!scpi_pd->genpd.name) { +dev_err (dev,"Failed to allocate genpd name:%s.%d\n" , + np->name, i); +continue ; + } scpi_pd->genpd.power_off = scpi_pd_power_off; scpi_pd->genpd.power_on = scpi_pd_power_on;
drivers/gpu/drm/msm/dsi/dsi_host.c +2 -0
@@ -1563,6 +1563,8 @@ static int dsi_host_parse_lane_data(struct msm_dsi_host *msm_host,if (!prop) {dev_dbg (dev,"failed to find data lane mapping, using default\n" ); +/* Set the number of date lanes to 4 by default. */ + msm_host->num_data_lanes =4 ;return 0 ; }
drivers/hwmon/dell-smm-hwmon.c +5 -2
@@ -578,15 +578,18 @@ static const struct file_operations i8k_fops = { .unlocked_ioctl = i8k_ioctl, }; +static struct proc_dir_entry *entry; +static void __init i8k_init_procfs (void ) {/* Register the proc entry */ -proc_create ("i8k" ,0 ,NULL , &i8k_fops); + entry =proc_create ("i8k" ,0 ,NULL , &i8k_fops); } static void __exit i8k_exit_procfs(void) { -remove_proc_entry ("i8k" ,NULL ); +if (entry) +remove_proc_entry ("i8k" ,NULL ); }#else
drivers/i2c/busses/i2c-rk3x.c +2 -2
@@ -424,8 +424,8 @@ static void rk3x_i2c_handle_read(struct rk3x_i2c *i2c, unsigned int ipd)if (!(ipd ®_INT_MBRF ))return ; -/* ack interrupt */ -i2c_writel (i2c,REG_INT_MBRF ,REG_IPD ); +/* ack interrupt (read also produces a spurious START flag, clear it too) */ +i2c_writel (i2c,REG_INT_MBRF |REG_INT_START ,REG_IPD );/* Can only handle a maximum of 32 bytes at a time */ if (len >32 )
drivers/input/touchscreen/of_touchscreen.c +9 -9
@@ -79,8 +79,8 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch, data_present =touchscreen_get_prop_u32 (dev,"touchscreen-size-x" ,input_abs_get_max (input, axis) +1 , - &maximum) | -touchscreen_get_prop_u32 (dev,"touchscreen-fuzz-x" , + &maximum); + data_present |=touchscreen_get_prop_u32 (dev,"touchscreen-fuzz-x" ,input_abs_get_fuzz (input, axis), &fuzz);if (data_present)
@@ -90,8 +90,8 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch, data_present =touchscreen_get_prop_u32 (dev,"touchscreen-size-y" ,input_abs_get_max (input, axis) +1 , - &maximum) | -touchscreen_get_prop_u32 (dev,"touchscreen-fuzz-y" , + &maximum); + data_present |=touchscreen_get_prop_u32 (dev,"touchscreen-fuzz-y" ,input_abs_get_fuzz (input, axis), &fuzz);if (data_present)
@@ -101,11 +101,11 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch, data_present =touchscreen_get_prop_u32 (dev,"touchscreen-max-pressure" ,input_abs_get_max (input, axis), - &maximum) | -touchscreen_get_prop_u32 (dev, -"touchscreen-fuzz-pressure" , -input_abs_get_fuzz (input, axis), - &fuzz); + &maximum); + data_present |=touchscreen_get_prop_u32 (dev, +"touchscreen-fuzz-pressure" , +input_abs_get_fuzz (input, axis), + &fuzz);if (data_present)touchscreen_set_params (input, axis, maximum, fuzz);
drivers/md/persistent-data/dm-btree-remove.c +1 -1
@@ -423,9 +423,9 @@ static int rebalance_children(struct shadow_spine *s,memcpy (n,dm_block_data (child),dm_bm_block_size (dm_tm_get_bm (info->tm))); -dm_tm_unlock (info->tm, child);dm_tm_dec (info->tm,dm_block_location (child)); +dm_tm_unlock (info->tm, child);return 0 ; }
drivers/net/ethernet/broadcom/bcmsysport.c +5 -0
@@ -120,9 +120,13 @@ static inline void tdma_port_write_desc_addr(struct bcm_sysport_priv *priv, struct dma_desc *desc, unsigned int port) { +unsigned long desc_flags; +/* Ports are latched, so write upper address first */ +spin_lock_irqsave (&priv->desc_lock, desc_flags);tdma_writel (priv, desc->addr_status_len,TDMA_WRITE_PORT_HI (port));tdma_writel (priv, desc->addr_lo,TDMA_WRITE_PORT_LO (port)); +spin_unlock_irqrestore (&priv->desc_lock, desc_flags); }/* Ethtool operations */
@@ -1880,6 +1884,7 @@ static int bcm_sysport_open(struct net_device *dev) }/* Initialize both hardware and software ring */ +spin_lock_init (&priv->desc_lock);for (i =0 ; i < dev->num_tx_queues; i++) { ret =bcm_sysport_init_tx_ring (priv, i);if (ret) {
drivers/net/ethernet/broadcom/bcmsysport.h +1 -0
@@ -733,6 +733,7 @@ struct bcm_sysport_priv {int wol_irq;/* Transmit rings */ +spinlock_t desc_lock;struct bcm_sysport_tx_ring *tx_rings;/* Receive queue */
drivers/net/ethernet/intel/igbvf/netdev.c +1 -0
@@ -2911,6 +2911,7 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)return 0 ; err_hw_init: +netif_napi_del (&adapter->rx_ring->napi);kfree (adapter->tx_ring);kfree (adapter->rx_ring); err_sw_init:
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c +3 -0
@@ -3397,6 +3397,9 @@ static s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)/* flush pending Tx transactions */ ixgbe_clear_tx_pending (hw); +/* set MDIO speed before talking to the PHY in case it's the 1st time */ +ixgbe_set_mdio_speed (hw); +/* PHY ops must be identified and initialized prior to reset */ /* Identify PHY and related function pointers */
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +3 -3
@@ -649,7 +649,7 @@ void __init mlx4_en_init_ptys2ethtool_map(void)MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_1000BASE_T ,SPEED_1000 , ETHTOOL_LINK_MODE_1000baseT_Full_BIT);MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_1000BASE_CX_SGMII ,SPEED_1000 , - ETHTOOL_LINK_MODE_1000baseKX_Full_BIT); + ETHTOOL_LINK_MODE_1000baseX_Full_BIT);MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_1000BASE_KX ,SPEED_1000 , ETHTOOL_LINK_MODE_1000baseKX_Full_BIT); MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_10GBASE_T, SPEED_10000,
@@ -661,9 +661,9 @@ void __init mlx4_en_init_ptys2ethtool_map(void)MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_10GBASE_KR ,SPEED_10000 , ETHTOOL_LINK_MODE_10000baseKR_Full_BIT);MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_10GBASE_CR ,SPEED_10000 , - ETHTOOL_LINK_MODE_10000baseKR_Full_BIT); + ETHTOOL_LINK_MODE_10000baseCR_Full_BIT);MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_10GBASE_SR ,SPEED_10000 , - ETHTOOL_LINK_MODE_10000baseKR_Full_BIT); + ETHTOOL_LINK_MODE_10000baseSR_Full_BIT);MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_20GBASE_KR2 ,SPEED_20000 , ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT, ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT);
drivers/net/usb/lan78xx.c +2 -4
@@ -920,11 +920,9 @@ static int lan78xx_read_otp(struct lan78xx_net *dev, u32 offset, ret =lan78xx_read_raw_otp (dev,0 ,1 , &sig);if (ret ==0 ) { -if (sig ==OTP_INDICATOR_1 ) - offset = offset; -else if (sig ==OTP_INDICATOR_2 ) +if (sig ==OTP_INDICATOR_2 ) offset +=0x100 ; -else +else if (sig !=OTP_INDICATOR_1 ) ret = -EINVAL ;if (!ret) ret =lan78xx_read_raw_otp (dev, offset, length, data);
drivers/net/wireless/marvell/mwifiex/cmdevt.c +2 -2
@@ -323,9 +323,9 @@ static int mwifiex_dnld_sleep_confirm_cmd(struct mwifiex_adapter *adapter) adapter->seq_num++; sleep_cfm_buf->seq_num = -cpu_to_le16 ((HostCmd_SET_SEQ_NO_BSS_INFO +cpu_to_le16 (HostCmd_SET_SEQ_NO_BSS_INFO (adapter->seq_num, priv->bss_num, - priv->bss_type))); + priv->bss_type)); mwifiex_dbg(adapter, CMD, "cmd: DNLD_CMD: %#x, act %#x, len %d, seqno %#x\n",
drivers/net/wireless/marvell/mwifiex/fw.h +4 -4
@@ -498,10 +498,10 @@ enum mwifiex_channel_flags {#define RF_ANTENNA_AUTO 0xFFFF -#define HostCmd_SET_SEQ_NO_BSS_INFO (seq, num, type) { \ - (((seq) & 0x00ff) | \ - (((num) & 0x000f) << 8)) | \ - (((type) & 0x000f) << 12); } +#define HostCmd_SET_SEQ_NO_BSS_INFO (seq, num, type) \ + ((((seq) & 0x00ff) | \ + (((num) & 0x000f) << 8)) | \ + (((type) & 0x000f) << 12))#define HostCmd_GET_SEQ_NO (seq) \ ((seq) & HostCmd_SEQ_NUM_MASK)
drivers/net/xen-netback/common.h +1 -0
@@ -203,6 +203,7 @@ struct xenvif_queue { /* Per-queue data for xenvif */unsigned int rx_queue_max;unsigned int rx_queue_len;unsigned long last_rx_time; +unsigned int rx_slots_needed;bool stalled;struct xenvif_copy_state rx_copy;
drivers/net/xen-netback/rx.c +49 -28
129 lines not on this page · raw message
drivers/net/xen-netfront.c +94 -31
250 lines not on this page · raw message
drivers/pci/msi.c +11 -4
@@ -796,9 +796,6 @@ static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries, goto out_disable; } -/* Ensure that all table entries are masked. */ -msix_mask_all (base, tsize); - ret =msix_setup_entries (dev, base, entries, nvec, affd);if (ret) goto out_disable;
@@ -821,6 +818,16 @@ static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,/* Set MSI-X enabled bits and unmask the function */ pci_intx_for_msi (dev,0 ); dev->msix_enabled =1 ; + +/* +* Ensure that all table entries are masked to prevent +* stale entries from firing in a crash kernel. +* +* Done late to deal with a broken Marvell NVME device +* which takes the MSI-X mask bits into account even +* when MSI-X is disabled, which prevents MSI delivery. +*/ +msix_mask_all (base, tsize);pci_msix_clear_and_set_ctrl (dev,PCI_MSIX_FLAGS_MASKALL ,0 );pcibios_free_irq (dev);
@@ -847,7 +854,7 @@ static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,free_msi_irqs (dev); out_disable: -pci_msix_clear_and_set_ctrl (dev,PCI_MSIX_FLAGS_ENABLE ,0 ); +pci_msix_clear_and_set_ctrl (dev,PCI_MSIX_FLAGS_MASKALL |PCI_MSIX_FLAGS_ENABLE ,0 );return ret; }
drivers/scsi/scsi_debug.c +2 -2
@@ -2181,11 +2181,11 @@ static int resp_mode_select(struct scsi_cmnd *scp, __func__, param_len, res); md_len = mselect6 ? (arr[0 ] +1 ) : (get_unaligned_be16 (arr +0 ) +2 ); bd_len = mselect6 ? arr[3 ] :get_unaligned_be16 (arr +6 ); -if (md_len >2 ) { + off = bd_len + (mselect6 ?4 :8 ); +if (md_len >2 || off >= res) {mk_sense_invalid_fld (scp,SDEB_IN_DATA ,0 ,-1 );return check_condition_result; } - off = bd_len + (mselect6 ?4 :8 ); mpage = arr[off] &0x3f ; ps = !!(arr[off] &0x80 );if (ps) {
drivers/soc/tegra/fuse/fuse-tegra.c +1 -1
@@ -178,7 +178,7 @@ static struct platform_driver tegra_fuse_driver = { };builtin_platform_driver (tegra_fuse_driver); -bool __init tegra_fuse_read_spare (unsigned int spare) +u32 __init tegra_fuse_read_spare (unsigned int spare) {unsigned int offset = fuse->soc->info->spare + spare *4 ;
drivers/soc/tegra/fuse/fuse.h +1 -1
@@ -62,7 +62,7 @@ struct tegra_fuse {void tegra_init_revision (void );void tegra_init_apbmisc (void ); -bool __init tegra_fuse_read_spare (unsigned int spare); +u32 __init tegra_fuse_read_spare (unsigned int spare);u32 __init tegra_fuse_read_early (unsigned int offset);#ifdef CONFIG_ARCH_TEGRA_2x_SOC
drivers/tty/hvc/hvc_xen.c +27 -3
@@ -50,6 +50,8 @@ struct xencons_info {struct xenbus_device *xbdev;struct xencons_interface *intf;unsigned int evtchn; +XENCONS_RING_IDX out_cons; +unsigned int out_cons_same;struct hvc_struct *hvc;int irq;int vtermno;
@@ -151,6 +153,8 @@ static int domU_read_console(uint32_t vtermno, char *buf, int len)XENCONS_RING_IDX cons, prod;int recv =0 ;struct xencons_info *xencons =vtermno_to_xencons (vtermno); +unsigned int eoiflag =0 ; +if (xencons ==NULL )return -EINVAL ; intf = xencons->intf;
@@ -170,7 +174,27 @@ static int domU_read_console(uint32_t vtermno, char *buf, int len)mb ();/* read ring before consuming */ intf->in_cons = cons; -notify_daemon (xencons); +/* +* When to mark interrupt having been spurious: +* - there was no new data to be read, and +* - the backend did not consume some output bytes, and +* - the previous round with no read data didn't see consumed bytes +* (we might have a race with an interrupt being in flight while +* updating xencons->out_cons, so account for that by allowing one +* round without any visible reason) +*/ +if (intf->out_cons != xencons->out_cons) { + xencons->out_cons = intf->out_cons; + xencons->out_cons_same =0 ; + } +if (recv) { +notify_daemon (xencons); + }else if (xencons->out_cons_same++ >1 ) { + eoiflag =XEN_EOI_FLAG_SPURIOUS ; + } + +xen_irq_lateeoi (xencons->irq, eoiflag); +return recv; }
@@ -399,7 +423,7 @@ static int xencons_connect_backend(struct xenbus_device *dev,if (ret)return ret; info->evtchn = evtchn; - irq =bind_evtchn_to_irq (evtchn); + irq =bind_interdomain_evtchn_to_irq_lateeoi (dev->otherend_id, evtchn);if (irq <0 )return irq; info->irq = irq;
@@ -563,7 +587,7 @@ static int __init xen_hvc_init(void)return r; info =vtermno_to_xencons (HVC_COOKIE ); - info->irq =bind_evtchn_to_irq (info->evtchn); + info->irq =bind_evtchn_to_irq_lateeoi (info->evtchn); }if (info->irq <0 ) info->irq =0 ;/* NO_IRQ */
drivers/usb/gadget/composite.c +3 -3
@@ -1636,14 +1636,14 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)u8 endp;if (w_length >USB_COMP_EP0_BUFSIZ ) { -if (ctrl->bRequestType ==USB_DIR_OUT ) { - goto done; - }else { +if (ctrl->bRequestType &USB_DIR_IN ) {/* Cast away the const, we are going to overwrite on purpose. */ __le16 *temp = (__le16 *)&ctrl->wLength; *temp =cpu_to_le16 (USB_COMP_EP0_BUFSIZ ); w_length =USB_COMP_EP0_BUFSIZ ; + }else { + goto done; } }
drivers/usb/gadget/legacy/dbgp.c +3 -3
@@ -345,14 +345,14 @@ static int dbgp_setup(struct usb_gadget *gadget,u16 len =0 ;if (length >DBGP_REQ_LEN ) { -if (ctrl->bRequestType ==USB_DIR_OUT ) { -return err; - }else { +if (ctrl->bRequestType &USB_DIR_IN ) {/* Cast away the const, we are going to overwrite on purpose. */ __le16 *temp = (__le16 *)&ctrl->wLength; *temp =cpu_to_le16 (DBGP_REQ_LEN ); length =DBGP_REQ_LEN ; + }else { +return err; } }
drivers/usb/gadget/legacy/inode.c +3 -3
@@ -1339,14 +1339,14 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)u16 w_length =le16_to_cpu (ctrl->wLength);if (w_length >RBUF_SIZE ) { -if (ctrl->bRequestType ==USB_DIR_OUT ) { -return value; - }else { +if (ctrl->bRequestType &USB_DIR_IN ) {/* Cast away the const, we are going to overwrite on purpose. */ __le16 *temp = (__le16 *)&ctrl->wLength; *temp =cpu_to_le16 (RBUF_SIZE ); w_length =RBUF_SIZE ; + }else { +return value; } }
drivers/usb/serial/option.c +8 -0
@@ -1222,6 +1222,14 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1063, 0xff), /* Telit LN920 (ECM) */ .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1070, 0xff), /* Telit FN990 (rmnet) */ + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1071, 0xff), /* Telit FN990 (MBIM) */ + .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1072, 0xff), /* Telit FN990 (RNDIS) */ + .driver_info = NCTRL(2) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990 (ECM) */ + .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
fs/fuse/dir.c +1 -1
@@ -969,7 +969,7 @@ int fuse_reverse_inval_entry(struct super_block *sb, u64 parent_nodeid,if (!parent)return -ENOENT ; -inode_lock (parent); +inode_lock_nested (parent,I_MUTEX_PARENT );if (!S_ISDIR (parent->i_mode)) goto unlock;
fs/nfsd/nfs4state.c +7 -2
@@ -955,6 +955,11 @@ hash_delegation_locked(struct nfs4_delegation *dp, struct nfs4_file *fp)return 0 ; } +static bool delegation_hashed (struct nfs4_delegation *dp) +{ +return !(list_empty (&dp->dl_perfile)); +} +static bool unhash_delegation_locked (struct nfs4_delegation *dp) {
@@ -962,7 +967,7 @@ unhash_delegation_locked(struct nfs4_delegation *dp)lockdep_assert_held (&state_lock); -if (list_empty (&dp->dl_perfile)) +if (!delegation_hashed (dp))return false; dp->dl_stid.sc_type =NFS4_CLOSED_DELEG_STID ;
@@ -3881,7 +3886,7 @@ static void nfsd4_cb_recall_prepare(struct nfsd4_callback *cb)* queued for a lease break. Don't queue it again. */ spin_lock (&state_lock); -if (dp->dl_time ==0 ) { +if (delegation_hashed (dp) && dp->dl_time ==0 ) { dp->dl_time =get_seconds ();list_add_tail (&dp->dl_recall_lru, &nn->del_recall_lru); }
kernel/audit.c +10 -11
@@ -686,7 +686,7 @@ static int kauditd_send_queue(struct sock *sk, u32 portid, {int rc =0 ;struct sk_buff *skb; -static unsigned int failed =0 ; +unsigned int failed =0 ;/* NOTE: kauditd_thread takes care of all our locking, we just use * the netlink info passed to us (e.g. sk and portid) */
@@ -703,32 +703,30 @@ static int kauditd_send_queue(struct sock *sk, u32 portid,continue ; } +retry:/* grab an extra skb reference in case of error */ skb_get (skb); rc =netlink_unicast (sk, skb, portid,0 );if (rc <0 ) { -/* fatal failure for our queue flush attempt? */ +/* send failed - try a few times unless fatal error */ if (++failed >= retry_limit || rc == -ECONNREFUSED || rc == -EPERM ) { -/* yes - error processing for the queue */ sk =NULL ;if (err_hook) (*err_hook)(skb); -if (!skb_hook) - goto out; -/* keep processing with the skb_hook */ +if (rc == -EAGAIN ) + rc =0 ; +/* continue to drain the queue */ continue ; }else -/* no - requeue to preserve ordering */ -skb_queue_head (queue, skb); + goto retry; }else { -/* it worked - drop the extra reference and continue */ +/* skb sent - drop the extra reference and continue */ consume_skb (skb); failed =0 ; } } -out:return (rc >=0 ?0 : rc); }
@@ -1518,7 +1516,8 @@ static int __net_init audit_net_init(struct net *net)audit_panic ("cannot initialize netlink socket in namespace" );return -ENOMEM ; } - aunet->sk->sk_sndtimeo =MAX_SCHEDULE_TIMEOUT ; +/* limit the timeout in case auditd is blocked/stopped */ + aunet->sk->sk_sndtimeo =HZ /10 ;return 0 ; }
kernel/time/timekeeping.c +1 -2
@@ -1235,8 +1235,7 @@ int do_settimeofday64(const struct timespec64 *ts)timekeeping_forward_now (tk); xt =tk_xtime (tk); - ts_delta.tv_sec = ts->tv_sec - xt.tv_sec; - ts_delta.tv_nsec = ts->tv_nsec - xt.tv_nsec; + ts_delta =timespec64_sub (*ts, xt);if (timespec64_compare (&tk->wall_to_monotonic, &ts_delta) >0 ) { ret = -EINVAL ;
kernel/trace/tracing_map.c +3 -0
@@ -24,6 +24,7 @@#include <linux/jhash.h> #include <linux/slab.h> #include <linux/sort.h> +#include <linux/kmemleak.h> #include "tracing_map.h" #include "trace.h"
@@ -227,6 +228,7 @@ void tracing_map_array_free(struct tracing_map_array *a)for (i =0 ; i < a->n_pages; i++) {if (!a->pages[i])break ; +kmemleak_free (a->pages[i]);free_page ((unsigned long )a->pages[i]); }
@@ -262,6 +264,7 @@ struct tracing_map_array *tracing_map_array_alloc(unsigned int n_elts, a->pages[i] = (void *)get_zeroed_page (GFP_KERNEL );if (!a->pages[i]) goto free; +kmemleak_alloc (a->pages[i],PAGE_SIZE ,1 ,GFP_KERNEL ); } out:return a;
lib/Kconfig.debug +3 -3
@@ -1131,7 +1131,7 @@ config LOCKDEP bool depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT select STACKTRACE - select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE && !ARC && !SCORE && !X86 + select FRAME_POINTER if !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !SCORE && !X86 select KALLSYMS select KALLSYMS_ALL
@@ -1566,7 +1566,7 @@ config FAULT_INJECTION_STACKTRACE_FILTER depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT depends on !X86_64 select STACKTRACE - select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC && !SCORE && !X86 + select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !SCORE && !X86 help Provide stacktrace filter for fault-injection capabilities
@@ -1575,7 +1575,7 @@ config LATENCYTOP depends on DEBUG_KERNEL depends on STACKTRACE_SUPPORT depends on PROC_FS - select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC && !X86 + select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86 select KALLSYMS select KALLSYMS_ALL select STACKTRACE
net/bpf/test_run.c +14 -3
@@ -96,6 +96,7 @@ int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,u32 size = kattr->test.data_size_in;u32 repeat = kattr->test.repeat;u32 retval, duration; +int hh_len =ETH_HLEN ;struct sk_buff *skb;void *data;int ret;
@@ -131,12 +132,22 @@ int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,skb_reset_network_header (skb);if (is_l2) -__skb_push (skb,ETH_HLEN ); +__skb_push (skb, hh_len);if (is_direct_pkt_access)bpf_compute_data_end (skb); retval =bpf_test_run (prog, skb, repeat, &duration); -if (!is_l2) -__skb_push (skb,ETH_HLEN ); +if (!is_l2) { +if (skb_headroom (skb) < hh_len) { +int nhead =HH_DATA_ALIGN (hh_len -skb_headroom (skb)); + +if (pskb_expand_head (skb, nhead,0 ,GFP_USER )) { +kfree_skb (skb); +return -ENOMEM ; + } + } +memset (__skb_push (skb, hh_len),0 , hh_len); + } + size = skb->len;/* bpf program can never convert linear skb to non-linear */ if (WARN_ON_ONCE (skb_is_nonlinear (skb)))
net/ipv6/sit.c +0 -1
@@ -1858,7 +1858,6 @@ static int __net_init sit_init_net(struct net *net)return 0 ; err_reg_dev: -ipip6_dev_free (sitn->fb_tunnel_dev);free_netdev (sitn->fb_tunnel_dev); err_alloc_dev:return err;
net/mac80211/agg-tx.c +1 -1
@@ -109,7 +109,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata, mgmt->u.action.u.addba_req.start_seq_num =cpu_to_le16 (start_seq_num <<4 ); -ieee80211_tx_skb (sdata, skb); +ieee80211_tx_skb_tid (sdata, skb, tid); }void ieee80211_send_bar (struct ieee80211_vif *vif,u8 *ra,u16 tid,u16 ssn)
net/netlink/af_netlink.c +5 -0
@@ -1822,6 +1822,11 @@ static int netlink_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)if (msg->msg_flags&MSG_OOB )return -EOPNOTSUPP ; +if (len ==0 ) { +pr_warn_once ("Zero length message leads to an empty skb\n" ); +return -ENODATA ; + } + err =scm_send (sock, msg, &scm, true);if (err <0 )return err;
net/nfc/netlink.c +4 -2
@@ -666,8 +666,10 @@ static int nfc_genl_dump_devices_done(struct netlink_callback *cb) {struct class_dev_iter *iter = (struct class_dev_iter *) cb->args[0 ]; -nfc_device_iter_exit (iter); -kfree (iter); +if (iter) { +nfc_device_iter_exit (iter); +kfree (iter); + }return 0 ; }
net/packet/af_packet.c +3 -2
@@ -4477,9 +4477,10 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u, } out_free_pg_vec: -bitmap_free (rx_owner_map); -if (pg_vec) +if (pg_vec) { +bitmap_free (rx_owner_map);free_pg_vec (pg_vec, order, req->tp_block_nr); + } out:return err; }
scripts/recordmcount.pl +1 -1
@@ -252,7 +252,7 @@ if ($arch eq "x86_64") { } elsif ($arch eq "s390" && $bits == 64) { if ($cc =~ /-DCC_USING_HOTPATCH/) { - $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*brcl\\s*0,[0-9a-f]+ <([^\+]*)>\$"; + $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*(bcrl\\s*0,|jgnop\\s*)[0-9a-f]+ <([^\+]*)>\$"; $mcount_adjust = 0; } else { $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_(PC|PLT)32DBL\\s+_mcount\\+0x2\$";
tools/testing/selftests/bpf/test_verifier.c +18 -0
@@ -4334,6 +4334,24 @@ static struct bpf_test tests[] = { .result = ACCEPT, .prog_type = BPF_PROG_TYPE_LWT_XMIT, }, + { + "make headroom for LWT_XMIT", + .insns = { +BPF_MOV64_REG (BPF_REG_6 ,BPF_REG_1 ), +BPF_MOV64_IMM (BPF_REG_2 ,34 ), +BPF_MOV64_IMM (BPF_REG_3 ,0 ), +BPF_EMIT_CALL (BPF_FUNC_skb_change_head), +/* split for s390 to succeed */ +BPF_MOV64_REG (BPF_REG_1 ,BPF_REG_6 ), +BPF_MOV64_IMM (BPF_REG_2 ,42 ), +BPF_MOV64_IMM (BPF_REG_3 ,0 ), +BPF_EMIT_CALL (BPF_FUNC_skb_change_head), +BPF_MOV64_IMM (BPF_REG_0 ,0 ), + BPF_EXIT_INSN(), + }, + .result =ACCEPT , + .prog_type = BPF_PROG_TYPE_LWT_XMIT, + }, {"invalid access of tc_classid for LWT_IN" , .insns = {