Linux 4.14.291
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.291 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 | 6 + arch/arm/boot/dts/aspeed-ast2500-evb.dts | 2 arch/arm/boot/dts/imx6ul.dtsi | 5 - arch/arm/boot/dts/qcom-pm8841.dtsi | 1 arch/arm/lib/findbit.S | 16 +-- arch/arm/lib/xor-neon.c | 3 arch/arm/mach-bcm/bcm_kona_smc.c | 1 arch/arm/mach-omap2/display.c | 1 arch/arm/mach-zynq/common.c | 1 arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 arch/arm64/include/asm/processor.h | 3 arch/arm64/kernel/armv8_deprecated.c | 9 + arch/ia64/include/asm/processor.h | 2 arch/mips/cavium-octeon/octeon-platform.c | 3 arch/mips/kernel/proc.c | 2 arch/mips/mm/tlbex.c | 4 arch/nios2/include/asm/entry.h | 3 arch/nios2/include/asm/ptrace.h | 2 arch/nios2/kernel/entry.S | 22 +++- arch/nios2/kernel/signal.c | 3 arch/nios2/kernel/syscall_table.c | 1 arch/parisc/kernel/drivers.c | 9 - arch/powerpc/kernel/pci-common.c | 45 ++++++--- arch/powerpc/kernel/prom.c | 7 + arch/powerpc/mm/dump_linuxpagetables.c | 13 -- arch/powerpc/platforms/cell/axon_msi.c | 1 arch/powerpc/platforms/cell/spufs/inode.c | 1 arch/powerpc/platforms/powernv/rng.c | 2 arch/powerpc/sysdev/fsl_pci.c | 8 + arch/powerpc/sysdev/fsl_pci.h | 1 arch/powerpc/sysdev/xive/spapr.c | 1 arch/s390/include/asm/archrandom.h | 9 + arch/x86/boot/Makefile | 2 arch/x86/boot/compressed/Makefile | 4 arch/x86/entry/vdso/Makefile | 2 arch/x86/kernel/pmem.c | 7 + arch/x86/kvm/emulate.c | 23 ++-- arch/x86/kvm/hyperv.c | 3 arch/x86/kvm/lapic.c | 4 arch/x86/kvm/svm.c | 2 arch/x86/mm/numa.c | 4 arch/x86/platform/olpc/olpc-xo1-sci.c | 2 drivers/acpi/acpi_lpss.c | 3 drivers/acpi/property.c | 8 - drivers/acpi/sleep.c | 8 + drivers/acpi/video_detect.c | 55 +++++++---- drivers/ata/libata-eh.c | 1 drivers/atm/idt77252.c | 1 drivers/bluetooth/hci_intel.c | 6 + drivers/clk/qcom/gcc-ipq8074.c | 1 drivers/fpga/altera-pr-ip-core.c | 2 drivers/gpio/gpiolib-of.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 17 ++- drivers/gpu/drm/bridge/sil-sii8620.c | 4 drivers/gpu/drm/mediatek/mtk_dpi.c | 31 +----- drivers/gpu/drm/mediatek/mtk_dsi.c | 2 drivers/gpu/drm/meson/meson_drv.c | 5 - drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c | 2 drivers/gpu/drm/radeon/ni_dpm.c | 6 - drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 drivers/gpu/drm/vc4/vc4_dsi.c | 6 - drivers/hid/wacom_sys.c | 2 drivers/hid/wacom_wac.c | 43 +++++---- drivers/hwtracing/intel_th/pci.c | 15 +++ drivers/i2c/busses/i2c-cadence.c | 10 +- drivers/i2c/i2c-core-base.c | 3 drivers/i2c/muxes/i2c-mux-gpmux.c | 1 drivers/iio/light/isl29028.c | 2 drivers/infiniband/hw/hfi1/file_ops.c | 4 drivers/infiniband/sw/rxe/rxe_qp.c | 12 +- drivers/iommu/exynos-iommu.c | 6 + drivers/iommu/qcom_iommu.c | 7 + drivers/irqchip/irq-tegra.c | 10 +- drivers/macintosh/adb.c | 2 drivers/md/dm-raid.c | 4 drivers/md/dm.c | 5 + drivers/md/raid10.c | 5 - drivers/md/raid5.c | 2 drivers/media/platform/mtk-mdp/mtk_mdp_ipi.h | 2 drivers/media/usb/hdpvr/hdpvr-video.c | 2 drivers/memstick/core/ms_block.c | 11 +- drivers/mfd/rtsx_pcr.c | 6 + drivers/mfd/t7l66xb.c | 6 - drivers/misc/cxl/irq.c | 1 drivers/mmc/host/cavium-octeon.c | 1 drivers/mmc/host/cavium-thunderx.c | 4 drivers/mmc/host/sdhci-of-at91.c | 9 + drivers/mmc/host/sdhci-of-esdhc.c | 1 drivers/mtd/devices/st_spi_fsm.c | 8 + drivers/mtd/maps/physmap_of_versatile.c | 2 drivers/mtd/sm_ftl.c | 2 drivers/net/can/pch_can.c | 8 - drivers/net/can/rcar/rcar_can.c | 8 - drivers/net/can/sja1000/sja1000.c | 7 - drivers/net/can/spi/hi311x.c | 5 - drivers/net/can/sun4i_can.c | 9 - drivers/net/can/usb/ems_usb.c | 2 drivers/net/can/usb/usb_8dev.c | 7 - drivers/net/ethernet/freescale/fec_ptp.c | 6 - drivers/net/ethernet/intel/i40e/i40e_main.c | 4 drivers/net/ethernet/intel/igb/igb.h | 2 drivers/net/ethernet/intel/igb/igb_main.c | 12 ++ drivers/net/geneve.c | 3 drivers/net/sungem_phy.c | 1 drivers/net/usb/ax88179_178a.c | 16 +-- drivers/net/usb/usbnet.c | 8 - drivers/net/wireless/ath/ath9k/htc.h | 10 +- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 3 drivers/net/wireless/ath/wil6210/debugfs.c | 18 +-- drivers/net/wireless/intel/iwlegacy/4965-rs.c | 5 - drivers/net/wireless/intersil/p54/main.c | 2 drivers/net/wireless/intersil/p54/p54spi.c | 3 drivers/net/wireless/marvell/libertas/if_usb.c | 1 drivers/net/wireless/mediatek/mt7601u/usb.c | 1 drivers/pci/quirks.c | 3 drivers/pinctrl/nomadik/pinctrl-nomadik.c | 4 drivers/pinctrl/qcom/pinctrl-msm8916.c | 4 drivers/platform/olpc/olpc-ec.c | 2 drivers/regulator/of_regulator.c | 6 + drivers/remoteproc/qcom_wcnss.c | 10 +- drivers/s390/char/zcore.c | 11 ++ drivers/s390/cio/vfio_ccw_drv.c | 14 -- drivers/s390/scsi/zfcp_fc.c | 29 ++++-- drivers/s390/scsi/zfcp_fc.h | 6 - drivers/s390/scsi/zfcp_fsf.c | 4 drivers/scsi/sg.c | 57 +++++++----- drivers/scsi/smartpqi/smartpqi_init.c | 4 drivers/scsi/ufs/ufshcd-pltfrm.c | 15 ++- drivers/soc/fsl/guts.c | 2 drivers/tty/n_gsm.c | 83 +++++++++++++++-- drivers/tty/serial/ucc_uart.c | 2 drivers/usb/core/hcd.c | 26 +++-- drivers/usb/gadget/legacy/inode.c | 1 drivers/usb/gadget/udc/Kconfig | 2 drivers/usb/host/ehci-ppc-of.c | 1 drivers/usb/host/ohci-nxp.c | 1 drivers/usb/host/ohci-ppc-of.c | 1 drivers/usb/serial/sierra.c | 3 drivers/usb/serial/usb-serial.c | 2 drivers/usb/serial/usb_wwan.c | 3 drivers/vfio/vfio.c | 1 drivers/video/fbdev/amba-clcd.c | 24 +++-- drivers/video/fbdev/arkfb.c | 9 + drivers/video/fbdev/i740fb.c | 9 + drivers/video/fbdev/s3fb.c | 2 drivers/video/fbdev/sis/init.c | 4 drivers/video/fbdev/vt8623fb.c | 2 drivers/xen/xenbus/xenbus_dev_frontend.c | 4 fs/attr.c | 2 fs/btrfs/disk-io.c | 14 ++ fs/btrfs/raid56.c | 74 ++++++++++++--- fs/btrfs/tree-log.c | 4 fs/cifs/smb2ops.c | 5 - fs/ext2/super.c | 12 ++ fs/ext4/inline.c | 3 fs/ext4/inode.c | 10 +- fs/ext4/migrate.c | 4 fs/ext4/namei.c | 23 +++- fs/ext4/resize.c | 11 ++ fs/ext4/xattr.c | 6 - fs/ext4/xattr.h | 13 ++ fs/fuse/inode.c | 6 + fs/jbd2/transaction.c | 14 ++ fs/namei.c | 2 fs/nfs/nfs4idmap.c | 46 +++++---- fs/nfs/nfs4proc.c | 3 fs/ntfs/attrib.c | 8 + fs/splice.c | 10 -- include/linux/buffer_head.h | 25 +++++ include/linux/kfifo.h | 2 include/linux/kvm_host.h | 28 +++++ include/linux/mfd/t7l66xb.h | 1 include/linux/pci_ids.h | 2 include/linux/usb/hcd.h | 1 include/net/bluetooth/l2cap.h | 1 include/sound/core.h | 8 + include/trace/events/spmi.h | 12 +- include/uapi/linux/can/error.h | 5 - kernel/kprobes.c | 3 kernel/power/user.c | 13 ++ kernel/profile.c | 7 + mm/mmap.c | 1 net/9p/client.c | 4 net/bluetooth/l2cap_core.c | 68 ++++++++++---- net/dccp/proto.c | 10 +- net/ipv4/tcp_output.c | 30 ++++-- net/ipv6/ping.c | 6 + net/netfilter/nf_tables_api.c | 3 net/netfilter/nfnetlink_queue.c | 7 + net/rds/ib_recv.c | 1 net/rose/af_rose.c | 11 +- net/rose/rose_route.c | 2 net/sched/cls_route.c | 8 + net/sunrpc/backchannel_rqst.c | 14 ++ net/vmw_vsock/af_vsock.c | 10 +- security/apparmor/audit.c | 2 security/apparmor/label.c | 6 - security/apparmor/mount.c | 8 + security/selinux/ss/policydb.h | 2 sound/core/info.c | 6 - sound/core/misc.c | 94 ++++++++++++++++++++ sound/core/timer.c | 11 +- sound/pci/hda/patch_cirrus.c | 1 sound/pci/hda/patch_conexant.c | 11 ++ sound/soc/codecs/da7210.c | 2 sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 10 +- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 9 + sound/usb/bcd2000/bcd2000.c | 3 tools/build/feature/test-libcrypto.c | 15 ++- tools/perf/util/genelf.c | 6 + tools/testing/selftests/timers/clocksource-switch.c | 6 - tools/testing/selftests/timers/valid-adjtimex.c | 2 tools/thermal/tmon/sysfs.c | 24 ++--- tools/thermal/tmon/tmon.h | 3 virt/kvm/kvm_main.c | 10 +- 216 files changed, 1337 insertions(+), 540 deletions(-)
Al Viro (6):
nios2: page fault et.al. are *not* restartable syscalls...
nios2: don't leave NULLs in sys_call_table[]
nios2: traced syscall does need to check the syscall number
nios2: fix syscall restart checks
nios2: restarts apply only to the first sigframe we build...
nios2: add force_successful_syscall_return()
Alan Brady (1):
i40e: Fix to stop tx_timeout recovery if GLOBR fails
Alexander Gordeev (1):
s390/zcore: fix race when reading from hardware system area
Alexander Lobakin (2):
ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr() x86/olpc: fix 'logical not is only applied to the left hand side'
Alexander Shishkin (3):
intel_th: pci: Add Raptor Lake-S CPU support
intel_th: pci: Add Raptor Lake-S PCH support
intel_th: pci: Add Meteor Lake-P support
Alexander Stein (2):
ARM: dts: imx6ul: add missing properties for sram
ARM: dts: imx6ul: fix qspi node compatible
Alexey Kodanev (2):
drm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()
wifi: iwlegacy: 4965: fix potential off-by-one overflow in il4965_rs_fill_link_cmd()
Allen Ballway (1):
ALSA: hda/cirrus - support for iMac 12,1 model
Amadeusz Sławiński (1):
ALSA: info: Fix llseek return value when using callback
Ammar Faizi (1):
wifi: wil6210: debugfs: fix uninitialized variable use in wil_write_file_wmi()
AngeloGioacchino Del Regno (1):
media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignment
Arnaldo Carvalho de Melo (1):
genelf: Use HAVE_LIBCRYPTO_SUPPORT, not the never defined HAVE_LIBCRYPTO
Baokun Li (4):
ext4: add EXT4_INODE_HAS_XATTR_SPACE macro in xattr.h
ext4: fix use-after-free in ext4_xattr_set_entry
ext4: correct max_inline_xattr_value_size computing
ext4: correct the misjudgment in ext4_iget_extra_inode
Bo-Chen Chen (1):
drm/mediatek: dpi: Remove output format of YUV
Brian Norris (1):
drm/rockchip: vop: Don't crash for invalid duplicate_state()
Chen Zhongjin (2):
profiling: fix shift too large makes kernel panic
kprobes: Forbid probing on trampoline and BPF code areas
ChenXiaoSong (1):
ntfs: fix use-after-free in ntfs_ucsncmp()
Christophe JAILLET (5):
wifi: p54: Fix an error handling path in p54spi_probe()
misc: rtsx: Fix an error handling path in rtsx_pci_probe() memstick/ms_block: Fix some incorrect memory allocation memstick/ms_block: Fix a memory leak
cxl: Fix a memory leak in an error handling path
Christophe Leroy (1):
powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E
Csókás Bence (1):
fec: Fix timer capture timing in fec_ptp_enable_pps()
Damien Le Moal (1):
ata: libata-eh: Add missing command name
Dan Carpenter (4):
wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi() platform/olpc: Fix uninitialized data in debugfs write
kfifo: fix kfifo_to_user() return type
xen/xenbus: fix return type in xenbus_file_read()
Daniel Starke (5):
tty: n_gsm: fix non flow control frames during mux flow off
tty: n_gsm: fix packet re-transmission without open control channel
tty: n_gsm: fix race condition in gsmld_write()
tty: n_gsm: fix wrong T1 retry count handling
tty: n_gsm: fix DM command
Dave Stevenson (1):
drm/vc4: dsi: Correct DSI divider calculations
David Collins (1):
spmi: trace: fix stack-out-of-bound access in SPMI tracing functions
David Howells (1):
vfs: Check the truncate maximum size in inode_newsize_ok()
Duoming Zhou (2):
mtd: sm_ftl: Fix deadlock caused by cancel_work_sync in sm_release
atm: idt77252: fix use-after-free bugs caused by tst_timer
Eric Dumazet (2):
net: rose: fix netdev reference changes
tcp: fix over estimation in sk_forced_mem_schedule()
Eric Farman (1):
vfio/ccw: Do not change FSM state in subchannel event
Eric Whitney (1):
ext4: fix extent status tree race in writeback error recovery path
Eugen Hristev (1):
mmc: sdhci-of-at91: fix set_uhs_signaling rewriting of MC1R
Filipe Manana (1):
btrfs: fix lost error handling when looking up extended ref on log replay
Florian Fainelli (1):
tools/thermal: Fix possible path truncations
Florian Westphal (2):
netfilter: nf_queue: do not allow packet truncation below transport header offset
netfilter: nf_tables: fix null deref due to zeroed list head
Francis Laniel (1):
arm64: Do not forget syscall when starting a new thread.
Greg Kroah-Hartman (2):
ARM: crypto: comment out gcc warning that breaks clang builds Linux 4.14.291
Hangyu Hua (3):
drm: bridge: sii8620: fix possible off-by-one
wifi: libertas: Fix possible refcount leak in if_usb_probe()
dccp: put dccp_qpolicy_full() and dccp_qpolicy_push() in the same lock
Harald Freudenberger (1):
s390/archrandom: prevent CPACF trng invocations in interrupt context
Helge Deller (1):
parisc: Fix device names in /proc/iomem
Huacai Chen (1):
MIPS: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
Jamal Hadi Salim (1):
net_sched: cls_route: disallow handle of 0
Jan Kara (1):
ext2: Add more validity checks for inode counts
Jason A. Donenfeld (1):
fs: check FMODE_LSEEK to control internal pipe splicing
Jianglei Nie (1):
RDMA/hfi1: fix potential memory leak in setup_base_ctxt()
Jiasheng Jiang (3):
drm: bridge: adv7511: Add check for mipi_dsi_driver_register
Bluetooth: hci_intel: Add check for platform_driver_register
ASoC: codecs: da7210: add check for i2c_add_driver
Johan Hovold (2):
x86/pmem: Fix platform-device leak in error path
USB: serial: fix tty-port initialized comments
John Johansen (2):
apparmor: fix quiet_denied for file rules
apparmor: Fix failed mount permission check error message
Jose Alonso (1):
Revert "net: usb: ax88179_178a needs FLAG_SEND_ZLP"
Jozef Martiniak (1):
gadgetfs: ep_io - wait until IRQ finishes
Kiselev, Oleg (1):
ext4: avoid resizing to a partial cluster size
Krzysztof Kozlowski (2):
ARM: dts: ast2500-evb: fix board compatible
ARM: dts: qcom: pm8841: add required thermal-sensor-cells
Kuniyuki Iwashima (1):
net: ping6: Fix memleak in ipv6_renew_options().
Lars-Peter Clausen (1):
i2c: cadence: Support PEC for SMBus block read
Leo Li (1):
drm/amdgpu: Check BO's requested pinning domains against its preferred_domains
Li Lingfeng (1):
ext4: recover csum seed of tmp_inode after migrating to extents
Liang He (14):
scsi: ufs: host: Hold reference returned by of_parse_phandle()
net: sungem_phy: Add of_node_put() for reference returned by of_get_parent()
ARM: OMAP2+: display: Fix refcount leak bug
regulator: of: Fix refcount leak bug in of_get_regulation_constraints()
i2c: mux-gpmux: Add of_node_put() when breaking out of loop
gpio: gpiolib-of: Fix refcount bugs in of_mm_gpiochip_add_data()
mmc: cavium-octeon: Add of_node_put() when breaking out of loop
mmc: cavium-thunderx: Add of_node_put() when breaking out of loop iommu/arm-smmu: qcom_iommu: Add of_node_put() when breaking out of loop
video: fbdev: amba-clcd: Fix refcount leak bugs
drm/meson: Fix refcount bugs in meson_vpu_has_available_connectors()
usb: host: ohci-ppc-of: Fix refcount leak bug
tty: serial: Fix refcount leak bug in ucc_uart.c
mips: cavium-octeon: Fix missing of_node_put() in octeon2_usb_clocks_start
Lin Ma (1):
igb: Add lock to avoid data race
Luiz Augusto von Dentz (2):
Bluetooth: L2CAP: Fix use-after-free caused by l2cap_chan_put
Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm regression
Lukas Czerner (1):
ext4: make sure ext4_append() always allocates new block
Lukas Wunner (1):
usbnet: Fix linkwatch use-after-free on disconnect
Maciej S. Szmigiero (1):
KVM: SVM: Don't BUG if userspace injects an interrupt with GIF=0
Mahesh Rajashekhara (1):
scsi: smartpqi: Fix DMA direction for RAID requests
Manyi Li (1):
ACPI: PM: save NVS memory for Lenovo G40-45
Marc Kleine-Budde (1):
can: ems_usb: fix clang's -Wunaligned-access warning
Marco Pagani (1):
fpga: altera-pr-ip: fix unsigned comparison with less than zero
Markus Mayer (1):
thermal/tools/tmon: Include pthread and time headers in tmon.h
Masahiro Yamada (1):
kbuild: clear LDFLAGS in the top Makefile
Matthias May (1):
geneve: do not use RT_TOS for IPv6 flowlabel
Meng Tang (1):
ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model
Miaohe Lin (1):
mm/mmap.c: fix missing call to vm_unacct_memory in mmap_region
Miaoqian Lin (13):
ARM: bcm: Fix refcount leak in bcm_kona_smc_init
cpufreq: zynq: Fix refcount leak in zynq_get_revision
mtd: maps: Fix refcount leak in of_flash_probe_versatile
mtd: maps: Fix refcount leak in ap_flash_init
usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe
usb: ohci-nxp: Fix refcount leak in ohci_hcd_nxp_probe
mmc: sdhci-of-esdhc: Fix refcount leak in esdhc_signal_voltage_switch
ASoC: mediatek: mt8173: Fix refcount leak in mt8173_rt5650_rt5676_dev_probe
ASoC: mediatek: mt8173-rt5650: Fix refcount leak in mt8173_rt5650_dev_probe powerpc/spufs: Fix refcount leak in spufs_init_isolated_loader powerpc/xive: Fix refcount leak in xive_get_max_prio powerpc/cell/axon_msi: Fix refcount leak in setup_msi_msg_address
pinctrl: nomadik: Fix refcount leak in nmk_pinctrl_dt_subnode_to_map
Michael Ellerman (3):
powerpc/powernv: Avoid crashing if rng is NULL powerpc/pci: Fix PHB numbering when using opal-phbid powerpc/pci: Fix get_phb_number() locking
Michael Walle (1):
soc: fsl: guts: machine variable might be unset
Mike Snitzer (1):
dm: return early from dm_pr_call() if DM device is suspended
Miklos Szeredi (1):
fuse: limit nsec
Mikulas Patocka (5):
add barriers to buffer_uptodate and set_buffer_uptodate
md-raid10: fix KASAN warning
dm raid: fix address sanitizer warning in raid_resume dm raid: fix address sanitizer warning in raid_status
rds: add missing barrier to release_refill
Nathan Chancellor (1):
MIPS: tlbex: Explicitly compare _PAGE_NO_EXEC against 0
Nick Desaulniers (2):
Makefile: link with -z noexecstack --no-warn-rwx-segments
x86: link vdso and boot with -z noexecstack --no-warn-rwx-segments
Niels Dossche (1):
media: hdpvr: fix error value returns in hdpvr_read
Nikita Travkin (1):
pinctrl: qcom: msm8916: Allow CAMSS GP clocks to be muxed
Ning Qiang (1):
macintosh/adb: fix oob read in do_adb_query() function
Pablo Neira Ayuso (1):
netfilter: nf_tables: really skip inactive sets when allocating name
Pali Rohár (3):
PCI: Add defines for normal and subtractive PCI bridges powerpc/fsl-pci: Fix Class Code of PCIe Root Port
powerpc/pci: Prefer PCI domain assignment via DT 'linux,pci-domain' and alias
Pavan Chebbi (1):
PCI: Add ACS quirk for Broadcom BCM5750x NICs
Pavel Skripkin (1):
ath9k: fix use-after-free in ath9k_hif_usb_rx_cb
Peilin Ye (2):
vsock: Fix memory leak in vsock_connect()
vsock: Set socket state back to SS_UNCONNECTED in vsock_connect_timeout()
Ping Cheng (1):
HID: wacom: Don't register pad_input for touch switch
Qu Wenruo (3):
btrfs: reject log replay if there is unsupported RO compat flag
btrfs: only write the sectors in the vertical stripe which has data stripes
btrfs: raid56: don't trust any cached sector in __raid56_parity_recover()
Randy Dunlap (1):
usb: gadget: udc: amd5536 depends on HAS_DMA
Robert Marko (1):
clk: qcom: ipq8074: dont disable gcc_sleep_clk_src
Roberto Sassu (1):
tools build: Switch to new openssl API for test-libcrypto
Russell King (Oracle) (1):
ARM: findbit: fix overflowing offset
Rustam Subkhankulov (2):
wifi: p54: add missing parentheses in p54_flush()
video: fbdev: sis: fix typos in SiS_GetModeID()
Sai Prakash Ranjan (1):
irqchip/tegra: Fix overflow implicit truncation warnings
Sakari Ailus (1):
ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool
Sam Protsenko (1):
iommu/exynos: Handle failed IOMMU device registration properly
Schspa Shi (1):
vfio: Clear the caps->buf to NULL after free
Sean Christopherson (3):
KVM: x86: Mark TSS busy during LTR emulation _after_ all fault checks
KVM: x86: Set error code to segment selector on LLDT/LTR non-canonical #GP
KVM: Add infrastructure and macro to mark VM as bugged
Siddh Raman Pant (1):
x86/numa: Use cpumask_available instead of hardcoded NULL check
Sireesh Kodali (2):
arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
remoteproc: qcom: wcnss: Fix handling of IRQs
Steffen Maier (1):
scsi: zfcp: Fix missing auto port scan and thus missing target ports
Steve French (1):
smb3: check xattr value length earlier
Takashi Iwai (2):
ALSA: core: Add async signal helpers
ALSA: timer: Use deferred fasync helper
Tetsuo Handa (1):
PM: hibernate: defer device probing when resuming from hibernation
Thadeu Lima de Souza Cascardo (1):
net_sched: cls_route: remove from list when handle is 0
Theodore Ts'o (1):
ext4: update s_overhead_clusters in the superblock during an on-line resize
Timur Tabi (1):
drm/nouveau: fix another off-by-one in nvbios_addr
Tom Rix (1):
apparmor: fix aa_label_asxprint return check
Tony Battersby (1):
scsi: sg: Allow waiting for commands to complete on removed device
Trond Myklebust (2):
NFSv4: Fix races in the legacy idmapper upcall
SUNRPC: Reinitialise the backchannel request buffers before reuse
Tyler Hicks (1):
net/9p: Initialize the iounit field during fid creation
Uwe Kleine-König (2):
mtd: st_spi_fsm: Add a clk_disable_unprepare() in .probe()'s error path
mfd: t7l66xb: Drop platform disable callback
Vincent Mailhol (8):
can: pch_can: do not report txerr and rxerr during bus-off
can: rcar_can: do not report txerr and rxerr during bus-off
can: sja1000: do not report txerr and rxerr during bus-off
can: hi311x: do not report txerr and rxerr during bus-off
can: sun4i_can: do not report txerr and rxerr during bus-off
can: usb_8dev: do not report txerr and rxerr during bus-off
can: error: specify the values of data[5..7] of CAN error frames
can: pch_can: pch_can_error(): initialize errc before using it
Vitaly Kuznetsov (2):
KVM: x86: Check lapic_in_kernel() before attempting to set a SynIC irq
KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast()
Wei Mingzhi (1):
mt7601u: add USB device ID for some versions of XiaoDu WiFi Dongle.
Weitao Wang (1):
USB: HCD: Fix URB giveback issue in tasklet function
Wentao_Liang (1):
drivers:md:fix a potential use-after-free bug
Werner Sembach (2):
ACPI: video: Force backlight native for some TongFang devices
ACPI: video: Shortening quirk list by identifying Clevo by board_name only
Wolfram Sang (2):
selftests: timers: valid-adjtimex: build fix for newer toolchains
selftests: timers: clocksource-switch: fix passing errors from child
Xin Xiong (1):
apparmor: fix reference count leak in aa_pivotroot()
Xinlei Lee (1):
drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
Xiu Jianfeng (1):
selinux: Add boundary check in put_entry()
Xu Wang (1):
i2c: Fix a potential use after free
Yang Xu (1):
fs: Add missing umask strip in vfs_tmpfile
Ye Bin (1):
ext4: avoid remove directory when directory is corrupted
Yonglong Li (1):
tcp: make retransmitted SKB fit into the send window
Zhang Xianwei (1):
NFSv4.1: RECLAIM_COMPLETE must handle EACCES
Zheyu Ma (7):
ALSA: bcd2000: Fix a UAF bug on the error path of probing
iio: light: isl29028: Fix the warning in isl29028_remove()
video: fbdev: arkfb: Fix a divide-by-zero bug in ark_set_pixclock()
video: fbdev: vt8623fb: Check the size of screen before memset_io()
video: fbdev: arkfb: Check the size of screen before memset_io()
video: fbdev: s3fb: Check the size of screen before memset_io()
video: fbdev: i740fb: Check the argument of i740_calc_vclk()
Zhihao Cheng (1):
jbd2: fix assertion 'jh->b_frozen_data == NULL' failure when journal aborted
Zhouyi Zhou (1):
powerpc/64: Init jump labels before parse_early_param()
Zhu Yanjun (1):
RDMA/rxe: Fix error unwind in rxe_create_qp()
haibinzhang (张海斌) (1):
arm64: fix oops in concurrently setting insn_emulation sysctls
huhai (1):
ACPI: LPSS: Fix missing check in register_device_clock()
Greg Kroah-Hartman
maintainerMakefile +5 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 290 +SUBLEVEL = 291 EXTRAVERSION = NAME = Petit Gorille
@@ -426,6 +426,7 @@ KBUILD_CFLAGS_KERNEL := KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds +LDFLAGS := GCC_PLUGINS_CFLAGS := CLANG_FLAGS :=
@@ -873,6 +874,9 @@ ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION LDFLAGS_vmlinux += $(call ld-option, --gc-sections,) endif +LDFLAGS += -z noexecstack +LDFLAGS += $(call ld-option,--no-warn-rwx-segments) + ifeq ($(CONFIG_STRIP_ASM_SYMS),y) LDFLAGS_vmlinux += $(call ld-option, -X,) endif
arch/arm/boot/dts/aspeed-ast2500-evb.dts +1 -1
@@ -5,7 +5,7 @@ / { model = "AST2500 EVB"; - compatible = "aspeed,ast2500"; + compatible = "aspeed,ast2500-evb", "aspeed,ast2500"; aliases { serial4 = &uart5;
arch/arm/boot/dts/imx6ul.dtsi +4 -1
@@ -152,6 +152,9 @@ ocram: sram@00900000 { compatible = "mmio-sram"; reg = <0x00900000 0x20000>; + ranges = <0 0x00900000 0x20000>; + #address-cells = <1>; + #size-cells = <1>; }; dma_apbh: dma-apbh@01804000 {
@@ -880,7 +883,7 @@ qspi: qspi@021e0000 { #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,imx6ul-qspi", "fsl,imx6sx-qspi"; + compatible = "fsl,imx6ul-qspi"; reg = <0x021e0000 0x4000>, <0x60000000 0x10000000>; reg-names = "QuadSPI", "QuadSPI-memory"; interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
arch/arm/boot/dts/qcom-pm8841.dtsi +1 -0
@@ -25,6 +25,7 @@ compatible = "qcom,spmi-temp-alarm"; reg = <0x2400>; interrupts = <4 0x24 0 IRQ_TYPE_EDGE_RISING>; + #thermal-sensor-cells = <0>; }; };
arch/arm/lib/findbit.S +8 -8
@@ -43,8 +43,8 @@ ENDPROC(_find_first_zero_bit_le) * Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset) */ ENTRY(_find_next_zero_bit_le) - teq r1, #0 - beq 3b + cmp r2, r1 + bhs 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine ARM( ldrb r3, [r0, r2, lsr #3] )
@@ -84,8 +84,8 @@ ENDPROC(_find_first_bit_le) * Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset) */ ENTRY(_find_next_bit_le) - teq r1, #0 - beq 3b + cmp r2, r1 + bhs 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine ARM( ldrb r3, [r0, r2, lsr #3] )
@@ -118,8 +118,8 @@ ENTRY(_find_first_zero_bit_be) ENDPROC(_find_first_zero_bit_be) ENTRY(_find_next_zero_bit_be) - teq r1, #0 - beq 3b + cmp r2, r1 + bhs 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine eor r3, r2, #0x18 @ big endian byte ordering
@@ -152,8 +152,8 @@ ENTRY(_find_first_bit_be) ENDPROC(_find_first_bit_be) ENTRY(_find_next_bit_be) - teq r1, #0 - beq 3b + cmp r2, r1 + bhs 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine eor r3, r2, #0x18 @ big endian byte ordering
arch/arm/lib/xor-neon.c +2 -1
@@ -29,8 +29,9 @@ MODULE_LICENSE("GPL");* While older versions of GCC do not generate incorrect code, they fail to * recognize the parallel nature of these functions, and emit plain ARM code, * which is known to be slower than the optimized ARM code in asm-arm/xor.h. +* +* #warning This code requires at least version 4.6 of GCC */ -#warning This code requires at least version 4.6 of GCC#endif #pragma GCC diagnostic ignored "-Wunused-variable"
arch/arm/mach-bcm/bcm_kona_smc.c +1 -0
@@ -54,6 +54,7 @@ int __init bcm_kona_smc_init(void)return -ENODEV ; prop_val =of_get_address (node,0 , &prop_size,NULL ); +of_node_put (node);if (!prop_val)return -EINVAL ;
arch/arm/mach-omap2/display.c +1 -0
@@ -218,6 +218,7 @@ static int __init omapdss_init_fbdev(void) node =of_find_node_by_name (NULL ,"omap4_padconf_global" );if (node) omap4_dsi_mux_syscon =syscon_node_to_regmap (node); +of_node_put (node);return 0 ; }
arch/arm/mach-zynq/common.c +1 -0
@@ -84,6 +84,7 @@ static int __init zynq_get_revision(void) } zynq_devcfg_base =of_iomap (np,0 ); +of_node_put (np);if (!zynq_devcfg_base) {pr_err ("%s: Unable to map I/O memory\n" , __func__);return -1 ;
arch/arm64/boot/dts/qcom/msm8916.dtsi +2 -2
@@ -980,8 +980,8 @@ vddmx-supply = <&pm8916_l3>; vddpx-supply = <&pm8916_l7>; - qcom,state = <&wcnss_smp2p_out 0>; - qcom,state-names = "stop"; + qcom,smem-states = <&wcnss_smp2p_out 0>; + qcom,smem-state-names = "stop"; pinctrl-names = "default"; pinctrl-0 = <&wcnss_pin_a>;
arch/arm64/include/asm/processor.h +2 -1
@@ -143,8 +143,9 @@ void tls_preserve_current_state(void);static inline void start_thread_common (struct pt_regs *regs,unsigned long pc) { +s32 previous_syscall = regs->syscallno;memset (regs,0 ,sizeof (*regs)); -forget_syscall (regs); + regs->syscallno = previous_syscall; regs->pc = pc; }
arch/arm64/kernel/armv8_deprecated.c +5 -4
@@ -63,6 +63,7 @@ struct insn_emulation {static LIST_HEAD (insn_emulation);static int nr_insn_emulated__initdata ;static DEFINE_RAW_SPINLOCK (insn_emulation_lock); +static DEFINE_MUTEX (insn_emulation_mutex);static void register_emulation_hooks (struct insn_emulation_ops *ops) {
@@ -208,10 +209,10 @@ static int emulation_proc_handler(struct ctl_table *table, int write, loff_t *ppos) {int ret =0 ; -struct insn_emulation *insn = (struct insn_emulation *) table->data; + struct insn_emulation *insn = container_of(table->data, struct insn_emulation, current_mode);enum insn_emulation_mode prev_mode = insn->current_mode; - table->data = &insn->current_mode; +mutex_lock (&insn_emulation_mutex); ret =proc_dointvec_minmax (table, write, buffer, lenp, ppos);if (ret || !write || prev_mode == insn->current_mode)
@@ -224,7 +225,7 @@ static int emulation_proc_handler(struct ctl_table *table, int write,update_insn_emulation_mode (insn,INSN_UNDEF ); } ret: - table->data = insn; +mutex_unlock (&insn_emulation_mutex);return ret; }
@@ -254,7 +255,7 @@ static void __init register_insn_emulation_sysctl(struct ctl_table *table) sysctl->maxlen =sizeof (int ); sysctl->procname = insn->ops->name; - sysctl->data = insn; + sysctl->data = &insn->current_mode; sysctl->extra1 = &insn->min; sysctl->extra2 = &insn->max; sysctl->proc_handler = emulation_proc_handler;
arch/ia64/include/asm/processor.h +1 -1
@@ -552,7 +552,7 @@ ia64_get_irr(unsigned int vector) {unsigned int reg = vector /64 ;unsigned int bit = vector %64 ; -u64 irr; +unsigned long irr;switch (reg) {case 0 : irr =ia64_getreg (_IA64_REG_CR_IRR0);break ;
arch/mips/cavium-octeon/octeon-platform.c +2 -1
@@ -86,11 +86,12 @@ static void octeon2_usb_clocks_start(struct device *dev) "refclk-frequency", &clock_rate);if (i) {dev_err (dev,"No UCTL \"refclk-frequency\"\n" ); +of_node_put (uctl_node); goto exit; } i =of_property_read_string (uctl_node,"refclk-type" , &clock_type); - +of_node_put (uctl_node);if (!i &&strcmp ("crystal" , clock_type) ==0 ) is_crystal_clock = true; }
arch/mips/kernel/proc.c +1 -1
@@ -164,7 +164,7 @@ static void *c_start(struct seq_file *m, loff_t *pos) {unsigned long i = *pos; -return i <NR_CPUS ? (void *) (i +1 ) :NULL ; +return i < nr_cpu_ids ? (void *) (i +1 ) :NULL ; }static void *c_next (struct seq_file *m,void *v,loff_t *pos)
arch/mips/mm/tlbex.c +2 -2
@@ -634,7 +634,7 @@ static __maybe_unused void build_convert_pte_to_entrylo(u32 **p,return ; } -if (cpu_has_rixi && !!_PAGE_NO_EXEC) { +if (cpu_has_rixi && _PAGE_NO_EXEC !=0 ) {if (fill_includes_sw_bits) {UASM_i_ROTR (p, reg, reg,ilog2 (_PAGE_GLOBAL)); }else {
@@ -2577,7 +2577,7 @@ static void check_pabits(void)unsigned long entry;unsigned pabits, fillbits; -if (!cpu_has_rixi || !_PAGE_NO_EXEC) { +if (!cpu_has_rixi || _PAGE_NO_EXEC ==0 ) {/* * We'll only be making use of the fact that we can rotate bits * into the fill if the CPU supports RIXI, so don't bother
arch/nios2/include/asm/entry.h +2 -1
@@ -50,7 +50,8 @@ stw r13, PT_R13(sp) stw r14, PT_R14(sp) stw r15, PT_R15(sp) - stw r2, PT_ORIG_R2(sp) + movi r24, -1 + stw r24, PT_ORIG_R2(sp) stw r7, PT_ORIG_R7(sp) stw ra, PT_RA(sp)
arch/nios2/include/asm/ptrace.h +2 -0
@@ -74,6 +74,8 @@ extern void show_regs(struct pt_regs *); ((struct pt_regs *)((unsigned long )current_thread_info () +THREAD_SIZE )\ - 1) +#define force_successful_syscall_return () (current_pt_regs()->orig_r2 = -1) +int do_syscall_trace_enter (void );void do_syscall_trace_exit (void );#endif /* __ASSEMBLY__ */
arch/nios2/kernel/entry.S +15 -7
@@ -185,6 +185,7 @@ ENTRY(handle_system_call) ldw r5, PT_R5(sp) local_restart: + stw r2, PT_ORIG_R2(sp) /* Check that the requested system call is within limits */ movui r1, __NR_syscalls bgeu r2, r1, ret_invsyscall
@@ -192,7 +193,6 @@ local_restart: movhi r11, %hiadj(sys_call_table) add r1, r1, r11 ldw r1, %lo(sys_call_table)(r1) - beq r1, r0, ret_invsyscall /* Check if we are being traced */ GET_THREAD_INFO r11
@@ -213,6 +213,9 @@ local_restart: translate_rc_and_ret: movi r1, 0 bge r2, zero, 3f + ldw r1, PT_ORIG_R2(sp) + addi r1, r1, 1 + beq r1, zero, 3f sub r2, zero, r2 movi r1, 1 3:
@@ -255,9 +258,9 @@ traced_system_call: ldw r6, PT_R6(sp) ldw r7, PT_R7(sp) - /* Fetch the syscall function, we don't need to check the boundaries - * since this is already done. - */ + /* Fetch the syscall function. */ + movui r1, __NR_syscalls + bgeu r2, r1, traced_invsyscall slli r1, r2, 2 movhi r11,%hiadj(sys_call_table) add r1, r1, r11
@@ -276,6 +279,9 @@ traced_system_call: translate_rc_and_ret2: movi r1, 0 bge r2, zero, 4f + ldw r1, PT_ORIG_R2(sp) + addi r1, r1, 1 + beq r1, zero, 4f sub r2, zero, r2 movi r1, 1 4:
@@ -287,6 +293,11 @@ end_translate_rc_and_ret2: RESTORE_SWITCH_STACK br ret_from_exception + /* If the syscall number was invalid return ENOSYS */ +traced_invsyscall: + movi r2, -ENOSYS + br translate_rc_and_ret2 + Luser_return: GET_THREAD_INFO r11 /* get thread_info pointer */ ldw r10, TI_FLAGS(r11) /* get thread_info->flags */
@@ -336,9 +347,6 @@ external_interrupt: /* skip if no interrupt is pending */ beq r12, r0, ret_from_interrupt - movi r24, -1 - stw r24, PT_ORIG_R2(sp) - /* * Process an external hardware interrupt. */
arch/nios2/kernel/signal.c +2 -1
@@ -240,7 +240,7 @@ static int do_signal(struct pt_regs *regs)/* * If we were from a system call, check for system call restarting... */ -if (regs->orig_r2 >=0 ) { +if (regs->orig_r2 >=0 && regs->r1) { continue_addr = regs->ea; restart_addr = continue_addr -4 ; retval = regs->r2;
@@ -261,6 +261,7 @@ static int do_signal(struct pt_regs *regs) regs->ea = restart_addr;break ; } + regs->orig_r2 =-1 ; }if (get_signal (&ksig)) {
arch/nios2/kernel/syscall_table.c +1 -0
@@ -25,5 +25,6 @@#define __SYSCALL (nr, call) [nr] = (call),void *sys_call_table[__NR_syscalls] = { + [0 ... __NR_syscalls-1 ] = sys_ni_syscall, #include <asm/unistd.h> };
arch/parisc/kernel/drivers.c +4 -5
@@ -505,7 +505,6 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path) dev->id.hversion_rev = iodc_data[1 ] &0x0f ; dev->id.sversion = ((iodc_data[4 ] &0x0f ) <<16 ) | (iodc_data[5 ] <<8 ) | iodc_data[6 ]; - dev->hpa.name =parisc_pathname (dev); dev->hpa.start = hpa;/* This is awkward. The STI spec says that gfx devices may occupy * 32MB or 64MB. Unfortunately, we don't know how to tell whether
@@ -519,10 +518,10 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path) dev->hpa.end = hpa +0xfff ; } dev->hpa.flags =IORESOURCE_MEM ; - name =parisc_hardware_description (&dev->id); -if (name) { -strlcpy (dev->name, name,sizeof (dev->name)); - } + dev->hpa.name = dev->name; + name =parisc_hardware_description (&dev->id) ? :"unknown" ; +snprintf (dev->name,sizeof (dev->name),"%s [%s]" , + name,parisc_pathname (dev));/* Silently fail things like mouse ports which are subsumed within * the keyboard controller
arch/powerpc/kernel/pci-common.c +31 -14
82 lines not on this page · raw message
arch/powerpc/kernel/prom.c +7 -0
@@ -710,6 +710,13 @@ void __init early_init_devtree(void *params)of_scan_flat_dt (early_init_dt_scan_root,NULL );of_scan_flat_dt (early_init_dt_scan_memory_ppc,NULL ); +/* +* As generic code authors expect to be able to use static keys +* in early_param() handlers, we initialize the static keys just +* before parsing early params (it's fine to call jump_label_init() +* more than once). +*/ +jump_label_init ();parse_early_param ();/* make sure we've parsed cmdline for mem= before this */
arch/powerpc/mm/dump_linuxpagetables.c +4 -9
@@ -123,15 +123,10 @@ static const struct flag_info flag_array[] = { .set = "user", .clear = " ", }, { -#if _PAGE_RO == 0 - .mask = _PAGE_RW, - .val = _PAGE_RW, -#else - .mask = _PAGE_RO, - .val = 0, -#endif - .set = "rw", - .clear = "ro", + .mask = _PAGE_RW | _PAGE_RO, + .val = _PAGE_RO, + .set = "ro", + .clear = "rw", }, { .mask = _PAGE_EXEC, .val = _PAGE_EXEC,
arch/powerpc/platforms/cell/axon_msi.c +1 -0
@@ -230,6 +230,7 @@ static int setup_msi_msg_address(struct pci_dev *dev, struct msi_msg *msg)if (!prop) {dev_dbg (&dev->dev,"axon_msi: no msi-address-(32|64) properties found\n" ); +of_node_put (dn);return -ENOENT ; }
arch/powerpc/platforms/cell/spufs/inode.c +1 -0
@@ -684,6 +684,7 @@ spufs_init_isolated_loader(void)return ; loader =of_get_property (dn,"loader" , &size); +of_node_put (dn);if (!loader)return ;
arch/powerpc/platforms/powernv/rng.c +2 -0
@@ -63,6 +63,8 @@ int powernv_get_random_real_mode(unsigned long *v)struct powernv_rng *rng; rng =raw_cpu_read (powernv_rng); +if (!rng) +return 0 ; *v =rng_whiten (rng,__raw_rm_readq (rng->regs_real));
arch/powerpc/sysdev/fsl_pci.c +8 -0
@@ -523,6 +523,7 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary)struct resource rsrc;const int *bus_range;u8 hdr_type, progif; +u32 class_code;struct device_node *dev;struct ccsr_pci __iomem *pci;u16 temp;
@@ -596,6 +597,13 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary)PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS ;if (fsl_pcie_check_link (hose)) hose->indirect_type |=PPC_INDIRECT_TYPE_NO_PCIE_LINK ; +/* Fix Class Code to PCI_CLASS_BRIDGE_PCI_NORMAL for pre-3.0 controller */ +if (in_be32 (&pci->block_rev1) <PCIE_IP_REV_3_0 ) { +early_read_config_dword (hose,0 ,0 ,PCIE_FSL_CSR_CLASSCODE , &class_code); + class_code &=0xff ; + class_code |=PCI_CLASS_BRIDGE_PCI_NORMAL <<8 ; +early_write_config_dword (hose,0 ,0 ,PCIE_FSL_CSR_CLASSCODE , class_code); + } }else {/* * Set PBFR(PCI Bus Function Register)[10] = 1 to
arch/powerpc/sysdev/fsl_pci.h +1 -0
@@ -23,6 +23,7 @@ struct platform_device;#define PCIE_LTSSM 0x0404/* PCIE Link Training and Status */ #define PCIE_LTSSM_L0 0x16/* L0 state */ +#define PCIE_FSL_CSR_CLASSCODE 0x474/* FSL GPEX CSR */ #define PCIE_IP_REV_2_2 0x02080202/* PCIE IP block version Rev2.2 */ #define PCIE_IP_REV_3_0 0x02080300/* PCIE IP block version Rev3.0 */ #define PIWAR_EN 0x80000000/* Enable */
arch/powerpc/sysdev/xive/spapr.c +1 -0
@@ -569,6 +569,7 @@ static bool xive_get_max_prio(u8 *max_prio) } reg =of_get_property (rootdn,"ibm,plat-res-int-priorities" , &len); +of_node_put (rootdn);if (!reg) {pr_err ("Failed to read 'ibm,plat-res-int-priorities' property\n" );return false;
arch/s390/include/asm/archrandom.h +6 -3
@@ -2,7 +2,7 @@/* * Kernel interface for the s390 arch_random_* functions * -* Copyright IBM Corp. 2017, 2020 +* Copyright IBM Corp. 2017, 2022 * * Author: Harald Freudenberger <[email protected]> *
@@ -14,6 +14,7 @@#ifdef CONFIG_ARCH_RANDOM #include <linux/static_key.h> +#include <linux/preempt.h> #include <linux/atomic.h> #include <asm/cpacf.h>
@@ -32,7 +33,8 @@ static inline bool __must_check arch_get_random_int(unsigned int *v)static inline bool __must_check arch_get_random_seed_long (unsigned long *v) { -if (static_branch_likely (&s390_arch_random_available)) { +if (static_branch_likely (&s390_arch_random_available) && +in_task ()) {cpacf_trng (NULL ,0 , (u8 *)v,sizeof (*v));atomic64_add (sizeof (*v), &s390_arch_random_counter);return true;
@@ -42,7 +44,8 @@ static inline bool __must_check arch_get_random_seed_long(unsigned long *v)static inline bool __must_check arch_get_random_seed_int (unsigned int *v) { -if (static_branch_likely (&s390_arch_random_available)) { +if (static_branch_likely (&s390_arch_random_available) && +in_task ()) {cpacf_trng (NULL ,0 , (u8 *)v,sizeof (*v));atomic64_add (sizeof (*v), &s390_arch_random_counter);return true;
arch/x86/boot/Makefile +1 -1
@@ -100,7 +100,7 @@ $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE AFLAGS_header.o += -I$(objtree)/$(obj) $(obj)/header.o: $(obj)/zoffset.h -LDFLAGS_setup.elf := -m elf_i386 -T +LDFLAGS_setup.elf := -m elf_i386 -z noexecstack -T $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE $(call if_changed,ld)
arch/x86/boot/compressed/Makefile +4 -0
@@ -55,6 +55,10 @@ else LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \ && echo "-z noreloc-overflow -pie --no-dynamic-linker") endif + +LDFLAGS += -z noexecstack +LDFLAGS += $(call ld-option,--no-warn-rwx-segments) + LDFLAGS_vmlinux := -T hostprogs-y := mkpiggy
arch/x86/entry/vdso/Makefile +1 -1
@@ -183,7 +183,7 @@ quiet_cmd_vdso = VDSO $@ VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \ $(call ld-option, --build-id) $(call ld-option, --eh-frame-hdr) \ - -Bsymbolic + -Bsymbolic -z noexecstack GCOV_PROFILE := n #
arch/x86/kernel/pmem.c +6 -1
@@ -27,6 +27,11 @@ static __init int register_e820_pmem(void)* simply here to trigger the module to load on demand. */ pdev =platform_device_alloc ("e820_pmem" ,-1 ); -return platform_device_add (pdev); + + rc =platform_device_add (pdev); +if (rc) +platform_device_put (pdev); + +return rc; }device_initcall (register_e820_pmem);
arch/x86/kvm/emulate.c +11 -12
@@ -1721,16 +1721,6 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,case VCPU_SREG_TR :if (seg_desc.s || (seg_desc.type !=1 && seg_desc.type !=9 )) goto exception; -if (!seg_desc.p) { - err_vec =NP_VECTOR ; - goto exception; - } - old_desc = seg_desc; - seg_desc.type |=2 ;/* busy */ - ret = ctxt->ops->cmpxchg_emulated (ctxt, desc_addr, &old_desc, &seg_desc, -sizeof (seg_desc), &ctxt->exception); -if (ret !=X86EMUL_CONTINUE ) -return ret;break ;case VCPU_SREG_LDTR :if (seg_desc.s || seg_desc.type !=2 )
@@ -1768,8 +1758,17 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,if (ret !=X86EMUL_CONTINUE )return ret;if (emul_is_noncanonical_address (get_desc_base (&seg_desc) | - ((u64 )base3 <<32 ), ctxt)) -return emulate_gp (ctxt,0 ); + ((u64 )base3 <<32 ), ctxt)) +return emulate_gp (ctxt, err_code); + } + +if (seg ==VCPU_SREG_TR ) { + old_desc = seg_desc; + seg_desc.type |=2 ;/* busy */ + ret = ctxt->ops->cmpxchg_emulated (ctxt, desc_addr, &old_desc, &seg_desc, +sizeof (seg_desc), &ctxt->exception); +if (ret !=X86EMUL_CONTINUE ) +return ret; } load: ctxt->ops->set_segment (ctxt, selector, &seg_desc, base3, seg);
arch/x86/kvm/hyperv.c +3 -0
@@ -317,6 +317,9 @@ static int synic_set_irq(struct kvm_vcpu_hv_synic *synic, u32 sint)struct kvm_lapic_irq irq;int ret, vector; +if (KVM_BUG_ON (!lapic_in_kernel (vcpu), vcpu->kvm)) +return -EINVAL ; +if (sint >=ARRAY_SIZE (synic->sint))return -EINVAL ;
arch/x86/kvm/lapic.c +4 -0
@@ -894,6 +894,10 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src, *r =-1 ;if (irq->shorthand ==APIC_DEST_SELF ) { +if (KVM_BUG_ON (!src, kvm)) { + *r =0 ; +return true; + } *r =kvm_apic_set_irq (src->vcpu, irq, dest_map);return true; }
arch/x86/kvm/svm.c +0 -2
@@ -4611,8 +4611,6 @@ static void svm_set_irq(struct kvm_vcpu *vcpu) {struct vcpu_svm *svm =to_svm (vcpu); -BUG_ON (!(gif_set (svm))); -trace_kvm_inj_virq (vcpu->arch.interrupt.nr); ++vcpu->stat.irq_injections;
arch/x86/mm/numa.c +2 -2
@@ -826,7 +826,7 @@ void debug_cpumask_set_cpu(int cpu, int node, bool enable)return ; } mask = node_to_cpumask_map[node]; -if (!mask) { +if (!cpumask_available (mask)) {pr_err ("node_to_cpumask_map[%i] NULL\n" , node);dump_stack ();return ;
@@ -872,7 +872,7 @@ const struct cpumask *cpumask_of_node(int node)dump_stack ();return cpu_none_mask; } -if (node_to_cpumask_map[node] ==NULL ) { +if (!cpumask_available (node_to_cpumask_map[node])) {printk (KERN_WARNING "cpumask_of_node(%d): no node_to_cpumask_map!\n" , node);
arch/x86/platform/olpc/olpc-xo1-sci.c +1 -1
@@ -85,7 +85,7 @@ static void send_ebook_state(void)return ; } -if (!!test_bit (SW_TABLET_MODE , ebook_switch_idev->sw) == state) +if (test_bit (SW_TABLET_MODE , ebook_switch_idev->sw) == !!state)return ;/* Nothing new to report. */ input_report_switch (ebook_switch_idev,SW_TABLET_MODE , state);
drivers/acpi/acpi_lpss.c +3 -0
@@ -396,6 +396,9 @@ static int register_device_clock(struct acpi_device *adev,if (!lpss_clk_dev)lpt_register_clock_device (); +if (IS_ERR (lpss_clk_dev)) +return PTR_ERR (lpss_clk_dev); + clk_data =platform_get_drvdata (lpss_clk_dev);if (!clk_data)return -ENODEV ;
drivers/acpi/property.c +4 -4
@@ -132,10 +132,10 @@ static bool acpi_nondev_subnode_ok(acpi_handle scope,return acpi_nondev_subnode_data_ok (handle, link, list, parent); } -static int acpi_add_nondev_subnodes (acpi_handle scope, -const union acpi_object *links, -struct list_head *list, -struct fwnode_handle *parent) +static bool acpi_add_nondev_subnodes (acpi_handle scope, +const union acpi_object *links, +struct list_head *list, +struct fwnode_handle *parent) {bool ret = false;int i;
drivers/acpi/sleep.c +8 -0
@@ -359,6 +359,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "80E3"), }, }, + { + .callback = init_nvs_save_s3, + .ident = "Lenovo G40-45", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "80E1"), + }, + },/* * https://bugzilla.kernel.org/show_bug.cgi?id=196907 * Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power
drivers/acpi/video_detect.c +35 -20
101 lines not on this page · raw message
drivers/ata/libata-eh.c +1 -0
@@ -2374,6 +2374,7 @@ const char *ata_get_cmd_descript(u8 command) { ATA_CMD_WRITE_QUEUED_FUA_EXT, "WRITE DMA QUEUED FUA EXT" }, { ATA_CMD_FPDMA_READ, "READ FPDMA QUEUED" }, { ATA_CMD_FPDMA_WRITE, "WRITE FPDMA QUEUED" }, + { ATA_CMD_NCQ_NON_DATA, "NCQ NON-DATA" }, { ATA_CMD_FPDMA_SEND, "SEND FPDMA QUEUED" }, { ATA_CMD_FPDMA_RECV, "RECEIVE FPDMA QUEUED" }, { ATA_CMD_PIO_READ, "READ SECTOR(S)" },
drivers/atm/idt77252.c +1 -0
@@ -3768,6 +3768,7 @@ static void __exit idt77252_exit(void) card = idt77252_chain; dev = card->atmdev; idt77252_chain = card->next; +del_timer_sync (&card->tst_timer);if (dev->phy->stop) dev->phy->stop (dev);
drivers/bluetooth/hci_intel.c +5 -1
@@ -1303,7 +1303,11 @@ static struct platform_driver intel_driver = {int __init intel_init (void ) { -platform_driver_register (&intel_driver); +int err; + + err =platform_driver_register (&intel_driver); +if (err) +return err;return hci_uart_register_proto (&intel_proto); }
drivers/clk/qcom/gcc-ipq8074.c +1 -0
@@ -139,6 +139,7 @@ static struct clk_branch gcc_sleep_clk_src = { }, .num_parents = 1, .ops = &clk_branch2_ops, + .flags = CLK_IS_CRITICAL, }, }, };
drivers/fpga/altera-pr-ip-core.c +1 -1
@@ -119,7 +119,7 @@ static int alt_pr_fpga_write(struct fpga_manager *mgr, const char *buf,u32 *buffer_32 = (u32 *)buf;size_t i =0 ; -if (count <=0 ) +if (!count)return -EINVAL ;/* Write out the complete 32-bit chunks */
drivers/gpio/gpiolib-of.c +3 -1
@@ -350,7 +350,8 @@ int of_mm_gpiochip_add_data(struct device_node *np,if (mm_gc->save_regs) mm_gc->save_regs (mm_gc); - mm_gc->gc.of_node = np; +of_node_put (mm_gc->gc.of_node); + mm_gc->gc.of_node =of_node_get (np); ret =gpiochip_add_data (gc, data);if (ret)
@@ -358,6 +359,7 @@ int of_mm_gpiochip_add_data(struct device_node *np,return 0 ; err2: +of_node_put (np);iounmap (mm_gc->regs); err1:kfree (gc->label);
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +4 -0
@@ -682,6 +682,10 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,if (WARN_ON_ONCE (min_offset > max_offset))return -EINVAL ; +/* Check domain to be pinned to against preferred domains */ +if (bo->preferred_domains & domain) + domain = bo->preferred_domains & domain; +/* A shared bo cannot be migrated to VRAM */ if (bo->prime_shared_count) {if (domain &AMDGPU_GEM_DOMAIN_GTT )
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +14 -3
@@ -1213,10 +1213,21 @@ static struct i2c_driver adv7511_driver = {static int __init adv7511_init (void ) { -if (IS_ENABLED (CONFIG_DRM_MIPI_DSI )) -mipi_dsi_driver_register (&adv7533_dsi_driver); +int ret; + +if (IS_ENABLED (CONFIG_DRM_MIPI_DSI )) { + ret =mipi_dsi_driver_register (&adv7533_dsi_driver); +if (ret) +return ret; + } -return i2c_add_driver (&adv7511_driver); + ret =i2c_add_driver (&adv7511_driver); +if (ret) { +if (IS_ENABLED (CONFIG_DRM_MIPI_DSI )) +mipi_dsi_driver_unregister (&adv7533_dsi_driver); + } + +return ret; }module_init (adv7511_init);
drivers/gpu/drm/bridge/sil-sii8620.c +2 -2
@@ -628,7 +628,7 @@ static void *sii8620_burst_get_tx_buf(struct sii8620 *ctx, int len)u8 *buf = &ctx->burst.tx_buf[ctx->burst.tx_count];int size = len +2 ; -if (ctx->burst.tx_count + size >ARRAY_SIZE (ctx->burst.tx_buf)) { +if (ctx->burst.tx_count + size >=ARRAY_SIZE (ctx->burst.tx_buf)) {dev_err (ctx->dev,"TX-BLK buffer exhausted\n" ); ctx->error = -EINVAL ;return NULL ;
@@ -645,7 +645,7 @@ static u8 *sii8620_burst_get_rx_buf(struct sii8620 *ctx, int len)u8 *buf = &ctx->burst.rx_buf[ctx->burst.rx_count];int size = len +1 ; -if (ctx->burst.tx_count + size >ARRAY_SIZE (ctx->burst.tx_buf)) { +if (ctx->burst.rx_count + size >=ARRAY_SIZE (ctx->burst.rx_buf)) {dev_err (ctx->dev,"RX-BLK buffer exhausted\n" ); ctx->error = -EINVAL ;return NULL ;
drivers/gpu/drm/mediatek/mtk_dpi.c +6 -25
@@ -51,13 +51,7 @@ enum mtk_dpi_out_channel_swap { };enum mtk_dpi_out_color_format { -MTK_DPI_COLOR_FORMAT_RGB , -MTK_DPI_COLOR_FORMAT_RGB_FULL , -MTK_DPI_COLOR_FORMAT_YCBCR_444 , -MTK_DPI_COLOR_FORMAT_YCBCR_422 , -MTK_DPI_COLOR_FORMAT_XV_YCC , -MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL , -MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL +MTK_DPI_COLOR_FORMAT_RGB };struct mtk_dpi {
@@ -346,24 +340,11 @@ static void mtk_dpi_config_2n_h_fre(struct mtk_dpi *dpi)static void mtk_dpi_config_color_format (struct mtk_dpi *dpi,enum mtk_dpi_out_color_format format) { -if ((format ==MTK_DPI_COLOR_FORMAT_YCBCR_444 ) || - (format ==MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL )) { -mtk_dpi_config_yuv422_enable (dpi, false); -mtk_dpi_config_csc_enable (dpi, true); -mtk_dpi_config_swap_input (dpi, false); -mtk_dpi_config_channel_swap (dpi,MTK_DPI_OUT_CHANNEL_SWAP_BGR ); - }else if ((format ==MTK_DPI_COLOR_FORMAT_YCBCR_422 ) || - (format ==MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL )) { -mtk_dpi_config_yuv422_enable (dpi, true); -mtk_dpi_config_csc_enable (dpi, true); -mtk_dpi_config_swap_input (dpi, true); -mtk_dpi_config_channel_swap (dpi,MTK_DPI_OUT_CHANNEL_SWAP_RGB ); - }else { -mtk_dpi_config_yuv422_enable (dpi, false); -mtk_dpi_config_csc_enable (dpi, false); -mtk_dpi_config_swap_input (dpi, false); -mtk_dpi_config_channel_swap (dpi,MTK_DPI_OUT_CHANNEL_SWAP_RGB ); - } +/* only support RGB888 */ +mtk_dpi_config_yuv422_enable (dpi, false); +mtk_dpi_config_csc_enable (dpi, false); +mtk_dpi_config_swap_input (dpi, false); +mtk_dpi_config_channel_swap (dpi,MTK_DPI_OUT_CHANNEL_SWAP_RGB ); }static void mtk_dpi_power_off (struct mtk_dpi *dpi,enum mtk_dpi_power_ctl pctl)
drivers/gpu/drm/mediatek/mtk_dsi.c +2 -0
@@ -652,6 +652,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)mtk_dsi_reset_engine (dsi);mtk_dsi_lane0_ulp_mode_enter (dsi);mtk_dsi_clk_ulp_mode_enter (dsi); +/* set the lane number as 0 to pull down mipi */ +writel (0 , dsi->regs +DSI_TXRX_CTRL );mtk_dsi_disable (dsi);
drivers/gpu/drm/meson/meson_drv.c +4 -1
@@ -136,8 +136,11 @@ static bool meson_vpu_has_available_connectors(struct device *dev)for_each_endpoint_of_node (dev->of_node, ep) {/* If the endpoint node exists, consider it enabled */ remote =of_graph_get_remote_port (ep); -if (remote) +if (remote) { +of_node_put (remote); +of_node_put (ep);return true; + } }return false;
drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c +1 -1
@@ -33,7 +33,7 @@ nvbios_addr(struct nvkm_bios *bios, u32 *addr, u8 size) {u32 p = *addr; -if (*addr > bios->image0_size && bios->imaged_addr) { +if (*addr >= bios->image0_size && bios->imaged_addr) { *addr -= bios->image0_size; *addr += bios->imaged_addr; }
drivers/gpu/drm/radeon/ni_dpm.c +2 -4
@@ -2738,10 +2738,10 @@ static int ni_set_mc_special_registers(struct radeon_device *rdev, table->mc_reg_table_entry[k].mc_data[j] |=0x100 ; } j++; -if (j >SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE ) -return -EINVAL ;break ;case MC_SEQ_RESERVE_M >>2 : +if (j >=SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE ) +return -EINVAL ; temp_reg =RREG32 (MC_PMG_CMD_MRS1 ); table->mc_reg_address[j].s1 =MC_PMG_CMD_MRS1 >>2 ; table->mc_reg_address[j].s0 =MC_SEQ_PMG_CMD_MRS1_LP >>2 ;
@@ -2750,8 +2750,6 @@ static int ni_set_mc_special_registers(struct radeon_device *rdev, (temp_reg &0xffff0000 ) | (table->mc_reg_table_entry[k].mc_data[i] &0x0000ffff ); j++; -if (j >SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE ) -return -EINVAL ;break ;default :break ;
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +3 -0
@@ -1068,6 +1068,9 @@ static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc) {struct rockchip_crtc_state *rockchip_state; +if (WARN_ON (!crtc->state)) +return NULL ; + rockchip_state =kzalloc (sizeof (*rockchip_state),GFP_KERNEL );if (!rockchip_state)return NULL ;
drivers/gpu/drm/vc4/vc4_dsi.c +2 -4
@@ -846,11 +846,9 @@ static bool vc4_dsi_encoder_mode_fixup(struct drm_encoder *encoder,/* Find what divider gets us a faster clock than the requested * pixel clock. */ -for (divider =1 ; divider <8 ; divider++) { -if (parent_rate / divider < pll_clock) { - divider--; +for (divider =1 ; divider <255 ; divider++) { +if (parent_rate / (divider +1 ) < pll_clock)break ; - } }/* Now that we've picked a PLL divider, calculate back to its
drivers/hid/wacom_sys.c +1 -1
@@ -1956,7 +1956,7 @@ static int wacom_register_inputs(struct wacom *wacom) error =wacom_setup_pad_input_capabilities (pad_input_dev, wacom_wac);if (error) { -/* no pad in use on this interface */ +/* no pad events using this interface */ input_free_device (pad_input_dev); wacom_wac->pad_input =NULL ; pad_input_dev =NULL ;
drivers/hid/wacom_wac.c +25 -18
67 lines not on this page · raw message
drivers/hwtracing/intel_th/pci.c +15 -0
@@ -253,6 +253,21 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x54a6), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Raptor Lake-S CPU */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0xa76f ), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, + { +/* Raptor Lake-S */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x7a26 ), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, + { +/* Meteor Lake-P */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x7e24 ), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, {/* Rocket Lake CPU */ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4c19),
drivers/i2c/busses/i2c-cadence.c +9 -1
@@ -353,8 +353,13 @@ static void cdns_i2c_mrecv(struct cdns_i2c *id) ctrl_reg =cdns_i2c_readreg (CDNS_I2C_CR_OFFSET ); ctrl_reg |=CDNS_I2C_CR_RW |CDNS_I2C_CR_CLR_FIFO ; +/* +* Receive up to I2C_SMBUS_BLOCK_MAX data bytes, plus one message length +* byte, plus one checksum byte if PEC is enabled. p_msg->len will be 2 if +* PEC is enabled, otherwise 1. +*/ if (id->p_msg->flags &I2C_M_RECV_LEN ) - id->recv_count =I2C_SMBUS_BLOCK_MAX +1 ; + id->recv_count =I2C_SMBUS_BLOCK_MAX + id->p_msg->len; id->curr_recv_count = id->recv_count;
@@ -540,6 +545,9 @@ static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg,if (id->err_status &CDNS_I2C_IXR_ARB_LOST )return -EAGAIN ; +if (msg->flags &I2C_M_RECV_LEN ) + msg->len += min_t(unsigned int, msg->buf[0], I2C_SMBUS_BLOCK_MAX); +return 0 ; }
drivers/i2c/i2c-core-base.c +2 -1
@@ -2243,8 +2243,9 @@ void i2c_put_adapter(struct i2c_adapter *adap)if (!adap)return ; -put_device (&adap->dev);module_put (adap->owner); +/* Should be last, otherwise we risk use-after-free with 'adap' */ +put_device (&adap->dev); }EXPORT_SYMBOL (i2c_put_adapter);
drivers/i2c/muxes/i2c-mux-gpmux.c +1 -0
@@ -141,6 +141,7 @@ static int i2c_mux_probe(struct platform_device *pdev)return 0 ; err_children: +of_node_put (child);i2c_mux_del_adapters (muxc); err_parent:i2c_put_adapter (parent);
drivers/iio/light/isl29028.c +1 -1
@@ -640,7 +640,7 @@ static int isl29028_probe(struct i2c_client *client, ISL29028_POWER_OFF_DELAY_MS);pm_runtime_use_autosuspend (&client->dev); - ret =devm_iio_device_register (indio_dev->dev.parent, indio_dev); + ret =iio_device_register (indio_dev);if (ret <0 ) { dev_err(&client->dev, "%s(): iio registration failed with error %d\n",
drivers/infiniband/hw/hfi1/file_ops.c +3 -1
@@ -1327,8 +1327,10 @@ static int setup_base_ctxt(struct hfi1_filedata *fd, goto done; ret =init_user_ctxt (fd, uctxt); -if (ret) +if (ret) { +hfi1_free_ctxt_rcv_groups (uctxt); goto done; + }user_init (uctxt);
drivers/infiniband/sw/rxe/rxe_qp.c +8 -4
@@ -220,6 +220,14 @@ static void rxe_qp_init_misc(struct rxe_dev *rxe, struct rxe_qp *qp,spin_lock_init (&qp->grp_lock);spin_lock_init (&qp->state_lock); +spin_lock_init (&qp->req.task.state_lock); +spin_lock_init (&qp->resp.task.state_lock); +spin_lock_init (&qp->comp.task.state_lock); + +spin_lock_init (&qp->sq.sq_lock); +spin_lock_init (&qp->rq.producer_lock); +spin_lock_init (&qp->rq.consumer_lock); +atomic_set (&qp->ssn,0 );atomic_set (&qp->skb_out,0 ); }
@@ -267,7 +275,6 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, qp->req.opcode =-1 ; qp->comp.opcode =-1 ; -spin_lock_init (&qp->sq.sq_lock);skb_queue_head_init (&qp->req_pkts); rxe_init_task(rxe, &qp->req.task, qp,
@@ -317,9 +324,6 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, } } -spin_lock_init (&qp->rq.producer_lock); -spin_lock_init (&qp->rq.consumer_lock); -skb_queue_head_init (&qp->resp_pkts); rxe_init_task(rxe, &qp->resp.task, qp,
drivers/iommu/exynos-iommu.c +5 -1
@@ -638,7 +638,7 @@ static int __init exynos_sysmmu_probe(struct platform_device *pdev) ret =iommu_device_register (&data->iommu);if (ret) -return ret; + goto err_iommu_register;platform_set_drvdata (pdev, data);
@@ -665,6 +665,10 @@ static int __init exynos_sysmmu_probe(struct platform_device *pdev)pm_runtime_enable (dev);return 0 ; + +err_iommu_register: +iommu_device_sysfs_remove (&data->iommu); +return ret; }static int __maybe_unused exynos_sysmmu_suspend (struct device *dev)
drivers/iommu/qcom_iommu.c +5 -2
@@ -745,9 +745,12 @@ static bool qcom_iommu_has_secure_context(struct qcom_iommu_dev *qcom_iommu) {struct device_node *child; -for_each_child_of_node (qcom_iommu->dev->of_node, child) -if (of_device_is_compatible (child,"qcom,msm-iommu-v1-sec" )) +for_each_child_of_node (qcom_iommu->dev->of_node, child) { +if (of_device_is_compatible (child,"qcom,msm-iommu-v1-sec" )) { +of_node_put (child);return true; + } + }return false; }
drivers/irqchip/irq-tegra.c +5 -5
@@ -157,10 +157,10 @@ static int tegra_ictlr_suspend(void) lic->cop_iep[i] =readl_relaxed (ictlr +ICTLR_COP_IEP_CLASS );/* Disable COP interrupts */ -writel_relaxed (~0ul , ictlr +ICTLR_COP_IER_CLR ); +writel_relaxed (GENMASK (31 ,0 ), ictlr +ICTLR_COP_IER_CLR );/* Disable CPU interrupts */ -writel_relaxed (~0ul , ictlr +ICTLR_CPU_IER_CLR ); +writel_relaxed (GENMASK (31 ,0 ), ictlr +ICTLR_CPU_IER_CLR );/* Enable the wakeup sources of ictlr */ writel_relaxed (lic->ictlr_wake_mask[i], ictlr +ICTLR_CPU_IER_SET );
@@ -181,12 +181,12 @@ static void tegra_ictlr_resume(void)writel_relaxed (lic->cpu_iep[i], ictlr +ICTLR_CPU_IEP_CLASS ); -writel_relaxed (~0ul , ictlr +ICTLR_CPU_IER_CLR ); +writel_relaxed (GENMASK (31 ,0 ), ictlr +ICTLR_CPU_IER_CLR );writel_relaxed (lic->cpu_ier[i], ictlr +ICTLR_CPU_IER_SET );writel_relaxed (lic->cop_iep[i], ictlr +ICTLR_COP_IEP_CLASS ); -writel_relaxed (~0ul , ictlr +ICTLR_COP_IER_CLR ); +writel_relaxed (GENMASK (31 ,0 ), ictlr +ICTLR_COP_IER_CLR );writel_relaxed (lic->cop_ier[i], ictlr +ICTLR_COP_IER_SET ); }
@@ -321,7 +321,7 @@ static int __init tegra_ictlr_init(struct device_node *node, lic->base[i] = base;/* Disable all interrupts */ -writel_relaxed (~0UL , base +ICTLR_CPU_IER_CLR ); +writel_relaxed (GENMASK (31 ,0 ), base +ICTLR_CPU_IER_CLR );/* All interrupts target IRQ */ writel_relaxed (0 , base +ICTLR_CPU_IEP_CLASS );
drivers/macintosh/adb.c +1 -1
@@ -647,7 +647,7 @@ do_adb_query(struct adb_request *req)switch (req->data[1 ]) {case ADB_QUERY_GETDEVINFO : -if (req->nbytes <3 ) +if (req->nbytes <3 || req->data[2 ] >=16 )break ;mutex_lock (&adb_handler_mutex); req->reply[0 ] = adb_handler[req->data[2 ]].original_address;
drivers/md/dm-raid.c +2 -2
@@ -3394,7 +3394,7 @@ static void raid_status(struct dm_target *ti, status_type_t type, {struct raid_set *rs = ti->private;struct mddev *mddev = &rs->md; -struct r5conf *conf = mddev->private; +struct r5conf *conf =rs_is_raid456 (rs) ? mddev->private :NULL ;int i, max_nr_stripes = conf ? conf->max_nr_stripes :0 ;bool array_in_sync;unsigned int raid_param_cnt =1 ;/* at least 1 for chunksize */
@@ -3669,7 +3669,7 @@ static void attempt_restore_of_faulty_devices(struct raid_set *rs)memset (cleared_failed_devices,0 ,sizeof (cleared_failed_devices)); -for (i =0 ; i < mddev->raid_disks; i++) { +for (i =0 ; i < rs->raid_disks; i++) { r = &rs->dev[i].rdev;/* HM FIXME: enhance journal device recovery processing */ if (test_bit (Journal, &r->flags))
drivers/md/dm.c +5 -0
@@ -2859,6 +2859,11 @@ static int dm_call_pr(struct block_device *bdev, iterate_devices_callout_fn fn, goto out; ti =dm_table_get_target (table,0 ); +if (dm_suspended_md (md)) { + ret = -EAGAIN ; + goto out; + } + ret = -EINVAL ;if (!ti->type->iterate_devices) goto out;
drivers/md/raid10.c +4 -1
@@ -1831,9 +1831,12 @@ static int raid10_remove_disk(struct mddev *mddev, struct md_rdev *rdev)int err =0 ;int number = rdev->raid_disk;struct md_rdev **rdevp; -struct raid10_info *p = conf->mirrors + number; +struct raid10_info *p;print_conf (conf); +if (unlikely (number >= mddev->raid_disks)) +return 0 ; + p = conf->mirrors + number;if (rdev == p->rdev) rdevp = &p->rdev;else if (rdev == p->replacement)
drivers/md/raid5.c +1 -1
@@ -2668,10 +2668,10 @@ static void raid5_end_write_request(struct bio *bi)if (!test_and_clear_bit (R5_DOUBLE_LOCKED , &sh->dev[i].flags))clear_bit (R5_LOCKED , &sh->dev[i].flags);set_bit (STRIPE_HANDLE , &sh->state); -raid5_release_stripe (sh);if (sh->batch_head && sh != sh->batch_head)raid5_release_stripe (sh->batch_head); +raid5_release_stripe (sh); }static void raid5_error (struct mddev *mddev,struct md_rdev *rdev)
drivers/media/platform/mtk-mdp/mtk_mdp_ipi.h +2 -0
@@ -48,12 +48,14 @@ struct mdp_ipi_init {* @ipi_id : IPI_MDP * @ap_inst : AP mtk_mdp_vpu address * @vpu_inst_addr : VPU MDP instance address +* @padding : Alignment padding */ struct mdp_ipi_comm {uint32_t msg_id;uint32_t ipi_id;uint64_t ap_inst;uint32_t vpu_inst_addr; +uint32_t padding; };/**
drivers/media/usb/hdpvr/hdpvr-video.c +1 -1
@@ -413,7 +413,7 @@ static ssize_t hdpvr_read(struct file *file, char __user *buffer, size_t count,struct hdpvr_device *dev =video_drvdata (file);struct hdpvr_buffer *buf =NULL ;struct urb *urb; -unsigned int ret =0 ; +int ret =0 ;int rem, cnt;if (*pos)
drivers/memstick/core/ms_block.c +6 -5
@@ -1338,16 +1338,16 @@ static int msb_ftl_initialize(struct msb_data *msb) msb->zone_count = msb->block_count /MS_BLOCKS_IN_ZONE ; msb->logical_block_count = msb->zone_count *496 -2 ; - msb->used_blocks_bitmap =kzalloc (msb->block_count /8 ,GFP_KERNEL ); - msb->erased_blocks_bitmap =kzalloc (msb->block_count /8 ,GFP_KERNEL ); + msb->used_blocks_bitmap =bitmap_zalloc (msb->block_count,GFP_KERNEL ); + msb->erased_blocks_bitmap =bitmap_zalloc (msb->block_count,GFP_KERNEL ); msb->lba_to_pba_table =kmalloc (msb->logical_block_count *sizeof (u16),GFP_KERNEL );if (!msb->used_blocks_bitmap || !msb->lba_to_pba_table || !msb->erased_blocks_bitmap) { -kfree (msb->used_blocks_bitmap); +bitmap_free (msb->used_blocks_bitmap); +bitmap_free (msb->erased_blocks_bitmap);kfree (msb->lba_to_pba_table); -kfree (msb->erased_blocks_bitmap);return -ENOMEM ; }
@@ -1960,7 +1960,8 @@ static int msb_bd_open(struct block_device *bdev, fmode_t mode)static void msb_data_clear (struct msb_data *msb) {kfree (msb->boot_page); -kfree (msb->used_blocks_bitmap); +bitmap_free (msb->used_blocks_bitmap); +bitmap_free (msb->erased_blocks_bitmap);kfree (msb->lba_to_pba_table);kfree (msb->cache); msb->card =NULL ;
drivers/mfd/rtsx_pcr.c +5 -1
@@ -1223,7 +1223,7 @@ static int rtsx_pci_probe(struct pci_dev *pcidev, pcr->remap_addr =ioremap_nocache (base, len);if (!pcr->remap_addr) { ret = -ENOMEM ; - goto free_handle; + goto free_idr; } pcr->rtsx_resv_buf = dma_alloc_coherent(&(pcidev->dev),
@@ -1285,6 +1285,10 @@ static int rtsx_pci_probe(struct pci_dev *pcidev, pcr->rtsx_resv_buf, pcr->rtsx_resv_buf_addr); unmap:iounmap (pcr->remap_addr); +free_idr: +spin_lock (&rtsx_pci_lock); +idr_remove (&rtsx_pci_idr, pcr->id); +spin_unlock (&rtsx_pci_lock); free_handle:kfree (handle); free_pcr:
drivers/mfd/t7l66xb.c +1 -5
@@ -412,11 +412,8 @@ static int t7l66xb_probe(struct platform_device *dev)static int t7l66xb_remove (struct platform_device *dev) { -struct t7l66xb_platform_data *pdata =dev_get_platdata (&dev->dev);struct t7l66xb *t7l66xb =platform_get_drvdata (dev); -int ret; - ret = pdata->disable (dev);clk_disable_unprepare (t7l66xb->clk48m);clk_put (t7l66xb->clk48m);clk_disable_unprepare (t7l66xb->clk32k);
@@ -427,8 +424,7 @@ static int t7l66xb_remove(struct platform_device *dev)mfd_remove_devices (&dev->dev);kfree (t7l66xb); -return ret; - +return 0 ; }static struct platform_driver t7l66xb_platform_driver = {
drivers/misc/cxl/irq.c +1 -0
@@ -353,6 +353,7 @@ int afu_allocate_irqs(struct cxl_context *ctx, u32 count) out: cxl_ops->release_irq_ranges (&ctx->irqs, ctx->afu->adapter); +bitmap_free (ctx->irq_bitmap);afu_irq_name_free (ctx);return -ENOMEM ; }
drivers/mmc/host/cavium-octeon.c +1 -0
@@ -288,6 +288,7 @@ static int octeon_mmc_probe(struct platform_device *pdev)if (ret) {dev_err (&pdev->dev,"Error populating slots\n" );octeon_mmc_set_shared_power (host,0 ); +of_node_put (cn); goto error; } i++;
drivers/mmc/host/cavium-thunderx.c +3 -1
@@ -138,8 +138,10 @@ static int thunder_mmc_probe(struct pci_dev *pdev,continue ; ret =cvm_mmc_of_slot_probe (&host->slot_pdev[i]->dev, host); -if (ret) +if (ret) { +of_node_put (child_node); goto error; + } } i++; }
drivers/mmc/host/sdhci-of-at91.c +7 -2
@@ -116,8 +116,13 @@ static void sdhci_at91_set_power(struct sdhci_host *host, unsigned char mode,void sdhci_at91_set_uhs_signaling (struct sdhci_host *host,unsigned int timing) { -if (timing ==MMC_TIMING_MMC_DDR52 ) -sdhci_writeb (host,SDMMC_MC1R_DDR ,SDMMC_MC1R ); +u8 mc1r; + +if (timing ==MMC_TIMING_MMC_DDR52 ) { + mc1r =sdhci_readb (host,SDMMC_MC1R ); + mc1r |=SDMMC_MC1R_DDR ; +sdhci_writeb (host, mc1r,SDMMC_MC1R ); + }sdhci_set_uhs_signaling (host, timing); }
drivers/mmc/host/sdhci-of-esdhc.c +1 -0
@@ -671,6 +671,7 @@ static int esdhc_signal_voltage_switch(struct mmc_host *mmc, scfg_node =of_find_matching_node (NULL , scfg_device_ids);if (scfg_node) scfg_base =of_iomap (scfg_node,0 ); +of_node_put (scfg_node);if (scfg_base) { sdhciovselcr =SDHCIOVSELCR_TGLEN |SDHCIOVSELCR_VSELVAL ;
drivers/mtd/devices/st_spi_fsm.c +5 -3
@@ -2125,10 +2125,12 @@ static int stfsm_probe(struct platform_device *pdev) (long long )fsm->mtd.size, (long long )(fsm->mtd.size >>20 ), fsm->mtd.erasesize, (fsm->mtd.erasesize >> 10)); -return mtd_device_register (&fsm->mtd,NULL ,0 ); - + ret =mtd_device_register (&fsm->mtd,NULL ,0 ); +if (ret) { err_clk_unprepare: -clk_disable_unprepare (fsm->clk); +clk_disable_unprepare (fsm->clk); + } +return ret; }
drivers/mtd/maps/physmap_of_versatile.c +2 -0
@@ -107,6 +107,7 @@ static int ap_flash_init(struct platform_device *pdev)return -ENODEV ; } ebi_base =of_iomap (ebi,0 ); +of_node_put (ebi);if (!ebi_base)return -ENODEV ;
@@ -221,6 +222,7 @@ int of_flash_probe_versatile(struct platform_device *pdev, versatile_flashprot = (enum versatile_flashprot )devid->data; rmap =syscon_node_to_regmap (sysnp); +of_node_put (sysnp);if (IS_ERR (rmap))return PTR_ERR (rmap);
drivers/mtd/sm_ftl.c +1 -1
@@ -1109,9 +1109,9 @@ static void sm_release(struct mtd_blktrans_dev *dev) {struct sm_ftl *ftl = dev->priv; -mutex_lock (&ftl->mutex);del_timer_sync (&ftl->timer);cancel_work_sync (&ftl->flush_work); +mutex_lock (&ftl->mutex);sm_cache_flush (ftl);mutex_unlock (&ftl->mutex); }
drivers/net/can/pch_can.c +4 -4
@@ -500,6 +500,7 @@ static void pch_can_error(struct net_device *ndev, u32 status)if (!skb)return ; + errc =ioread32 (&priv->regs->errc);if (status &PCH_BUS_OFF ) {pch_can_set_tx_all (priv,0 );pch_can_set_rx_all (priv,0 );
@@ -507,9 +508,11 @@ static void pch_can_error(struct net_device *ndev, u32 status) cf->can_id |=CAN_ERR_BUSOFF ; priv->can.can_stats.bus_off++;can_bus_off (ndev); + }else { + cf->data[6 ] = errc &PCH_TEC ; + cf->data[7 ] = (errc &PCH_REC ) >>8 ; } - errc =ioread32 (&priv->regs->errc);/* Warning interrupt. */ if (status &PCH_EWARN ) { state =CAN_STATE_ERROR_WARNING ;
@@ -567,9 +570,6 @@ static void pch_can_error(struct net_device *ndev, u32 status)break ; } - cf->data[6 ] = errc &PCH_TEC ; - cf->data[7 ] = (errc &PCH_REC ) >>8 ; - priv->can.state = state;netif_receive_skb (skb);
drivers/net/can/rcar/rcar_can.c +4 -4
@@ -233,11 +233,8 @@ static void rcar_can_error(struct net_device *ndev)if (eifr & (RCAR_CAN_EIFR_EWIF |RCAR_CAN_EIFR_EPIF )) { txerr =readb (&priv->regs->tecr); rxerr =readb (&priv->regs->recr); -if (skb) { +if (skb) cf->can_id |=CAN_ERR_CRTL ; - cf->data[6 ] = txerr; - cf->data[7 ] = rxerr; - } }if (eifr &RCAR_CAN_EIFR_BEIF ) {int rx_errors =0 , tx_errors =0 ;
@@ -337,6 +334,9 @@ static void rcar_can_error(struct net_device *ndev)can_bus_off (ndev);if (skb) cf->can_id |=CAN_ERR_BUSOFF ; + }else if (skb) { + cf->data[6 ] = txerr; + cf->data[7 ] = rxerr; }if (eifr &RCAR_CAN_EIFR_ORIF ) {netdev_dbg (priv->ndev,"Receive overrun error interrupt\n" );
drivers/net/can/sja1000/sja1000.c +4 -3
@@ -405,9 +405,6 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status) txerr = priv->read_reg (priv,SJA1000_TXERR ); rxerr = priv->read_reg (priv,SJA1000_RXERR ); - cf->data[6 ] = txerr; - cf->data[7 ] = rxerr; -if (isrc &IRQ_DOI ) {/* data overrun interrupt */ netdev_dbg (dev,"data overrun interrupt\n" );
@@ -429,6 +426,10 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)else state =CAN_STATE_ERROR_ACTIVE ; } +if (state !=CAN_STATE_BUS_OFF ) { + cf->data[6 ] = txerr; + cf->data[7 ] = rxerr; + }if (isrc &IRQ_BEI ) {/* bus error interrupt */ priv->can.can_stats.bus_error++;
drivers/net/can/spi/hi311x.c +3 -2
@@ -688,8 +688,6 @@ static irqreturn_t hi3110_can_ist(int irq, void *dev_id) txerr =hi3110_read (spi,HI3110_READ_TEC ); rxerr =hi3110_read (spi,HI3110_READ_REC ); - cf->data[6 ] = txerr; - cf->data[7 ] = rxerr; tx_state = txerr >= rxerr ? new_state :0 ; rx_state = txerr <= rxerr ? new_state :0 ;can_change_state (net, cf, tx_state, rx_state);
@@ -702,6 +700,9 @@ static irqreturn_t hi3110_can_ist(int irq, void *dev_id)hi3110_hw_sleep (spi);break ; } + }else { + cf->data[6 ] = txerr; + cf->data[7 ] = rxerr; } }
drivers/net/can/sun4i_can.c +4 -5
@@ -525,11 +525,6 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status) rxerr = (errc >>16 ) &0xFF ; txerr = errc &0xFF ; -if (skb) { - cf->data[6 ] = txerr; - cf->data[7 ] = rxerr; - } -if (isrc &SUN4I_INT_DATA_OR ) {/* data overrun interrupt */ netdev_dbg (dev,"data overrun interrupt\n" );
@@ -560,6 +555,10 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status)else state =CAN_STATE_ERROR_ACTIVE ; } +if (skb && state !=CAN_STATE_BUS_OFF ) { + cf->data[6 ] = txerr; + cf->data[7 ] = rxerr; + }if (isrc &SUN4I_INT_BUS_ERR ) {/* bus error interrupt */ netdev_dbg (dev,"bus error interrupt\n" );
drivers/net/can/usb/ems_usb.c +1 -1
@@ -206,7 +206,7 @@ struct __packed ems_cpc_msg {__le32 ts_sec;/* timestamp in seconds */ __le32 ts_nsec;/* timestamp in nano seconds */ -union { +union __packed {u8 generic[64 ];struct cpc_can_msg can_msg;struct cpc_can_params can_params;
drivers/net/can/usb/usb_8dev.c +4 -3
@@ -453,9 +453,10 @@ static void usb_8dev_rx_err_msg(struct usb_8dev_priv *priv,if (rx_errors) stats->rx_errors++; - - cf->data[6 ] = txerr; - cf->data[7 ] = rxerr; +if (priv->can.state !=CAN_STATE_BUS_OFF ) { + cf->data[6 ] = txerr; + cf->data[7 ] = rxerr; + } priv->bec.txerr = txerr; priv->bec.rxerr = rxerr;
drivers/net/ethernet/freescale/fec_ptp.c +1 -5
@@ -155,11 +155,7 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)* NSEC_PER_SEC - ts.tv_nsec. Add the remaining nanoseconds * to current timer would be next second. */ - tempval =readl (fep->hwp +FEC_ATIME_CTRL ); - tempval |=FEC_T_CTRL_CAPTURE ; -writel (tempval, fep->hwp +FEC_ATIME_CTRL ); - - tempval =readl (fep->hwp +FEC_ATIME ); + tempval = fep->cc.read (&fep->cc);/* Convert the ptp local counter to 1588 timestamp */ ns =timecounter_cyc2time (&fep->tc, tempval); ts =ns_to_timespec64 (ns);
drivers/net/ethernet/intel/i40e/i40e_main.c +3 -1
@@ -405,7 +405,9 @@ static void i40e_tx_timeout(struct net_device *netdev)set_bit (__I40E_GLOBAL_RESET_REQUESTED, pf->state);break ;default : -netdev_err (netdev,"tx_timeout recovery unsuccessful\n" ); +netdev_err (netdev,"tx_timeout recovery unsuccessful, device is in non-recoverable state.\n" ); +set_bit (__I40E_DOWN_REQUESTED, pf->state); +set_bit (__I40E_VSI_DOWN_REQUESTED, vsi->state);break ; }
drivers/net/ethernet/intel/igb/igb.h +2 -0
@@ -599,6 +599,8 @@ struct igb_adapter {struct igb_mac_addr *mac_table;struct vf_mac_filter vf_macs;struct vf_mac_filter *vf_mac_list; +/* lock for VF resources */ +spinlock_t vfs_lock; };/* flags controlling PTP/1588 function */
drivers/net/ethernet/intel/igb/igb_main.c +11 -1
@@ -2805,6 +2805,7 @@ static int igb_disable_sriov(struct pci_dev *pdev)struct net_device *netdev =pci_get_drvdata (pdev);struct igb_adapter *adapter =netdev_priv (netdev);struct e1000_hw *hw = &adapter->hw; +unsigned long flags;/* reclaim resources allocated to VFs */ if (adapter->vf_data) {
@@ -2817,12 +2818,13 @@ static int igb_disable_sriov(struct pci_dev *pdev)pci_disable_sriov (pdev);msleep (500 ); } - +spin_lock_irqsave (&adapter->vfs_lock, flags);kfree (adapter->vf_mac_list); adapter->vf_mac_list =NULL ;kfree (adapter->vf_data); adapter->vf_data =NULL ; adapter->vfs_allocated_count =0 ; +spin_unlock_irqrestore (&adapter->vfs_lock, flags);wr32 (E1000_IOVCTL ,E1000_IOVCTL_REUSE_VFQ );wrfl ();msleep (100 );
@@ -2984,7 +2986,9 @@ static void igb_remove(struct pci_dev *pdev)igb_release_hw_control (adapter);#ifdef CONFIG_PCI_IOV +rtnl_lock ();igb_disable_sriov (pdev); +rtnl_unlock ();#endif unregister_netdev (netdev);
@@ -3137,6 +3141,9 @@ static int igb_sw_init(struct igb_adapter *adapter)spin_lock_init (&adapter->nfc_lock);spin_lock_init (&adapter->stats64_lock); + +/* init spinlock to avoid concurrency of VF resources */ +spin_lock_init (&adapter->vfs_lock);#ifdef CONFIG_PCI_IOV switch (hw->mac.type) {case e1000_82576:
@@ -6776,8 +6783,10 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf)static void igb_msg_task (struct igb_adapter *adapter) {struct e1000_hw *hw = &adapter->hw; +unsigned long flags;u32 vf; +spin_lock_irqsave (&adapter->vfs_lock, flags);for (vf =0 ; vf < adapter->vfs_allocated_count; vf++) {/* process any reset requests */ if (!igb_check_for_rst (hw, vf))
@@ -6791,6 +6800,7 @@ static void igb_msg_task(struct igb_adapter *adapter)if (!igb_check_for_ack (hw, vf))igb_rcv_ack_from_vf (adapter, vf); } +spin_unlock_irqrestore (&adapter->vfs_lock, flags); }/**
drivers/net/geneve.c +1 -2
@@ -795,8 +795,7 @@ static struct dst_entry *geneve_get_v6_dst(struct sk_buff *skb, use_cache = false; } - fl6->flowlabel =ip6_make_flowinfo (RT_TOS (prio), - info->key.label); + fl6->flowlabel =ip6_make_flowinfo (prio, info->key.label); dst_cache = (struct dst_cache *)&info->dst_cache;if (use_cache) { dst =dst_cache_get_ip6 (dst_cache, &fl6->saddr);
drivers/net/sungem_phy.c +1 -0
@@ -453,6 +453,7 @@ static int bcm5421_init(struct mii_phy* phy)int can_low_power =1 ;if (np ==NULL ||of_get_property (np,"no-autolowpower" ,NULL )) can_low_power =0 ; +of_node_put (np);if (can_low_power) {/* Enable automatic low-power */ sungem_phy_write (phy,0x1c ,0x9002 );
drivers/net/usb/ax88179_178a.c +8 -8
@@ -1707,7 +1707,7 @@ static const struct driver_info ax88179_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1720,7 +1720,7 @@ static const struct driver_info ax88178a_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1733,7 +1733,7 @@ static const struct driver_info cypress_GX3_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1746,7 +1746,7 @@ static const struct driver_info dlink_dub1312_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1759,7 +1759,7 @@ static const struct driver_info sitecom_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1772,7 +1772,7 @@ static const struct driver_info samsung_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1785,7 +1785,7 @@ static const struct driver_info lenovo_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1798,7 +1798,7 @@ static const struct driver_info belkin_info = { .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
drivers/net/usb/usbnet.c +2 -6
@@ -847,13 +847,11 @@ int usbnet_stop (struct net_device *net) mpn = !test_and_clear_bit (EVENT_NO_RUNTIME_PM , &dev->flags); -/* deferred work (task, timer, softirq) must also stop. -* can't flush_scheduled_work() until we drop rtnl (later), -* else workers could deadlock; so make workers a NOP. -*/ +/* deferred work (timer, softirq, task) must also stop */ dev->flags =0 ;del_timer_sync (&dev->delay);tasklet_kill (&dev->bh); +cancel_work_sync (&dev->kevent);if (!pm)usb_autopm_put_interface (dev->intf);
@@ -1616,8 +1614,6 @@ void usbnet_disconnect (struct usb_interface *intf) net = dev->net;unregister_netdev (net); -cancel_work_sync (&dev->kevent); -usb_scuttle_anchored_urbs (&dev->deferred);if (dev->driver_info->unbind)
drivers/net/wireless/ath/ath9k/htc.h +5 -5
@@ -325,11 +325,11 @@ static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb) }#ifdef CONFIG_ATH9K_HTC_DEBUGFS - -#define TX_STAT_INC (c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) -#define TX_STAT_ADD (c, a) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a) -#define RX_STAT_INC (c) (hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c++) -#define RX_STAT_ADD (c, a) (hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c += a) +#define __STAT_SAFE (expr) (hif_dev->htc_handle->drv_priv ? (expr) : 0) +#define TX_STAT_INC (c) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) +#define TX_STAT_ADD (c, a) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a) +#define RX_STAT_INC (c) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c++) +#define RX_STAT_ADD (c, a) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c += a)#define CAB_STAT_INC priv->debug.tx_stats.cab_queued++#define TX_QSTAT_INC (q) (priv->debug.tx_stats.queue_stats[q]++)
drivers/net/wireless/ath/ath9k/htc_drv_init.c +2 -1
@@ -946,7 +946,6 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev, priv->hw = hw; priv->htc = htc_handle; priv->dev = dev; - htc_handle->drv_priv = priv;SET_IEEE80211_DEV (hw, priv->dev); ret =ath9k_htc_wait_for_target (priv);
@@ -967,6 +966,8 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,if (ret) goto err_init; + htc_handle->drv_priv = priv; +return 0 ; err_init:
drivers/net/wireless/ath/wil6210/debugfs.c +6 -12
@@ -834,20 +834,14 @@ static ssize_t wil_write_file_wmi(struct file *file, const char __user *buf,void *cmd;int cmdlen = len -sizeof (struct wmi_cmd_hdr );u16 cmdid; -int rc, rc1; +int rc1; -if (cmdlen <0 ) +if (cmdlen <0 || *ppos !=0 )return -EINVAL ; - wmi =kmalloc (len,GFP_KERNEL ); -if (!wmi) -return -ENOMEM ; - - rc =simple_write_to_buffer (wmi, len, ppos, buf, len); -if (rc <0 ) { -kfree (wmi); -return rc; - } + wmi =memdup_user (buf, len); +if (IS_ERR (wmi)) +return PTR_ERR (wmi); cmd = (cmdlen >0 ) ? &wmi[1 ] :NULL ; cmdid =le16_to_cpu (wmi->command_id);
@@ -857,7 +851,7 @@ static ssize_t wil_write_file_wmi(struct file *file, const char __user *buf,wil_info (wil,"0x%04x[%d] -> %d\n" , cmdid, cmdlen, rc1); -return rc; +return len; }static const struct file_operations fops_wmi = {
drivers/net/wireless/intel/iwlegacy/4965-rs.c +4 -1
@@ -2424,7 +2424,7 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,/* Repeat initial/next rate. * For legacy IL_NUMBER_TRY == 1, this loop will not execute. * For HT IL_HT_NUMBER_TRY == 3, this executes twice. */ -while (repeat_rate >0 && idx <LINK_QUAL_MAX_RETRY_NUM ) { +while (repeat_rate >0 ) {if (is_legacy (tbl_type.lq_type)) {if (ant_toggle_cnt <NUM_TRY_BEFORE_ANT_TOGGLE ) ant_toggle_cnt++;
@@ -2443,6 +2443,8 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,cpu_to_le32 (new_rate); repeat_rate--; idx++; +if (idx >=LINK_QUAL_MAX_RETRY_NUM ) + goto out; } il4965_rs_get_tbl_info_from_mcs(new_rate, lq_sta->band,
@@ -2487,6 +2489,7 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta, repeat_rate--; } +out: lq_cmd->agg_params.agg_frame_cnt_limit =LINK_QUAL_AGG_FRAME_LIMIT_DEF ; lq_cmd->agg_params.agg_dis_start_th =LINK_QUAL_AGG_DISABLE_START_DEF ;
drivers/net/wireless/intersil/p54/main.c +1 -1
@@ -688,7 +688,7 @@ static void p54_flush(struct ieee80211_hw *dev, struct ieee80211_vif *vif,* queues have already been stopped and no new frames can sneak * up from behind. */ -while ((total =p54_flush_count (priv) && i--)) { +while ((total =p54_flush_count (priv)) && i--) {/* waste time */ msleep (20 ); }
drivers/net/wireless/intersil/p54/p54spi.c +2 -1
@@ -177,7 +177,7 @@ static int p54spi_request_firmware(struct ieee80211_hw *dev) ret =p54_parse_firmware (dev, priv->firmware);if (ret) { -release_firmware (priv->firmware); +/* the firmware is released by the caller */ return ret; }
@@ -672,6 +672,7 @@ static int p54spi_probe(struct spi_device *spi)return 0 ; err_free_common: +release_firmware (priv->firmware);free_irq (gpio_to_irq (p54spi_gpio_irq), spi); err_free_gpio_irq:gpio_free (p54spi_gpio_irq);
drivers/net/wireless/marvell/libertas/if_usb.c +1 -0
@@ -283,6 +283,7 @@ static int if_usb_probe(struct usb_interface *intf,return 0 ; err_get_fw: +usb_put_dev (udev);lbs_remove_card (priv); err_add_card:if_usb_reset_device (cardp);
drivers/net/wireless/mediatek/mt7601u/usb.c +1 -0
@@ -34,6 +34,7 @@ static const struct usb_device_id mt7601u_device_table[] = { { USB_DEVICE(0x2717, 0x4106) }, { USB_DEVICE(0x2955, 0x0001) }, { USB_DEVICE(0x2955, 0x1001) }, + { USB_DEVICE(0x2955, 0x1003) }, { USB_DEVICE(0x2a5f, 0x1000) }, { USB_DEVICE(0x7392, 0x7710) }, { 0, }
drivers/pci/quirks.c +3 -0
@@ -4760,6 +4760,9 @@ static const struct pci_dev_acs_enabled { { PCI_VENDOR_ID_AMPERE, 0xE00C, pci_quirk_xgene_acs },/* Broadcom multi-function device */ { PCI_VENDOR_ID_BROADCOM, 0x16D7, pci_quirk_mf_endpoint_acs }, + { PCI_VENDOR_ID_BROADCOM, 0x1750, pci_quirk_mf_endpoint_acs }, + { PCI_VENDOR_ID_BROADCOM, 0x1751, pci_quirk_mf_endpoint_acs }, + { PCI_VENDOR_ID_BROADCOM, 0x1752, pci_quirk_mf_endpoint_acs }, { PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs }, { 0 } };
drivers/pinctrl/nomadik/pinctrl-nomadik.c +3 -1
@@ -1455,8 +1455,10 @@ static int nmk_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, has_config =nmk_pinctrl_dt_get_config (np, &configs); np_config =of_parse_phandle (np,"ste,config" ,0 ); -if (np_config) +if (np_config) { has_config |=nmk_pinctrl_dt_get_config (np_config, &configs); +of_node_put (np_config); + }if (has_config) {const char *gpio_name;const char *pin;
drivers/pinctrl/qcom/pinctrl-msm8916.c +2 -2
@@ -852,8 +852,8 @@ static const struct msm_pingroup msm8916_groups[] = {PINGROUP (28 , pwr_modem_enabled_a,NA ,NA ,NA ,NA ,NA , qdss_tracedata_b,NA , atest_combodac),PINGROUP (29 , cci_i2c,NA ,NA ,NA ,NA ,NA , qdss_tracedata_b,NA , atest_combodac),PINGROUP (30 , cci_i2c,NA ,NA ,NA ,NA ,NA ,NA ,NA , qdss_tracedata_b), -PINGROUP (31 , cci_timer0,NA ,NA ,NA ,NA ,NA ,NA ,NA ,NA ), -PINGROUP (32 , cci_timer1,NA ,NA ,NA ,NA ,NA ,NA ,NA ,NA ), +PINGROUP (31 , cci_timer0, flash_strobe,NA ,NA ,NA ,NA ,NA ,NA ,NA ), +PINGROUP (32 , cci_timer1, flash_strobe,NA ,NA ,NA ,NA ,NA ,NA ,NA ),PINGROUP (33 , cci_async,NA ,NA ,NA ,NA ,NA ,NA ,NA , qdss_tracedata_b),PINGROUP (34 , pwr_nav_enabled_a,NA ,NA ,NA ,NA ,NA ,NA ,NA , qdss_tracedata_b), PINGROUP(35, pwr_crypto_enabled_a, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_b),
drivers/platform/olpc/olpc-ec.c +1 -1
@@ -170,7 +170,7 @@ static ssize_t ec_dbgfs_cmd_write(struct file *file, const char __user *buf,int i, m;unsigned char ec_cmd[EC_MAX_CMD_ARGS ];unsigned int ec_cmd_int[EC_MAX_CMD_ARGS ]; -char cmdbuf[64 ]; +char cmdbuf[64 ] ="" ;int ec_cmd_bytes;mutex_lock (&ec_dbgfs_lock);
drivers/regulator/of_regulator.c +5 -1
@@ -158,8 +158,12 @@ static void of_get_regulation_constraints(struct device_node *np, } suspend_np =of_get_child_by_name (np, regulator_states[i]); -if (!suspend_np || !suspend_state) +if (!suspend_np)continue ; +if (!suspend_state) { +of_node_put (suspend_np); +continue ; + }if (!of_property_read_u32 (suspend_np,"regulator-mode" , &pval)) {
drivers/remoteproc/qcom_wcnss.c +8 -2
@@ -418,6 +418,7 @@ static int wcnss_request_irq(struct qcom_wcnss *wcnss, irq_handler_t thread_fn) {int ret; +int irq_number; ret =platform_get_irq_byname (pdev, name);if (ret <0 && optional) {
@@ -428,14 +429,19 @@ static int wcnss_request_irq(struct qcom_wcnss *wcnss,return ret; } + irq_number = ret; + ret =devm_request_threaded_irq (&pdev->dev, ret,NULL , thread_fn,IRQF_TRIGGER_RISING |IRQF_ONESHOT ,"wcnss" , wcnss); -if (ret) +if (ret) {dev_err (&pdev->dev,"request %s IRQ failed\n" , name); +return ret; + } -return ret; +/* Return the IRQ number if the IRQ was successfully acquired */ +return irq_number; }static int wcnss_alloc_memory_region (struct qcom_wcnss *wcnss)
drivers/s390/char/zcore.c +10 -1
@@ -53,6 +53,7 @@ static struct dentry *zcore_reipl_file;static struct dentry *zcore_hsa_file;static struct ipl_parameter_block *ipl_block; +static DEFINE_MUTEX (hsa_buf_mutex);static char hsa_buf[PAGE_SIZE ]__aligned(PAGE_SIZE) ;/*
@@ -69,19 +70,24 @@ int memcpy_hsa_user(void __user *dest, unsigned long src, size_t count)if (!hsa_available)return -ENODATA ; +mutex_lock (&hsa_buf_mutex);while (count) {if (sclp_sdias_copy (hsa_buf, src /PAGE_SIZE +2 ,1 )) {TRACE ("sclp_sdias_copy() failed\n" ); +mutex_unlock (&hsa_buf_mutex);return -EIO ; } offset = src %PAGE_SIZE ; bytes =min (PAGE_SIZE - offset, count); -if (copy_to_user (dest, hsa_buf + offset, bytes)) +if (copy_to_user (dest, hsa_buf + offset, bytes)) { +mutex_unlock (&hsa_buf_mutex);return -EFAULT ; + } src += bytes; dest += bytes; count -= bytes; } +mutex_unlock (&hsa_buf_mutex);return 0 ; }
@@ -99,9 +105,11 @@ int memcpy_hsa_kernel(void *dest, unsigned long src, size_t count)if (!hsa_available)return -ENODATA ; +mutex_lock (&hsa_buf_mutex);while (count) {if (sclp_sdias_copy (hsa_buf, src /PAGE_SIZE +2 ,1 )) {TRACE ("sclp_sdias_copy() failed\n" ); +mutex_unlock (&hsa_buf_mutex);return -EIO ; } offset = src %PAGE_SIZE ;
@@ -111,6 +119,7 @@ int memcpy_hsa_kernel(void *dest, unsigned long src, size_t count) dest += bytes; count -= bytes; } +mutex_unlock (&hsa_buf_mutex);return 0 ; }
drivers/s390/cio/vfio_ccw_drv.c +3 -11
@@ -193,19 +193,11 @@ static int vfio_ccw_sch_event(struct subchannel *sch, int process)if (work_pending (&sch->todo_work)) goto out_unlock; -if (cio_update_schib (sch)) { -vfio_ccw_fsm_event (private,VFIO_CCW_EVENT_NOT_OPER ); - rc =0 ; - goto out_unlock; - } - - private =dev_get_drvdata (&sch->dev); -if (private->state ==VFIO_CCW_STATE_NOT_OPER ) { - private->state = private->mdev ?VFIO_CCW_STATE_IDLE : -VFIO_CCW_STATE_STANDBY ; - } rc =0 ; +if (cio_update_schib (sch)) +vfio_ccw_fsm_event (private,VFIO_CCW_EVENT_NOT_OPER ); + out_unlock:spin_unlock_irqrestore (sch->lock, flags);
drivers/s390/scsi/zfcp_fc.c +20 -9
@@ -146,27 +146,33 @@ void zfcp_fc_enqueue_event(struct zfcp_adapter *adapter,static int zfcp_fc_wka_port_get (struct zfcp_fc_wka_port *wka_port) { +int ret = -EIO ; +if (mutex_lock_interruptible (&wka_port->mutex))return -ERESTARTSYS ;if (wka_port->status ==ZFCP_FC_WKA_PORT_OFFLINE || wka_port->status ==ZFCP_FC_WKA_PORT_CLOSING ) { wka_port->status =ZFCP_FC_WKA_PORT_OPENING ; -if (zfcp_fsf_open_wka_port (wka_port)) +if (zfcp_fsf_open_wka_port (wka_port)) { +/* could not even send request, nothing to wait for */ wka_port->status =ZFCP_FC_WKA_PORT_OFFLINE ; + goto out; + } } -mutex_unlock (&wka_port->mutex); - -wait_event (wka_port->completion_wq, +wait_event (wka_port->opened, wka_port->status ==ZFCP_FC_WKA_PORT_ONLINE || wka_port->status ==ZFCP_FC_WKA_PORT_OFFLINE );if (wka_port->status ==ZFCP_FC_WKA_PORT_ONLINE ) {atomic_inc (&wka_port->refcount); -return 0 ; + ret =0 ; + goto out; } -return -EIO ; +out: +mutex_unlock (&wka_port->mutex); +return ret; }static void zfcp_fc_wka_port_offline (struct work_struct *work)
@@ -182,9 +188,12 @@ static void zfcp_fc_wka_port_offline(struct work_struct *work) wka_port->status =ZFCP_FC_WKA_PORT_CLOSING ;if (zfcp_fsf_close_wka_port (wka_port)) { +/* could not even send request, nothing to wait for */ wka_port->status =ZFCP_FC_WKA_PORT_OFFLINE ; -wake_up (&wka_port->completion_wq); + goto out; } +wait_event (wka_port->closed, + wka_port->status ==ZFCP_FC_WKA_PORT_OFFLINE ); out:mutex_unlock (&wka_port->mutex); }
@@ -194,13 +203,15 @@ static void zfcp_fc_wka_port_put(struct zfcp_fc_wka_port *wka_port)if (atomic_dec_return (&wka_port->refcount) !=0 )return ;/* wait 10 milliseconds, other reqs might pop in */ -schedule_delayed_work (&wka_port->work,HZ /100 ); +queue_delayed_work (wka_port->adapter->work_queue, &wka_port->work, +msecs_to_jiffies (10 )); }static void zfcp_fc_wka_port_init (struct zfcp_fc_wka_port *wka_port,u32 d_id,struct zfcp_adapter *adapter) { -init_waitqueue_head (&wka_port->completion_wq); +init_waitqueue_head (&wka_port->opened); +init_waitqueue_head (&wka_port->closed); wka_port->adapter = adapter; wka_port->d_id = d_id;
drivers/s390/scsi/zfcp_fc.h +4 -2
@@ -170,7 +170,8 @@ enum zfcp_fc_wka_status {/** * struct zfcp_fc_wka_port - representation of well-known-address (WKA) FC port * @adapter: Pointer to adapter structure this WKA port belongs to -* @completion_wq: Wait for completion of open/close command +* @opened: Wait for completion of open command +* @closed: Wait for completion of close command * @status: Current status of WKA port * @refcount: Reference count to keep port open as long as it is in use * @d_id: FC destination id or well-known-address
@@ -180,7 +181,8 @@ enum zfcp_fc_wka_status {*/ struct zfcp_fc_wka_port {struct zfcp_adapter *adapter; -wait_queue_head_t completion_wq; +wait_queue_head_t opened; +wait_queue_head_t closed;enum zfcp_fc_wka_status status;atomic_t refcount;u32 d_id;
drivers/s390/scsi/zfcp_fsf.c +2 -2
@@ -1582,7 +1582,7 @@ static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req) wka_port->status =ZFCP_FC_WKA_PORT_ONLINE ; } out: -wake_up (&wka_port->completion_wq); +wake_up (&wka_port->opened); }/**
@@ -1640,7 +1640,7 @@ static void zfcp_fsf_close_wka_port_handler(struct zfcp_fsf_req *req) } wka_port->status =ZFCP_FC_WKA_PORT_OFFLINE ; -wake_up (&wka_port->completion_wq); +wake_up (&wka_port->closed); }/**
drivers/scsi/sg.c +34 -23
106 lines not on this page · raw message
drivers/scsi/smartpqi/smartpqi_init.c +2 -2
@@ -4652,10 +4652,10 @@ static int pqi_raid_submit_scsi_cmd_with_io_request( }switch (scmd->sc_data_direction) { -case DMA_TO_DEVICE : +case DMA_FROM_DEVICE : request->data_direction =SOP_READ_FLAG ;break ; -case DMA_FROM_DEVICE : +case DMA_TO_DEVICE : request->data_direction =SOP_WRITE_FLAG ;break ;case DMA_NONE :
drivers/scsi/ufs/ufshcd-pltfrm.c +13 -2
@@ -124,9 +124,20 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba)return ret; } +static bool phandle_exists (const struct device_node *np, +const char *phandle_name,int index) +{ +struct device_node *parse_np =of_parse_phandle (np, phandle_name, index); + +if (parse_np) +of_node_put (parse_np); + +return parse_np !=NULL ; +} +#define MAX_PROP_SIZE 32static int ufshcd_populate_vreg (struct device *dev,const char *name, -struct ufs_vreg **out_vreg) +struct ufs_vreg **out_vreg) {int ret =0 ;char prop_name[MAX_PROP_SIZE ];
@@ -139,7 +150,7 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name, }snprintf (prop_name,MAX_PROP_SIZE ,"%s-supply" , name); -if (!of_parse_phandle (np, prop_name,0 )) { +if (!phandle_exists (np, prop_name,0 )) {dev_info (dev,"%s: Unable to find %s regulator, assuming enabled\n" , __func__, prop_name); goto out;
drivers/soc/fsl/guts.c +1 -1
@@ -136,7 +136,7 @@ static int fsl_guts_probe(struct platform_device *pdev)struct device *dev = &pdev->dev;struct resource *res;const struct fsl_soc_die_attr *soc_die; -const char *machine; +const char *machine =NULL ;u32 svr;/* Initialize guts */
drivers/tty/n_gsm.c +74 -9
134 lines not on this page · raw message
drivers/tty/serial/ucc_uart.c +2 -0
@@ -1143,6 +1143,8 @@ static unsigned int soc_info(unsigned int *rev_h, unsigned int *rev_l)/* No compatible property, so try the name. */ soc_string = np->name; +of_node_put (np); +/* Extract the SOC number from the "PowerPC," string */ if ((sscanf (soc_string,"PowerPC,%u" , &soc) !=1 ) || !soc)return 0 ;
drivers/usb/core/hcd.c +15 -11
@@ -1814,7 +1814,6 @@ static void usb_giveback_urb_bh(unsigned long param)spin_lock_irq (&bh->lock); bh->running = true; - restart:list_replace_init (&bh->head, &local_list);spin_unlock_irq (&bh->lock);
@@ -1828,10 +1827,17 @@ static void usb_giveback_urb_bh(unsigned long param) bh->completing_ep =NULL ; } -/* check if there are new URBs to giveback */ +/* +* giveback new URBs next time to prevent this function +* from not exiting for a long time. +*/ spin_lock_irq (&bh->lock); -if (!list_empty (&bh->head)) - goto restart; +if (!list_empty (&bh->head)) { +if (bh->high_prio) +tasklet_hi_schedule (&bh->bh); +else +tasklet_schedule (&bh->bh); + } bh->running = false;spin_unlock_irq (&bh->lock); }
@@ -1856,7 +1862,7 @@ static void usb_giveback_urb_bh(unsigned long param)void usb_hcd_giveback_urb (struct usb_hcd *hcd,struct urb *urb,int status) {struct giveback_urb_bh *bh; -bool running, high_prio_bh; +bool running;/* pass status to tasklet via unlinked */ if (likely (!urb->unlinked))
@@ -1867,13 +1873,10 @@ void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, int status)return ; } -if (usb_pipeisoc (urb->pipe) ||usb_pipeint (urb->pipe)) { +if (usb_pipeisoc (urb->pipe) ||usb_pipeint (urb->pipe)) bh = &hcd->high_prio_bh; - high_prio_bh = true; - }else { +else bh = &hcd->low_prio_bh; - high_prio_bh = false; - }spin_lock (&bh->lock);list_add_tail (&urb->urb_list, &bh->head);
@@ -1882,7 +1885,7 @@ void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, int status)if (running) ; -else if (high_prio_bh) +else if (bh->high_prio)tasklet_hi_schedule (&bh->bh);else tasklet_schedule (&bh->bh);
@@ -2900,6 +2903,7 @@ int usb_add_hcd(struct usb_hcd *hcd,/* initialize tasklets */ init_giveback_urb_bh (&hcd->high_prio_bh); + hcd->high_prio_bh.high_prio = true;init_giveback_urb_bh (&hcd->low_prio_bh);/* enable irqs just before we start the controller,
drivers/usb/gadget/legacy/inode.c +1 -0
@@ -365,6 +365,7 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)spin_unlock_irq (&epdata->dev->lock);DBG (epdata->dev,"endpoint gone\n" ); +wait_for_completion (&done); epdata->status = -ENODEV ; } }
drivers/usb/gadget/udc/Kconfig +1 -1
@@ -309,7 +309,7 @@ source "drivers/usb/gadget/udc/bdc/Kconfig" config USB_AMD5536UDC tristate "AMD5536 UDC" - depends on USB_PCI + depends on USB_PCI && HAS_DMA select USB_SNP_CORE help The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge.
drivers/usb/host/ehci-ppc-of.c +1 -0
@@ -147,6 +147,7 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op) }else { ehci->has_amcc_usb23 =1 ; } +of_node_put (np); }if (of_get_property (dn,"big-endian" ,NULL )) {
drivers/usb/host/ohci-nxp.c +1 -0
@@ -155,6 +155,7 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev) } isp1301_i2c_client =isp1301_get_client (isp1301_node); +of_node_put (isp1301_node);if (!isp1301_i2c_client)return -EPROBE_DEFER ;
drivers/usb/host/ohci-ppc-of.c +1 -0
@@ -168,6 +168,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op)release_mem_region (res.start,0x4 ); }else pr_debug ("%s: cannot get ehci offset from fdt\n" , __FILE__); +of_node_put (np); }irq_dispose_mapping (irq);
drivers/usb/serial/sierra.c +2 -1
@@ -759,7 +759,8 @@ static void sierra_close(struct usb_serial_port *port)/* * Need to take susp_lock to make sure port is not already being -* resumed, but no need to hold it due to initialized +* resumed, but no need to hold it due to the tty-port initialized +* flag. */ spin_lock_irq (&intfdata->susp_lock);if (--intfdata->open_ports ==0 )
drivers/usb/serial/usb-serial.c +1 -1
@@ -254,7 +254,7 @@ static int serial_open(struct tty_struct *tty, struct file *filp)* * Shut down a USB serial port. Serialized against activate by the * tport mutex and kept to matching open/close pairs -* of calls by the initialized flag. +* of calls by the tty-port initialized flag. * * Not called if tty is console. */
drivers/usb/serial/usb_wwan.c +2 -1
@@ -465,7 +465,8 @@ void usb_wwan_close(struct usb_serial_port *port)/* * Need to take susp_lock to make sure port is not already being -* resumed, but no need to hold it due to initialized +* resumed, but no need to hold it due to the tty-port initialized +* flag. */ spin_lock_irq (&intfdata->susp_lock);if (--intfdata->open_ports ==0 )
drivers/vfio/vfio.c +1 -0
@@ -1813,6 +1813,7 @@ struct vfio_info_cap_header *vfio_info_cap_add(struct vfio_info_cap *caps, buf =krealloc (caps->buf, caps->size + size,GFP_KERNEL );if (!buf) {kfree (caps->buf); + caps->buf =NULL ; caps->size =0 ;return ERR_PTR (-ENOMEM ); }
drivers/video/fbdev/amba-clcd.c +18 -6
@@ -772,8 +772,10 @@ static int clcdfb_of_init_display(struct clcd_fb *fb)return -ENODEV ; panel =of_graph_get_remote_port_parent (endpoint); -if (!panel) -return -ENODEV ; +if (!panel) { + err = -ENODEV ; + goto out_endpoint_put; + }if (fb->vendor->init_panel) { err = fb->vendor->init_panel (fb, panel);
@@ -783,11 +785,11 @@ static int clcdfb_of_init_display(struct clcd_fb *fb) err =clcdfb_of_get_backlight (panel, fb->panel);if (err) -return err; + goto out_panel_put; err =clcdfb_of_get_mode (&fb->dev->dev, panel, fb->panel);if (err) -return err; + goto out_panel_put; err =of_property_read_u32 (fb->dev->dev.of_node,"max-memory-bandwidth" , &max_bandwidth);
@@ -816,11 +818,21 @@ static int clcdfb_of_init_display(struct clcd_fb *fb)if (of_property_read_u32_array (endpoint,"arm,pl11x,tft-r0g0b0-pads" , - tft_r0b0g0,ARRAY_SIZE (tft_r0b0g0)) !=0 ) -return -ENOENT ; + tft_r0b0g0,ARRAY_SIZE (tft_r0b0g0)) !=0 ) { + err = -ENOENT ; + goto out_panel_put; + } + +of_node_put (panel); +of_node_put (endpoint);return clcdfb_of_init_tft_panel (fb, tft_r0b0g0[0 ], tft_r0b0g0[1 ], tft_r0b0g0[2 ]); +out_panel_put: +of_node_put (panel); +out_endpoint_put: +of_node_put (endpoint); +return err; }static int clcdfb_of_vram_setup (struct clcd_fb *fb)
drivers/video/fbdev/arkfb.c +8 -1
@@ -778,7 +778,12 @@ static int arkfb_set_par(struct fb_info *info)return -EINVAL ; } -ark_set_pixclock (info, (hdiv * info->var.pixclock) / hmul); + value = (hdiv * info->var.pixclock) / hmul; +if (!value) { +fb_dbg (info,"invalid pixclock\n" ); + value =1 ; + } +ark_set_pixclock (info, value); svga_set_timings(par->state.vgabase, &ark_timing_regs, &(info->var), hmul, hdiv, (info->var.vmode & FB_VMODE_DOUBLE) ? 2 : 1, (info->var.vmode & FB_VMODE_INTERLACED) ? 2 : 1,
@@ -789,6 +794,8 @@ static int arkfb_set_par(struct fb_info *info) value = ((value * hmul / hdiv) /8 ) -5 ;vga_wcrt (par->state.vgabase,0x42 , (value +1 ) /2 ); +if (screen_size > info->screen_size) + screen_size = info->screen_size;memset_io (info->screen_base,0x00 , screen_size);/* Device and screen back on */ svga_wcrt_mask (par->state.vgabase,0x17 ,0x80 ,0x80 );
drivers/video/fbdev/i740fb.c +7 -2
@@ -399,7 +399,7 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var,u32 xres, right, hslen, left, xtotal;u32 yres, lower, vslen, upper, ytotal;u32 vxres, xoffset, vyres, yoffset; -u32 bpp, base, dacspeed24, mem; +u32 bpp, base, dacspeed24, mem, freq;u8 r7;int i;
@@ -641,7 +641,12 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var, par->atc[VGA_ATC_OVERSCAN ] =0 ;/* Calculate VCLK that most closely matches the requested dot clock */ -i740_calc_vclk ((((u32 )1e9 ) / var->pixclock) * (u32)(1e3 ), par); + freq = (((u32 )1e9 ) / var->pixclock) * (u32)(1e3 ); +if (freq <I740_RFREQ_FIX ) { +fb_dbg (info,"invalid pixclock\n" ); + freq =I740_RFREQ_FIX ; + } +i740_calc_vclk (freq, par);/* Since we program the clocks ourselves, always use VCLK2. */ par->misc |=0x0C ;
drivers/video/fbdev/s3fb.c +2 -0
@@ -902,6 +902,8 @@ static int s3fb_set_par(struct fb_info *info) value =clamp ((htotal + hsstart +1 ) /2 +2 , hsstart +4 , htotal +1 );svga_wcrt_multi (par->state.vgabase, s3_dtpc_regs, value); +if (screen_size > info->screen_size) + screen_size = info->screen_size;memset_io (info->screen_base,0x00 , screen_size);/* Device and screen back on */ svga_wcrt_mask (par->state.vgabase,0x17 ,0x80 ,0x80 );
drivers/video/fbdev/sis/init.c +2 -2
@@ -355,12 +355,12 @@ SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, }break ;case 400 : -if ((!(VBFlags &CRT1_LCDA )) || ((LCDwidth >=800 ) && (LCDwidth >=600 ))) { +if ((!(VBFlags &CRT1_LCDA )) || ((LCDwidth >=800 ) && (LCDheight >=600 ))) {if (VDisplay ==300 ) ModeIndex = ModeIndex_400x300[Depth]; }break ;case 512 : -if ((!(VBFlags &CRT1_LCDA )) || ((LCDwidth >=1024 ) && (LCDwidth >=768 ))) { +if ((!(VBFlags &CRT1_LCDA )) || ((LCDwidth >=1024 ) && (LCDheight >=768 ))) {if (VDisplay ==384 ) ModeIndex = ModeIndex_512x384[Depth]; }break ;
drivers/video/fbdev/vt8623fb.c +2 -0
@@ -504,6 +504,8 @@ static int vt8623fb_set_par(struct fb_info *info) (info->var.vmode &FB_VMODE_DOUBLE ) ?2 :1 ,1 , 1, info->node); +if (screen_size > info->screen_size) + screen_size = info->screen_size;memset_io (info->screen_base,0x00 , screen_size);/* Device and screen back on */
drivers/xen/xenbus/xenbus_dev_frontend.c +2 -2
@@ -125,7 +125,7 @@ static ssize_t xenbus_file_read(struct file *filp, {struct xenbus_file_priv *u = filp->private_data;struct read_buffer *rb; -unsigned i; +ssize_t i;int ret;mutex_lock (&u->reply_mutex);
@@ -145,7 +145,7 @@ static ssize_t xenbus_file_read(struct file *filp, rb = list_entry(u->read_buffers.next, struct read_buffer, list); i =0 ;while (i < len) { -unsigned sz =min ((unsigned )len - i, rb->len - rb->cons); +size_t sz =min_t (size_t, len - i, rb->len - rb->cons); ret =copy_to_user (ubuf + i, &rb->msg[rb->cons], sz);
fs/attr.c +2 -0
@@ -113,6 +113,8 @@ EXPORT_SYMBOL(setattr_prepare);*/ int inode_newsize_ok (const struct inode *inode,loff_t offset) { +if (offset <0 ) +return -EINVAL ;if (inode->i_size < offset) {unsigned long limit;
fs/btrfs/disk-io.c +14 -0
@@ -2718,6 +2718,20 @@ int open_ctree(struct super_block *sb, err = -EINVAL ; goto fail_alloc; } +/* +* We have unsupported RO compat features, although RO mounted, we +* should not cause any metadata write, including log replay. +* Or we could screw up whatever the new feature requires. +*/ +if (unlikely (features &&btrfs_super_log_root (disk_super) && + !btrfs_test_opt (fs_info,NOLOGREPLAY ))) { +btrfs_err (fs_info, +"cannot replay dirty log with unsupported compat_ro features (0x%llx), try rescue=nologreplay" , + features); + err = -EINVAL ; + goto fail_alloc; + } + max_active = fs_info->thread_pool_size;
fs/btrfs/raid56.c +57 -17
135 lines not on this page · raw message
fs/btrfs/tree-log.c +3 -1
@@ -1100,7 +1100,9 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans, extref =btrfs_lookup_inode_extref (NULL , root, path, name, namelen, inode_objectid, parent_objectid,0 ,0 ); -if (!IS_ERR_OR_NULL (extref)) { +if (IS_ERR (extref)) { +return PTR_ERR (extref); + }else if (extref) {u32 item_size;u32 cur_offset =0 ;unsigned long base;
fs/cifs/smb2ops.c +3 -2
@@ -463,9 +463,7 @@ move_smb2_ea_to_cifs(char *dst, size_t dst_size,size_t name_len, value_len, user_name_len;while (src_size >0 ) { - name = &src->ea_data[0 ]; name_len = (size_t )src->ea_name_length; - value = &src->ea_data[src->ea_name_length +1 ]; value_len = (size_t )le16_to_cpu (src->ea_value_length);if (name_len ==0 ) {
@@ -478,6 +476,9 @@ move_smb2_ea_to_cifs(char *dst, size_t dst_size, goto out; } + name = &src->ea_data[0 ]; + value = &src->ea_data[src->ea_name_length +1 ]; +if (ea_name) {if (ea_name_len == name_len &&memcmp (ea_name, name, name_len) ==0 ) {
fs/ext2/super.c +10 -2
@@ -1072,9 +1072,10 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) sbi->s_frags_per_group); goto failed_mount; } -if (sbi->s_inodes_per_group > sb->s_blocksize *8 ) { +if (sbi->s_inodes_per_group < sbi->s_inodes_per_block || + sbi->s_inodes_per_group > sb->s_blocksize *8 ) {ext2_msg (sb,KERN_ERR , -"error: #inodes per group too big: %lu" , +"error: invalid #inodes per group: %lu" , sbi->s_inodes_per_group); goto failed_mount; }
@@ -1084,6 +1085,13 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) sbi->s_groups_count = ((le32_to_cpu (es->s_blocks_count) -le32_to_cpu (es->s_first_data_block) -1 ) /EXT2_BLOCKS_PER_GROUP (sb)) +1 ; +if ((u64 )sbi->s_groups_count * sbi->s_inodes_per_group != +le32_to_cpu (es->s_inodes_count)) { +ext2_msg (sb,KERN_ERR ,"error: invalid #inodes: %u vs computed %llu" , +le32_to_cpu (es->s_inodes_count), + (u64 )sbi->s_groups_count * sbi->s_inodes_per_group); + goto failed_mount; + } db_count = (sbi->s_groups_count +EXT2_DESC_PER_BLOCK (sb) -1 ) /EXT2_DESC_PER_BLOCK (sb); sbi->s_group_desc =kmalloc (db_count *sizeof (struct buffer_head *),GFP_KERNEL );
fs/ext4/inline.c +3 -0
@@ -40,6 +40,9 @@ static int get_max_inline_xattr_value_size(struct inode *inode,struct ext4_inode *raw_inode;int free, min_offs;
Lines of this file are not shown. View the raw message.
fs/nfs/nfs4idmap.c +24 -22
46 lines not on this page · raw message
net/bluetooth/l2cap_core.c +51 -17
68 lines not on this page · raw message
sound/core/misc.c +94 -0
94 lines not on this page · raw message
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c +7 -3
Lines of this file are not shown. View the raw message.
sound/soc/mediatek/mt8173/mt8173-rt5650.c +6 -3
Lines of this file are not shown. View the raw message.
tools/testing/selftests/timers/clocksource-switch.c +3 -3
Lines of this file are not shown. View the raw message.
tools/testing/selftests/timers/valid-adjtimex.c +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.