Linux 4.9.259
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.9.259 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.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/arm/boot/compressed/head.S | 4 arch/arm/boot/dts/exynos5250-spring.dts | 2 arch/arm/boot/dts/exynos5420-arndale-octa.dts | 2 arch/arm/boot/dts/omap443x.dtsi | 2 arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 2 arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 arch/arm64/kernel/head.S | 1 arch/mips/kernel/vmlinux.lds.S | 1 arch/mips/lantiq/irq.c | 2 arch/mips/mm/c-r4k.c | 2 arch/powerpc/Kconfig | 2 arch/powerpc/platforms/pseries/dlpar.c | 7 - arch/sparc/Kconfig | 2 arch/sparc/lib/memset.S | 1 arch/x86/kernel/reboot.c | 29 +---- block/blk-settings.c | 12 ++ crypto/ecdh_helper.c | 3 drivers/acpi/acpi_configfs.c | 7 + drivers/amba/bus.c | 20 ++- drivers/ata/ahci_brcm.c | 14 ++ drivers/block/floppy.c | 27 ++--- drivers/char/random.c | 2 drivers/clk/meson/clk-pll.c | 2 drivers/clocksource/mxs_timer.c | 5 drivers/dma/fsldma.c | 6 + drivers/gpio/gpio-pcf857x.c | 2 drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c | 22 ++-- drivers/gpu/drm/gma500/psb_drv.c | 2 drivers/gpu/drm/msm/dsi/phy/dsi_phy_20nm.c | 2 drivers/hid/hid-core.c | 9 + drivers/i2c/busses/i2c-brcmstb.c | 2 drivers/infiniband/core/user_mad.c | 7 + drivers/infiniband/sw/rxe/rxe_recv.c | 11 +- drivers/input/joydev.c | 7 - drivers/input/joystick/xpad.c | 1 drivers/input/serio/i8042-x86ia64io.h | 4 drivers/input/touchscreen/elo.c | 4 drivers/input/touchscreen/raydium_i2c_ts.c | 3 drivers/md/dm-era-target.c | 93 +++++++++++------- drivers/media/pci/cx25821/cx25821-core.c | 4 drivers/media/pci/saa7134/saa7134-empress.c | 5 drivers/media/platform/pxa_camera.c | 3 drivers/media/platform/vsp1/vsp1_drv.c | 4 drivers/media/tuners/qm1d1c0042.c | 4 drivers/media/usb/dvb-usb-v2/lmedm04.c | 2 drivers/media/usb/tm6000/tm6000-dvb.c | 4 drivers/media/usb/uvc/uvc_v4l2.c | 18 +-- drivers/mfd/wm831x-auxadc.c | 3 drivers/misc/eeprom/eeprom_93xx46.c | 1 drivers/misc/vmw_vmci/vmci_queue_pair.c | 5 drivers/mmc/host/sdhci-esdhc-imx.c | 3 drivers/mmc/host/usdhi6rol0.c | 4 drivers/mtd/spi-nor/cadence-quadspi.c | 2 drivers/mtd/spi-nor/hisi-sfc.c | 4 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 + drivers/net/ethernet/intel/igb/igb_main.c | 2 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 1 drivers/net/ethernet/sun/sunvnet_common.c | 24 ---- drivers/net/gtp.c | 5 drivers/net/usb/qmi_wwan.c | 1 drivers/net/wireless/broadcom/b43/phy_n.c | 2 drivers/net/xen-netback/interface.c | 8 - drivers/nvdimm/dimm_devs.c | 18 ++- drivers/of/fdt.c | 12 +- drivers/pci/syscall.c | 10 - drivers/power/reset/at91-sama5d2_shdwc.c | 2 drivers/pwm/pwm-rockchip.c | 1 drivers/regulator/axp20x-regulator.c | 7 - drivers/scsi/bnx2fc/Kconfig | 1 drivers/spi/spi-pxa2xx-pci.c | 27 +++-- drivers/spi/spi-s3c24xx-fiq.S | 9 - drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 drivers/usb/core/quirks.c | 3 drivers/usb/dwc2/hcd.c | 15 +- drivers/usb/dwc2/hcd_intr.c | 14 ++ drivers/usb/dwc3/gadget.c | 19 +++ drivers/usb/musb/musb_core.c | 31 +++--- drivers/usb/renesas_usbhs/fifo.c | 2 drivers/usb/serial/mos7720.c | 4 drivers/usb/serial/mos7840.c | 4 drivers/usb/serial/option.c | 3 drivers/video/fbdev/Kconfig | 2 fs/btrfs/ctree.c | 7 - fs/btrfs/free-space-cache.c | 6 - fs/btrfs/relocation.c | 4 fs/cifs/connect.c | 1 fs/f2fs/file.c | 3 fs/gfs2/lock_dlm.c | 8 - fs/isofs/dir.c | 1 fs/isofs/namei.c | 1 fs/jffs2/summary.c | 3 fs/jfs/jfs_dmap.c | 2 fs/ntfs/inode.c | 6 + fs/ocfs2/cluster/heartbeat.c | 8 + include/linux/icmpv6.h | 48 ++++++++- include/linux/ipv6.h | 2 include/net/icmp.h | 10 + kernel/debug/kdb/kdb_private.h | 2 kernel/futex.c | 12 +- kernel/module.c | 21 +++- kernel/seccomp.c | 2 kernel/tracepoint.c | 80 ++++++++++++--- mm/huge_memory.c | 15 ++ mm/hugetlb.c | 43 ++++++++ mm/memory.c | 6 - net/bluetooth/a2mp.c | 3 net/bluetooth/hci_core.c | 6 - net/ipv4/icmp.c | 34 ++++++ net/ipv6/icmp.c | 19 +-- net/ipv6/ip6_icmp.c | 46 +++++++- net/mac80211/mesh_hwmp.c | 2 scripts/recordmcount.pl | 6 - security/keys/trusted.c | 2 sound/soc/codecs/cs42l56.c | 3 tools/perf/tests/sample-parsing.c | 2 tools/perf/util/event.c | 2 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 3 120 files changed, 757 insertions(+), 301 deletions(-)
Adrian Hunter (1):
perf intel-pt: Fix missing CYC processing in PSB
Al Viro (1):
sparc32: fix a user-triggerable oops in clear_user()
Alexander Lobakin (1):
MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section
Andy Shevchenko (1):
spi: pxa2xx: Fix the controller numbering for Wildcat Point
Arnaldo Carvalho de Melo (1):
perf tools: Fix DSO filtering when not finding a map for a sampled address
Arnd Bergmann (1):
ARM: s3c: fix fiq for clang IAS
Aswath Govindraju (2):
misc: eeprom_93xx46: Fix module alias to enable module autoprobe
misc: eeprom_93xx46: Add module alias to avoid breaking support for non device tree users
Bob Pearson (1):
RDMA/rxe: Fix coding error in rxe_recv.c
Bob Peterson (1):
gfs2: Don't skip dlm unlock if glock has an lvb
Chao Yu (1):
f2fs: fix out-of-repair __setattr_copy()
Christoph Schemmel (1):
NET: usb: qmi_wwan: Adding support for Cinterion MV31
Christophe JAILLET (5):
media: vsp1: Fix an error handling path in the probe function
media: cx25821: Fix a bug when reallocating some dma memory
dmaengine: fsldma: Fix a resource leak in the remove function
dmaengine: fsldma: Fix a resource leak in an error handling path of the probe function
mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe
Christophe Leroy (1):
powerpc/47x: Disable 256k page size
Christopher William Snowhill (1):
Bluetooth: Fix initializing response id after clearing struct
Chuhong Yuan (1):
net/mlx4_core: Add missed mlx4_free_cmd_mailbox()
Claudiu Beznea (1):
power: reset: at91-sama5d2_shdwc: fix wkupdbc mask
Colin Ian King (3):
mac80211: fix potential overflow when multiplying to u32 integers
b43: N-PHY: Fix the update of coef for the PHY revision >= 3case fs/jfs: fix potential integer overflow on shift of a int
Corinna Vinschen (1):
igb: Remove incorrect "unexpected SYS WRAP" log message
Dan Carpenter (8):
gma500: clean up error handling in init
ASoC: cs42l56: fix up error handling in probe
mfd: wm831x-auxadc: Prevent use after free in wm831x_auxadc_read_irq()
Input: elo - fix an error code in elo_connect()
ocfs2: fix a use after free on error
Input: joydev - prevent potential read overflow in ioctl
USB: serial: mos7840: fix error code in mos7840_write()
USB: serial: mos7720: fix error code in mos7720_write()
Dan Williams (1):
libnvdimm/dimm: Avoid race between probe and available_slots_show()
Daniele Alessandrelli (1):
crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key()
Dinghao Liu (2):
media: media/pci: Fix memleak in empress_init
media: tm6000: Fix memleak in tm6000_start_stream
Edwin Peer (1):
bnxt_en: reverse order of TX disable and carrier off
Eric Biggers (1):
random: fix the RNDRESEEDCRNG ioctl
Eric Dumazet (1):
ipv6: icmp6: avoid indirect call for icmpv6_send()
Fangrui Song (1):
module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols
Filipe Manana (1):
btrfs: fix extent buffer leak on failure to copy root
Florian Fainelli (1):
ata: ahci_brcm: Add back regulators management
Frank Li (1):
mmc: sdhci-esdhc-imx: fix kernel panic when remove module
Greg Kroah-Hartman (1):
Linux 4.9.259
Guenter Roeck (3):
usb: dwc2: Do not update data length if it is 0 on inbound transfers
usb: dwc2: Abort transaction after errors with unknown reason
usb: dwc2: Make "trimming xfer length" a debug message
Heiner Kallweit (1):
PCI: Align checking of syscall user config accessors
Jarkko Sakkinen (1):
KEYS: trusted: Fix migratable=1 failing
Jason A. Donenfeld (5):
icmp: introduce helper for nat'd source address in network device context
icmp: allow icmpv6_ndo_send to work with CONFIG_IPV6=n
gtp: use icmp_ndo_send helper
sunvnet: use icmp_ndo_send helper
net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending
Jialin Zhang (1):
drm/gma500: Fix error return code in psb_driver_load()
Jiri Kosina (1):
floppy: reintroduce O_NDELAY fix
Joe Perches (1):
media: lmedm04: Fix misuse of comma
Jorgen Hansen (1):
VMCI: Use set_page_dirty_lock() when unregistering guest memory
Josef Bacik (2):
btrfs: abort the transaction if we fail to inc ref in btrfs_copy_root
btrfs: fix reloc root leak with 0 ref reloc roots on recovery
Juergen Gross (1):
xen/netback: fix spurious event detection for common event case
KarimAllah Ahmed (1):
fdt: Properly handle "no-map" field in the memory region
Konrad Dybcio (1):
drm/msm/dsi: Correct io_start for MSM8994 (20nm PHY)
Krzysztof Kozlowski (3):
ARM: dts: exynos: correct PMIC interrupt trigger level on Spring
ARM: dts: exynos: correct PMIC interrupt trigger level on Arndale Octa
arm64: dts: exynos: correct PMIC interrupt trigger level on Espresso
Laurent Pinchart (1):
media: uvcvideo: Accept invalid bFormatIndex and bFrameIndex values
Lech Perczak (1):
USB: serial: option: update interface mapping for ZTE P685M
Leon Romanovsky (1):
ipv6: silence compilation warning for non-IPV6 builds
Luo Meng (1):
media: qm1d1c0042: fix error return code in qm1d1c0042_init()
Marc Zyngier (1):
arm64: Add missing ISB after invalidating TLB in __primary_switch
Marcos Paulo de Souza (1):
Input: i8042 - add ASUS Zenbook Flip to noselftest list
Martin Blumenstingl (1):
clk: meson: clk-pll: fix initializing the old rate (fallback) for a PLL
Martin Kaiser (1):
staging: rtl8188eu: Add Edimax EW-7811UN V2 to device table
Maxim Kiselev (1):
gpio: pcf857x: Fix missing first interrupt
Maxime Ripard (1):
i2c: brcmstb: Fix brcmstd_send_i2c_cmd condition
Miaohe Lin (2):
mm/memory.c: fix potential pte_unmap_unlock pte error mm/hugetlb: fix potential double free in hugetlb_register_node() error path
Mikulas Patocka (1):
blk-settings: align max_sectors on "logical_block_size" boundary
Muchun Song (1):
mm: hugetlb: fix a race between freeing and dissolving the page
Namhyung Kim (1):
perf test: Fix unaligned access in sample parsing test
Nathan Chancellor (2):
MIPS: c-r4k: Fix section mismatch for loongson2_sc_init
MIPS: lantiq: Explicitly compare LTQ_EBU_PCC_ISTAT against 0
Nathan Lynch (1):
powerpc/pseries/dlpar: handle ibm, configure-connector delay status
Nicolas Boichat (1):
of/fdt: Make sure no-map does not remove already reserved regions
Nikos Tsironis (7):
dm era: Recover committed writeset after crash
dm era: Verify the data block size hasn't changed
dm era: Fix bitset memory leaks
dm era: Use correct value size in equality function of writeset tree dm era: Reinitialize bitset cache before digesting a new writeset dm era: only resize metadata in preresume
dm era: Update in-core bitset after committing the metadata
Olivier Crête (1):
Input: xpad - add support for PowerA Enhanced Wired Controller for Xbox Series X|S
Pan Bian (5):
Bluetooth: drop HCI device reference before return
Bluetooth: Put HCI device if inquiry procedure interrupts
regulator: axp20x: Fix reference cout leak
isofs: release buffer head before return
mtd: spi-nor: hisi-sfc: Put child node np on error path
Paul Cercueil (2):
usb: musb: Fix runtime PM race in musb_queue_resume_work
seccomp: Add missing return in non-void function
Peter Zijlstra (1):
futex: Fix OWNER_DEAD fixup
Pratyush Yadav (1):
spi: cadence-quadspi: Abort read if dummy cycles required are too many
Qinglang Miao (1):
ACPI: configfs: add missing check after configfs_register_default_group()
Randy Dunlap (4):
fbdev: aty: SPARC64 requires FB_ATY_CT
HID: core: detect and skip invalid inputs to snto32()
sparc64: only select COMPAT_BINFMT_ELF if BINFMT_ELF is set
scsi: bnx2fc: Fix Kconfig warning & CNIC build errors
Rong Chen (1):
scripts/recordmcount.pl: support big endian for ARCH sh
Rustam Kovhaev (1):
ntfs: check for valid standard information attribute
Sabyrzhan Tasbolatov (1):
drivers/misc/vmw_vmci: restrict too big queue size in qp_host_alloc_queue
Sameer Pujar (1):
arm64: tegra: Add power-domain for Tegra210 HDA
Sean Christopherson (1):
x86/reboot: Force all cpus to exit VMX root if VMX is supported
Shay Drory (1):
IB/umad: Return EIO in case of when device disassociated
Shyam Prasad N (1):
cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath.
Simon South (1):
pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()
Slawomir Laba (1):
i40e: Fix flow for IPv6 next header (extension header)
Stefan Ursella (1):
usb: quirks: add quirk to start video capture on ELMO L-12F document camera reliable
Steven Rostedt (VMware) (1):
tracepoint: Do not fail unregistering a probe due to memory failure
Sumit Garg (1):
kdb: Make memory allocations more robust
Thinh Nguyen (2):
usb: dwc3: gadget: Fix setting of DEPCFG.bInterval_m1
usb: dwc3: gadget: Fix dep->interval for fullspeed interrupt
Thomas Gleixner (1):
futex: fix dead code in attach_to_pi_owner()
Tom Rix (3):
media: pxa_camera: declare variable when DEBUG is defined
jffs2: fix use after free in jffs2_sum_write_data() clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined
Tony Lindgren (1):
ARM: dts: Configure missing thermal interrupt for 4430
Uwe Kleine-König (1):
amba: Fix resource leak for drivers without .remove
Vincent Knecht (1):
arm64: dts: msm8916: Fix reserved and rfsa nodes unit address
Vladimir Murzin (1):
ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores
Vlastimil Babka (1):
mm, thp: make do_huge_pmd_wp_page() lock page for testing mapcount
Will McVicker (1):
HID: make arrays usage and value to be the same
Yoshihiro Shimoda (1):
usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop()
Zhihao Cheng (1):
btrfs: clarify error returns values in __load_free_space_cache
jeffrey.lin (1):
Input: raydium_ts_i2c - do not send zero length
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 258 +SUBLEVEL = 259 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/boot/compressed/head.S +2 -2
@@ -1080,9 +1080,9 @@ __armv4_mmu_cache_off: __armv7_mmu_cache_off: mrc p15, 0, r0, c1, c0 #ifdef CONFIG_MMU - bic r0, r0, #0x000d + bic r0, r0, #0x0005 #else - bic r0, r0, #0x000c + bic r0, r0, #0x0004 #endif mcr p15, 0, r0, c1, c0 @ turn MMU and cache off mov r12, lr
arch/arm/boot/dts/exynos5250-spring.dts +1 -1
@@ -112,7 +112,7 @@ compatible = "samsung,s5m8767-pmic"; reg = <0x66>; interrupt-parent = <&gpx3>; - interrupts = <2 IRQ_TYPE_NONE>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>; wakeup-source;
arch/arm/boot/dts/exynos5420-arndale-octa.dts +1 -1
@@ -88,7 +88,7 @@ reg = <0x66>; interrupt-parent = <&gpx3>; - interrupts = <2 IRQ_TYPE_EDGE_FALLING>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&s2mps11_irq>;
arch/arm/boot/dts/omap443x.dtsi +2 -0
@@ -35,10 +35,12 @@ }; ocp { + /* 4430 has only gpio_86 tshut and no talert interrupt */ bandgap: bandgap@4a002260 { reg = <0x4a002260 0x4 0x4a00232C 0x4>; compatible = "ti,omap4430-bandgap"; + gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>; #thermal-sensor-cells = <0>; };
arch/arm64/boot/dts/exynos/exynos7-espresso.dts +1 -1
@@ -64,7 +64,7 @@ s2mps15_pmic@66 { compatible = "samsung,s2mps15-pmic"; reg = <0x66>; - interrupts = <2 IRQ_TYPE_NONE>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; interrupt-parent = <&gpa0>; pinctrl-names = "default"; pinctrl-0 = <&pmic_irq>;
arch/arm64/boot/dts/nvidia/tegra210.dtsi +1 -0
@@ -727,6 +727,7 @@ <&tegra_car 128>, /* hda2hdmi */ <&tegra_car 111>; /* hda2codec_2x */ reset-names = "hda", "hda2hdmi", "hda2codec_2x"; + power-domains = <&pd_sor>; status = "disabled"; };
arch/arm64/boot/dts/qcom/msm8916.dtsi +2 -2
@@ -62,7 +62,7 @@ no-map; }; - reserved@8668000 { + reserved@86680000 { reg = <0x0 0x86680000 0x0 0x80000>; no-map; };
@@ -72,7 +72,7 @@ no-map; }; - rfsa@867e00000 { + rfsa@867e0000 { reg = <0x0 0x867e0000 0x0 0x20000>; no-map; };
arch/arm64/kernel/head.S +1 -0
@@ -846,6 +846,7 @@ __primary_switch: tlbi vmalle1 // Remove any stale TLB entries dsb nsh + isb msr sctlr_el1, x19 // re-enable the MMU isb
arch/mips/kernel/vmlinux.lds.S +1 -0
@@ -92,6 +92,7 @@ SECTIONS INIT_TASK_DATA(THREAD_SIZE) NOSAVE_DATA + PAGE_ALIGNED_DATA(PAGE_SIZE) CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) DATA_DATA
arch/mips/lantiq/irq.c +1 -1
@@ -245,7 +245,7 @@ static void ltq_hw_irqdispatch(int module)do_IRQ ((int )irq +MIPS_CPU_IRQ_CASCADE + (INT_NUM_IM_OFFSET * module));/* if this is a EBU irq, we need to ack it or get a deadlock */ -if ((irq ==LTQ_ICU_EBU_IRQ ) && (module ==0 ) &<Q_EBU_PCC_ISTAT ) +if (irq ==LTQ_ICU_EBU_IRQ && !module &<Q_EBU_PCC_ISTAT !=0 )ltq_ebu_w32 (ltq_ebu_r32 (LTQ_EBU_PCC_ISTAT ) |0x10 ,LTQ_EBU_PCC_ISTAT ); }
arch/mips/mm/c-r4k.c +1 -1
@@ -1630,7 +1630,7 @@ static int probe_scache(void)return 1 ; } -static void __init loongson2_sc_init (void ) +static void loongson2_sc_init (void ) {struct cpuinfo_mips *c = ¤t_cpu_data;
arch/powerpc/Kconfig +1 -1
@@ -622,7 +622,7 @@ config PPC_64K_PAGES config PPC_256K_PAGES bool "256k page size" - depends on 44x && !STDBINUTILS + depends on 44x && !STDBINUTILS && !PPC_47x help Make the page size 256k.
arch/powerpc/platforms/pseries/dlpar.c +3 -4
@@ -139,7 +139,6 @@ void dlpar_free_cc_nodes(struct device_node *dn)#define NEXT_PROPERTY 3#define PREV_PARENT 4#define MORE_MEMORY 5 -#define CALL_AGAIN -2#define ERR_CFG_USE -9003 struct device_node *dlpar_configure_connector(__be32 drc_index,
@@ -181,6 +180,9 @@ struct device_node *dlpar_configure_connector(__be32 drc_index,spin_unlock (&rtas_data_buf_lock); +if (rtas_busy_delay (rc)) +continue ; +switch (rc) {case COMPLETE :break ;
@@ -233,9 +235,6 @@ struct device_node *dlpar_configure_connector(__be32 drc_index, parent_path = last_dn->parent->full_name;break ; -case CALL_AGAIN : -break ; -case MORE_MEMORY :case ERR_CFG_USE :default :
arch/sparc/Kconfig +1 -1
@@ -562,7 +562,7 @@ config COMPAT bool depends on SPARC64 default y - select COMPAT_BINFMT_ELF + select COMPAT_BINFMT_ELF if BINFMT_ELF select HAVE_UID16 select ARCH_WANT_OLD_COMPAT_IPC select COMPAT_OLD_SIGACTION
arch/sparc/lib/memset.S +1 -0
@@ -140,6 +140,7 @@ __bzero: ZERO_LAST_BLOCKS(%o0, 0x48, %g2) ZERO_LAST_BLOCKS(%o0, 0x08, %g2) 13: + EXT(12b, 13b, 21f) be 8f andcc %o1, 4, %g0
arch/x86/kernel/reboot.c +10 -19
@@ -539,29 +539,20 @@ static void emergency_vmx_disable_all(void)local_irq_disable ();/* -* We need to disable VMX on all CPUs before rebooting, otherwise -* we risk hanging up the machine, because the CPU ignore INIT -* signals when VMX is enabled. +* Disable VMX on all CPUs before rebooting, otherwise we risk hanging +* the machine, because the CPU blocks INIT when it's in VMX root. * -* We can't take any locks and we may be on an inconsistent -* state, so we use NMIs as IPIs to tell the other CPUs to disable -* VMX and halt. +* We can't take any locks and we may be on an inconsistent state, so +* use NMIs as IPIs to tell the other CPUs to exit VMX root and halt. * -* For safety, we will avoid running the nmi_shootdown_cpus() -* stuff unnecessarily, but we don't have a way to check -* if other CPUs have VMX enabled. So we will call it only if the -* CPU we are running on has VMX enabled. -* -* We will miss cases where VMX is not enabled on all CPUs. This -* shouldn't do much harm because KVM always enable VMX on all -* CPUs anyway. But we can miss it on the small window where KVM -* is still enabling VMX. +* Do the NMI shootdown even if VMX if off on _this_ CPU, as that +* doesn't prevent a different CPU from being in VMX root operation. */ -if (cpu_has_vmx () &&cpu_vmx_enabled ()) { -/* Disable VMX on this CPU. */ -cpu_vmxoff (); +if (cpu_has_vmx ()) { +/* Safely force _this_ CPU out of VMX root operation. */ +__cpu_emergency_vmxoff (); -/* Halt and disable VMX on the other CPUs */ +/* Halt and exit VMX root operation on the other CPUs. */ nmi_shootdown_cpus (vmxoff_nmi); }
block/blk-settings.c +12 -0
@@ -494,6 +494,14 @@ void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b) }EXPORT_SYMBOL (blk_queue_stack_limits); +static unsigned int blk_round_down_sectors (unsigned int sectors,unsigned int lbs) +{ + sectors =round_down (sectors, lbs >>SECTOR_SHIFT ); +if (sectors <PAGE_SIZE >>SECTOR_SHIFT ) + sectors =PAGE_SIZE >>SECTOR_SHIFT ; +return sectors; +} +/** * blk_stack_limits - adjust queue_limits for stacked devices * @t: the stacking driver limits (top device)
@@ -606,6 +614,10 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, ret =-1 ; } + t->max_sectors =blk_round_down_sectors (t->max_sectors, t->logical_block_size); + t->max_hw_sectors =blk_round_down_sectors (t->max_hw_sectors, t->logical_block_size); + t->max_dev_sectors =blk_round_down_sectors (t->max_dev_sectors, t->logical_block_size); +/* Discard alignment and granularity */ if (b->discard_granularity) { alignment =queue_limit_discard_alignment (b, start);
crypto/ecdh_helper.c +3 -0
@@ -71,6 +71,9 @@ int crypto_ecdh_decode_key(const char *buf, unsigned int len,if (secret.type !=CRYPTO_KPP_SECRET_TYPE_ECDH )return -EINVAL ; +if (unlikely (len < secret.len)) +return -EINVAL ; + ptr =ecdh_unpack_data (¶ms->curve_id, ptr,sizeof (params->curve_id)); ptr =ecdh_unpack_data (¶ms->key_size, ptr,sizeof (params->key_size));if (secret.len !=crypto_ecdh_key_len (params))
drivers/acpi/acpi_configfs.c +6 -1
@@ -251,7 +251,12 @@ static int __init acpi_configfs_init(void) acpi_table_group =configfs_register_default_group (root,"table" , &acpi_tables_type); -return PTR_ERR_OR_ZERO (acpi_table_group); +if (IS_ERR (acpi_table_group)) { +configfs_unregister_subsystem (&acpi_configfs); +return PTR_ERR (acpi_table_group); + } + +return 0 ; }module_init (acpi_configfs_init);
drivers/amba/bus.c +12 -8
@@ -280,10 +280,11 @@ static int amba_remove(struct device *dev) {struct amba_device *pcdev =to_amba_device (dev);struct amba_driver *drv =to_amba_driver (dev->driver); -int ret; +int ret =0 ;pm_runtime_get_sync (dev); - ret = drv->remove (pcdev); +if (drv->remove) + ret = drv->remove (pcdev);pm_runtime_put_noidle (dev);/* Undo the runtime PM settings in amba_probe() */
@@ -300,7 +301,9 @@ static int amba_remove(struct device *dev)static void amba_shutdown (struct device *dev) {struct amba_driver *drv =to_amba_driver (dev->driver); - drv->shutdown (to_amba_device (dev)); + +if (drv->shutdown) + drv->shutdown (to_amba_device (dev)); }/**
@@ -313,12 +316,13 @@ static void amba_shutdown(struct device *dev)*/ int amba_driver_register (struct amba_driver *drv) { - drv->drv.bus = &amba_bustype; +if (!drv->probe) +return -EINVAL ; -#define SETFN (fn) if (drv->fn) drv->drv.fn = amba_##fn -SETFN (probe); -SETFN (remove); -SETFN (shutdown); + drv->drv.bus = &amba_bustype; + drv->drv.probe = amba_probe; + drv->drv.remove = amba_remove; + drv->drv.shutdown = amba_shutdown;return driver_register (&drv->drv); }
drivers/ata/ahci_brcm.c +13 -1
@@ -285,6 +285,10 @@ static int brcm_ahci_resume(struct device *dev)if (ret)return ret; + ret =ahci_platform_enable_regulators (hpriv); +if (ret) + goto out_disable_clks; +brcm_sata_init (priv);brcm_sata_phys_enable (priv);brcm_sata_alpm_init (hpriv);
@@ -314,6 +318,8 @@ static int brcm_ahci_resume(struct device *dev)ahci_platform_disable_phys (hpriv); out_disable_phys:brcm_sata_phys_disable (priv); +ahci_platform_disable_regulators (hpriv); +out_disable_clks:ahci_platform_disable_clks (hpriv);return ret; }
@@ -377,6 +383,10 @@ static int brcm_ahci_probe(struct platform_device *pdev)if (ret) goto out_reset; + ret =ahci_platform_enable_regulators (hpriv); +if (ret) + goto out_disable_clks; +/* Must be first so as to configure endianness including that * of the standard AHCI register space. */
@@ -386,7 +396,7 @@ static int brcm_ahci_probe(struct platform_device *pdev) priv->port_mask =brcm_ahci_get_portmask (hpriv, priv);if (!priv->port_mask) { ret = -ENODEV ; - goto out_disable_clks; + goto out_disable_regulators; }/* Must be done before ahci_platform_enable_phys() */
@@ -417,6 +427,8 @@ static int brcm_ahci_probe(struct platform_device *pdev)ahci_platform_disable_phys (hpriv); out_disable_phys:brcm_sata_phys_disable (priv); +out_disable_regulators: +ahci_platform_disable_regulators (hpriv); out_disable_clks:ahci_platform_disable_clks (hpriv); out_reset:
drivers/block/floppy.c +14 -13
@@ -4067,21 +4067,22 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)if (UFDCS ->rawcmd ==1 )UFDCS ->rawcmd =2 ; -if (!(mode &FMODE_NDELAY )) { -if (mode & (FMODE_READ |FMODE_WRITE )) { -UDRS ->last_checked =0 ; -clear_bit (FD_OPEN_SHOULD_FAIL_BIT , &UDRS ->flags); -check_disk_change (bdev); -if (test_bit (FD_DISK_CHANGED_BIT , &UDRS ->flags)) - goto out; -if (test_bit (FD_OPEN_SHOULD_FAIL_BIT , &UDRS ->flags)) - goto out; - } - res = -EROFS ; -if ((mode &FMODE_WRITE ) && - !test_bit (FD_DISK_WRITABLE_BIT , &UDRS ->flags)) +if (mode & (FMODE_READ |FMODE_WRITE )) { +UDRS ->last_checked =0 ; +clear_bit (FD_OPEN_SHOULD_FAIL_BIT , &UDRS ->flags); +check_disk_change (bdev); +if (test_bit (FD_DISK_CHANGED_BIT , &UDRS ->flags)) + goto out; +if (test_bit (FD_OPEN_SHOULD_FAIL_BIT , &UDRS ->flags)) goto out; } + + res = -EROFS ; + +if ((mode &FMODE_WRITE ) && + !test_bit (FD_DISK_WRITABLE_BIT , &UDRS ->flags)) + goto out; +mutex_unlock (&open_lock);mutex_unlock (&floppy_mutex);return 0 ;
drivers/char/random.c +1 -1
@@ -1913,7 +1913,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)return -EPERM ;if (crng_init <2 )return -ENODATA ; -crng_reseed (&primary_crng,NULL ); +crng_reseed (&primary_crng, &input_pool); crng_global_init_time = jiffies -1 ;return 0 ;default :
drivers/clk/meson/clk-pll.c +1 -1
@@ -145,7 +145,7 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate,if (parent_rate ==0 || rate ==0 )return -EINVAL ; - old_rate = rate; + old_rate =clk_hw_get_rate (hw); rate_set =meson_clk_get_pll_settings (pll, rate);if (!rate_set)
drivers/clocksource/mxs_timer.c +1 -4
@@ -152,10 +152,7 @@ static void mxs_irq_clear(char *state)/* Clear pending interrupt */ timrot_irq_acknowledge (); - -#ifdef DEBUG - pr_info("%s: changing mode to %s\n", __func__, state) -#endif /* DEBUG */ +pr_debug ("%s: changing mode to %s\n" , __func__, state); }static int mxs_shutdown (struct clock_event_device *evt)
drivers/dma/fsldma.c +6 -0
@@ -1331,6 +1331,7 @@ static int fsldma_of_probe(struct platform_device *op) {struct fsldma_device *fdev;struct device_node *child; +unsigned int i;int err; fdev =kzalloc (sizeof (*fdev),GFP_KERNEL );
@@ -1411,6 +1412,10 @@ static int fsldma_of_probe(struct platform_device *op)return 0 ; out_free_fdev: +for (i =0 ; i <FSL_DMA_MAX_CHANS_PER_DEVICE ; i++) { +if (fdev->chan[i]) +fsl_dma_chan_remove (fdev->chan[i]); + }irq_dispose_mapping (fdev->irq);iounmap (fdev->regs); out_free:
@@ -1433,6 +1438,7 @@ static int fsldma_of_remove(struct platform_device *op)if (fdev->chan[i])fsl_dma_chan_remove (fdev->chan[i]); } +irq_dispose_mapping (fdev->irq);iounmap (fdev->regs);kfree (fdev);
drivers/gpio/gpio-pcf857x.c +1 -1
@@ -370,7 +370,7 @@ static int pcf857x_probe(struct i2c_client *client,* reset state. Otherwise it flags pins to be driven low. */ gpio->out = ~n_latch; - gpio->status = gpio->out; + gpio->status = gpio->read (gpio->client); status =devm_gpiochip_add_data (&client->dev, &gpio->chip, gpio);if (status <0 )
drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c +13 -9
@@ -279,11 +279,8 @@ int oaktrail_hdmi_i2c_init(struct pci_dev *dev) hdmi_dev =pci_get_drvdata (dev); i2c_dev =kzalloc (sizeof (struct hdmi_i2c_dev ),GFP_KERNEL ); -if (i2c_dev ==NULL ) { -DRM_ERROR ("Can't allocate interface\n" ); - ret = -ENOMEM ; - goto exit; - } +if (!i2c_dev) +return -ENOMEM ; i2c_dev->adap = &oaktrail_hdmi_i2c_adapter; i2c_dev->status =I2C_STAT_INIT ;
@@ -300,16 +297,23 @@ int oaktrail_hdmi_i2c_init(struct pci_dev *dev) oaktrail_hdmi_i2c_adapter.name, hdmi_dev);if (ret) {DRM_ERROR ("Failed to request IRQ for I2C controller\n" ); - goto err; + goto free_dev; }/* Adapter registration */ ret =i2c_add_numbered_adapter (&oaktrail_hdmi_i2c_adapter); -return ret; +if (ret) { +DRM_ERROR ("Failed to add I2C adapter\n" ); + goto free_irq; + } -err: +return 0 ; + +free_irq: +free_irq (dev->irq, hdmi_dev); +free_dev:kfree (i2c_dev); -exit: +return ret; }
drivers/gpu/drm/gma500/psb_drv.c +2 -0
@@ -323,6 +323,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)if (ret) goto out_err; + ret = -ENOMEM ; + dev_priv->mmu =psb_mmu_driver_init (dev,1 ,0 ,0 );if (!dev_priv->mmu) goto out_err;
drivers/gpu/drm/msm/dsi/phy/dsi_phy_20nm.c +1 -1
@@ -146,7 +146,7 @@ const struct msm_dsi_phy_cfg dsi_phy_20nm_cfgs = { .enable = dsi_20nm_phy_enable, .disable = dsi_20nm_phy_disable, }, - .io_start = { 0xfd998300, 0xfd9a0300 }, + .io_start = { 0xfd998500, 0xfd9a0500 }, .num_dsi_phy = 2, };
drivers/hid/hid-core.c +6 -3
@@ -91,7 +91,7 @@ EXPORT_SYMBOL_GPL(hid_register_report);* Register a new field for this report. */ -static struct hid_field *hid_register_field (struct hid_report *report,unsigned usages,unsigned values) +static struct hid_field *hid_register_field (struct hid_report *report,unsigned usages) {struct hid_field *field;
@@ -102,7 +102,7 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned field =kzalloc ((sizeof (struct hid_field ) + usages *sizeof (struct hid_usage ) + - values *sizeof (unsigned )),GFP_KERNEL ); + usages *sizeof (unsigned )),GFP_KERNEL );if (!field)return NULL ;
@@ -281,7 +281,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign usages =max_t (unsigned, parser->local.usage_index, parser->global.report_count); - field =hid_register_field (report, usages, parser->global.report_count); + field =hid_register_field (report, usages);if (!field)return 0 ;
@@ -1109,6 +1109,9 @@ EXPORT_SYMBOL_GPL(hid_open_report);static s32 snto32 (__u32 value,unsigned n) { +if (!value || !n) +return 0 ; +switch (n) {case 8 :return ((__s8 )value);case 16 :return ((__s16 )value);
drivers/i2c/busses/i2c-brcmstb.c +1 -1
@@ -318,7 +318,7 @@ static int brcmstb_send_i2c_cmd(struct brcmstb_i2c_dev *dev, goto cmd_out; } -if ((CMD_RD ||CMD_WR ) && +if ((cmd ==CMD_RD || cmd ==CMD_WR ) &&bsc_readl (dev, iic_enable) &BSC_IIC_EN_NOACK_MASK ) { rc = -EREMOTEIO ; dev_dbg(dev->device, "controller received NOACK intr for %s\n",
drivers/infiniband/core/user_mad.c +6 -1
@@ -343,6 +343,11 @@ static ssize_t ib_umad_read(struct file *filp, char __user *buf,mutex_lock (&file->mutex); +if (file->agents_dead) { +mutex_unlock (&file->mutex); +return -EIO ; + } +while (list_empty (&file->recv_list)) {mutex_unlock (&file->mutex);
@@ -485,7 +490,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf, agent =__get_agent (file, packet->mad.hdr.id);if (!agent) { - ret = -EINVAL ; + ret = -EIO ; goto err_up; }
drivers/infiniband/sw/rxe/rxe_recv.c +8 -3
@@ -36,21 +36,26 @@#include "rxe.h" #include "rxe_loc.h" +/* check that QP matches packet opcode type and is in a valid state */ static int check_type_state (struct rxe_dev *rxe,struct rxe_pkt_info *pkt,struct rxe_qp *qp) { +unsigned int pkt_type; +if (unlikely (!qp->valid)) goto err1; + pkt_type = pkt->opcode &0xe0 ; +switch (qp_type (qp)) {case IB_QPT_RC : -if (unlikely ((pkt->opcode &IB_OPCODE_RC ) !=0 )) { +if (unlikely (pkt_type !=IB_OPCODE_RC )) {pr_warn_ratelimited ("bad qp type\n" ); goto err1; }break ;case IB_QPT_UC : -if (unlikely (!(pkt->opcode &IB_OPCODE_UC ))) { +if (unlikely (pkt_type !=IB_OPCODE_UC )) {pr_warn_ratelimited ("bad qp type\n" ); goto err1; }
@@ -58,7 +63,7 @@ static int check_type_state(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,case IB_QPT_UD :case IB_QPT_SMI :case IB_QPT_GSI : -if (unlikely (!(pkt->opcode &IB_OPCODE_UD ))) { +if (unlikely (pkt_type !=IB_OPCODE_UD )) {pr_warn_ratelimited ("bad qp type\n" ); goto err1; }
drivers/input/joydev.c +5 -2
@@ -448,7 +448,7 @@ static int joydev_handle_JSIOCSAXMAP(struct joydev *joydev,if (IS_ERR (abspam))return PTR_ERR (abspam); -for (i =0 ; i < joydev->nabs; i++) { +for (i =0 ; i < len && i < joydev->nabs; i++) {if (abspam[i] >ABS_MAX ) { retval = -EINVAL ; goto out;
@@ -472,6 +472,9 @@ static int joydev_handle_JSIOCSBTNMAP(struct joydev *joydev,int i;int retval =0 ; +if (len %sizeof (*keypam)) +return -EINVAL ; + len =min (len,sizeof (joydev->keypam));/* Validate the map. */
@@ -479,7 +482,7 @@ static int joydev_handle_JSIOCSBTNMAP(struct joydev *joydev,if (IS_ERR (keypam))return PTR_ERR (keypam); -for (i =0 ; i < joydev->nkey; i++) { +for (i =0 ; i < (len /2 ) && i < joydev->nkey; i++) {if (keypam[i] >KEY_MAX || keypam[i] <BTN_MISC ) { retval = -EINVAL ; goto out;
drivers/input/joystick/xpad.c +1 -0
@@ -322,6 +322,7 @@ static const struct xpad_device { { 0x1bad, 0xfd00, "Razer Onza TE", 0, XTYPE_XBOX360 }, { 0x1bad, 0xfd01, "Razer Onza", 0, XTYPE_XBOX360 }, { 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE }, + { 0x20d6, 0x2009, "PowerA Enhanced Wired Controller for Xbox Series X|S", 0, XTYPE_XBOXONE }, { 0x20d6, 0x281f, "PowerA Wired Controller For Xbox 360", 0, XTYPE_XBOX360 }, { 0x2e24, 0x0652, "Hyperkin Duke X-Box One pad", 0, XTYPE_XBOXONE }, { 0x24c6, 0x5000, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
drivers/input/serio/i8042-x86ia64io.h +4 -0
@@ -579,6 +579,10 @@ static const struct dmi_system_id i8042_dmi_forcemux_table[] __initconst = { DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), DMI_MATCH(DMI_PRODUCT_NAME, "VGN-CS"), }, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_CHASSIS_TYPE, "31"), /* Convertible Notebook */ + }, }, { } };
drivers/input/touchscreen/elo.c +3 -1
@@ -345,8 +345,10 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv)switch (elo->id) {case 0 :/* 10-byte protocol */ -if (elo_setup_10 (elo)) +if (elo_setup_10 (elo)) { + err = -EIO ; goto fail3; + }break ;
drivers/input/touchscreen/raydium_i2c_ts.c +2 -1
@@ -419,6 +419,7 @@ static int raydium_i2c_write_object(struct i2c_client *client, enum raydium_bl_ack state) {int error; +static const u8 cmd[] = {0xFF ,0x39 }; error =raydium_i2c_send (client,RM_CMD_BOOT_WRT , data, len);if (error) {
@@ -427,7 +428,7 @@ static int raydium_i2c_write_object(struct i2c_client *client,return error; } - error =raydium_i2c_send (client,RM_CMD_BOOT_ACK ,NULL ,0 ); + error =raydium_i2c_send (client,RM_CMD_BOOT_ACK , cmd,sizeof (cmd));if (error) {dev_err (&client->dev,"Ack obj command failed: %d\n" , error);return error;
drivers/md/dm-era-target.c +60 -33
243 lines not on this page · raw message
drivers/media/pci/cx25821/cx25821-core.c +3 -1
@@ -990,8 +990,10 @@ int cx25821_riscmem_alloc(struct pci_dev *pci,__le32 *cpu;dma_addr_t dma =0 ; -if (NULL != risc->cpu && risc->size < size) +if (risc->cpu && risc->size < size) {pci_free_consistent (pci, risc->size, risc->cpu, risc->dma); + risc->cpu =NULL ; + }if (NULL == risc->cpu) { cpu =pci_zalloc_consistent (pci, size, &dma);if (NULL == cpu)
drivers/media/pci/saa7134/saa7134-empress.c +4 -1
@@ -297,8 +297,11 @@ static int empress_init(struct saa7134_dev *dev) q->lock = &dev->lock; q->dev = &dev->pci->dev; err =vb2_queue_init (q); -if (err) +if (err) { +video_device_release (dev->empress_dev); + dev->empress_dev =NULL ;return err; + } dev->empress_dev->queue = q;video_set_drvdata (dev->empress_dev, dev);
drivers/media/platform/pxa_camera.c +3 -0
@@ -1420,6 +1420,9 @@ static int pxac_vb2_prepare(struct vb2_buffer *vb)struct pxa_camera_dev *pcdev =vb2_get_drv_priv (vb->vb2_queue);struct pxa_buffer *buf =vb2_to_pxa_buffer (vb);int ret =0 ; +#ifdef DEBUG +int i; +#endif switch (pcdev->channels) {case 1 :
drivers/media/platform/vsp1/vsp1_drv.c +3 -1
@@ -764,8 +764,10 @@ static int vsp1_probe(struct platform_device *pdev) } done: -if (ret) +if (ret) {pm_runtime_disable (&pdev->dev); +rcar_fcp_put (vsp1->fcp); + }return ret; }
drivers/media/tuners/qm1d1c0042.c +3 -1
@@ -352,8 +352,10 @@ static int qm1d1c0042_init(struct dvb_frontend *fe)if (val == reg_initval[reg_index][0x00 ])break ; } -if (reg_index >=QM1D1C0042_NUM_REG_ROWS ) +if (reg_index >=QM1D1C0042_NUM_REG_ROWS ) { + ret = -EINVAL ; goto failed; + }memcpy (state->regs, reg_initval[reg_index],QM1D1C0042_NUM_REGS );usleep_range (2000 ,3000 );
drivers/media/usb/dvb-usb-v2/lmedm04.c +1 -1
@@ -446,7 +446,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap) ep =usb_pipe_endpoint (d->udev, lme_int->lme_urb->pipe);if (usb_endpoint_type (&ep->desc) ==USB_ENDPOINT_XFER_BULK ) - lme_int->lme_urb->pipe =usb_rcvbulkpipe (d->udev,0xa ), + lme_int->lme_urb->pipe =usb_rcvbulkpipe (d->udev,0xa ); lme_int->lme_urb->transfer_flags |=URB_NO_TRANSFER_DMA_MAP ;
drivers/media/usb/tm6000/tm6000-dvb.c +4 -0
@@ -156,6 +156,10 @@ static int tm6000_start_stream(struct tm6000_core *dev)if (ret <0 ) {printk (KERN_ERR "tm6000: error %i in %s during pipe reset\n" , ret, __func__); + +kfree (dvb->bulk_urb->transfer_buffer); +usb_free_urb (dvb->bulk_urb); + dvb->bulk_urb =NULL ;return ret; }else printk (KERN_ERR "tm6000: pipe resetted\n" );
drivers/media/usb/uvc/uvc_v4l2.c +9 -9
@@ -258,7 +258,9 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream, goto done;/* After the probe, update fmt with the values returned from -* negotiation with the device. +* negotiation with the device. Some devices return invalid bFormatIndex +* and bFrameIndex values, in which case we can only assume they have +* accepted the requested format as-is. */ for (i =0 ; i < stream->nformats; ++i) {if (probe->bFormatIndex == stream->format[i].index) {
@@ -267,11 +269,10 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream, } } -if (i == stream->nformats) { -uvc_trace (UVC_TRACE_FORMAT ,"Unknown bFormatIndex %u\n" , +if (i == stream->nformats) +uvc_trace (UVC_TRACE_FORMAT , +"Unknown bFormatIndex %u, using default\n" , probe->bFormatIndex); -return -EINVAL ; - }for (i =0 ; i < format->nframes; ++i) {if (probe->bFrameIndex == format->frame[i].bFrameIndex) {
@@ -280,11 +281,10 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream, } } -if (i == format->nframes) { -uvc_trace (UVC_TRACE_FORMAT ,"Unknown bFrameIndex %u\n" , +if (i == format->nframes) +uvc_trace (UVC_TRACE_FORMAT , +"Unknown bFrameIndex %u, using default\n" , probe->bFrameIndex); -return -EINVAL ; - } fmt->fmt.pix.width = frame->wWidth; fmt->fmt.pix.height = frame->wHeight;
drivers/mfd/wm831x-auxadc.c +1 -2
@@ -98,11 +98,10 @@ static int wm831x_auxadc_read_irq(struct wm831x *wm831x,wait_for_completion_timeout (&req->done,msecs_to_jiffies (500 ));mutex_lock (&wm831x->auxadc_lock); - -list_del (&req->list); ret = req->val; out: +list_del (&req->list);mutex_unlock (&wm831x->auxadc_lock);kfree (req);
drivers/misc/eeprom/eeprom_93xx46.c +1 -0
@@ -533,3 +533,4 @@ MODULE_LICENSE("GPL");MODULE_DESCRIPTION ("Driver for 93xx46 EEPROMs" );MODULE_AUTHOR ("Anatolij Gustschin <[email protected]>" );MODULE_ALIAS ("spi:93xx46" ); +MODULE_ALIAS ("spi:eeprom-93xx46" );
drivers/misc/vmw_vmci/vmci_queue_pair.c +4 -1
@@ -639,6 +639,9 @@ static struct vmci_queue *qp_host_alloc_queue(u64 size) queue_page_size = num_pages *sizeof (*queue->kernel_if->u.h.page); +if (queue_size + queue_page_size >KMALLOC_MAX_SIZE ) +return NULL ; + queue =kzalloc (queue_size + queue_page_size,GFP_KERNEL );if (queue) { queue->q_header =NULL ;
@@ -732,7 +735,7 @@ static void qp_release_pages(struct page **pages,for (i =0 ; i < num_pages; i++) {if (dirty) -set_page_dirty (pages[i]); +set_page_dirty_lock (pages[i]);put_page (pages[i]); pages[i] =NULL ;
drivers/mmc/host/sdhci-esdhc-imx.c +2 -1
@@ -1301,9 +1301,10 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev)struct sdhci_host *host =platform_get_drvdata (pdev);struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host);struct pltfm_imx_data *imx_data =sdhci_pltfm_priv (pltfm_host); -int dead = (readl (host->ioaddr +SDHCI_INT_STATUS ) ==0xffffffff ); +int dead;pm_runtime_get_sync (&pdev->dev); + dead = (readl (host->ioaddr +SDHCI_INT_STATUS ) ==0xffffffff );pm_runtime_disable (&pdev->dev);pm_runtime_put_noidle (&pdev->dev);
drivers/mmc/host/usdhi6rol0.c +3 -1
@@ -1866,10 +1866,12 @@ static int usdhi6_probe(struct platform_device *pdev) ret =mmc_add_host (mmc);if (ret <0 ) - goto e_clk_off; + goto e_release_dma;return 0 ; +e_release_dma: +usdhi6_dma_release (host); e_clk_off:clk_disable_unprepare (host->clk); e_free_mmc:
drivers/mtd/spi-nor/cadence-quadspi.c +1 -1
@@ -461,7 +461,7 @@ static int cqspi_indirect_read_setup(struct spi_nor *nor,/* Setup dummy clock cycles */ dummy_clk = nor->read_dummy;if (dummy_clk >CQSPI_DUMMY_CLKS_MAX ) - dummy_clk =CQSPI_DUMMY_CLKS_MAX ; +return -EOPNOTSUPP ;if (dummy_clk /8 ) { reg |= (1 <<CQSPI_REG_RD_INSTR_MODE_EN_LSB );
drivers/mtd/spi-nor/hisi-sfc.c +3 -1
@@ -393,8 +393,10 @@ static int hisi_spi_nor_register_all(struct hifmc_host *host)for_each_available_child_of_node (dev->of_node, np) { ret =hisi_spi_nor_register (np, host); -if (ret) +if (ret) { +of_node_put (np); goto fail; + }if (host->num_chip ==HIFMC_MAX_CHIP_NUM ) {dev_warn (dev,"Flash device number exceeds the maximum chipselect number\n" );
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -1
@@ -5095,9 +5095,10 @@ static void bnxt_tx_disable(struct bnxt *bp) txr->dev_state =BNXT_DEV_STATE_CLOSING ; } } +/* Drop carrier first to prevent TX timeout */ +netif_carrier_off (bp->dev);/* Stop all TX queues */ netif_tx_disable (bp->dev); -netif_carrier_off (bp->dev); }static void bnxt_tx_enable (struct bnxt *bp)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +6 -3
@@ -2452,13 +2452,16 @@ static int i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags, l4_proto = ip.v4->protocol; }else if (*tx_flags &I40E_TX_FLAGS_IPV6 ) { +int ret; + tunnel |=I40E_TX_CTX_EXT_IP_IPV6 ; exthdr = ip.hdr +sizeof (*ip.v6); l4_proto = ip.v6->nexthdr; -if (l4.hdr != exthdr) -ipv6_skip_exthdr (skb, exthdr - skb->data, - &l4_proto, &frag_off); + ret =ipv6_skip_exthdr (skb, exthdr - skb->data, + &l4_proto, &frag_off); +if (ret <0 ) +return -1 ; }/* define outer transport */
drivers/net/ethernet/intel/igb/igb_main.c +0 -2
@@ -5665,8 +5665,6 @@ static void igb_tsync_interrupt(struct igb_adapter *adapter) event.type =PTP_CLOCK_PPS ;if (adapter->ptp_caps.pps)ptp_clock_event (adapter->ptp_clock, &event); -else -dev_err (&adapter->pdev->dev,"unexpected SYS WRAP" ); ack |=TSINTR_SYS_WRAP ; }
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +1 -0
@@ -4948,6 +4948,7 @@ static int mlx4_do_mirror_rule(struct mlx4_dev *dev, struct res_fs_rule *fs_ruleif (!fs_rule->mirr_mbox) {mlx4_err (dev,"rule mirroring mailbox is null\n" ); +mlx4_free_cmd_mailbox (dev, mailbox);return -EINVAL ; }memcpy (mailbox->buf, fs_rule->mirr_mbox, fs_rule->mirr_mbox_size);
drivers/net/ethernet/sun/sunvnet_common.c +4 -20
@@ -1263,28 +1263,12 @@ int sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,if (vio_version_after_eq (&port->vio,1 ,3 )) localmtu -=VLAN_HLEN ; -if (skb->protocol ==htons (ETH_P_IP )) { -struct flowi4 fl4; -struct rtable *rt =NULL ; - -memset (&fl4,0 ,sizeof (fl4)); - fl4.flowi4_oif = dev->ifindex; - fl4.flowi4_tos =RT_TOS (ip_hdr (skb)->tos); - fl4.daddr =ip_hdr (skb)->daddr; - fl4.saddr =ip_hdr (skb)->saddr; - - rt =ip_route_output_key (dev_net (dev), &fl4); -rcu_read_unlock (); -if (!IS_ERR (rt)) { -skb_dst_set (skb, &rt->dst); -icmp_send (skb,ICMP_DEST_UNREACH , -ICMP_FRAG_NEEDED , -htonl (localmtu)); - } - } +if (skb->protocol ==htons (ETH_P_IP )) +icmp_ndo_send (skb,ICMP_DEST_UNREACH ,ICMP_FRAG_NEEDED , +htonl (localmtu));#if IS_ENABLED (CONFIG_IPV6 ) else if (skb->protocol == htons(ETH_P_IPV6)) - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, localmtu); + icmpv6_ndo_send(skb, ICMPV6_PKT_TOOBIG, 0, localmtu);#endif goto out_dropped; }
drivers/net/gtp.c +2 -3
@@ -559,9 +559,8 @@ static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev,if (!skb_is_gso (skb) && (iph->frag_off &htons (IP_DF )) && mtu <ntohs (iph->tot_len)) {netdev_dbg (dev,"packet too big, fragmentation needed\n" ); -memset (IPCB (skb),0 ,sizeof (*IPCB (skb))); -icmp_send (skb,ICMP_DEST_UNREACH ,ICMP_FRAG_NEEDED , -htonl (mtu)); +icmp_ndo_send (skb,ICMP_DEST_UNREACH ,ICMP_FRAG_NEEDED , +htonl (mtu)); goto err_rt; }
drivers/net/usb/qmi_wwan.c +1 -0
@@ -949,6 +949,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x1e2d, 0x0082, 5)}, /* Cinterion PHxx,PXxx (2 RmNet) */ {QMI_FIXED_INTF(0x1e2d, 0x0083, 4)}, /* Cinterion PHxx,PXxx (1 RmNet + USB Audio)*/ {QMI_QUIRK_SET_DTR(0x1e2d, 0x00b0, 4)}, /* Cinterion CLS8 */ + {QMI_FIXED_INTF(0x1e2d, 0x00b7, 0)}, /* Cinterion MV31 RmNet */ {QMI_FIXED_INTF(0x413c, 0x81a2, 8)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */ {QMI_FIXED_INTF(0x413c, 0x81a3, 8)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */ {QMI_FIXED_INTF(0x413c, 0x81a4, 8)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */
drivers/net/wireless/broadcom/b43/phy_n.c +1 -1
@@ -5320,7 +5320,7 @@ static void b43_nphy_restore_cal(struct b43_wldev *dev)for (i =0 ; i <4 ; i++) {if (dev->phy.rev >=3 ) - table[i] = coef[i]; + coef[i] = table[i];else coef[i] =0 ; }
drivers/net/xen-netback/interface.c +5 -3
@@ -161,13 +161,15 @@ irqreturn_t xenvif_interrupt(int irq, void *dev_id) {struct xenvif_queue *queue = dev_id;int old; +bool has_rx, has_tx; old =atomic_fetch_or (NETBK_COMMON_EOI , &queue->eoi_pending);WARN (old,"Interrupt while EOI pending\n" ); -/* Use bitwise or as we need to call both functions. */ -if ((!xenvif_handle_tx_interrupt (queue) | - !xenvif_handle_rx_interrupt (queue))) { + has_tx =xenvif_handle_tx_interrupt (queue); + has_rx =xenvif_handle_rx_interrupt (queue); + +if (!has_rx && !has_tx) {atomic_andnot (NETBK_COMMON_EOI , &queue->eoi_pending);xen_irq_lateeoi (irq,XEN_EOI_FLAG_SPURIOUS ); }
drivers/nvdimm/dimm_devs.c +15 -3
@@ -317,16 +317,16 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr, }static DEVICE_ATTR_RO (state); -static ssize_t available_slots_show (struct device *dev, -struct device_attribute *attr,char *buf) +static ssize_t __available_slots_show (struct nvdimm_drvdata *ndd,char *buf) { -struct nvdimm_drvdata *ndd =dev_get_drvdata (dev); +struct device *dev;ssize_t rc;u32 nfree;if (!ndd)return -ENXIO ; + dev = ndd->dev;nvdimm_bus_lock (dev); nfree =nd_label_nfree (ndd);if (nfree -1 > nfree) {
@@ -338,6 +338,18 @@ static ssize_t available_slots_show(struct device *dev,nvdimm_bus_unlock (dev);return rc; } + +static ssize_t available_slots_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +ssize_t rc; + +device_lock (dev); + rc =__available_slots_show (dev_get_drvdata (dev), buf); +device_unlock (dev); + +return rc; +}static DEVICE_ATTR_RO (available_slots);static struct attribute *nvdimm_attributes[] = {
drivers/of/fdt.c +10 -2
@@ -1158,8 +1158,16 @@ void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)int __init __weak early_init_dt_reserve_memory_arch (phys_addr_t base,phys_addr_t size,bool nomap) { -if (nomap) -return memblock_remove (base, size); +if (nomap) { +/* +* If the memory is already reserved (by another region), we +* should not allow it to be marked nomap. +*/ +if (memblock_is_region_reserved (base, size)) +return -EBUSY ; + +return memblock_mark_nomap (base, size); + }return memblock_reserve (base, size); }
drivers/pci/syscall.c +5 -5
@@ -21,7 +21,7 @@ SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn,u16 word;u32 dword;long err; -long cfg_ret; +int cfg_ret;if (!capable (CAP_SYS_ADMIN ))return -EPERM ;
@@ -47,7 +47,7 @@ SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn, } err = -EIO ; -if (cfg_ret !=PCIBIOS_SUCCESSFUL ) +if (cfg_ret) goto error;switch (len) {
@@ -105,7 +105,7 @@ SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn,if (err)break ; err =pci_user_write_config_byte (dev, off, byte); -if (err !=PCIBIOS_SUCCESSFUL ) +if (err) err = -EIO ;break ;
@@ -114,7 +114,7 @@ SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn,if (err)break ; err =pci_user_write_config_word (dev, off, word); -if (err !=PCIBIOS_SUCCESSFUL ) +if (err) err = -EIO ;break ;
@@ -123,7 +123,7 @@ SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn,if (err)break ; err =pci_user_write_config_dword (dev, off, dword); -if (err !=PCIBIOS_SUCCESSFUL ) +if (err) err = -EIO ;break ;
drivers/power/reset/at91-sama5d2_shdwc.c +1 -1
@@ -36,7 +36,7 @@#define AT91_SHDW_MR 0x04/* Shut Down Mode Register */ #define AT91_SHDW_WKUPDBC_SHIFT 24 -#define AT91_SHDW_WKUPDBC_MASK GENMASK(31, 16) +#define AT91_SHDW_WKUPDBC_MASK GENMASK(26, 24)#define AT91_SHDW_WKUPDBC (x) (((x) << AT91_SHDW_WKUPDBC_SHIFT) \ & AT91_SHDW_WKUPDBC_MASK)
drivers/pwm/pwm-rockchip.c +0 -1
@@ -366,7 +366,6 @@ static int rockchip_pwm_probe(struct platform_device *pdev) ret =pwmchip_add (&pc->chip);if (ret <0 ) { -clk_unprepare (pc->clk);dev_err (&pdev->dev,"pwmchip_add() failed: %d\n" , ret); }
drivers/regulator/axp20x-regulator.c +3 -4
@@ -415,7 +415,7 @@ static int axp20x_set_dcdc_freq(struct platform_device *pdev, u32 dcdcfreq)static int axp20x_regulator_parse_dt (struct platform_device *pdev) {struct device_node *np, *regulators; -int ret; +int ret =0 ;u32 dcdcfreq =0 ; np =of_node_get (pdev->dev.parent->of_node);
@@ -430,13 +430,12 @@ static int axp20x_regulator_parse_dt(struct platform_device *pdev) ret =axp20x_set_dcdc_freq (pdev, dcdcfreq);if (ret <0 ) {dev_err (&pdev->dev,"Error setting dcdc frequency: %d\n" , ret); -return ret; } -of_node_put (regulators); } -return 0 ; +of_node_put (np); +return ret; }static int axp20x_set_dcdc_workmode (struct regulator_dev *rdev,int id,u32 workmode)
drivers/scsi/bnx2fc/Kconfig +1 -0
@@ -4,6 +4,7 @@ config SCSI_BNX2X_FCOE depends on (IPV6 || IPV6=n) depends on LIBFC depends on LIBFCOE + depends on MMU select NETDEVICES select ETHERNET select NET_VENDOR_BROADCOM
drivers/spi/spi-pxa2xx-pci.c +19 -8
@@ -21,7 +21,8 @@ enum {PORT_BSW1 ,PORT_BSW2 ,PORT_CE4100 , - PORT_LPT, +PORT_LPT0 , + PORT_LPT1, }; struct pxa_spi_info {
@@ -48,8 +49,10 @@ static struct dw_dma_slave bsw1_rx_param = { .src_id = 7 };static struct dw_dma_slave bsw2_tx_param = { .dst_id =8 };static struct dw_dma_slave bsw2_rx_param = { .src_id =9 }; -static struct dw_dma_slave lpt_tx_param = { .dst_id =0 }; -static struct dw_dma_slave lpt_rx_param = { .src_id =1 }; +static struct dw_dma_slave lpt1_tx_param = { .dst_id =0 }; +static struct dw_dma_slave lpt1_rx_param = { .src_id =1 }; +static struct dw_dma_slave lpt0_tx_param = { .dst_id =2 }; +static struct dw_dma_slave lpt0_rx_param = { .src_id =3 };static bool lpss_dma_filter (struct dma_chan *chan,void *param) {
@@ -158,12 +161,19 @@ static struct pxa_spi_info spi_info_configs[] = { .num_chipselect = 1, .max_clk_rate = 50000000, }, - [PORT_LPT] = { + [PORT_LPT0] = { .type = LPSS_LPT_SSP, .port_id = 0, .setup = lpss_spi_setup, - .tx_param = &lpt_tx_param, - .rx_param = &lpt_rx_param, + .tx_param = &lpt0_tx_param, + .rx_param = &lpt0_rx_param, + }, + [PORT_LPT1] = { + .type = LPSS_LPT_SSP, + .port_id = 1, + .setup = lpss_spi_setup, + .tx_param = &lpt1_tx_param, + .rx_param = &lpt1_rx_param, }, };
@@ -251,8 +261,9 @@ static const struct pci_device_id pxa2xx_spi_pci_devices[] = { { PCI_VDEVICE(INTEL, 0x2290), PORT_BSW1 }, { PCI_VDEVICE(INTEL, 0x22ac), PORT_BSW2 }, { PCI_VDEVICE(INTEL, 0x2e6a), PORT_CE4100 }, - { PCI_VDEVICE(INTEL, 0x9ce6), PORT_LPT }, - { }, + { PCI_VDEVICE(INTEL, 0x9ce5), PORT_LPT0 }, + { PCI_VDEVICE(INTEL, 0x9ce6), PORT_LPT1 }, + { } };MODULE_DEVICE_TABLE (pci, pxa2xx_spi_pci_devices);
drivers/spi/spi-s3c24xx-fiq.S +3 -6
@@ -36,7 +36,6 @@ @ and an offset to the irq acknowledgment word ENTRY(s3c24xx_spi_fiq_rx) -s3c24xx_spi_fix_rx: .word fiq_rx_end - fiq_rx_start .word fiq_rx_irq_ack - fiq_rx_start fiq_rx_start:
@@ -50,7 +49,7 @@ fiq_rx_start: strb fiq_rtmp, [ fiq_rspi, # S3C2410_SPTDAT ] subs fiq_rcount, fiq_rcount, #1 - subnes pc, lr, #4 @@ return, still have work to do + subsne pc, lr, #4 @@ return, still have work to do @@ set IRQ controller so that next op will trigger IRQ mov fiq_rtmp, #0
@@ -62,7 +61,6 @@ fiq_rx_irq_ack: fiq_rx_end: ENTRY(s3c24xx_spi_fiq_txrx) -s3c24xx_spi_fiq_txrx: .word fiq_txrx_end - fiq_txrx_start .word fiq_txrx_irq_ack - fiq_txrx_start fiq_txrx_start:
@@ -77,7 +75,7 @@ fiq_txrx_start: strb fiq_rtmp, [ fiq_rspi, # S3C2410_SPTDAT ] subs fiq_rcount, fiq_rcount, #1 - subnes pc, lr, #4 @@ return, still have work to do + subsne pc, lr, #4 @@ return, still have work to do mov fiq_rtmp, #0 str fiq_rtmp, [ fiq_rirq, # S3C2410_INTMOD - S3C24XX_VA_IRQ ]
@@ -89,7 +87,6 @@ fiq_txrx_irq_ack: fiq_txrx_end: ENTRY(s3c24xx_spi_fiq_tx) -s3c24xx_spi_fix_tx: .word fiq_tx_end - fiq_tx_start .word fiq_tx_irq_ack - fiq_tx_start fiq_tx_start:
@@ -102,7 +99,7 @@ fiq_tx_start: strb fiq_rtmp, [ fiq_rspi, # S3C2410_SPTDAT ] subs fiq_rcount, fiq_rcount, #1 - subnes pc, lr, #4 @@ return, still have work to do + subsne pc, lr, #4 @@ return, still have work to do mov fiq_rtmp, #0 str fiq_rtmp, [ fiq_rirq, # S3C2410_INTMOD - S3C24XX_VA_IRQ ]
drivers/staging/rtl8188eu/os_dep/usb_intf.c +1 -0
@@ -49,6 +49,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = { {USB_DEVICE(0x2357, 0x0111)}, /* TP-Link TL-WN727N v5.21 */ {USB_DEVICE(0x2C4E, 0x0102)}, /* MERCUSYS MW150US v2 */ {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ + {USB_DEVICE(0x7392, 0xb811)}, /* Edimax EW-7811UN V2 */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0xffef)}, /* Rosewill RNX-N150NUB */ {} /* Terminating entry */ };
drivers/usb/core/quirks.c +3 -0
@@ -230,6 +230,9 @@ static const struct usb_device_id usb_quirk_list[] = {/* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */ { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF }, + /* ELMO L-12F document camera */ + { USB_DEVICE(0x09a1, 0x0028), .driver_info = USB_QUIRK_DELAY_CTRL_MSG }, + /* Broadcom BCM92035DGROM BT dongle */ { USB_DEVICE(0x0a5c, 0x2021), .driver_info = USB_QUIRK_RESET_RESUME },
drivers/usb/dwc2/hcd.c +8 -7
@@ -1425,19 +1425,20 @@ static void dwc2_hc_start_transfer(struct dwc2_hsotg *hsotg,if (num_packets > max_hc_pkt_count) { num_packets = max_hc_pkt_count; chan->xfer_len = num_packets * chan->max_packet; + }else if (chan->ep_is_in) { +/* +* Always program an integral # of max packets +* for IN transfers. +* Note: This assumes that the input buffer is +* aligned and sized accordingly. +*/ + chan->xfer_len = num_packets * chan->max_packet; } }else {/* Need 1 packet for transfer length of 0 */ num_packets =1 ; } -if (chan->ep_is_in) -/* -* Always program an integral # of max packets for IN -* transfers -*/ - chan->xfer_len = num_packets * chan->max_packet; -if (chan->ep_type ==USB_ENDPOINT_XFER_INT || chan->ep_type ==USB_ENDPOINT_XFER_ISOC )/*
drivers/usb/dwc2/hcd_intr.c +13 -1
@@ -488,7 +488,7 @@ static int dwc2_update_urb_state(struct dwc2_hsotg *hsotg, &short_read);if (urb->actual_length + xfer_length > urb->length) { -dev_warn (hsotg->dev,"%s(): trimming xfer length\n" , __func__); +dev_dbg (hsotg->dev,"%s(): trimming xfer length\n" , __func__); xfer_length = urb->length - urb->actual_length; }
@@ -1921,6 +1921,18 @@ static void dwc2_hc_chhltd_intr_dma(struct dwc2_hsotg *hsotg, qtd->error_count++;dwc2_update_urb_state_abn (hsotg, chan, chnum, qtd->urb, qtd,DWC2_HC_XFER_XACT_ERR ); +/* +* We can get here after a completed transaction +* (urb->actual_length >= urb->length) which was not reported +* as completed. If that is the case, and we do not abort +* the transfer, a transfer of size 0 will be enqueued +* subsequently. If urb->actual_length is not DMA-aligned, +* the buffer will then point to an unaligned address, and +* the resulting behavior is undefined. Bail out in that +* situation. +*/ +if (qtd->urb->actual_length >= qtd->urb->length) + qtd->error_count =3 ;dwc2_hcd_save_data_toggle (hsotg, chan, chnum, qtd);dwc2_halt_channel (hsotg, chan, qtd,DWC2_HC_XFER_XACT_ERR ); }
drivers/usb/dwc3/gadget.c +17 -2
@@ -528,8 +528,23 @@ static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep, params.param0 |=DWC3_DEPCFG_FIFO_NUMBER (dep->number >>1 );if (desc->bInterval) { - params.param1 |=DWC3_DEPCFG_BINTERVAL_M1 (desc->bInterval -1 ); - dep->interval =1 << (desc->bInterval -1 ); +u8 bInterval_m1; + +/* +* Valid range for DEPCFG.bInterval_m1 is from 0 to 13, and it +* must be set to 0 when the controller operates in full-speed. +*/ + bInterval_m1 =min_t (u8, desc->bInterval -1 ,13 ); +if (dwc->gadget.speed ==USB_SPEED_FULL ) + bInterval_m1 =0 ; + +if (usb_endpoint_type (desc) ==USB_ENDPOINT_XFER_INT && + dwc->gadget.speed ==USB_SPEED_FULL ) + dep->interval = desc->bInterval; +else + dep->interval =1 << (desc->bInterval -1 ); + + params.param1 |=DWC3_DEPCFG_BINTERVAL_M1 (bInterval_m1); }return dwc3_send_gadget_ep_cmd (dep,DWC3_DEPCMD_SETEPCONFIG , ¶ms);
drivers/usb/musb/musb_core.c +17 -14
@@ -2097,32 +2097,35 @@ int musb_queue_resume_work(struct musb *musb, {struct musb_pending_work *w;unsigned long flags; +bool is_suspended;int error;if (WARN_ON (!callback))return -EINVAL ; -if (pm_runtime_active (musb->controller)) -return callback (musb, data); +spin_lock_irqsave (&musb->list_lock, flags); + is_suspended = musb->is_runtime_suspended; + +if (is_suspended) { + w =devm_kzalloc (musb->controller,sizeof (*w),GFP_ATOMIC ); +if (!w) { + error = -ENOMEM ; + goto out_unlock; + } - w =devm_kzalloc (musb->controller,sizeof (*w),GFP_ATOMIC ); -if (!w) -return -ENOMEM ; + w->callback = callback; + w->data = data; - w->callback = callback; - w->data = data; -spin_lock_irqsave (&musb->list_lock, flags); -if (musb->is_runtime_suspended) {list_add_tail (&w->node, &musb->pending_list); error =0 ; - }else { -dev_err (musb->controller,"could not add resume work %p\n" , - callback); -devm_kfree (musb->controller, w); - error = -EINPROGRESS ; } + +out_unlock:spin_unlock_irqrestore (&musb->list_lock, flags); +if (!is_suspended) + error =callback (musb, data); +return error; }EXPORT_SYMBOL_GPL (musb_queue_resume_work);
drivers/usb/renesas_usbhs/fifo.c +2 -0
@@ -140,6 +140,8 @@ struct usbhs_pkt *usbhs_pkt_pop(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt)usbhsf_dma_unmap (pkt); } +usbhs_pipe_running (pipe,0 ); +__usbhsf_pkt_del (pkt); }
drivers/usb/serial/mos7720.c +3 -1
@@ -1239,8 +1239,10 @@ static int mos7720_write(struct tty_struct *tty, struct usb_serial_port *port,if (urb->transfer_buffer ==NULL ) { urb->transfer_buffer =kmalloc (URB_TRANSFER_BUFFER_SIZE ,GFP_ATOMIC ); -if (!urb->transfer_buffer) +if (!urb->transfer_buffer) { + bytes_sent = -ENOMEM ; goto exit; + } } transfer_size =min (count,URB_TRANSFER_BUFFER_SIZE );
drivers/usb/serial/mos7840.c +3 -1
@@ -1362,8 +1362,10 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port,if (urb->transfer_buffer ==NULL ) { urb->transfer_buffer =kmalloc (URB_TRANSFER_BUFFER_SIZE ,GFP_ATOMIC ); -if (!urb->transfer_buffer) +if (!urb->transfer_buffer) { + bytes_sent = -ENOMEM ; goto exit; + } } transfer_size =min (count,URB_TRANSFER_BUFFER_SIZE );
drivers/usb/serial/option.c +2 -1
@@ -1551,7 +1551,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1272, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1273, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1274, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1275, 0xff, 0xff, 0xff) }, + { USB_DEVICE(ZTE_VENDOR_ID, 0x1275), /* ZTE P685M */ + .driver_info = RSVD(3) | RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1276, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1277, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1278, 0xff, 0xff, 0xff) },
drivers/video/fbdev/Kconfig +1 -1
@@ -1405,6 +1405,7 @@ config FB_ATY select FB_CFB_IMAGEBLIT select FB_BACKLIGHT if FB_ATY_BACKLIGHT select FB_MACMODES if PPC + select FB_ATY_CT if SPARC64 && PCI help This driver supports graphics boards with the ATI Mach64 chips. Say Y if you have such a graphics board.
@@ -1415,7 +1416,6 @@ config FB_ATY config FB_ATY_CT bool "Mach64 CT/VT/GT/LT (incl. 3D RAGE) support" depends on PCI && FB_ATY - default y if SPARC64 && PCI help Say Y here to support use of ATI's 64-bit Rage boards (or other boards based on the Mach64 CT, VT, GT, and LT chipsets) as a
fs/btrfs/ctree.c +5 -2
@@ -279,9 +279,12 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans, ret =btrfs_inc_ref (trans, root, cow,1 ); else ret =btrfs_inc_ref (trans, root, cow,0 ); - -if (ret) +if (ret) { +btrfs_tree_unlock (cow); +free_extent_buffer (cow); +btrfs_abort_transaction (trans, ret);return ret; + }btrfs_mark_buffer_dirty (cow); *cow_ret = cow;
fs/btrfs/free-space-cache.c +5 -1
@@ -753,8 +753,10 @@ static int __load_free_space_cache(struct btrfs_root *root, struct inode *inode,while (num_entries) { e =kmem_cache_zalloc (btrfs_free_space_cachep,GFP_NOFS ); -if (!e) +if (!e) { + ret = -ENOMEM ; goto free_cache; + } ret =io_ctl_read_entry (&io_ctl, e, &type);if (ret) {
@@ -763,6 +765,7 @@ static int __load_free_space_cache(struct btrfs_root *root, struct inode *inode, }if (!e->bytes) { + ret =-1 ;kmem_cache_free (btrfs_free_space_cachep, e); goto free_cache; }
@@ -782,6 +785,7 @@ static int __load_free_space_cache(struct btrfs_root *root, struct inode *inode, num_bitmaps--; e->bitmap =kzalloc (PAGE_SIZE ,GFP_NOFS );if (!e->bitmap) { + ret = -ENOMEM ;kmem_cache_free ( btrfs_free_space_cachep, e); goto free_cache;
fs/btrfs/relocation.c +1 -3
@@ -1335,9 +1335,7 @@ static void __del_reloc_root(struct btrfs_root *root)RB_CLEAR_NODE (&node->rb_node); }spin_unlock (&rc->reloc_root_tree.lock); -if (!node) -return ; -BUG_ON ((struct btrfs_root *)node->data != root); +ASSERT (!node || (struct btrfs_root *)node->data == root); }spin_lock (&root->fs_info->trans_lock);
fs/cifs/connect.c +1 -0
@@ -3488,6 +3488,7 @@ int cifs_setup_cifs_sb(struct smb_vol *pvolume_info, cifs_sb->prepath =kstrdup (pvolume_info->prepath,GFP_KERNEL );if (cifs_sb->prepath ==NULL )return -ENOMEM ; + cifs_sb->mnt_cifs_flags |=CIFS_MOUNT_USE_PREFIX_PATH ; }return 0 ;
fs/f2fs/file.c +2 -1
@@ -682,7 +682,8 @@ static void __setattr_copy(struct inode *inode, const struct iattr *attr)if (ia_valid &ATTR_MODE ) {umode_t mode = attr->ia_mode; -if (!in_group_p (inode->i_gid) && !capable (CAP_FSETID )) +if (!in_group_p (inode->i_gid) && + !capable_wrt_inode_uidgid (inode,CAP_FSETID )) mode &= ~S_ISGID ;set_acl_inode (inode, mode); }
fs/gfs2/lock_dlm.c +2 -6
@@ -284,7 +284,6 @@ static void gdlm_put_lock(struct gfs2_glock *gl) {struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;struct lm_lockstruct *ls = &sdp->sd_lockstruct; -int lvb_needs_unlock =0 ;int error;if (gl->gl_lksb.sb_lkid ==0 ) {
@@ -297,13 +296,10 @@ static void gdlm_put_lock(struct gfs2_glock *gl)gfs2_sbstats_inc (gl,GFS2_LKS_DCOUNT );gfs2_update_request_times (gl); -/* don't want to skip dlm_unlock writing the lvb when lock is ex */ - -if (gl->gl_lksb.sb_lvbptr && (gl->gl_state ==LM_ST_EXCLUSIVE )) - lvb_needs_unlock =1 ; +/* don't want to skip dlm_unlock writing the lvb when lock has one */ if (test_bit (SDF_SKIP_DLM_UNLOCK , &sdp->sd_flags) && - !lvb_needs_unlock) { + !gl->gl_lksb.sb_lvbptr) {gfs2_glock_free (gl);return ; }
fs/isofs/dir.c +1 -0
@@ -151,6 +151,7 @@ static int do_isofs_readdir(struct inode *inode, struct file *file,printk (KERN_NOTICE "iso9660: Corrupted directory entry" " in block %lu of inode %lu\n" , block, inode->i_ino); +brelse (bh);return -EIO ; }
fs/isofs/namei.c +1 -0
@@ -101,6 +101,7 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,printk (KERN_NOTICE "iso9660: Corrupted directory entry" " in block %lu of inode %lu\n" , block, dir->i_ino); +brelse (bh);return 0 ; }
fs/jffs2/summary.c +3 -0
@@ -783,6 +783,8 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblockdbg_summary ("Writing unknown RWCOMPAT_COPY node type %x\n" ,je16_to_cpu (temp->u.nodetype));jffs2_sum_disable_collecting (c->summary); +/* The above call removes the list, nothing more to do */ + goto bail_rwcompat; }else {BUG ();/* unknown node in summary information */ }
@@ -794,6 +796,7 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock c->summary->sum_num--; } + bail_rwcompat:jffs2_sum_reset_collected (c->summary);
fs/jfs/jfs_dmap.c +1 -1
@@ -1669,7 +1669,7 @@ s64 dbDiscardAG(struct inode *ip, int agno, s64 minlen) }else if (rc == -ENOSPC ) {/* search for next smaller log2 block */ l2nb =BLKSTOL2 (nblocks) -1 ; - nblocks =1 << l2nb; + nblocks =1LL << l2nb; }else {/* Trim any already allocated blocks */ jfs_error (bmp->db_ipbmap->i_sb,"-EIO\n" );
fs/ntfs/inode.c +6 -0
@@ -661,6 +661,12 @@ static int ntfs_read_locked_inode(struct inode *vi) } a = ctx->attr;/* Get the standard information attribute value. */ +if ((u8 *)a +le16_to_cpu (a->data.resident.value_offset) + +le32_to_cpu (a->data.resident.value_length) > + (u8 *)ctx->mrec + vol->mft_record_size) { +ntfs_error (vi->i_sb,"Corrupt standard information attribute in inode." ); + goto unm_err_out; + } si = (STANDARD_INFORMATION *)((u8 *)a +le16_to_cpu (a->data.resident.value_offset));
fs/ocfs2/cluster/heartbeat.c +7 -1
@@ -2155,7 +2155,7 @@ static struct config_item *o2hb_heartbeat_group_make_item(struct config_group *g o2hb_nego_timeout_handler, reg, NULL, ®->hr_handler_list);if (ret) - goto free; + goto remove_item; ret = o2net_register_handler(O2HB_NEGO_APPROVE_MSG, reg->hr_key, sizeof(struct o2hb_nego_msg),
@@ -2174,6 +2174,12 @@ static struct config_item *o2hb_heartbeat_group_make_item(struct config_group *g unregister_handler:o2net_unregister_handler_list (®->hr_handler_list); +remove_item: +spin_lock (&o2hb_live_lock); +list_del (®->hr_all_item); +if (o2hb_global_heartbeat_active ()) +clear_bit (reg->hr_region_num, o2hb_region_bitmap); +spin_unlock (&o2hb_live_lock); free:kfree (reg);return ERR_PTR (ret);
include/linux/icmpv6.h +46 -2
73 lines not on this page · raw message
include/linux/ipv6.h +1 -1
@@ -2,6 +2,7 @@#define _IPV6_H#include <uapi/linux/ipv6.h> +#include <uapi/linux/icmpv6.h> #define ipv6_optlen (p) (((p)->hdrlen+1) << 3)#define ipv6_authlen (p) (((p)->hdrlen+2) << 2)
@@ -73,7 +74,6 @@ struct ipv6_params {__s32 autoconf; };extern struct ipv6_params ipv6_defaults; -#include <linux/icmpv6.h> #include <linux/tcp.h> #include <linux/udp.h>
include/net/icmp.h +10 -0
@@ -47,6 +47,16 @@ static inline void icmp_send(struct sk_buff *skb_in, int type, int code, __be32__icmp_send (skb_in, type, code, info, &IPCB (skb_in)->opt); } +#if IS_ENABLED (CONFIG_NF_NAT ) +void icmp_ndo_send (struct sk_buff *skb_in,int type,int code,__be32 info); +#else +static inline void icmp_ndo_send (struct sk_buff *skb_in,int type,int code,__be32 info) +{ +struct ip_options opts = {0 }; +__icmp_send (skb_in, type, code, info, &opts); +} +#endif +int icmp_rcv (struct sk_buff *skb);void icmp_err (struct sk_buff *skb,u32 info);int icmp_init (void );
kernel/debug/kdb/kdb_private.h +1 -1
@@ -234,7 +234,7 @@ extern struct task_struct *kdb_curr_task(int);#define kdb_do_each_thread (g, p) do_each_thread(g, p)#define kdb_while_each_thread (g, p) while_each_thread(g, p) -#define GFP_KDB (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL) +#define GFP_KDB (in_dbg_master() ? GFP_ATOMIC : GFP_KERNEL)extern void *debug_kmalloc (size_t size,gfp_t flags);extern void debug_kfree (void *);
kernel/futex.c +6 -6
@@ -1207,11 +1207,11 @@ static int handle_exit_race(u32 __user *uaddr, u32 uval,u32 uval2;/* -* If the futex exit state is not yet FUTEX_STATE_DEAD, wait -* for it to finish. +* If the futex exit state is not yet FUTEX_STATE_DEAD, tell the +* caller that the alleged owner is busy. */ if (tsk && tsk->futex_state !=FUTEX_STATE_DEAD ) -return -EAGAIN ; +return -EBUSY ;/* * Reread the user space value to handle the following situation:
@@ -2424,9 +2424,6 @@ static int __fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,int err =0 ; oldowner = pi_state->owner; -/* Owner died? */ -if (!pi_state->owner) - newtid |=FUTEX_OWNER_DIED ;/* * We are here because either:
@@ -2484,6 +2481,9 @@ static int __fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, } newtid =task_pid_vnr (newowner) |FUTEX_WAITERS ; +/* Owner died? */ +if (!pi_state->owner) + newtid |=FUTEX_OWNER_DIED ;if (get_futex_value_locked (&uval, uaddr)) goto handle_fault;
kernel/module.c +19 -2
@@ -2209,6 +2209,21 @@ static int verify_export_symbols(struct module *mod)return 0 ; } +static bool ignore_undef_symbol (Elf_Half emachine,const char *name) +{ +/* +* On x86, PIC code and Clang non-PIC code may have call foo@PLT. GNU as +* before 2.37 produces an unreferenced _GLOBAL_OFFSET_TABLE_ on x86-64. +* i386 has a similar problem but may not deserve a fix. +* +* If we ever have to ignore many symbols, consider refactoring the code to +* only warn if referenced by a relocation. +*/ +if (emachine ==EM_386 || emachine ==EM_X86_64 ) +return !strcmp (name,"_GLOBAL_OFFSET_TABLE_" ); +return false; +} +/* Change all symbols so that st_value encodes the pointer directly. */ static int simplify_symbols (struct module *mod,const struct load_info *info) {
@@ -2254,8 +2269,10 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)break ; } -/* Ok if weak. */ -if (!ksym &&ELF_ST_BIND (sym[i].st_info) ==STB_WEAK ) +/* Ok if weak or ignored. */ +if (!ksym && + (ELF_ST_BIND (sym[i].st_info) ==STB_WEAK || +ignore_undef_symbol (info->hdr->e_machine, name)))break ; pr_warn("%s: Unknown symbol %s (err %li)\n",
kernel/seccomp.c +2 -0
@@ -669,6 +669,8 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd, const bool recheck_after_trace) {BUG (); + +return -1 ; }#endif
kernel/tracepoint.c +64 -16
122 lines not on this page · raw message
mm/huge_memory.c +15 -0
@@ -1022,6 +1022,19 @@ int do_huge_pmd_wp_page(struct fault_env *fe, pmd_t orig_pmd)* We can only reuse the page if nobody else maps the huge page or it's * part. */ +if (!trylock_page (page)) { +get_page (page); +spin_unlock (fe->ptl); +lock_page (page); +spin_lock (fe->ptl); +if (unlikely (!pmd_same (*fe->pmd, orig_pmd))) { +unlock_page (page); +put_page (page); + goto out_unlock; + } +put_page (page); + } +if (page_trans_huge_mapcount (page,NULL ) ==1 ) {pmd_t entry; entry =pmd_mkyoung (orig_pmd);
@@ -1029,8 +1042,10 @@ int do_huge_pmd_wp_page(struct fault_env *fe, pmd_t orig_pmd)if (pmdp_set_access_flags (vma, haddr, fe->pmd, entry,1 ))update_mmu_cache_pmd (vma, fe->address, fe->pmd); ret |=VM_FAULT_WRITE ; +unlock_page (page); goto out_unlock; } +unlock_page (page);get_page (page);spin_unlock (fe->ptl); alloc:
mm/hugetlb.c +42 -1
86 lines not on this page · raw message
mm/memory.c +3 -3
@@ -1687,11 +1687,11 @@ static int remap_pte_range(struct mm_struct *mm, pmd_t *pmd, unsigned long addr, unsigned long end, unsigned long pfn, pgprot_t prot) { - pte_t *pte; + pte_t *pte, *mapped_pte;spinlock_t *ptl;int err =0 ; - pte =pte_alloc_map_lock (mm, pmd, addr, &ptl); + mapped_pte = pte =pte_alloc_map_lock (mm, pmd, addr, &ptl);if (!pte)return -ENOMEM ;arch_enter_lazy_mmu_mode ();
@@ -1705,7 +1705,7 @@ static int remap_pte_range(struct mm_struct *mm, pmd_t *pmd, pfn++; }while (pte++, addr +=PAGE_SIZE , addr != end);arch_leave_lazy_mmu_mode (); -pte_unmap_unlock (pte -1 , ptl); +pte_unmap_unlock (mapped_pte, ptl);return err; }
net/bluetooth/a2mp.c +2 -1
@@ -388,9 +388,9 @@ static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, hdev =hci_dev_get (req->id);if (!hdev || hdev->amp_type ==AMP_TYPE_BREDR || tmp) {struct a2mp_amp_assoc_rsp rsp; - rsp.id = req->id;memset (&rsp,0 ,sizeof (rsp)); + rsp.id = req->id;if (tmp) { rsp.status =A2MP_STATUS_COLLISION_OCCURED ;
@@ -519,6 +519,7 @@ static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, assoc =kmemdup (req->amp_assoc, assoc_len,GFP_KERNEL );if (!assoc) {amp_ctrl_put (ctrl); +hci_dev_put (hdev);return -ENOMEM ; }
net/bluetooth/hci_core.c +4 -2
@@ -1243,8 +1243,10 @@ int hci_inquiry(void __user *arg)* cleared). If it is interrupted by a signal, return -EINTR. */ if (wait_on_bit (&hdev->flags,HCI_INQUIRY , -TASK_INTERRUPTIBLE )) -return -EINTR ; +TASK_INTERRUPTIBLE )) { + err = -EINTR ; + goto done; + } }/* for unlimited number of responses we will use buffer with
net/ipv4/icmp.c +34 -0
@@ -738,6 +738,40 @@ out:; }EXPORT_SYMBOL (__icmp_send); +#if IS_ENABLED (CONFIG_NF_NAT ) +#include <net/netfilter/nf_conntrack.h> +void icmp_ndo_send (struct sk_buff *skb_in,int type,int code,__be32 info) +{ +struct sk_buff *cloned_skb =NULL ; +struct ip_options opts = {0 }; +enum ip_conntrack_info ctinfo; +struct nf_conn *ct; +__be32 orig_ip; + + ct =nf_ct_get (skb_in, &ctinfo); +if (!ct || !(ct->status &IPS_SRC_NAT )) { +__icmp_send (skb_in, type, code, info, &opts); +return ; + } + +if (skb_shared (skb_in)) + skb_in = cloned_skb =skb_clone (skb_in,GFP_ATOMIC ); + +if (unlikely (!skb_in ||skb_network_header (skb_in) < skb_in->head || + (skb_network_header (skb_in) +sizeof (struct iphdr )) > +skb_tail_pointer (skb_in) ||skb_ensure_writable (skb_in, +skb_network_offset (skb_in) +sizeof (struct iphdr )))) + goto out; + + orig_ip =ip_hdr (skb_in)->saddr; +ip_hdr (skb_in)->saddr = ct->tuplehash[0 ].tuple.src.u3.ip; +__icmp_send (skb_in, type, code, info, &opts); +ip_hdr (skb_in)->saddr = orig_ip; +out: +consume_skb (cloned_skb); +} +EXPORT_SYMBOL (icmp_ndo_send); +#endif static void icmp_socket_deliver (struct sk_buff *skb,u32 info) {
net/ipv6/icmp.c +10 -9
@@ -298,10 +298,9 @@ static int icmpv6_getfrag(void *from, char *to, int offset, int len, int odd, st }#if IS_ENABLED (CONFIG_IPV6_MIP6 ) -static void mip6_addr_swap (struct sk_buff *skb) +static void mip6_addr_swap (struct sk_buff *skb,const struct inet6_skb_parm *opt) {struct ipv6hdr *iph =ipv6_hdr (skb); -struct inet6_skb_parm *opt =IP6CB (skb);struct ipv6_destopt_hao *hao;struct in6_addr tmp;int off;
@@ -318,7 +317,7 @@ static void mip6_addr_swap(struct sk_buff *skb) } }#else -static inline void mip6_addr_swap (struct sk_buff *skb) {} +static inline void mip6_addr_swap (struct sk_buff *skb,const struct inet6_skb_parm *opt) {}#endif static struct dst_entry *icmpv6_route_lookup(struct net *net,
@@ -388,8 +387,9 @@ static struct dst_entry *icmpv6_route_lookup(struct net *net,/* * Send an ICMP message in response to a packet in error */ -static void icmp6_send (struct sk_buff *skb,u8 type,u8 code,__u32 info, -const struct in6_addr *force_saddr) +void icmp6_send (struct sk_buff *skb,u8 type,u8 code,__u32 info, +const struct in6_addr *force_saddr, +const struct inet6_skb_parm *parm) {struct net *net =dev_net (skb->dev);struct inet6_dev *idev =NULL ;
@@ -473,7 +473,7 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,return ; } -mip6_addr_swap (skb); +mip6_addr_swap (skb, parm);memset (&fl6,0 ,sizeof (fl6)); fl6.flowi6_proto =IPPROTO_ICMPV6 ;
@@ -556,9 +556,10 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,*/ void icmpv6_param_prob (struct sk_buff *skb,u8 code,int pos) { -icmp6_send (skb,ICMPV6_PARAMPROB , code, pos,NULL ); +icmp6_send (skb,ICMPV6_PARAMPROB , code, pos,NULL ,IP6CB (skb));kfree_skb (skb); } +EXPORT_SYMBOL (icmp6_send);/* Generate icmpv6 with type/code ICMPV6_DEST_UNREACH/ICMPV6_ADDR_UNREACH * if sufficient data bytes are available
@@ -612,10 +613,10 @@ int ip6_err_gen_icmpv6_unreach(struct sk_buff *skb, int nhs, int type, }if (type ==ICMP_TIME_EXCEEDED )icmp6_send (skb2,ICMPV6_TIME_EXCEED ,ICMPV6_EXC_HOPLIMIT , - info, &temp_saddr); + info, &temp_saddr,IP6CB (skb2));else icmp6_send (skb2,ICMPV6_DEST_UNREACH ,ICMPV6_ADDR_UNREACH , - info, &temp_saddr); + info, &temp_saddr,IP6CB (skb2));if (rt)ip6_rt_put (rt);
net/ipv6/ip6_icmp.c +41 -5
65 lines not on this page · raw message
net/mac80211/mesh_hwmp.c +1 -1
@@ -355,7 +355,7 @@ static u32 airtime_link_metric_get(struct ieee80211_local *local,*/ tx_time = (device_constant +10 * test_frame_len / rate); estimated_retx = ((1 << (2 *ARITH_SHIFT )) / (s_unit - err)); - result = (tx_time * estimated_retx) >> (2 *ARITH_SHIFT ); + result = ((u64 )tx_time * estimated_retx) >> (2 *ARITH_SHIFT );return (u32 )result; }
scripts/recordmcount.pl +5 -1
@@ -261,7 +261,11 @@ if ($arch eq "x86_64") { # force flags for this arch $ld .= " -m shlelf_linux"; - $objcopy .= " -O elf32-sh-linux"; + if ($endian eq "big") { + $objcopy .= " -O elf32-shbig-linux"; + } else { + $objcopy .= " -O elf32-sh-linux"; + } } elsif ($arch eq "powerpc") { $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)";
security/keys/trusted.c +1 -1
@@ -797,7 +797,7 @@ static int getoptions(char *c, struct trusted_key_payload *pay,case Opt_migratable:if (*args[0 ].from =='0' ) pay->migratable =0 ; -else +else if (*args[0 ].from !='1' )return -EINVAL ;break ;case Opt_pcrlock:
sound/soc/codecs/cs42l56.c +2 -1
@@ -1270,6 +1270,7 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client,dev_err (&i2c_client->dev,"CS42L56 Device ID (%X). Expected %X\n" , devid,CS42L56_DEVID ); + ret = -EINVAL ; goto err_enable; } alpha_rev = reg &CS42L56_AREV_MASK ;
@@ -1325,7 +1326,7 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client, ret =snd_soc_register_codec (&i2c_client->dev, &soc_codec_dev_cs42l56, &cs42l56_dai,1 );if (ret <0 ) -return ret; + goto err_enable;return 0 ;
tools/perf/tests/sample-parsing.c +1 -1
@@ -167,7 +167,7 @@ static int do_test(u64 sample_type, u64 sample_regs, u64 read_format) .data = {1, 211, 212, 213}, };u64 regs[64 ]; -const u64 raw_data[] = {0x123456780a0b0c0dULL ,0x1102030405060708ULL }; +const u32 raw_data[] = {0x12345678 ,0x0a0b0c0d ,0x11020304 ,0x05060708 ,0 };const u64 data[] = {0x2211443366558877ULL ,0 ,0xaabbccddeeff4321ULL };struct perf_sample sample = { .ip = 101,
tools/perf/util/event.c +2 -0
@@ -1370,6 +1370,8 @@ int machine__resolve(struct machine *machine, struct addr_location *al, } al->sym =map__find_symbol (al->map, al->addr); + }else if (symbol_conf.dso_list) { + al->filtered |= (1 <<HIST_FILTER__DSO ); } if (symbol_conf.sym_list &&
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +3 -0
@@ -1508,6 +1508,9 @@ static int intel_pt_walk_psbend(struct intel_pt_decoder *decoder)break ;case INTEL_PT_CYC : +intel_pt_calc_cyc_timestamp (decoder); +break ; +case INTEL_PT_VMCS :case INTEL_PT_MNT :case INTEL_PT_PAD :