Linux 4.19.140
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.140 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/testing/sysfs-bus-iio | 3 Makefile | 2 arch/arm/boot/dts/r8a7793-gose.dts | 4 arch/arm/kernel/stacktrace.c | 24 ++ arch/arm/mach-at91/pm.c | 11 - arch/arm/mach-socfpga/pm.c | 8 arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 1 arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 11 + arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 2 arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 10 - arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi | 2 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 4 arch/m68k/mac/iop.c | 21 -- arch/mips/cavium-octeon/octeon-usb.c | 5 arch/parisc/include/asm/barrier.h | 61 ++++++ arch/powerpc/boot/Makefile | 2 arch/powerpc/boot/serial.c | 2 arch/powerpc/kernel/vdso.c | 2 arch/powerpc/mm/pkeys.c | 16 + arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 14 - arch/x86/crypto/aesni-intel_asm.S | 6 arch/x86/kernel/apic/io_apic.c | 5 arch/x86/kernel/cpu/mcheck/mce-inject.c | 2 arch/x86/kernel/ptrace.c | 2 drivers/acpi/acpica/exprep.c | 4 drivers/acpi/acpica/utdelete.c | 6 drivers/block/loop.c | 4 drivers/bluetooth/hci_h5.c | 2 drivers/bluetooth/hci_serdev.c | 3 drivers/char/agp/intel-gtt.c | 4 drivers/clk/clk-scmi.c | 22 ++ drivers/cpufreq/armada-37xx-cpufreq.c | 1 drivers/crypto/cavium/cpt/cptvf_algs.c | 1 drivers/crypto/cavium/cpt/cptvf_reqmanager.c | 12 - drivers/crypto/cavium/cpt/request_manager.h | 2 drivers/crypto/ccp/ccp-dev.h | 1 drivers/crypto/ccp/ccp-ops.c | 37 ++- drivers/crypto/ccree/cc_cipher.c | 30 +-- drivers/crypto/hisilicon/sec/sec_algs.c | 34 +-- drivers/crypto/qat/qat_common/qat_uclo.c | 9 drivers/edac/edac_device_sysfs.c | 1 drivers/edac/edac_pci_sysfs.c | 2 drivers/firmware/arm_scmi/scmi_pm_domain.c | 12 - drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 19 +- drivers/gpu/drm/arm/malidp_planes.c | 2 drivers/gpu/drm/bridge/sil-sii8620.c | 2 drivers/gpu/drm/drm_debugfs.c | 8 drivers/gpu/drm/drm_mipi_dsi.c | 6 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 19 +- drivers/gpu/drm/imx/imx-tve.c | 20 +- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 drivers/gpu/drm/nouveau/nouveau_drm.c | 8 drivers/gpu/drm/nouveau/nouveau_gem.c | 4 drivers/gpu/drm/nouveau/nouveau_sgdma.c | 9 drivers/gpu/drm/panel/panel-simple.c | 2 drivers/gpu/drm/radeon/ci_dpm.c | 2 drivers/gpu/drm/radeon/radeon_display.c | 4 drivers/gpu/drm/radeon/radeon_drv.c | 9 drivers/gpu/drm/radeon/radeon_kms.c | 4 drivers/gpu/drm/tilcdc/tilcdc_panel.c | 6 drivers/gpu/drm/ttm/ttm_tt.c | 3 drivers/gpu/host1x/debug.c | 4 drivers/hid/hid-input.c | 6 drivers/hwtracing/coresight/coresight-tmc-etf.c | 13 - drivers/infiniband/core/verbs.c | 2 drivers/infiniband/hw/qedr/qedr.h | 4 drivers/infiniband/hw/qedr/verbs.c | 22 +- drivers/infiniband/sw/rxe/rxe_recv.c | 6 drivers/infiniband/sw/rxe/rxe_verbs.c | 5 drivers/iommu/intel_irq_remapping.c | 8 drivers/irqchip/irq-mtk-sysirq.c | 8 drivers/leds/led-class.c | 1 drivers/leds/leds-lm355x.c | 7 drivers/md/bcache/super.c | 9 drivers/md/md-cluster.c | 1 drivers/media/firewire/firedtv-fw.c | 2 drivers/media/platform/exynos4-is/media-dev.c | 3 drivers/media/platform/omap3isp/isppreview.c | 4 drivers/misc/cxl/sysfs.c | 2 drivers/mtd/nand/raw/qcom_nandc.c | 7 drivers/net/dsa/mv88e6xxx/chip.c | 1 drivers/net/dsa/rtl8366.c | 35 ++- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 2 drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c | 2 drivers/net/ethernet/freescale/fman/fman.c | 3 drivers/net/ethernet/freescale/fman/fman_dtsec.c | 4 drivers/net/ethernet/freescale/fman/fman_mac.h | 2 drivers/net/ethernet/freescale/fman/fman_memac.c | 3 drivers/net/ethernet/freescale/fman/fman_port.c | 9 drivers/net/ethernet/freescale/fman/fman_tgec.c | 2 drivers/net/ethernet/toshiba/spider_net.c | 4 drivers/net/wan/lapbether.c | 10 - drivers/net/wireless/ath/ath10k/htt_tx.c | 4 drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h | 2 drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 4 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 6 drivers/net/wireless/intel/iwlegacy/common.c | 4 drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 22 +- drivers/net/wireless/ti/wl1251/event.c | 2 drivers/parisc/sba_iommu.c | 2 drivers/pci/access.c | 8 drivers/pci/controller/pcie-cadence-host.c | 9 drivers/pci/controller/vmd.c | 3 drivers/pci/pcie/aspm.c | 1 drivers/pci/quirks.c | 2 drivers/phy/samsung/phy-exynos5-usbdrd.c | 4 drivers/pinctrl/pinctrl-single.c | 11 - drivers/platform/x86/intel-hid.c | 2 drivers/platform/x86/intel-vbtn.c | 2 drivers/power/supply/88pm860x_battery.c | 6 drivers/s390/net/qeth_l2_main.c | 4 drivers/scsi/arm/cumana_2.c | 2 drivers/scsi/arm/eesox.c | 2 drivers/scsi/arm/powertec.c | 2 drivers/scsi/mesh.c | 8 drivers/scsi/scsi_debug.c | 6 drivers/soc/qcom/rpmh-rsc.c | 1 drivers/spi/spi-lantiq-ssc.c | 10 + drivers/spi/spidev.c | 21 +- drivers/staging/rtl8192u/r8192U_core.c | 2 drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 drivers/usb/core/quirks.c | 16 + drivers/usb/dwc2/platform.c | 4 drivers/usb/gadget/udc/bdc/bdc_core.c | 13 + drivers/usb/gadget/udc/bdc/bdc_ep.c | 16 + drivers/usb/gadget/udc/net2280.c | 4 drivers/usb/mtu3/mtu3_core.c | 6 drivers/usb/serial/cp210x.c | 19 ++ drivers/usb/serial/iuu_phoenix.c | 14 - drivers/video/console/newport_con.c | 12 + drivers/video/fbdev/neofb.c | 1 drivers/video/fbdev/pxafb.c | 4 drivers/video/fbdev/sm712fb.c | 2 drivers/xen/balloon.c | 12 + drivers/xen/gntdev-dmabuf.c | 8 fs/9p/v9fs.c | 5 fs/btrfs/extent_io.c | 2 fs/dlm/lockspace.c | 6 fs/minix/inode.c | 36 +++ fs/minix/itree_common.c | 8 fs/nfs/pnfs.c | 46 +--- fs/ocfs2/dlmglue.c | 8 fs/pstore/platform.c | 5 fs/xfs/scrub/bmap.c | 22 ++ fs/xfs/xfs_reflink.c | 21 +- include/asm-generic/vmlinux.lds.h | 1 include/linux/bitfield.h | 2 include/linux/tracepoint.h | 2 include/net/inet_connection_sock.h | 4 include/net/ip_vs.h | 10 - kernel/cgroup/cgroup.c | 2 kernel/sched/fair.c | 23 +- kernel/sched/topology.c | 2 lib/dynamic_debug.c | 23 +- mm/mmap.c | 1 net/bluetooth/6lowpan.c | 5 net/ipv4/inet_connection_sock.c | 93 +++++----- net/ipv4/inet_hashtables.c | 1 net/netfilter/ipvs/ip_vs_core.c | 12 - net/nfc/rawsock.c | 7 net/packet/af_packet.c | 9 net/socket.c | 2 net/sunrpc/xprtrdma/svc_rdma_rw.c | 28 ++- net/tls/tls_device.c | 3 security/smack/smackfs.c | 6 sound/pci/hda/patch_realtek.c | 1 sound/soc/intel/boards/bxt_rt298.c | 2 sound/soc/meson/axg-tdm-interface.c | 26 +- sound/usb/card.h | 1 sound/usb/mixer_quirks.c | 1 sound/usb/pcm.c | 6 sound/usb/quirks-table.h | 64 ++++++ sound/usb/quirks.c | 3 sound/usb/stream.c | 1 tools/build/Build.include | 3 tools/testing/selftests/powerpc/benchmarks/context_switch.c | 21 +- tools/testing/selftests/powerpc/utils.c | 37 ++- 177 files changed, 1085 insertions(+), 488 deletions(-)
Aditya Pakki (2):
drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync drm/nouveau: fix multiple instances of reference count leaks
Alim Akhtar (1):
arm64: dts: exynos: Fix silent hang after boot on Espresso
Andrii Nakryiko (1):
tools, build: Propagate build failures from tools/build/Makefile.build
Aneesh Kumar K.V (1):
powerpc/book3s64/pkeys: Use PVR check instead of cpu feature
Arnd Bergmann (1):
leds: lm355x: avoid enum conversion warning
Bartosz Golaszewski (1):
irqchip/irq-mtk-sysirq: Replace spinlock with raw_spinlock
Bjorn Helgaas (1):
PCI: Fix pci_cfg_wait queue locking problem
Bolarinwa Olayemi Saheed (1):
iwlegacy: Check the return value of pcie_capability_read_*()
Brant Merryman (2):
USB: serial: cp210x: re-enable auto-RTS on open
USB: serial: cp210x: enable usb generic throttle/unthrottleChris Packham (1):
net: dsa: mv88e6xxx: MV88E6097 does not support jumbo configuration
Christian Eggers (1):
spi: spidev: Align buffers for DMA
Christian König (1):
drm/radeon: disable AGP by default
Christophe JAILLET (5):
video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call
scsi: cumana_2: Fix different dev_id between request_irq() and free_irq()
scsi: powertec: Fix different dev_id between request_irq() and free_irq()
scsi: eesox: Fix different dev_id between request_irq() and free_irq()
net: spider_net: Fix the size used in a 'dma_free_coherent()' call
Chuck Lever (1):
svcrdma: Fix page leak in svc_rdma_recv_read_chunk()
Chuhong Yuan (2):
media: omap3isp: Add missed v4l2_ctrl_handler_free() for preview_init_entities()
media: exynos4-is: Add missed check for pinctrl_lookup_state()
Chunfeng Yun (1):
usb: mtu3: clear dual mode of u3port when disable device
Colin Ian King (3):
drm/arm: fix unintentional integer overflow on left shift drm/radeon: fix array out-of-bounds read and write issues
staging: rtl8192u: fix a dubious looking mask before a shift
Coly Li (1):
bcache: fix super block seq numbers comparision in register_cache_set()
Cristian Marussi (1):
firmware: arm_scmi: Fix SCMI genpd domain probing
Dan Carpenter (5):
media: firewire: Using uninitialized values in node_probe()
mwifiex: Prevent memory corruption handling keys
thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor()
Smack: fix another vsscanf out of bounds
Smack: prevent underflow in smk_set_cipso()
Danesh Petigara (1):
usb: bdc: Halt controller on suspend
Darrick J. Wong (2):
xfs: don't eat an EIO/ENOSPC writeback error when scrubbing data fork
xfs: fix reflink quota reservation accounting error
Dave Airlie (1):
drm/ttm/nouveau: don't call tt destroy callback on alloc failure.
Dejin Zheng (2):
video: fbdev: sm712fb: fix an issue about iounmap for a wrong address
console: newport_con: fix an issue about leak related system resources
Dilip Kota (1):
spi: lantiq: fix: Rx overflow error in full duplex mode
Dmitry Osipenko (1):
gpu: host1x: debug: Fix multiple channels emitting messages simultaneously
Drew Fustini (1):
pinctrl-single: fix pcs_parse_pinconf() return value
Emil Velikov (1):
drm/mipi: use dcs write for mipi_dsi_dcs_set_tear_scanline
Eric Biggers (3):
fs/minix: check return value of sb_getblk() fs/minix: don't allow getting deleted inodes fs/minix: reject too-large maximum file size
Eric Dumazet (1):
x86/fsgsbase/64: Fix NULL deref in 86_fsgsbase_read_task
Erik Kaneda (1):
ACPICA: Do not increment operation_region reference counts for field units
Evan Green (1):
ath10k: Acquire tx_lock in tx error paths
Evgeny Novikov (2):
video: fbdev: neofb: fix memory leak in neo_scan_monitor()
usb: gadget: net2280: fix memory leak on probe error handling paths
Finn Thain (3):
m68k: mac: Don't send IOP message until channel is idle
m68k: mac: Fix IOP status/control register writes
scsi: mesh: Fix panic after host or bus reset
Florinel Iordache (5):
fsl/fman: use 32-bit unsigned integer
fsl/fman: fix dereference null return value
fsl/fman: fix unreachable code
fsl/fman: check dereferencing null pointer
fsl/fman: fix eth hash table allocation
Gilad Ben-Yossef (1):
crypto: ccree - fix resource leak on error path
Grant Likely (1):
HID: input: Fix devices that return multiple bytes in battery report
Greg Kroah-Hartman (1):
Linux 4.19.140
Hanjun Guo (1):
PCI: Release IVRS table in AMD ACS quirk
Harish (1):
selftests/powerpc: Fix CPU affinity for child process
Hector Martin (3):
ALSA: usb-audio: fix overeager device match for MacroSilicon MS2109
ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109
ALSA: usb-audio: add quirk for Pioneer DDJ-RB
Heiko Stuebner (3):
arm64: dts: rockchip: fix rk3368-lion gmac reset gpio
arm64: dts: rockchip: fix rk3399-puma vcc5v0-host gpio
arm64: dts: rockchip: fix rk3399-puma gmac reset gpio
Hui Wang (1):
ALSA: hda - fix the micmute led status for Lenovo ThinkCentre AIO
Ira Weiny (1):
net/tls: Fix kmap usage
Ivan Kokshaysky (1):
cpufreq: dt: fix oops on armada37xx
Jack Xiao (1):
drm/amdgpu: avoid dereferencing a NULL pointer
Jakub Kicinski (1):
bitfield.h: don't compile-time validate _val in FIELD_FIT
Jerome Brunet (1):
ASoC: meson: axg-tdm-interface: fix link fmt setup
Jian Cai (1):
crypto: aesni - add compatibility with IAS
Jim Cromie (1):
dyndbg: fix a BUG_ON in ddebug_describe_flags
Johan Hovold (1):
USB: serial: iuu_phoenix: fix led-activity helpers
John Allen (1):
crypto: ccp - Fix use of merged scatterlists
John David Anglin (1):
parisc: Implement __smp_store_release and __smp_load_acquire barriers
John Garry (1):
scsi: scsi_debug: Add check for sdebug_max_queue during module init
John Ogness (1):
af_packet: TPACKET_V3: fix fill status rwlock imbalance
Jon Derrick (1):
irqdomain/treewide: Free firmware node after domain removal
Julian Anastasov (1):
ipvs: allow connection reuse for unconfirmed conntrack
Julian Wiedmann (1):
s390/qeth: don't process empty bridge port events
Kai-Heng Feng (1):
leds: core: Flush scheduled work for system suspend
Kars Mulder (1):
usb: core: fix quirks_param_set() writing to a const pointer
Kishon Vijay Abraham I (1):
PCI: cadence: Fix updating Vendor ID and Subsystem Vendor ID register
Laurent Pinchart (1):
drm: panel: simple: Fix bpc for LG LB070WV8 panel
Li Heng (1):
RDMA/core: Fix return error value in _ib_modify_qp() to negative
Lihong Kou (1):
Bluetooth: add a mutex lock to avoid UAF in do_enale_set
Linus Walleij (2):
net: dsa: rtl8366: Fix VLAN semantics
net: dsa: rtl8366: Fix VLAN set-up
Lu Wei (2):
platform/x86: intel-hid: Fix return value check in check_acpi_dev() platform/x86: intel-vbtn: Fix return value check in check_acpi_dev()
Lubomir Rintel (1):
drm/etnaviv: Fix error path on failure to enable bus clk
Luis Chamberlain (1):
loop: be paranoid on exit and prevent new additions / removals
Marco Felsch (1):
drm/imx: tve: fix regulator_disable error path
Marek Szyprowski (2):
phy: exynos5-usbdrd: Calibrating makes sense only for USB2.0 PHY
usb: dwc2: Fix error path in gadget registration
Matteo Croce (1):
pstore: Fix linking when crypto API disabled
Maulik Shah (1):
soc: qcom: rpmh-rsc: Set suppress_bind_attrs flag
Miaohe Lin (1):
net: Set fput_needed iff FDPUT_FPUT is set
Michael Ellerman (1):
powerpc/boot: Fix CONFIG_PPC_MPC52XX references
Michael Tretter (1):
drm/debugfs: fix plain echo to connector "force" attribute
Mikhail Malygin (1):
RDMA/rxe: Prevent access to wr->next ptr afrer wr is posted to send queue
Mikulas Patocka (2):
crypto: hisilicon - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified
crypto: cpt - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified
Milton Miller (1):
powerpc/vdso: Fix vdso cpu truncation
Mirko Dietrich (1):
ALSA: usb-audio: Creative USB X-Fi Pro SB1095 volume knob support
Nathan Huckleberry (1):
ARM: 8992/1: Fix unwind_frame for clang-built kernels
Navid Emamdoost (1):
drm/etnaviv: fix ref count leak via pm_runtime_get_sync
Nick Desaulniers (1):
tracepoint: Mark __tracepoint_string's __used
Nicolas Boichat (2):
Bluetooth: hci_h5: Set HCI_UART_RESET_ON_INIT to correct flags
Bluetooth: hci_serdev: Only unregister device if it was registered
Niklas Söderlund (2):
ARM: dts: gose: Fix ports node name for adv7180
ARM: dts: gose: Fix ports node name for adv7612
Oleksandr Andrushchenko (1):
xen/gntdev: Fix dmabuf import with non-zero sgt offset
Paul E. McKenney (2):
fs/btrfs: Add cond_resched() for try_release_extent_mapping() stalls mm/mmap.c: Add cond_resched() for exit_mmap() CPU stalls
Pavel Machek (1):
ocfs2: fix unbalanced locking
Peng Liu (1):
sched: correct SD_flags returned by tl->sd_flags()
Pierre-Louis Bossart (1):
ASoC: Intel: bxt_rt298: add missing .owner field
Prasanna Kerekoppa (1):
brcmfmac: To fix Bss Info flag definition Bug
Qingyu Li (1):
net/nfc/rawsock.c: add CAP_NET_RAW check.
Qiushi Wu (2):
EDAC: Fix reference count leaks
agp/intel: Fix a memory leak on module initialisation failure
Ricardo Cañuelo (1):
arm64: dts: hisilicon: hikey: fixes to comply with adi, adv7533 DT binding
Rob Clark (1):
drm/msm: ratelimit crtc event overflow error
Roger Pau Monne (2):
xen/balloon: fix accounting in alloc_xenballooned_pages error path xen/balloon: make the balloon wait interruptible
Romain Naour (1):
include/asm-generic/vmlinux.lds.h: align ro_after_init
Sai Prakash Ranjan (1):
coresight: tmc: Fix TMC mode read in tmc_read_unprepare_etb()
Sandipan Das (1):
selftests/powerpc: Fix online CPU selection
Sasi Kumar (1):
bdc: Fix bug causing crash after multiple disconnects
Sedat Dilek (1):
crypto: aesni - Fix build with LLVM_IAS=1
Sivaprakash Murugesan (1):
mtd: rawnand: qcom: avoid write to unavailable register
Stephan Gerhold (1):
arm64: dts: qcom: msm8916: Replace invalid bias-pull-none property
Sudeep Holla (1):
clk: scmi: Fix min and max rate when registering clocks with discrete rates
Sven Schnelle (1):
parisc: mask out enable and reserved bits from sba imask
Tianjia Zhang (2):
net: ethernet: aquantia: Fix wrong return value
liquidio: Fix wrong return value in cn23xx_get_pf_num()
Tim Froidcoeur (2):
net: refactor bind_bucket fastreuse into helper
net: initialize fastreuse on inet_inherit_port
Tom Rix (3):
drm/bridge: sil_sii8620: initialize return of sii8620_readb
power: supply: check if calc_soc succeeded in pm860x_init_battery
crypto: qat - fix double free in qat_uclo_create_batch_init_list
Tomasz Duszynski (1):
iio: improve IIO_CONCENTRATION channel type description
Tomi Valkeinen (1):
drm/tilcdc: fix leak & null ref in panel_connector_get_modes
Trond Myklebust (2):
NFS: Don't move layouts to plh_return_segs list while in use
NFS: Don't return layout segments that are in use
Vincent Guittot (1):
sched/fair: Fix NOHZ next idle balance
Wang Hai (3):
cxl: Fix kobject memleak
wl1251: fix always return 0 error
dlm: Fix kobject memleak
Wright Feng (2):
brcmfmac: keep SDIO watchdog running when console_interval is non-zero
brcmfmac: set state of hanger slot to FREE when flushing PSQ
Xie He (1):
drivers/net/wan/lapbether: Added needed_headroom and a skb->len check
Xiongfeng Wang (1):
PCI/ASPM: Add missing newline in sysfs 'policy'
Yang Yingliang (1):
cgroup: add missing skcd->no_refcnt check in cgroup_sk_clone()
Yu Kuai (2):
ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh()
MIPS: OCTEON: add missing put_device() call in dwc3_octeon_device_init()
Yuval Basson (1):
RDMA/qedr: SRQ's bug fixes
Zhao Heming (1):
md-cluster: fix wild pointer of unlock_all_bitmaps()
Zheng Bin (1):
9p: Fix memory leak in v9fs_mount
Zhenzhong Duan (1):
x86/mce/inject: Fix a wrong assignment of i_mce.status
Zhu Yanjun (1):
RDMA/rxe: Skip dgid check in loopback mode
yu kuai (1):
ARM: at91: pm: add missing put_device() call in at91_pm_sram_init()
Greg Kroah-Hartman
maintainerDocumentation/ABI/testing/sysfs-bus-iio +2 -1
@@ -1559,7 +1559,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw KernelVersion: 4.3 Contact: [email protected] Description: - Raw (unscaled no offset etc.) percentage reading of a substance. + Raw (unscaled no offset etc.) reading of a substance. Units + after application of scale and offset are percents. What: /sys/bus/iio/devices/iio:deviceX/in_resistance_raw What: /sys/bus/iio/devices/iio:deviceX/in_resistanceX_raw
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 139 +SUBLEVEL = 140 EXTRAVERSION = NAME = "People's Front"
arch/arm/boot/dts/r8a7793-gose.dts +2 -2
@@ -339,7 +339,7 @@ reg = <0x20>; remote = <&vin1>; - port { + ports { #address-cells = <1>; #size-cells = <0>;
@@ -399,7 +399,7 @@ interrupts = <2 IRQ_TYPE_LEVEL_LOW>; default-input = <0>; - port { + ports { #address-cells = <1>; #size-cells = <0>;
arch/arm/kernel/stacktrace.c +24 -0
@@ -21,6 +21,19 @@* A simple function epilogue looks like this: * ldm sp, {fp, sp, pc} * +* When compiled with clang, pc and sp are not pushed. A simple function +* prologue looks like this when built with clang: +* +* stmdb {..., fp, lr} +* add fp, sp, #x +* sub sp, sp, #y +* +* A simple function epilogue looks like this when built with clang: +* +* sub sp, fp, #x +* ldm {..., fp, pc} +* +* * Note that with framepointer enabled, even the leaf functions have the same * prologue and epilogue, therefore we can ignore the LR value in this case. */
@@ -33,6 +46,16 @@ int notrace unwind_frame(struct stackframe *frame) low = frame->sp; high =ALIGN (low,THREAD_SIZE ); +#ifdef CONFIG_CC_IS_CLANG +/* check current frame pointer is within bounds */ +if (fp < low +4 || fp > high -4 ) +return -EINVAL ; + + frame->sp = frame->fp; + frame->fp = *(unsigned long *)(fp); + frame->pc = frame->lr; + frame->lr = *(unsigned long *)(fp +4 ); +#else /* check current frame pointer is within bounds */ if (fp < low +12 || fp > high -4 )return -EINVAL ;
@@ -41,6 +64,7 @@ int notrace unwind_frame(struct stackframe *frame) frame->fp = *(unsigned long *)(fp -12 ); frame->sp = *(unsigned long *)(fp -8 ); frame->pc = *(unsigned long *)(fp -4 ); +#endif return 0 ; }
arch/arm/mach-at91/pm.c +8 -3
@@ -542,13 +542,13 @@ static void __init at91_pm_sram_init(void) sram_pool =gen_pool_get (&pdev->dev,NULL );if (!sram_pool) {pr_warn ("%s: sram pool unavailable!\n" , __func__); -return ; + goto out_put_device; } sram_base =gen_pool_alloc (sram_pool, at91_pm_suspend_in_sram_sz);if (!sram_base) {pr_warn ("%s: unable to alloc sram!\n" , __func__); -return ; + goto out_put_device; } sram_pbase =gen_pool_virt_to_phys (sram_pool, sram_base);
@@ -556,12 +556,17 @@ static void __init at91_pm_sram_init(void) at91_pm_suspend_in_sram_sz, false);if (!at91_suspend_sram_fn) {pr_warn ("SRAM: Could not map\n" ); -return ; + goto out_put_device; }/* Copy the pm suspend handler to SRAM */ at91_suspend_sram_fn =fncpy (at91_suspend_sram_fn, &at91_pm_suspend_in_sram, at91_pm_suspend_in_sram_sz); +return ; + +out_put_device: +put_device (&pdev->dev); +return ; }static bool __init at91_is_pm_mode_active (int pm_mode)
arch/arm/mach-socfpga/pm.c +5 -3
@@ -60,14 +60,14 @@ static int socfpga_setup_ocram_self_refresh(void)if (!ocram_pool) {pr_warn ("%s: ocram pool unavailable!\n" , __func__); ret = -ENODEV ; - goto put_node; + goto put_device; } ocram_base =gen_pool_alloc (ocram_pool, socfpga_sdram_self_refresh_sz);if (!ocram_base) {pr_warn ("%s: unable to alloc ocram!\n" , __func__); ret = -ENOMEM ; - goto put_node; + goto put_device; } ocram_pbase =gen_pool_virt_to_phys (ocram_pool, ocram_base);
@@ -78,7 +78,7 @@ static int socfpga_setup_ocram_self_refresh(void)if (!suspend_ocram_base) {pr_warn ("%s: __arm_ioremap_exec failed!\n" , __func__); ret = -ENOMEM ; - goto put_node; + goto put_device; }/* Copy the code that puts DDR in self refresh to ocram */
@@ -92,6 +92,8 @@ static int socfpga_setup_ocram_self_refresh(void)if (!socfpga_sdram_self_refresh_in_ocram) ret = -EFAULT ; +put_device: +put_device (&pdev->dev); put_node:of_node_put (np);
arch/arm64/boot/dts/exynos/exynos7-espresso.dts +1 -0
@@ -152,6 +152,7 @@ regulator-min-microvolt = <700000>; regulator-max-microvolt = <1150000>; regulator-enable-ramp-delay = <125>; + regulator-always-on; }; ldo8_reg: LDO8 {
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +11 -0
@@ -530,6 +530,17 @@ status = "ok"; compatible = "adi,adv7533"; reg = <0x39>; + adi,dsi-lanes = <4>; + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + }; + port@1 { + reg = <1>; + }; + }; }; };
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +1 -1
@@ -515,7 +515,7 @@ reg = <0x39>; interrupt-parent = <&gpio1>; interrupts = <1 2>; - pd-gpio = <&gpio0 4 0>; + pd-gpios = <&gpio0 4 0>; adi,dsi-lanes = <4>; #sound-dai-cells = <0>;
arch/arm64/boot/dts/qcom/msm8916-pins.dtsi +5 -5
@@ -516,7 +516,7 @@ pins = "gpio63", "gpio64", "gpio65", "gpio66", "gpio67", "gpio68"; drive-strength = <8>; - bias-pull-none; + bias-disable; }; }; cdc_pdm_lines_sus: pdm_lines_off {
@@ -545,7 +545,7 @@ pins = "gpio113", "gpio114", "gpio115", "gpio116"; drive-strength = <8>; - bias-pull-none; + bias-disable; }; };
@@ -573,7 +573,7 @@ pinconf { pins = "gpio110"; drive-strength = <8>; - bias-pull-none; + bias-disable; }; };
@@ -599,7 +599,7 @@ pinconf { pins = "gpio116"; drive-strength = <8>; - bias-pull-none; + bias-disable; }; }; ext_mclk_tlmm_lines_sus: mclk_lines_off {
@@ -627,7 +627,7 @@ pins = "gpio112", "gpio117", "gpio118", "gpio119"; drive-strength = <8>; - bias-pull-none; + bias-disable; }; }; ext_sec_tlmm_lines_sus: tlmm_lines_off {
arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi +1 -1
@@ -159,7 +159,7 @@ pinctrl-0 = <&rgmii_pins>; snps,reset-active-low; snps,reset-delays-us = <0 10000 50000>; - snps,reset-gpio = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>; + snps,reset-gpio = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; tx_delay = <0x10>; rx_delay = <0x10>; status = "okay";
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +2 -2
@@ -101,7 +101,7 @@ vcc5v0_host: vcc5v0-host-regulator { compatible = "regulator-fixed"; - gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>; + gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>; enable-active-low; pinctrl-names = "default"; pinctrl-0 = <&vcc5v0_host_en>;
@@ -156,7 +156,7 @@ phy-mode = "rgmii"; pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins>; - snps,reset-gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; + snps,reset-gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; snps,reset-active-low; snps,reset-delays-us = <0 10000 50000>; tx_delay = <0x10>;
arch/m68k/mac/iop.c +6 -15
@@ -183,7 +183,7 @@ static __inline__ void iop_writeb(volatile struct mac_iop *iop, __u16 addr, __u8static __inline__void iop_stop (volatile struct mac_iop *iop) { - iop->status_ctrl &= ~IOP_RUN ; + iop->status_ctrl =IOP_AUTOINC ; }static __inline__void iop_start (volatile struct mac_iop *iop)
@@ -191,14 +191,9 @@ static __inline__ void iop_start(volatile struct mac_iop *iop) iop->status_ctrl =IOP_RUN |IOP_AUTOINC ; } -static __inline__void iop_bypass (volatile struct mac_iop *iop) -{ - iop->status_ctrl |=IOP_BYPASS ; -} -static __inline__void iop_interrupt (volatile struct mac_iop *iop) { - iop->status_ctrl |=IOP_IRQ ; + iop->status_ctrl =IOP_IRQ |IOP_RUN |IOP_AUTOINC ; }static int iop_alive (volatile struct mac_iop *iop)
@@ -244,7 +239,6 @@ void __init iop_preinit(void) }else { iop_base[IOP_NUM_SCC ] = (struct mac_iop *)SCC_IOP_BASE_QUADRA ; } - iop_base[IOP_NUM_SCC ]->status_ctrl =0x87 ; iop_scc_present =1 ; }else { iop_base[IOP_NUM_SCC ] =NULL ;
@@ -256,7 +250,7 @@ void __init iop_preinit(void) }else { iop_base[IOP_NUM_ISM ] = (struct mac_iop *)ISM_IOP_BASE_QUADRA ; } - iop_base[IOP_NUM_ISM ]->status_ctrl =0 ; +iop_stop (iop_base[IOP_NUM_ISM ]); iop_ism_present =1 ; }else { iop_base[IOP_NUM_ISM ] =NULL ;
@@ -416,7 +410,8 @@ static void iop_handle_send(uint iop_num, uint chan) msg->status =IOP_MSGSTATUS_UNUSED ; msg = msg->next; iop_send_queue[iop_num][chan] = msg; -if (msg)iop_do_send (msg); +if (msg &&iop_readb (iop,IOP_ADDR_SEND_STATE + chan) ==IOP_MSG_IDLE ) +iop_do_send (msg); }/*
@@ -490,16 +485,12 @@ int iop_send_message(uint iop_num, uint chan, void *privdata,if (!(q = iop_send_queue[iop_num][chan])) { iop_send_queue[iop_num][chan] = msg; +iop_do_send (msg); }else {while (q->next) q = q->next; q->next = msg; } -if (iop_readb (iop_base[iop_num], -IOP_ADDR_SEND_STATE + chan) ==IOP_MSG_IDLE ) { -iop_do_send (msg); - } -return 0 ; }
arch/mips/cavium-octeon/octeon-usb.c +4 -1
@@ -517,6 +517,7 @@ static int __init dwc3_octeon_device_init(void) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (res ==NULL ) { +put_device (&pdev->dev);dev_err (&pdev->dev,"No memory resources\n" );return -ENXIO ; }
@@ -528,8 +529,10 @@ static int __init dwc3_octeon_device_init(void)* know the difference. */ base =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (base)) +if (IS_ERR (base)) { +put_device (&pdev->dev);return PTR_ERR (base); + }mutex_lock (&dwc3_octeon_clocks_mutex);dwc3_octeon_clocks_start (&pdev->dev, (u64 )base);
arch/parisc/include/asm/barrier.h +61 -0
67 lines not on this page · raw message
arch/powerpc/boot/Makefile +1 -1
@@ -122,7 +122,7 @@ src-wlib-y := string.S crt0.S stdio.c decompress.c main.c \ elf_util.c $(zlib-y) devtree.c stdlib.c \ oflib.c ofconsole.c cuboot.c -src-wlib-$(CONFIG_PPC_MPC52XX) += mpc52xx-psc.c +src-wlib-$(CONFIG_PPC_MPC52xx) += mpc52xx-psc.c src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S opal.c ifndef CONFIG_PPC64_BOOT_WRAPPER src-wlib-y += crtsavres.S
arch/powerpc/boot/serial.c +1 -1
@@ -127,7 +127,7 @@ int serial_console_init(void) dt_is_compatible(devp, "fsl,cpm2-smc-uart")) rc =cpm_console_init (devp, &serial_cd);#endif -#ifdef CONFIG_PPC_MPC52XX +#ifdef CONFIG_PPC_MPC52xx else if (dt_is_compatible(devp, "fsl,mpc5200-psc-uart")) rc =mpc5200_psc_console_init (devp, &serial_cd);#endif
arch/powerpc/kernel/vdso.c +1 -1
@@ -705,7 +705,7 @@ int vdso_getcpu_init(void) node =cpu_to_node (cpu);WARN_ON_ONCE (node >0xffff ); - val = (cpu &0xfff ) | ((node &0xffff ) <<16 ); + val = (cpu &0xffff ) | ((node &0xffff ) <<16 );mtspr (SPRN_SPRG_VDSO_WRITE , val);get_paca ()->sprg_vdso = val;
arch/powerpc/mm/pkeys.c +10 -6
@@ -81,13 +81,17 @@ int pkey_initialize(void)scan_pkey_feature ();/* -* Let's assume 32 pkeys on P8 bare metal, if its not defined by device -* tree. We make this exception since skiboot forgot to expose this -* property on power8. +* Let's assume 32 pkeys on P8/P9 bare metal, if its not defined by device +* tree. We make this exception since some version of skiboot forgot to +* expose this property on power8/9. */ -if (!pkeys_devtree_defined && !firmware_has_feature (FW_FEATURE_LPAR ) && -cpu_has_feature (CPU_FTRS_POWER8 )) - pkeys_total =32 ; +if (!pkeys_devtree_defined && !firmware_has_feature (FW_FEATURE_LPAR )) { +unsigned long pvr =mfspr (SPRN_PVR ); + +if (PVR_VER (pvr) ==PVR_POWER8 ||PVR_VER (pvr) ==PVR_POWER8E || +PVR_VER (pvr) ==PVR_POWER8NVL ||PVR_VER (pvr) ==PVR_POWER9 ) + pkeys_total =32 ; + }/* * Adjust the upper limit, based on the number of bits supported by
arch/x86/crypto/aes_ctrby8_avx-x86_64.S +3 -11
@@ -127,10 +127,6 @@ ddq_add_8: /* generate a unique variable for ddq_add_x */ -.macro setddq n - var_ddq_add = ddq_add_\n -.endm - /* generate a unique variable for xmm register */ .macro setxdata n var_xdata = %xmm\n
@@ -140,9 +136,7 @@ ddq_add_8: .macro club name, id .altmacro - .if \name == DDQ_DATA - setddq %\id - .elseif \name == XDATA + .if \name == XDATA setxdata %\id .endif .noaltmacro
@@ -165,9 +159,8 @@ ddq_add_8: .set i, 1 .rept (by - 1) - club DDQ_DATA, i club XDATA, i - vpaddq var_ddq_add(%rip), xcounter, var_xdata + vpaddq (ddq_add_1 + 16 * (i - 1))(%rip), xcounter, var_xdata vptest ddq_low_msk(%rip), var_xdata jnz 1f vpaddq ddq_high_add_1(%rip), var_xdata, var_xdata
@@ -180,8 +173,7 @@ ddq_add_8: vmovdqa 1*16(p_keys), xkeyA vpxor xkey0, xdata0, xdata0 - club DDQ_DATA, by - vpaddq var_ddq_add(%rip), xcounter, xcounter + vpaddq (ddq_add_1 + 16 * (by - 1))(%rip), xcounter, xcounter vptest ddq_low_msk(%rip), xcounter jnz 1f vpaddq ddq_high_add_1(%rip), xcounter, xcounter
arch/x86/crypto/aesni-intel_asm.S +3 -3
@@ -270,7 +270,7 @@ ALL_F: .octa 0xffffffffffffffffffffffffffffffff PSHUFB_XMM %xmm2, %xmm0 movdqu %xmm0, CurCount(%arg2) # ctx_data.current_counter = iv - PRECOMPUTE \SUBKEY, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, + PRECOMPUTE \SUBKEY, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7 movdqu HashKey(%arg2), %xmm13 CALC_AAD_HASH %xmm13, \AAD, \AADLEN, %xmm0, %xmm1, %xmm2, %xmm3, \
@@ -982,7 +982,7 @@ _initial_blocks_done\@: * arg1, %arg3, %arg4 are used as pointers only, not modified * %r11 is the data offset value */ -.macro GHASH_4_ENCRYPT_4_PARALLEL_ENC TMP1 TMP2 TMP3 TMP4 TMP5 \ +.macro GHASH_4_ENCRYPT_4_PARALLEL_enc TMP1 TMP2 TMP3 TMP4 TMP5 \ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation movdqa \XMM1, \XMM5
@@ -1190,7 +1190,7 @@ aes_loop_par_enc_done\@: * arg1, %arg3, %arg4 are used as pointers only, not modified * %r11 is the data offset value */ -.macro GHASH_4_ENCRYPT_4_PARALLEL_DEC TMP1 TMP2 TMP3 TMP4 TMP5 \ +.macro GHASH_4_ENCRYPT_4_PARALLEL_dec TMP1 TMP2 TMP3 TMP4 TMP5 \ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation movdqa \XMM1, \XMM5
arch/x86/kernel/apic/io_apic.c +5 -0
@@ -2342,8 +2342,13 @@ static int mp_irqdomain_create(int ioapic)static void ioapic_destroy_irqdomain (int idx) { +struct ioapic_domain_cfg *cfg = &ioapics[idx].irqdomain_cfg; +struct fwnode_handle *fn = ioapics[idx].irqdomain->fwnode; +if (ioapics[idx].irqdomain) {irq_domain_remove (ioapics[idx].irqdomain); +if (!cfg->dev) +irq_domain_free_fwnode (fn); ioapics[idx].irqdomain =NULL ; } }
arch/x86/kernel/cpu/mcheck/mce-inject.c +1 -1
@@ -518,7 +518,7 @@ static void do_inject(void)*/ if (inj_type ==DFR_INT_INJ ) { i_mce.status |=MCI_STATUS_DEFERRED ; - i_mce.status |= (i_mce.status & ~MCI_STATUS_UC ); + i_mce.status &= ~MCI_STATUS_UC ; }/*
arch/x86/kernel/ptrace.c +1 -1
@@ -374,7 +374,7 @@ static unsigned long task_seg_base(struct task_struct *task,*/ mutex_lock (&task->mm->context.lock); ldt = task->mm->context.ldt; -if (unlikely (idx >= ldt->nr_entries)) +if (unlikely (!ldt || idx >= ldt->nr_entries)) base =0 ;else base =get_desc_base (ldt->entries + idx);
drivers/acpi/acpica/exprep.c +0 -4
@@ -473,10 +473,6 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) (u8 )access_byte_width; } } -/* An additional reference for the container */ - -acpi_ut_add_reference (obj_desc->field.region_obj); - ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n", obj_desc->field.start_field_bit_offset,
drivers/acpi/acpica/utdelete.c +1 -5
@@ -563,11 +563,6 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) next_object = object->buffer_field.buffer_obj;break ; -case ACPI_TYPE_LOCAL_REGION_FIELD : - - next_object = object->field.region_obj; -break ; -case ACPI_TYPE_LOCAL_BANK_FIELD : next_object = object->bank_field.bank_obj;
@@ -608,6 +603,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) }break ; +case ACPI_TYPE_LOCAL_REGION_FIELD :case ACPI_TYPE_REGION :default :
drivers/block/loop.c +4 -0
@@ -2279,6 +2279,8 @@ static void __exit loop_exit(void) range = max_loop ? max_loop << part_shift :1UL <<MINORBITS ; +mutex_lock (&loop_ctl_mutex); +idr_for_each (&loop_index_idr, &loop_exit_cb,NULL );idr_destroy (&loop_index_idr);
@@ -2286,6 +2288,8 @@ static void __exit loop_exit(void)unregister_blkdev (LOOP_MAJOR ,"loop" );misc_deregister (&loop_misc); + +mutex_unlock (&loop_ctl_mutex); }module_init (loop_init);
drivers/bluetooth/hci_h5.c +1 -1
@@ -803,7 +803,7 @@ static int h5_serdev_probe(struct serdev_device *serdev)if (!h5)return -ENOMEM ; -set_bit (HCI_UART_RESET_ON_INIT , &h5->serdev_hu.flags); +set_bit (HCI_UART_RESET_ON_INIT , &h5->serdev_hu.hdev_flags); h5->hu = &h5->serdev_hu; h5->serdev_hu.serdev = serdev;
drivers/bluetooth/hci_serdev.c +2 -1
@@ -369,7 +369,8 @@ void hci_uart_unregister_device(struct hci_uart *hu)struct hci_dev *hdev = hu->hdev;clear_bit (HCI_UART_PROTO_READY , &hu->flags); -hci_unregister_dev (hdev); +if (test_bit (HCI_UART_REGISTERED , &hu->flags)) +hci_unregister_dev (hdev);hci_free_dev (hdev);cancel_work_sync (&hu->write_work);
drivers/char/agp/intel-gtt.c +3 -1
@@ -304,8 +304,10 @@ static int intel_gtt_setup_scratch_page(void)if (intel_private.needs_dmar) { dma_addr =pci_map_page (intel_private.pcidev, page,0 ,PAGE_SIZE ,PCI_DMA_BIDIRECTIONAL ); -if (pci_dma_mapping_error (intel_private.pcidev, dma_addr)) +if (pci_dma_mapping_error (intel_private.pcidev, dma_addr)) { +__free_page (page);return -EINVAL ; + } intel_private.scratch_page_dma = dma_addr; }else
drivers/clk/clk-scmi.c +19 -3
@@ -103,6 +103,8 @@ static const struct clk_ops scmi_clk_ops = {static int scmi_clk_ops_init (struct device *dev,struct scmi_clk *sclk) {int ret; +unsigned long min_rate, max_rate; +struct clk_init_data init = { .flags =CLK_GET_RATE_NOCACHE , .num_parents =0 ,
@@ -112,9 +114,23 @@ static int scmi_clk_ops_init(struct device *dev, struct scmi_clk *sclk) sclk->hw.init = &init; ret =devm_clk_hw_register (dev, &sclk->hw); -if (!ret) -clk_hw_set_rate_range (&sclk->hw, sclk->info->range.min_rate, - sclk->info->range.max_rate); +if (ret) +return ret; + +if (sclk->info->rate_discrete) { +int num_rates = sclk->info->list.num_rates; + +if (num_rates <=0 ) +return -EINVAL ; + + min_rate = sclk->info->list.rates[0 ]; + max_rate = sclk->info->list.rates[num_rates -1 ]; + }else { + min_rate = sclk->info->range.min_rate; + max_rate = sclk->info->range.max_rate; + } + +clk_hw_set_rate_range (&sclk->hw, min_rate, max_rate);return ret; }
drivers/cpufreq/armada-37xx-cpufreq.c +1 -0
@@ -458,6 +458,7 @@ static int __init armada37xx_cpufreq_driver_init(void)/* Now that everything is setup, enable the DVFS at hardware level */ armada37xx_cpufreq_enable_dvfs (nb_pm_base); +memset (&pdata,0 ,sizeof (pdata)); pdata.suspend = armada37xx_cpufreq_suspend; pdata.resume = armada37xx_cpufreq_resume;
drivers/crypto/cavium/cpt/cptvf_algs.c +1 -0
@@ -205,6 +205,7 @@ static inline int cvm_enc_dec(struct ablkcipher_request *req, u32 enc)int status;memset (req_info,0 ,sizeof (struct cpt_request_info )); + req_info->may_sleep = (req->base.flags &CRYPTO_TFM_REQ_MAY_SLEEP ) !=0 ;memset (fctx,0 ,sizeof (struct fc_context ));create_input_list (req, enc, enc_iv_len);create_output_list (req, enc_iv_len);
drivers/crypto/cavium/cpt/cptvf_reqmanager.c +6 -6
@@ -136,7 +136,7 @@ static inline int setup_sgio_list(struct cpt_vf *cptvf,/* Setup gather (input) components */ g_sz_bytes = ((req->incnt +3 ) /4 ) *sizeof (struct sglist_component ); - info->gather_components =kzalloc (g_sz_bytes,GFP_KERNEL ); + info->gather_components =kzalloc (g_sz_bytes, req->may_sleep ?GFP_KERNEL :GFP_ATOMIC );if (!info->gather_components) { ret = -ENOMEM ; goto scatter_gather_clean;
@@ -153,7 +153,7 @@ static inline int setup_sgio_list(struct cpt_vf *cptvf,/* Setup scatter (output) components */ s_sz_bytes = ((req->outcnt +3 ) /4 ) *sizeof (struct sglist_component ); - info->scatter_components =kzalloc (s_sz_bytes,GFP_KERNEL ); + info->scatter_components =kzalloc (s_sz_bytes, req->may_sleep ?GFP_KERNEL :GFP_ATOMIC );if (!info->scatter_components) { ret = -ENOMEM ; goto scatter_gather_clean;
@@ -170,7 +170,7 @@ static inline int setup_sgio_list(struct cpt_vf *cptvf,/* Create and initialize DPTR */ info->dlen = g_sz_bytes + s_sz_bytes +SG_LIST_HDR_SIZE ; - info->in_buffer =kzalloc (info->dlen,GFP_KERNEL ); + info->in_buffer =kzalloc (info->dlen, req->may_sleep ?GFP_KERNEL :GFP_ATOMIC );if (!info->in_buffer) { ret = -ENOMEM ; goto scatter_gather_clean;
@@ -198,7 +198,7 @@ static inline int setup_sgio_list(struct cpt_vf *cptvf, }/* Create and initialize RPTR */ - info->out_buffer =kzalloc (COMPLETION_CODE_SIZE ,GFP_KERNEL ); + info->out_buffer =kzalloc (COMPLETION_CODE_SIZE , req->may_sleep ?GFP_KERNEL :GFP_ATOMIC );if (!info->out_buffer) { ret = -ENOMEM ; goto scatter_gather_clean;
@@ -434,7 +434,7 @@ int process_request(struct cpt_vf *cptvf, struct cpt_request_info *req)struct cpt_vq_command vq_cmd;union cpt_inst_s cptinst; - info =kzalloc (sizeof (*info),GFP_KERNEL ); + info =kzalloc (sizeof (*info), req->may_sleep ?GFP_KERNEL :GFP_ATOMIC );if (unlikely (!info)) {dev_err (&pdev->dev,"Unable to allocate memory for info_buffer\n" );return -ENOMEM ;
@@ -456,7 +456,7 @@ int process_request(struct cpt_vf *cptvf, struct cpt_request_info *req)* Get buffer for union cpt_res_s response * structure and its physical address */ - info->completion_addr =kzalloc (sizeof (union cpt_res_s ),GFP_KERNEL ); + info->completion_addr =kzalloc (sizeof (union cpt_res_s ), req->may_sleep ?GFP_KERNEL :GFP_ATOMIC );if (unlikely (!info->completion_addr)) {dev_err (&pdev->dev,"Unable to allocate memory for completion_addr\n" ); ret = -ENOMEM ;
drivers/crypto/cavium/cpt/request_manager.h +2 -0
@@ -65,6 +65,8 @@ struct cpt_request_info {union ctrl_info ctrl;/* User control information */ struct cptvf_request req;/* Request Information (Core specific) */ +bool may_sleep; +struct buf_ptr in[MAX_BUF_CNT ];struct buf_ptr out[MAX_BUF_CNT ];
drivers/crypto/ccp/ccp-dev.h +1 -0
@@ -471,6 +471,7 @@ struct ccp_sg_workarea {unsigned int sg_used;struct scatterlist *dma_sg; +struct scatterlist *dma_sg_head;struct device *dma_dev;unsigned int dma_count;enum dma_data_direction dma_dir;
drivers/crypto/ccp/ccp-ops.c +26 -11
@@ -67,7 +67,7 @@ static u32 ccp_gen_jobid(struct ccp_device *ccp)static void ccp_sg_free (struct ccp_sg_workarea *wa) {if (wa->dma_count) -dma_unmap_sg (wa->dma_dev, wa->dma_sg, wa->nents, wa->dma_dir); +dma_unmap_sg (wa->dma_dev, wa->dma_sg_head, wa->nents, wa->dma_dir); wa->dma_count =0 ; }
@@ -96,6 +96,7 @@ static int ccp_init_sg_workarea(struct ccp_sg_workarea *wa, struct device *dev,return 0 ; wa->dma_sg = sg; + wa->dma_sg_head = sg; wa->dma_dev = dev; wa->dma_dir = dma_dir; wa->dma_count =dma_map_sg (dev, sg, wa->nents, dma_dir);
@@ -108,14 +109,28 @@ static int ccp_init_sg_workarea(struct ccp_sg_workarea *wa, struct device *dev,static void ccp_update_sg_workarea (struct ccp_sg_workarea *wa,unsigned int len) {unsigned int nbytes =min_t (u64, len, wa->bytes_left); +unsigned int sg_combined_len =0 ;if (!wa->sg)return ; wa->sg_used += nbytes; wa->bytes_left -= nbytes; -if (wa->sg_used == wa->sg->length) { - wa->sg =sg_next (wa->sg); +if (wa->sg_used ==sg_dma_len (wa->dma_sg)) { +/* Advance to the next DMA scatterlist entry */ + wa->dma_sg =sg_next (wa->dma_sg); + +/* In the case that the DMA mapped scatterlist has entries +* that have been merged, the non-DMA mapped scatterlist +* must be advanced multiple times for each merged entry. +* This ensures that the current non-DMA mapped entry +* corresponds to the current DMA mapped entry. +*/ +do { + sg_combined_len += wa->sg->length; + wa->sg =sg_next (wa->sg); + }while (wa->sg_used > sg_combined_len); + wa->sg_used =0 ; } }
@@ -304,7 +319,7 @@ static unsigned int ccp_queue_buf(struct ccp_data *data, unsigned int from)/* Update the structures and generate the count */ buf_count =0 ;while (sg_wa->bytes_left && (buf_count < dm_wa->length)) { - nbytes =min (sg_wa->sg->length - sg_wa->sg_used, + nbytes =min (sg_dma_len (sg_wa->dma_sg) - sg_wa->sg_used, dm_wa->length - buf_count); nbytes =min_t (u64, sg_wa->bytes_left, nbytes);
@@ -336,11 +351,11 @@ static void ccp_prepare_data(struct ccp_data *src, struct ccp_data *dst,* and destination. The resulting len values will always be <= UINT_MAX * because the dma length is an unsigned int. */ - sg_src_len =sg_dma_len (src->sg_wa.sg) - src->sg_wa.sg_used; + sg_src_len =sg_dma_len (src->sg_wa.dma_sg) - src->sg_wa.sg_used; sg_src_len =min_t (u64, src->sg_wa.bytes_left, sg_src_len);if (dst) { - sg_dst_len =sg_dma_len (dst->sg_wa.sg) - dst->sg_wa.sg_used; + sg_dst_len =sg_dma_len (dst->sg_wa.dma_sg) - dst->sg_wa.sg_used; sg_dst_len =min_t (u64, src->sg_wa.bytes_left, sg_dst_len); op_len =min (sg_src_len, sg_dst_len); }else {
@@ -370,7 +385,7 @@ static void ccp_prepare_data(struct ccp_data *src, struct ccp_data *dst,/* Enough data in the sg element, but we need to * adjust for any previously copied data */ - op->src.u.dma.address =sg_dma_address (src->sg_wa.sg); + op->src.u.dma.address =sg_dma_address (src->sg_wa.dma_sg); op->src.u.dma.offset = src->sg_wa.sg_used; op->src.u.dma.length = op_len & ~(block_size -1 );
@@ -391,7 +406,7 @@ static void ccp_prepare_data(struct ccp_data *src, struct ccp_data *dst,/* Enough room in the sg element, but we need to * adjust for any previously used area */ - op->dst.u.dma.address =sg_dma_address (dst->sg_wa.sg); + op->dst.u.dma.address =sg_dma_address (dst->sg_wa.dma_sg); op->dst.u.dma.offset = dst->sg_wa.sg_used; op->dst.u.dma.length = op->src.u.dma.length; }
@@ -2034,7 +2049,7 @@ ccp_run_passthru_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) dst.sg_wa.sg_used =0 ;for (i =1 ; i <= src.sg_wa.dma_count; i++) {if (!dst.sg_wa.sg || - (dst.sg_wa.sg->length < src.sg_wa.sg->length)) { + (sg_dma_len (dst.sg_wa.sg) <sg_dma_len (src.sg_wa.sg))) { ret = -EINVAL ; goto e_dst; }
@@ -2060,8 +2075,8 @@ ccp_run_passthru_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) goto e_dst; } - dst.sg_wa.sg_used += src.sg_wa.sg->length; -if (dst.sg_wa.sg_used == dst.sg_wa.sg->length) { + dst.sg_wa.sg_used +=sg_dma_len (src.sg_wa.sg); +if (dst.sg_wa.sg_used ==sg_dma_len (dst.sg_wa.sg)) { dst.sg_wa.sg =sg_next (dst.sg_wa.sg); dst.sg_wa.sg_used =0 ; }
drivers/crypto/ccree/cc_cipher.c +18 -12
@@ -137,7 +137,6 @@ static int cc_cipher_init(struct crypto_tfm *tfm) skcipher_alg.base);struct device *dev =drvdata_to_dev (cc_alg->drvdata);unsigned int max_key_buf_size = cc_alg->skcipher_alg.max_keysize; -int rc =0 ;dev_dbg (dev,"Initializing context @%p for %s\n" , ctx_p,crypto_tfm_alg_name (tfm));
@@ -149,10 +148,19 @@ static int cc_cipher_init(struct crypto_tfm *tfm) ctx_p->flow_mode = cc_alg->flow_mode; ctx_p->drvdata = cc_alg->drvdata; +if (ctx_p->cipher_mode ==DRV_CIPHER_ESSIV ) { +/* Alloc hash tfm for essiv */ + ctx_p->shash_tfm =crypto_alloc_shash ("sha256-generic" ,0 ,0 ); +if (IS_ERR (ctx_p->shash_tfm)) { +dev_err (dev,"Error allocating hash tfm for ESSIV.\n" ); +return PTR_ERR (ctx_p->shash_tfm); + } + } +/* Allocate key buffer, cache line aligned */ ctx_p->user.key =kmalloc (max_key_buf_size,GFP_KERNEL );if (!ctx_p->user.key) -return -ENOMEM ; + goto free_shash;dev_dbg (dev,"Allocated key buffer in context. key=@%p\n" , ctx_p->user.key);
@@ -164,21 +172,19 @@ static int cc_cipher_init(struct crypto_tfm *tfm)if (dma_mapping_error (dev, ctx_p->user.key_dma_addr)) {dev_err (dev,"Mapping Key %u B at va=%pK for DMA failed\n" , max_key_buf_size, ctx_p->user.key); -return -ENOMEM ; + goto free_key; }dev_dbg (dev,"Mapped key %u B at va=%pK to dma=%pad\n" , max_key_buf_size, ctx_p->user.key, &ctx_p->user.key_dma_addr); -if (ctx_p->cipher_mode ==DRV_CIPHER_ESSIV ) { -/* Alloc hash tfm for essiv */ - ctx_p->shash_tfm =crypto_alloc_shash ("sha256-generic" ,0 ,0 ); -if (IS_ERR (ctx_p->shash_tfm)) { -dev_err (dev,"Error allocating hash tfm for ESSIV.\n" ); -return PTR_ERR (ctx_p->shash_tfm); - } - } +return 0 ; -return rc; +free_key: +kfree (ctx_p->user.key); +free_shash: +crypto_free_shash (ctx_p->shash_tfm); + +return -ENOMEM ; }static void cc_cipher_exit (struct crypto_tfm *tfm)
drivers/crypto/hisilicon/sec/sec_algs.c +18 -16
@@ -175,7 +175,8 @@ static int sec_alloc_and_fill_hw_sgl(struct sec_hw_sgl **sec_sgl,dma_addr_t *psec_sgl, struct scatterlist *sgl, int count, - struct sec_dev_info *info) + struct sec_dev_info *info, + gfp_t gfp) { struct sec_hw_sgl *sgl_current = NULL;struct sec_hw_sgl *sgl_next;
@@ -190,7 +191,7 @@ static int sec_alloc_and_fill_hw_sgl(struct sec_hw_sgl **sec_sgl, sge_index = i %SEC_MAX_SGE_NUM ;if (sge_index ==0 ) { sgl_next =dma_pool_zalloc (info->hw_sgl_pool, -GFP_KERNEL , &sgl_next_dma); + gfp, &sgl_next_dma);if (!sgl_next) { ret = -ENOMEM ; goto err_free_hw_sgls;
@@ -553,14 +554,14 @@ void sec_alg_callback(struct sec_bd_info *resp, void *shadow) }static int sec_alg_alloc_and_calc_split_sizes (int length,size_t **split_sizes, -int *steps) +int *steps,gfp_t gfp) {size_t *sizes;int i;/* Split into suitable sized blocks */ *steps =roundup (length,SEC_REQ_LIMIT ) /SEC_REQ_LIMIT ; - sizes =kcalloc (*steps,sizeof (*sizes),GFP_KERNEL ); + sizes =kcalloc (*steps,sizeof (*sizes), gfp);if (!sizes)return -ENOMEM ;
@@ -576,7 +577,7 @@ static int sec_map_and_split_sg(struct scatterlist *sgl, size_t *split_sizes, int steps, struct scatterlist ***splits, int **splits_nents, int sgl_len_in, - struct device *dev) + struct device *dev, gfp_t gfp) { int ret, count;
@@ -584,12 +585,12 @@ static int sec_map_and_split_sg(struct scatterlist *sgl, size_t *split_sizes,if (!count)return -EINVAL ; - *splits =kcalloc (steps,sizeof (struct scatterlist *),GFP_KERNEL ); + *splits =kcalloc (steps,sizeof (struct scatterlist *), gfp);if (!*splits) { ret = -ENOMEM ; goto err_unmap_sg; } - *splits_nents =kcalloc (steps,sizeof (int ),GFP_KERNEL ); + *splits_nents =kcalloc (steps,sizeof (int ), gfp);if (!*splits_nents) { ret = -ENOMEM ; goto err_free_splits;
@@ -597,7 +598,7 @@ static int sec_map_and_split_sg(struct scatterlist *sgl, size_t *split_sizes,/* output the scatter list before and after this */ ret =sg_split (sgl, count,0 , steps, split_sizes, - *splits, *splits_nents,GFP_KERNEL ); + *splits, *splits_nents, gfp);if (ret) { ret = -ENOMEM ; goto err_free_splits_nents;
@@ -638,13 +639,13 @@ static struct sec_request_el int el_size, bool different_dest, struct scatterlist *sgl_in, int n_ents_in, struct scatterlist *sgl_out, int n_ents_out, - struct sec_dev_info *info) + struct sec_dev_info *info, gfp_t gfp) { struct sec_request_el *el;struct sec_bd_info *req;int ret; - el =kzalloc (sizeof (*el),GFP_KERNEL ); + el =kzalloc (sizeof (*el), gfp);if (!el)return ERR_PTR (-ENOMEM ); el->el_length = el_size;
@@ -676,7 +677,7 @@ static struct sec_request_el el->sgl_in = sgl_in; ret =sec_alloc_and_fill_hw_sgl (&el->in, &el->dma_in, el->sgl_in, - n_ents_in, info); + n_ents_in, info, gfp);if (ret) goto err_free_el;
@@ -687,7 +688,7 @@ static struct sec_request_el el->sgl_out = sgl_out; ret =sec_alloc_and_fill_hw_sgl (&el->out, &el->dma_out, el->sgl_out, - n_ents_out, info); + n_ents_out, info, gfp);if (ret) goto err_free_hw_sgl_in;
@@ -728,6 +729,7 @@ static int sec_alg_skcipher_crypto(struct skcipher_request *skreq,int *splits_out_nents =NULL ;struct sec_request_el *el, *temp;bool split = skreq->src != skreq->dst; +gfp_t gfp = skreq->base.flags &CRYPTO_TFM_REQ_MAY_SLEEP ?GFP_KERNEL :GFP_ATOMIC ;mutex_init (&sec_req->lock); sec_req->req_base = &skreq->base;
@@ -736,13 +738,13 @@ static int sec_alg_skcipher_crypto(struct skcipher_request *skreq, sec_req->len_in =sg_nents (skreq->src); ret =sec_alg_alloc_and_calc_split_sizes (skreq->cryptlen, &split_sizes, - &steps); + &steps, gfp);if (ret)return ret; sec_req->num_elements = steps; ret =sec_map_and_split_sg (skreq->src, split_sizes, steps, &splits_in, &splits_in_nents, sec_req->len_in, - info->dev); + info->dev, gfp);if (ret) goto err_free_split_sizes;
@@ -750,7 +752,7 @@ static int sec_alg_skcipher_crypto(struct skcipher_request *skreq, sec_req->len_out =sg_nents (skreq->dst); ret =sec_map_and_split_sg (skreq->dst, split_sizes, steps, &splits_out, &splits_out_nents, - sec_req->len_out, info->dev); + sec_req->len_out, info->dev, gfp);if (ret) goto err_unmap_in_sg; }
@@ -783,7 +785,7 @@ static int sec_alg_skcipher_crypto(struct skcipher_request *skreq, splits_in[i], splits_in_nents[i], split ? splits_out[i] :NULL , split ? splits_out_nents[i] :0 , - info); + info, gfp);if (IS_ERR (el)) { ret =PTR_ERR (el); goto err_free_elements;
drivers/crypto/qat/qat_common/qat_uclo.c +7 -2
@@ -332,13 +332,18 @@ static int qat_uclo_create_batch_init_list(struct icp_qat_fw_loader_handle }return 0 ; out_err: +/* Do not free the list head unless we allocated it. */ + tail_old = tail_old->next; +if (flag) { +kfree (*init_tab_base); + *init_tab_base =NULL ; + } +while (tail_old) { mem_init = tail_old->next;kfree (tail_old); tail_old = mem_init; } -if (flag) -kfree (*init_tab_base);return -ENOMEM ; }
drivers/edac/edac_device_sysfs.c +1 -0
@@ -275,6 +275,7 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)/* Error exit stack */ err_kobj_reg: +kobject_put (&edac_dev->kobj);module_put (edac_dev->owner); err_out:
drivers/edac/edac_pci_sysfs.c +1 -1
@@ -386,7 +386,7 @@ static int edac_pci_main_kobj_setup(void)/* Error unwind statck */ kobject_init_and_add_fail: -kfree (edac_pci_top_main_kobj); +kobject_put (edac_pci_top_main_kobj); kzalloc_fail:module_put (THIS_MODULE );
drivers/firmware/arm_scmi/scmi_pm_domain.c +6 -6
@@ -85,7 +85,10 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev)for (i =0 ; i < num_domains; i++, scmi_pd++) {u32 state; - domains[i] = &scmi_pd->genpd; +if (handle->power_ops->state_get (handle, i, &state)) { +dev_warn (dev,"failed to get state for domain %d\n" , i); +continue ; + } scmi_pd->domain = i; scmi_pd->handle = handle;
@@ -94,13 +97,10 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev) scmi_pd->genpd.power_off = scmi_pd_power_off; scmi_pd->genpd.power_on = scmi_pd_power_on; -if (handle->power_ops->state_get (handle, i, &state)) { -dev_warn (dev,"failed to get state for domain %d\n" , i); -continue ; - } -pm_genpd_init (&scmi_pd->genpd,NULL , state ==SCMI_POWER_STATE_GENERIC_OFF ); + + domains[i] = &scmi_pd->genpd; } scmi_pd_data->domains = domains;
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +12 -7
@@ -396,7 +396,9 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring, ring->fence_drv.gpu_addr = adev->uvd.inst[ring->me].gpu_addr + index; }amdgpu_fence_write (ring,atomic_read (&ring->fence_drv.last_seq)); -amdgpu_irq_get (adev, irq_src, irq_type); + +if (irq_src) +amdgpu_irq_get (adev, irq_src, irq_type); ring->fence_drv.irq_src = irq_src; ring->fence_drv.irq_type = irq_type;
@@ -508,8 +510,9 @@ void amdgpu_fence_driver_fini(struct amdgpu_device *adev)/* no need to trigger GPU reset as we are unloading */ amdgpu_fence_driver_force_completion (ring); } -amdgpu_irq_put (adev, ring->fence_drv.irq_src, - ring->fence_drv.irq_type); +if (ring->fence_drv.irq_src) +amdgpu_irq_put (adev, ring->fence_drv.irq_src, + ring->fence_drv.irq_type);drm_sched_fini (&ring->sched);del_timer_sync (&ring->fence_drv.fallback_timer);for (j =0 ; j <= ring->fence_drv.num_fences_mask; ++j)
@@ -545,8 +548,9 @@ void amdgpu_fence_driver_suspend(struct amdgpu_device *adev) }/* disable the interrupt */ -amdgpu_irq_put (adev, ring->fence_drv.irq_src, - ring->fence_drv.irq_type); +if (ring->fence_drv.irq_src) +amdgpu_irq_put (adev, ring->fence_drv.irq_src, + ring->fence_drv.irq_type); } }
@@ -572,8 +576,9 @@ void amdgpu_fence_driver_resume(struct amdgpu_device *adev)continue ;/* enable the interrupt */ -amdgpu_irq_get (adev, ring->fence_drv.irq_src, - ring->fence_drv.irq_type); +if (ring->fence_drv.irq_src) +amdgpu_irq_get (adev, ring->fence_drv.irq_src, + ring->fence_drv.irq_type); } }
drivers/gpu/drm/arm/malidp_planes.c +1 -1
@@ -446,7 +446,7 @@ int malidp_de_planes_init(struct drm_device *drm)const struct malidp_hw_regmap *map = &malidp->dev->hw->map;struct malidp_plane *plane =NULL ;enum drm_plane_type plane_type; -unsigned long crtcs =1 << drm->mode_config.num_crtc; +unsigned long crtcs =BIT (drm->mode_config.num_crtc);unsigned long flags =DRM_MODE_ROTATE_0 |DRM_MODE_ROTATE_90 |DRM_MODE_ROTATE_180 |DRM_MODE_ROTATE_270 |DRM_MODE_REFLECT_X |DRM_MODE_REFLECT_Y ;u32 *formats;
drivers/gpu/drm/bridge/sil-sii8620.c +1 -1
@@ -180,7 +180,7 @@ static void sii8620_read_buf(struct sii8620 *ctx, u16 addr, u8 *buf, int len)static u8 sii8620_readb (struct sii8620 *ctx,u16 addr) { -u8 ret; +u8 ret =0 ;sii8620_read_buf (ctx, addr, &ret,1 );return ret;
drivers/gpu/drm/drm_debugfs.c +4 -4
@@ -265,13 +265,13 @@ static ssize_t connector_write(struct file *file, const char __user *ubuf, buf[len] ='\0' ; -if (!strcmp (buf,"on" )) +if (sysfs_streq (buf,"on" )) connector->force =DRM_FORCE_ON ; -else if (!strcmp (buf,"digital" )) +else if (sysfs_streq (buf,"digital" )) connector->force =DRM_FORCE_ON_DIGITAL ; -else if (!strcmp (buf,"off" )) +else if (sysfs_streq (buf,"off" )) connector->force =DRM_FORCE_OFF ; -else if (!strcmp (buf,"unspecified" )) +else if (sysfs_streq (buf,"unspecified" )) connector->force =DRM_FORCE_UNSPECIFIED ;else return -EINVAL ;
drivers/gpu/drm/drm_mipi_dsi.c +3 -3
@@ -1034,11 +1034,11 @@ EXPORT_SYMBOL(mipi_dsi_dcs_set_pixel_format);*/ int mipi_dsi_dcs_set_tear_scanline (struct mipi_dsi_device *dsi,u16 scanline) { -u8 payload[3 ] = {MIPI_DCS_SET_TEAR_SCANLINE , scanline >>8 , - scanline &0xff }; +u8 payload[2 ] = { scanline >>8 , scanline &0xff };ssize_t err; - err =mipi_dsi_generic_write (dsi, payload,sizeof (payload)); + err =mipi_dsi_dcs_write (dsi,MIPI_DCS_SET_TEAR_SCANLINE , payload, +sizeof (payload));if (err <0 )return err;
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +14 -5
@@ -694,7 +694,7 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu) ret =pm_runtime_get_sync (gpu->dev);if (ret <0 ) {dev_err (gpu->dev,"Failed to enable GPU power domain\n" ); -return ret; + goto pm_put; }etnaviv_hw_identify (gpu);
@@ -808,6 +808,7 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu) gpu->mmu =NULL ; fail:pm_runtime_mark_last_busy (gpu->dev); +pm_put:pm_runtime_put_autosuspend (gpu->dev);return ret;
@@ -848,7 +849,7 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m) ret =pm_runtime_get_sync (gpu->dev);if (ret <0 ) -return ret; + goto pm_put; dma_lo =gpu_read (gpu,VIVS_FE_DMA_LOW ); dma_hi =gpu_read (gpu,VIVS_FE_DMA_HIGH );
@@ -971,6 +972,7 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m) ret =0 ;pm_runtime_mark_last_busy (gpu->dev); +pm_put:pm_runtime_put_autosuspend (gpu->dev);return ret;
@@ -985,7 +987,7 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gpu *gpu)dev_err (gpu->dev,"recover hung GPU!\n" );if (pm_runtime_get_sync (gpu->dev) <0 ) -return ; + goto pm_put;mutex_lock (&gpu->lock);
@@ -1005,6 +1007,7 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gpu *gpu)mutex_unlock (&gpu->lock);pm_runtime_mark_last_busy (gpu->dev); +pm_put:pm_runtime_put_autosuspend (gpu->dev); }
@@ -1278,8 +1281,10 @@ struct dma_fence *etnaviv_gpu_submit(struct etnaviv_gem_submit *submit)if (!submit->runtime_resumed) { ret =pm_runtime_get_sync (gpu->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (gpu->dev);return NULL ; + } submit->runtime_resumed = true; }
@@ -1296,6 +1301,7 @@ struct dma_fence *etnaviv_gpu_submit(struct etnaviv_gem_submit *submit) ret =event_alloc (gpu, nr_events, event);if (ret) {DRM_ERROR ("no free events\n" ); +pm_runtime_put_noidle (gpu->dev);return NULL ; }
@@ -1459,7 +1465,7 @@ static int etnaviv_gpu_clk_enable(struct etnaviv_gpu *gpu)if (gpu->clk_bus) { ret =clk_prepare_enable (gpu->clk_bus);if (ret) -return ret; + goto disable_clk_reg; }if (gpu->clk_core) {
@@ -1482,6 +1488,9 @@ static int etnaviv_gpu_clk_enable(struct etnaviv_gpu *gpu) disable_clk_bus:if (gpu->clk_bus)clk_disable_unprepare (gpu->clk_bus); +disable_clk_reg: +if (gpu->clk_reg) +clk_disable_unprepare (gpu->clk_reg);return ret; }
drivers/gpu/drm/imx/imx-tve.c +10 -10
@@ -498,6 +498,13 @@ static int imx_tve_register(struct drm_device *drm, struct imx_tve *tve)return 0 ; } +static void imx_tve_disable_regulator (void *data) +{ +struct imx_tve *tve = data; + +regulator_disable (tve->dac_reg); +} +static bool imx_tve_readable_reg (struct device *dev,unsigned int reg) {return (reg %4 ==0 ) && (reg <=0xdc );
@@ -622,6 +629,9 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data) ret =regulator_enable (tve->dac_reg);if (ret)return ret; + ret =devm_add_action_or_reset (dev, imx_tve_disable_regulator, tve); +if (ret) +return ret; } tve->clk =devm_clk_get (dev,"tve" );
@@ -668,18 +678,8 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data)return 0 ; } -static void imx_tve_unbind (struct device *dev,struct device *master, -void *data) -{ -struct imx_tve *tve =dev_get_drvdata (dev); - -if (!IS_ERR (tve->dac_reg)) -regulator_disable (tve->dac_reg); -} -static const struct component_ops imx_tve_ops = { .bind = imx_tve_bind, - .unbind = imx_tve_unbind, };static int imx_tve_probe (struct platform_device *pdev)
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +1 -1
@@ -659,7 +659,7 @@ static void dpu_crtc_frame_event_cb(void *data, u32 event)spin_unlock_irqrestore (&dpu_crtc->spin_lock, flags);if (!fevent) { -DRM_ERROR ("crtc%d event %d overflow\n" , crtc->base.id, event); +DRM_ERROR_RATELIMITED ("crtc%d event %d overflow\n" , crtc->base.id, event);return ; }
drivers/gpu/drm/nouveau/nouveau_drm.c +6 -2
@@ -899,8 +899,10 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)/* need to bring up power immediately if opening device */ ret =pm_runtime_get_sync (dev->dev); -if (ret <0 && ret != -EACCES ) +if (ret <0 && ret != -EACCES ) { +pm_runtime_put_autosuspend (dev->dev);return ret; + }get_task_comm (tmpname, current);snprintf (name,sizeof (name),"%s[%d]" , tmpname,pid_nr (fpriv->pid));
@@ -980,8 +982,10 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)long ret; ret =pm_runtime_get_sync (dev->dev); -if (ret <0 && ret != -EACCES ) +if (ret <0 && ret != -EACCES ) { +pm_runtime_put_autosuspend (dev->dev);return ret; + }switch (_IOC_NR (cmd) -DRM_COMMAND_BASE ) {case DRM_NOUVEAU_NVIF :
drivers/gpu/drm/nouveau/nouveau_gem.c +3 -1
@@ -46,8 +46,10 @@ nouveau_gem_object_del(struct drm_gem_object *gem)int ret; ret =pm_runtime_get_sync (dev); -if (WARN_ON (ret <0 && ret != -EACCES )) +if (WARN_ON (ret <0 && ret != -EACCES )) { +pm_runtime_put_autosuspend (dev);return ; + }if (gem->import_attach)drm_prime_gem_destroy (gem, nvbo->bo.sg);
drivers/gpu/drm/nouveau/nouveau_sgdma.c +3 -6
@@ -96,12 +96,9 @@ nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo, uint32_t page_flags)else nvbe->ttm.ttm.func = &nv50_sgdma_backend; -if (ttm_dma_tt_init (&nvbe->ttm, bo, page_flags)) -/* -* A failing ttm_dma_tt_init() will call ttm_tt_destroy() -* and thus our nouveau_sgdma_destroy() hook, so we don't need -* to free nvbe here. -*/ +if (ttm_dma_tt_init (&nvbe->ttm, bo, page_flags)) { +kfree (nvbe);return NULL ; + }return &nvbe->ttm.ttm; }
drivers/gpu/drm/panel/panel-simple.c +1 -1
@@ -1503,7 +1503,7 @@ static const struct drm_display_mode lg_lb070wv8_mode = {static const struct panel_desc lg_lb070wv8 = { .modes = &lg_lb070wv8_mode, .num_modes =1 , - .bpc =16 , + .bpc =8 , .size = { .width =151 , .height =91 ,
drivers/gpu/drm/radeon/ci_dpm.c +1 -1
@@ -4364,7 +4364,7 @@ static int ci_set_mc_special_registers(struct radeon_device *rdev, table->mc_reg_table_entry[k].mc_data[j] |=0x100 ; } j++; -if (j >SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE ) +if (j >=SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE )return -EINVAL ;if (!pi->mem_gddr5) {
drivers/gpu/drm/radeon/radeon_display.c +3 -1
@@ -625,8 +625,10 @@ radeon_crtc_set_config(struct drm_mode_set *set, dev = set->crtc->dev; ret =pm_runtime_get_sync (dev->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_autosuspend (dev->dev);return ret; + } ret =drm_crtc_helper_set_config (set, ctx);
drivers/gpu/drm/radeon/radeon_drv.c +3 -6
@@ -168,12 +168,7 @@ int radeon_no_wb;int radeon_modeset =-1 ;int radeon_dynclks =-1 ;int radeon_r4xx_atom =0 ; -#ifdef __powerpc__ -/* Default to PCI on PowerPC (fdo #95017) */ int radeon_agpmode =-1 ; -#else -int radeon_agpmode =0 ; -#endif int radeon_vram_limit =0 ;int radeon_gart_size =-1 ;/* auto */ int radeon_benchmarking =0 ;
@@ -523,8 +518,10 @@ long radeon_drm_ioctl(struct file *filp,long ret; dev = file_priv->minor->dev; ret =pm_runtime_get_sync (dev->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_autosuspend (dev->dev);return ret; + } ret =drm_ioctl (filp, cmd, arg);
drivers/gpu/drm/radeon/radeon_kms.c +3 -1
@@ -627,8 +627,10 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) file_priv->driver_priv =NULL ; r =pm_runtime_get_sync (dev->dev); -if (r <0 ) +if (r <0 ) { +pm_runtime_put_autosuspend (dev->dev);return r; + }/* new gpu have virtual address space support */ if (rdev->family >=CHIP_CAYMAN ) {
drivers/gpu/drm/tilcdc/tilcdc_panel.c +5 -1
@@ -150,12 +150,16 @@ static int panel_connector_get_modes(struct drm_connector *connector)int i;for (i =0 ; i < timings->num_timings; i++) { -struct drm_display_mode *mode =drm_mode_create (dev); +struct drm_display_mode *mode;struct videomode vm;if (videomode_from_timings (timings, &vm, i))break ; + mode =drm_mode_create (dev); +if (!mode) +break ; +drm_display_mode_from_videomode (&vm, mode); mode->type =DRM_MODE_TYPE_DRIVER ;
drivers/gpu/drm/ttm/ttm_tt.c +0 -3
@@ -241,7 +241,6 @@ int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,ttm_tt_init_fields (ttm, bo, page_flags);if (ttm_tt_alloc_page_directory (ttm)) { -ttm_tt_destroy (ttm);pr_err ("Failed allocating page table\n" );return -ENOMEM ; }
@@ -265,7 +264,6 @@ int ttm_dma_tt_init(struct ttm_dma_tt *ttm_dma, struct ttm_buffer_object *bo,INIT_LIST_HEAD (&ttm_dma->pages_list);if (ttm_dma_tt_alloc_page_directory (ttm_dma)) { -ttm_tt_destroy (ttm);pr_err ("Failed allocating page table\n" );return -ENOMEM ; }
@@ -287,7 +285,6 @@ int ttm_sg_tt_init(struct ttm_dma_tt *ttm_dma, struct ttm_buffer_object *bo,else ret =ttm_dma_tt_alloc_page_directory (ttm_dma);if (ret) { -ttm_tt_destroy (ttm);pr_err ("Failed allocating page table\n" );return -ENOMEM ; }
drivers/gpu/host1x/debug.c +4 -0
@@ -25,6 +25,8 @@#include "debug.h" #include "channel.h" +static DEFINE_MUTEX (debug_lock); +unsigned int host1x_debug_trace_cmdbuf;static pid_t host1x_debug_force_timeout_pid;
@@ -61,12 +63,14 @@ static int show_channel(struct host1x_channel *ch, void *data, bool show_fifo)struct output *o = data;mutex_lock (&ch->cdma.lock); +mutex_lock (&debug_lock);if (show_fifo)host1x_hw_show_channel_fifo (m, ch, o);host1x_hw_show_channel_cdma (m, ch, o); +mutex_unlock (&debug_lock);mutex_unlock (&ch->cdma.lock);return 0 ;
drivers/hid/hid-input.c +3 -3
@@ -362,13 +362,13 @@ static int hidinput_query_battery_capacity(struct hid_device *dev)u8 *buf;int ret; - buf =kmalloc (2 ,GFP_KERNEL ); + buf =kmalloc (4 ,GFP_KERNEL );if (!buf)return -ENOMEM ; - ret =hid_hw_raw_request (dev, dev->battery_report_id, buf,2 , + ret =hid_hw_raw_request (dev, dev->battery_report_id, buf,4 , dev->battery_report_type,HID_REQ_GET_REPORT ); -if (ret !=2 ) { +if (ret <2 ) {kfree (buf);return -ENODATA ; }
drivers/hwtracing/coresight/coresight-tmc-etf.c +6 -7
@@ -583,15 +583,14 @@ int tmc_read_unprepare_etb(struct tmc_drvdata *drvdata)spin_lock_irqsave (&drvdata->spinlock, flags); -/* There is no point in reading a TMC in HW FIFO mode */ - mode =readl_relaxed (drvdata->base +TMC_MODE ); -if (mode !=TMC_MODE_CIRCULAR_BUFFER ) { -spin_unlock_irqrestore (&drvdata->spinlock, flags); -return -EINVAL ; - } -/* Re-enable the TMC if need be */ if (drvdata->mode ==CS_MODE_SYSFS ) { +/* There is no point in reading a TMC in HW FIFO mode */ + mode =readl_relaxed (drvdata->base +TMC_MODE ); +if (mode !=TMC_MODE_CIRCULAR_BUFFER ) { +spin_unlock_irqrestore (&drvdata->spinlock, flags); +return -EINVAL ; + }/* * The trace run will continue with the same allocated trace * buffer. As such zero-out the buffer so that we don't end
drivers/infiniband/core/verbs.c +1 -1
@@ -1617,7 +1617,7 @@ static int _ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr,if (!(rdma_protocol_ib (qp->device, attr->alt_ah_attr.port_num) &&rdma_protocol_ib (qp->device, port))) { - ret =EINVAL ; + ret = -EINVAL ; goto out; } }
drivers/infiniband/hw/qedr/qedr.h +2 -2
@@ -351,10 +351,10 @@ struct qedr_srq_hwq_info {u32 wqe_prod;u32 sge_prod;u32 wr_prod_cnt; -u32 wr_cons_cnt; +atomic_t wr_cons_cnt;u32 num_elems; -u32 *virt_prod_pair_addr; +struct rdma_srq_producers *virt_prod_pair_addr;dma_addr_t phy_prod_pair_addr; };
drivers/infiniband/hw/qedr/verbs.c +10 -12
@@ -3577,7 +3577,7 @@ static u32 qedr_srq_elem_left(struct qedr_srq_hwq_info *hw_srq)* count and consumer count and subtract it from max * work request supported so that we get elements left. */ - used = hw_srq->wr_prod_cnt - hw_srq->wr_cons_cnt; + used = hw_srq->wr_prod_cnt - (u32 )atomic_read (&hw_srq->wr_cons_cnt);return hw_srq->max_wr - used; }
@@ -3592,7 +3592,6 @@ int qedr_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr,unsigned long flags;int status =0 ;u32 num_sge; -u32 offset;spin_lock_irqsave (&srq->lock, flags);
@@ -3605,7 +3604,8 @@ int qedr_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr,if (!qedr_srq_elem_left (hw_srq) || wr->num_sge > srq->hw_srq.max_sges) {DP_ERR (dev,"Can't post WR (%d,%d) || (%d > %d)\n" , - hw_srq->wr_prod_cnt, hw_srq->wr_cons_cnt, + hw_srq->wr_prod_cnt, +atomic_read (&hw_srq->wr_cons_cnt), wr->num_sge, srq->hw_srq.max_sges); status = -ENOMEM ; *bad_wr = wr;
@@ -3639,22 +3639,20 @@ int qedr_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr, hw_srq->sge_prod++; } -/* Flush WQE and SGE information before +/* Update WQE and SGE information before * updating producer. */ -wmb (); +dma_wmb ();/* SRQ producer is 8 bytes. Need to update SGE producer index * in first 4 bytes and need to update WQE producer in * next 4 bytes. */ - *srq->hw_srq.virt_prod_pair_addr = hw_srq->sge_prod; - offset = offsetof(struct rdma_srq_producers , wqe_prod); - *((u8 *)srq->hw_srq.virt_prod_pair_addr + offset) = - hw_srq->wqe_prod; + srq->hw_srq.virt_prod_pair_addr->sge_prod = hw_srq->sge_prod; +/* Make sure sge producer is updated first */ +dma_wmb (); + srq->hw_srq.virt_prod_pair_addr->wqe_prod = hw_srq->wqe_prod; -/* Flush producer after updating it. */ -wmb (); wr = wr->next; }
@@ -4077,7 +4075,7 @@ static int process_resp_one_srq(struct qedr_dev *dev, struct qedr_qp *qp, }else {__process_resp_one (dev, qp, cq, wc, resp, wr_id); } - srq->hw_srq.wr_cons_cnt++; +atomic_inc (&srq->hw_srq.wr_cons_cnt);return 1 ; }
drivers/infiniband/sw/rxe/rxe_recv.c +5 -1
@@ -332,10 +332,14 @@ static void rxe_rcv_mcast_pkt(struct rxe_dev *rxe, struct sk_buff *skb)static int rxe_match_dgid (struct rxe_dev *rxe,struct sk_buff *skb) { +struct rxe_pkt_info *pkt =SKB_TO_PKT (skb);const struct ib_gid_attr *gid_attr;union ib_gid dgid;union ib_gid *pdgid; +if (pkt->mask &RXE_LOOPBACK_MASK ) +return 0 ; +if (skb->protocol ==htons (ETH_P_IP )) {ipv6_addr_set_v4mapped (ip_hdr (skb)->daddr, (struct in6_addr *)&dgid);
@@ -368,7 +372,7 @@ void rxe_rcv(struct sk_buff *skb)if (unlikely (skb->len < pkt->offset +RXE_BTH_BYTES )) goto drop; -if (unlikely (rxe_match_dgid (rxe, skb) <0 )) { +if (rxe_match_dgid (rxe, skb) <0 ) {pr_warn_ratelimited ("failed matching dgid\n" ); goto drop; }
drivers/infiniband/sw/rxe/rxe_verbs.c +4 -1
@@ -733,6 +733,7 @@ static int rxe_post_send_kernel(struct rxe_qp *qp, const struct ib_send_wr *wr,unsigned int mask;unsigned int length =0 ;int i; +struct ib_send_wr *next;while (wr) { mask =wr_opcode_mask (wr->opcode, qp);
@@ -749,6 +750,8 @@ static int rxe_post_send_kernel(struct rxe_qp *qp, const struct ib_send_wr *wr,break ; } + next = wr->next; + length =0 ;for (i =0 ; i < wr->num_sge; i++) length += wr->sg_list[i].length;
@@ -759,7 +762,7 @@ static int rxe_post_send_kernel(struct rxe_qp *qp, const struct ib_send_wr *wr, *bad_wr = wr;break ; } - wr = wr->next; + wr = next; }rxe_run_task (&qp->req.task,1 );
drivers/iommu/intel_irq_remapping.c +8 -0
@@ -601,13 +601,21 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu)static void intel_teardown_irq_remapping (struct intel_iommu *iommu) { +struct fwnode_handle *fn; +if (iommu && iommu->ir_table) {if (iommu->ir_msi_domain) { + fn = iommu->ir_msi_domain->fwnode; +irq_domain_remove (iommu->ir_msi_domain); +irq_domain_free_fwnode (fn); iommu->ir_msi_domain =NULL ; }if (iommu->ir_domain) { + fn = iommu->ir_domain->fwnode; +irq_domain_remove (iommu->ir_domain); +irq_domain_free_fwnode (fn); iommu->ir_domain =NULL ; } free_pages((unsigned long)iommu->ir_table->base,
drivers/irqchip/irq-mtk-sysirq.c +4 -4
@@ -23,7 +23,7 @@#include <linux/spinlock.h> struct mtk_sysirq_chip_data { -spinlock_t lock; +raw_spinlock_t lock;u32 nr_intpol_bases;void __iomem **intpol_bases;u32 *intpol_words;
@@ -45,7 +45,7 @@ static int mtk_sysirq_set_type(struct irq_data *data, unsigned int type) reg_index = chip_data->which_word[hwirq]; offset = hwirq &0x1f ; -spin_lock_irqsave (&chip_data->lock, flags); +raw_spin_lock_irqsave (&chip_data->lock, flags); value =readl_relaxed (base + reg_index *4 );if (type ==IRQ_TYPE_LEVEL_LOW || type ==IRQ_TYPE_EDGE_FALLING ) {if (type ==IRQ_TYPE_LEVEL_LOW )
@@ -61,7 +61,7 @@ static int mtk_sysirq_set_type(struct irq_data *data, unsigned int type) data = data->parent_data; ret = data->chip->irq_set_type (data, type); -spin_unlock_irqrestore (&chip_data->lock, flags); +raw_spin_unlock_irqrestore (&chip_data->lock, flags);return ret; }
@@ -220,7 +220,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node, ret = -ENOMEM ; goto out_free_which_word; } -spin_lock_init (&chip_data->lock); +raw_spin_lock_init (&chip_data->lock);return 0 ;
drivers/leds/led-class.c +1 -0
@@ -173,6 +173,7 @@ void led_classdev_suspend(struct led_classdev *led_cdev) { led_cdev->flags |=LED_SUSPENDED ;led_set_brightness_nopm (led_cdev,0 ); +flush_work (&led_cdev->set_brightness_work); }EXPORT_SYMBOL_GPL (led_classdev_suspend);
drivers/leds/leds-lm355x.c +4 -3
@@ -168,18 +168,19 @@ static int lm355x_chip_init(struct lm355x_chip_data *chip)/* input and output pins configuration */ switch (chip->type) {case CHIP_LM3554 : - reg_val = pdata->pin_tx2 | pdata->ntc_pin; + reg_val = (u32 )pdata->pin_tx2 | (u32 )pdata->ntc_pin; ret =regmap_update_bits (chip->regmap,0xE0 ,0x28 , reg_val);if (ret <0 ) goto out; - reg_val = pdata->pass_mode; + reg_val = (u32 )pdata->pass_mode; ret =regmap_update_bits (chip->regmap,0xA0 ,0x04 , reg_val);if (ret <0 ) goto out;break ;case CHIP_LM3556 : - reg_val = pdata->pin_tx2 | pdata->ntc_pin | pdata->pass_mode; + reg_val = (u32 )pdata->pin_tx2 | (u32 )pdata->ntc_pin | + (u32 )pdata->pass_mode; ret =regmap_update_bits (chip->regmap,0x0A ,0xC4 , reg_val);if (ret <0 ) goto out;
drivers/md/bcache/super.c +8 -1
@@ -2013,7 +2013,14 @@ static const char *register_cache_set(struct cache *ca) sysfs_create_link(&c->kobj, &ca->kobj, buf)) goto err; -if (ca->sb.seq > c->sb.seq) { +/* +* A special case is both ca->sb.seq and c->sb.seq are 0, +* such condition happens on a new created cache device whose +* super block is never flushed yet. In this case c->sb.version +* and other members should be updated too, otherwise we will +* have a mistaken super block version in cache set. +*/ +if (ca->sb.seq > c->sb.seq || c->sb.seq ==0 ) { c->sb.version = ca->sb.version;memcpy (c->sb.set_uuid, ca->sb.set_uuid,16 ); c->sb.flags = ca->sb.flags;
drivers/md/md-cluster.c +1 -0
@@ -1443,6 +1443,7 @@ static void unlock_all_bitmaps(struct mddev *mddev) } }kfree (cinfo->other_bitmap_lockres); + cinfo->other_bitmap_lockres =NULL ; } }
drivers/media/firewire/firedtv-fw.c +2 -0
@@ -271,6 +271,8 @@ static int node_probe(struct fw_unit *unit, const struct ieee1394_device_id *id) name_len =fw_csr_string (unit->directory,CSR_MODEL , name,sizeof (name)); +if (name_len <0 ) +return name_len;for (i =ARRAY_SIZE (model_names); --i; )if (strlen (model_names[i]) <= name_len &&strncmp (name, model_names[i], name_len) ==0 )
drivers/media/platform/exynos4-is/media-dev.c +3 -0
@@ -1259,6 +1259,9 @@ static int fimc_md_get_pinctrl(struct fimc_md *fmd) pctl->state_idle =pinctrl_lookup_state (pctl->pinctrl,PINCTRL_STATE_IDLE ); +if (IS_ERR (pctl->state_idle)) +return PTR_ERR (pctl->state_idle); +return 0 ; }
drivers/media/platform/omap3isp/isppreview.c +3 -1
@@ -2290,7 +2290,7 @@ static int preview_init_entities(struct isp_prev_device *prev) me->ops = &preview_media_ops; ret =media_entity_pads_init (me,PREV_PADS_NUM , pads);if (ret <0 ) -return ret; + goto error_handler_free;preview_init_formats (sd,NULL );
@@ -2323,6 +2323,8 @@ static int preview_init_entities(struct isp_prev_device *prev)omap3isp_video_cleanup (&prev->video_in); error_video_in:media_entity_cleanup (&prev->subdev.entity); +error_handler_free: +v4l2_ctrl_handler_free (&prev->ctrls);return ret; }
drivers/misc/cxl/sysfs.c +1 -1
@@ -628,7 +628,7 @@ static struct afu_config_record *cxl_sysfs_afu_new_cr(struct cxl_afu *afu, int c rc =kobject_init_and_add (&cr->kobj, &afu_config_record_type, &afu->dev.kobj,"cr%i" , cr->cr);if (rc) - goto err; + goto err1; rc =sysfs_create_bin_file (&cr->kobj, &cr->config_attr);if (rc)
drivers/mtd/nand/raw/qcom_nandc.c +6 -1
@@ -466,11 +466,13 @@ struct qcom_nand_host {* among different NAND controllers. * @ecc_modes - ecc mode for NAND * @is_bam - whether NAND controller is using BAM +* @is_qpic - whether NAND CTRL is part of qpic IP * @dev_cmd_reg_start - NAND_DEV_CMD_* registers starting offset */ struct qcom_nandc_props {u32 ecc_modes;bool is_bam; +bool is_qpic;u32 dev_cmd_reg_start; };
@@ -2766,7 +2768,8 @@ static int qcom_nandc_setup(struct qcom_nand_controller *nandc)u32 nand_ctrl;/* kill onenand */ -nandc_write (nandc,SFLASHC_BURST_CFG ,0 ); +if (!nandc->props->is_qpic) +nandc_write (nandc,SFLASHC_BURST_CFG ,0 );nandc_write (nandc,dev_cmd_reg_addr (nandc,NAND_DEV_CMD_VLD ),NAND_DEV_CMD_VLD_VAL );
@@ -3022,12 +3025,14 @@ static const struct qcom_nandc_props ipq806x_nandc_props = {static const struct qcom_nandc_props ipq4019_nandc_props = { .ecc_modes = (ECC_BCH_4BIT |ECC_BCH_8BIT ), .is_bam = true, + .is_qpic = true, .dev_cmd_reg_start =0x0 , };static const struct qcom_nandc_props ipq8074_nandc_props = { .ecc_modes = (ECC_BCH_4BIT |ECC_BCH_8BIT ), .is_bam = true, + .is_qpic = true, .dev_cmd_reg_start =0x7000 , };
drivers/net/dsa/mv88e6xxx/chip.c +0 -1
@@ -2930,7 +2930,6 @@ static const struct mv88e6xxx_ops mv88e6097_ops = { .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_egress_floods = mv88e6352_port_set_egress_floods, .port_set_ether_type = mv88e6351_port_set_ether_type, - .port_set_jumbo_size = mv88e6165_port_set_jumbo_size, .port_egress_rate_limiting = mv88e6095_port_egress_rate_limiting, .port_pause_limit = mv88e6097_port_pause_limit, .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit,
drivers/net/dsa/rtl8366.c +24 -11
@@ -43,18 +43,26 @@ int rtl8366_set_vlan(struct realtek_smi *smi, int vid, u32 member,int ret;int i; +dev_dbg (smi->dev, +"setting VLAN%d 4k members: 0x%02x, untagged: 0x%02x\n" , + vid, member, untag); +/* Update the 4K table */ ret = smi->ops->get_vlan_4k (smi, vid, &vlan4k);if (ret)return ret; - vlan4k.member = member; - vlan4k.untag = untag; + vlan4k.member |= member; + vlan4k.untag |= untag; vlan4k.fid = fid; ret = smi->ops->set_vlan_4k (smi, &vlan4k);if (ret)return ret; +dev_dbg (smi->dev, +"resulting VLAN%d 4k members: 0x%02x, untagged: 0x%02x\n" , + vid, vlan4k.member, vlan4k.untag); +/* Try to find an existing MC entry for this VID */ for (i =0 ; i < smi->num_vlan_mc; i++) {struct rtl8366_vlan_mc vlanmc;
@@ -65,11 +73,16 @@ int rtl8366_set_vlan(struct realtek_smi *smi, int vid, u32 member,if (vid == vlanmc.vid) {/* update the MC entry */ - vlanmc.member = member; - vlanmc.untag = untag; + vlanmc.member |= member; + vlanmc.untag |= untag; vlanmc.fid = fid; ret = smi->ops->set_vlan_mc (smi, i, &vlanmc); + +dev_dbg (smi->dev, +"resulting VLAN%d MC members: 0x%02x, untagged: 0x%02x\n" , + vid, vlanmc.member, vlanmc.untag); +break ; } }
@@ -384,7 +397,7 @@ void rtl8366_vlan_add(struct dsa_switch *ds, int port,if (dsa_is_dsa_port (ds, port) ||dsa_is_cpu_port (ds, port))dev_err (smi->dev,"port is DSA or CPU port\n" ); -for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) { +for (vid = vlan->vid_begin; vid <= vlan->vid_end; vid++) {int pvid_val =0 ;dev_info (smi->dev,"add VLAN %04x\n" , vid);
@@ -407,13 +420,13 @@ void rtl8366_vlan_add(struct dsa_switch *ds, int port,if (ret <0 )return ; } - } - ret =rtl8366_set_vlan (smi, port, member, untag,0 ); -if (ret) -dev_err (smi->dev, -"failed to set up VLAN %04x" , - vid); + ret =rtl8366_set_vlan (smi, vid, member, untag,0 ); +if (ret) +dev_err (smi->dev, +"failed to set up VLAN %04x" , + vid); + } }EXPORT_SYMBOL_GPL (rtl8366_vlan_add);
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c +1 -1
@@ -774,7 +774,7 @@ static int hw_atl_a0_hw_multicast_list_set(struct aq_hw_s *self,int err =0 ;if (count > (HW_ATL_A0_MAC_MAX -HW_ATL_A0_MAC_MIN )) { - err =EBADRQC ; + err = -EBADRQC ; goto err_exit; } for (self->aq_nic_cfg->mc_list_count = 0U;
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c +1 -1
@@ -1167,7 +1167,7 @@ static int cn23xx_get_pf_num(struct octeon_device *oct) oct->pf_num = ((fdl_bit >>CN23XX_PCIE_SRIOV_FDL_BIT_POS ) &CN23XX_PCIE_SRIOV_FDL_MASK ); }else { - ret =EINVAL ; + ret = -EINVAL ;/* Under some virtual environments, extended PCI regs are * inaccessible, in which case the above read will have failed.
drivers/net/ethernet/freescale/fman/fman.c +1 -2
@@ -1396,8 +1396,7 @@ static void enable_time_stamp(struct fman *fman) {struct fman_fpm_regs __iomem *fpm_rg = fman->fpm_regs;u16 fm_clk_freq = fman->state->fm_clk_freq; -u32 tmp, intgr, ts_freq; -u64 frac; +u32 tmp, intgr, ts_freq, frac; ts_freq = (u32)(1 << fman->state->count1_micro_bit);/* configure timestamp so that bit 8 will count 1 microsecond
drivers/net/ethernet/freescale/fman/fman_dtsec.c +2 -2
@@ -1205,7 +1205,7 @@ int dtsec_del_hash_mac_address(struct fman_mac *dtsec, enet_addr_t *eth_addr)list_for_each (pos, &dtsec->multicast_addr_hash->lsts[bucket]) { hash_entry =ETH_HASH_ENTRY_OBJ (pos); -if (hash_entry->addr == addr) { +if (hash_entry && hash_entry->addr == addr) {list_del_init (&hash_entry->node);kfree (hash_entry);break ;
@@ -1218,7 +1218,7 @@ int dtsec_del_hash_mac_address(struct fman_mac *dtsec, enet_addr_t *eth_addr)list_for_each (pos, &dtsec->unicast_addr_hash->lsts[bucket]) { hash_entry =ETH_HASH_ENTRY_OBJ (pos); -if (hash_entry->addr == addr) { +if (hash_entry && hash_entry->addr == addr) {list_del_init (&hash_entry->node);kfree (hash_entry);break ;
drivers/net/ethernet/freescale/fman/fman_mac.h +1 -1
@@ -252,7 +252,7 @@ static inline struct eth_hash_t *alloc_hash_table(u16 size)struct eth_hash_t *hash;/* Allocate address hash table */ - hash =kmalloc_array (size,sizeof (struct eth_hash_t *),GFP_KERNEL ); + hash =kmalloc (sizeof (*hash),GFP_KERNEL );if (!hash)return NULL ;
drivers/net/ethernet/freescale/fman/fman_memac.c +1 -2
@@ -856,7 +856,6 @@ int memac_set_tx_pause_frames(struct fman_mac *memac, u8 priority, tmp =ioread32be (®s->command_config); tmp &= ~CMD_CFG_PFC_MODE ; - priority =0 ;iowrite32be (tmp, ®s->command_config);
@@ -986,7 +985,7 @@ int memac_del_hash_mac_address(struct fman_mac *memac, enet_addr_t *eth_addr)list_for_each (pos, &memac->multicast_addr_hash->lsts[hash]) { hash_entry =ETH_HASH_ENTRY_OBJ (pos); -if (hash_entry->addr == addr) { +if (hash_entry && hash_entry->addr == addr) {list_del_init (&hash_entry->node);kfree (hash_entry);break ;
drivers/net/ethernet/freescale/fman/fman_port.c +8 -1
@@ -1756,6 +1756,7 @@ static int fman_port_probe(struct platform_device *of_dev)struct fman_port *port;struct fman *fman;struct device_node *fm_node, *port_node; +struct platform_device *fm_pdev;struct resource res;struct resource *dev_res;u32 val;
@@ -1780,8 +1781,14 @@ static int fman_port_probe(struct platform_device *of_dev) goto return_err; } - fman =dev_get_drvdata (&of_find_device_by_node (fm_node)->dev); + fm_pdev =of_find_device_by_node (fm_node);of_node_put (fm_node); +if (!fm_pdev) { + err = -EINVAL ; + goto return_err; + } + + fman =dev_get_drvdata (&fm_pdev->dev);if (!fman) { err = -EINVAL ; goto return_err;
drivers/net/ethernet/freescale/fman/fman_tgec.c +1 -1
@@ -630,7 +630,7 @@ int tgec_del_hash_mac_address(struct fman_mac *tgec, enet_addr_t *eth_addr)list_for_each (pos, &tgec->multicast_addr_hash->lsts[hash]) { hash_entry =ETH_HASH_ENTRY_OBJ (pos); -if (hash_entry->addr == addr) { +if (hash_entry && hash_entry->addr == addr) {list_del_init (&hash_entry->node);kfree (hash_entry);break ;
drivers/net/ethernet/toshiba/spider_net.c +2 -2
@@ -296,8 +296,8 @@ spider_net_free_chain(struct spider_net_card *card, descr = descr->next; }while (descr != chain->ring); -dma_free_coherent (&card->pdev->dev, chain->num_desc, - chain->hwring, chain->dma_addr); +dma_free_coherent (&card->pdev->dev, chain->num_desc *sizeof (struct spider_net_hw_descr ), + chain->hwring, chain->dma_addr); }/**
drivers/net/wan/lapbether.c +9 -1
@@ -160,6 +160,12 @@ static netdev_tx_t lapbeth_xmit(struct sk_buff *skb,if (!netif_running (dev)) goto drop; +/* There should be a pseudo header of 1 byte added by upper layers. +* Check to make sure it is there before reading it. +*/ +if (skb->len <1 ) + goto drop; +switch (skb->data[0 ]) {case X25_IFACE_DATA :break ;
@@ -308,6 +314,7 @@ static void lapbeth_setup(struct net_device *dev) dev->netdev_ops = &lapbeth_netdev_ops; dev->needs_free_netdev = true; dev->type =ARPHRD_X25 ; + dev->hard_header_len =0 ; dev->mtu =1000 ; dev->addr_len =0 ; }
@@ -334,7 +341,8 @@ static int lapbeth_new_device(struct net_device *dev)* then this driver prepends a length field of 2 bytes, * then the underlying Ethernet device prepends its own header. */ - ndev->hard_header_len =-1 +3 +2 + dev->hard_header_len; + ndev->needed_headroom =-1 +3 +2 + dev->hard_header_len + + dev->needed_headroom; lapbeth =netdev_priv (ndev); lapbeth->axdev = ndev;
drivers/net/wireless/ath/ath10k/htt_tx.c +4 -0
@@ -1329,7 +1329,9 @@ static int ath10k_htt_tx_32(struct ath10k_htt *htt, err_unmap_msdu:dma_unmap_single (dev, skb_cb->paddr, msdu->len,DMA_TO_DEVICE ); err_free_msdu_id: +spin_lock_bh (&htt->tx_lock);ath10k_htt_tx_free_msdu_id (htt, msdu_id); +spin_unlock_bh (&htt->tx_lock); err:return res; }
@@ -1536,7 +1538,9 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt, err_unmap_msdu:dma_unmap_single (dev, skb_cb->paddr, msdu->len,DMA_TO_DEVICE ); err_free_msdu_id: +spin_lock_bh (&htt->tx_lock);ath10k_htt_tx_free_msdu_id (htt, msdu_id); +spin_unlock_bh (&htt->tx_lock); err:return res; }
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +1 -1
@@ -30,7 +30,7 @@#define BRCMF_ARP_OL_PEER_AUTO_REPLY 0x00000008#define BRCMF_BSS_INFO_VERSION 109/* curr ver of brcmf_bss_info_le struct */ -#define BRCMF_BSS_RSSI_ON_CHANNEL 0x0002 +#define BRCMF_BSS_RSSI_ON_CHANNEL 0x0004#define BRCMF_STA_BRCM 0x00000001/* Running a Broadcom driver */ #define BRCMF_STA_WME 0x00000002/* WMM association */
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c +4 -0
@@ -653,6 +653,7 @@ static inline int brcmf_fws_hanger_poppkt(struct brcmf_fws_hanger *h,static void brcmf_fws_psq_flush (struct brcmf_fws_info *fws,struct pktq *q,int ifidx) { +struct brcmf_fws_hanger_item *hi;bool (*matchfn)(struct sk_buff *,void *) =NULL ;struct sk_buff *skb;int prec;
@@ -664,6 +665,9 @@ static void brcmf_fws_psq_flush(struct brcmf_fws_info *fws, struct pktq *q, skb =brcmu_pktq_pdeq_match (q, prec, matchfn, &ifidx);while (skb) { hslot =brcmf_skb_htod_tag_get_field (skb,HSLOT ); + hi = &fws->hanger.items[hslot]; +WARN_ON (skb != hi->pkt); + hi->state =BRCMF_FWS_HANGER_ITEM_STATE_FREE ;brcmf_fws_hanger_poppkt (&fws->hanger, hslot, &skb, true);brcmu_pkt_buf_free_skb (skb);
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +5 -1
@@ -3633,7 +3633,11 @@ static void brcmf_sdio_bus_watchdog(struct brcmf_sdio *bus)if (bus->idlecount > bus->idletime) {brcmf_dbg (SDIO ,"idle\n" );sdio_claim_host (bus->sdiodev->func1); -brcmf_sdio_wd_timer (bus, false); +#ifdef DEBUG +if (!BRCMF_FWCON_ON () || + bus->console_interval == 0) +#endif +brcmf_sdio_wd_timer (bus, false); bus->idlecount =0 ;brcmf_sdio_bus_sleep (bus, true, false);sdio_release_host (bus->sdiodev->func1);
drivers/net/wireless/intel/iwlegacy/common.c +2 -2
@@ -4302,8 +4302,8 @@ il_apm_init(struct il_priv *il)* power savings, even without L1. */ if (il->cfg->set_l0s) { -pcie_capability_read_word (il->pci_dev,PCI_EXP_LNKCTL , &lctl); -if (lctl &PCI_EXP_LNKCTL_ASPM_L1 ) { + ret =pcie_capability_read_word (il->pci_dev,PCI_EXP_LNKCTL , &lctl); +if (!ret && (lctl &PCI_EXP_LNKCTL_ASPM_L1 )) {/* L1-ASPM enabled; disable(!) L0S */ il_set_bit (il,CSR_GIO_REG ,CSR_GIO_REG_VAL_L0S_ENABLED );
drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c +15 -7
@@ -581,6 +581,11 @@ static int mwifiex_ret_802_11_key_material_v1(struct mwifiex_private *priv, {struct host_cmd_ds_802_11_key_material *key = &resp->params.key_material; +int len; + + len =le16_to_cpu (key->key_param_set.key_len); +if (len >sizeof (key->key_param_set.key)) +return -EINVAL ;if (le16_to_cpu (key->action) == HostCmd_ACT_GEN_SET) {if ((le16_to_cpu (key->key_param_set.key_info) &KEY_MCAST )) {
@@ -594,9 +599,8 @@ static int mwifiex_ret_802_11_key_material_v1(struct mwifiex_private *priv,memset (priv->aes_key.key_param_set.key,0 ,sizeof (key->key_param_set.key)); - priv->aes_key.key_param_set.key_len = key->key_param_set.key_len; -memcpy (priv->aes_key.key_param_set.key, key->key_param_set.key, -le16_to_cpu (priv->aes_key.key_param_set.key_len)); + priv->aes_key.key_param_set.key_len =cpu_to_le16 (len); +memcpy (priv->aes_key.key_param_set.key, key->key_param_set.key, len);return 0 ; }
@@ -611,9 +615,14 @@ static int mwifiex_ret_802_11_key_material_v2(struct mwifiex_private *priv, struct host_cmd_ds_command *resp) {struct host_cmd_ds_802_11_key_material_v2 *key_v2; -__le16 len; +int len; key_v2 = &resp->params.key_material_v2; + + len =le16_to_cpu (key_v2->key_param_set.key_params.aes.key_len); +if (len >WLAN_KEY_LEN_CCMP ) +return -EINVAL ; +if (le16_to_cpu (key_v2->action) == HostCmd_ACT_GEN_SET) {if ((le16_to_cpu (key_v2->key_param_set.key_info) &KEY_MCAST )) {mwifiex_dbg (priv->adapter,INFO ,"info: key: GTK is set\n" );
@@ -629,10 +638,9 @@ static int mwifiex_ret_802_11_key_material_v2(struct mwifiex_private *priv,memset (priv->aes_key_v2.key_param_set.key_params.aes.key,0 ,WLAN_KEY_LEN_CCMP ); priv->aes_key_v2.key_param_set.key_params.aes.key_len = - key_v2->key_param_set.key_params.aes.key_len; - len = priv->aes_key_v2.key_param_set.key_params.aes.key_len; +cpu_to_le16 (len);memcpy (priv->aes_key_v2.key_param_set.key_params.aes.key, - key_v2->key_param_set.key_params.aes.key,le16_to_cpu (len)); + key_v2->key_param_set.key_params.aes.key, len);return 0 ; }
drivers/net/wireless/ti/wl1251/event.c +1 -1
@@ -84,7 +84,7 @@ static int wl1251_event_ps_report(struct wl1251 *wl,break ; } -return 0 ; +return ret; }static void wl1251_event_mbox_dump (struct event_mailbox *mbox)
drivers/parisc/sba_iommu.c +1 -1
@@ -1291,7 +1291,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num)** (one that doesn't overlap memory or LMMIO space) in the ** IBASE and IMASK registers. */ - ioc->ibase =READ_REG (ioc->ioc_hpa +IOC_IBASE ); + ioc->ibase =READ_REG (ioc->ioc_hpa +IOC_IBASE ) & ~0x1fffffULL ; iova_space_size = ~(READ_REG (ioc->ioc_hpa +IOC_IMASK ) &0xFFFFFFFFUL ) +1 ;if ((ioc->ibase <0xfed00000UL ) && ((ioc->ibase + iova_space_size) >0xfee00000UL )) {
drivers/pci/access.c +2 -6
@@ -204,17 +204,13 @@ EXPORT_SYMBOL(pci_bus_set_ops);static DECLARE_WAIT_QUEUE_HEAD (pci_cfg_wait); static noinline void pci_wait_cfg(struct pci_dev *dev) + __must_hold(&pci_lock) { -DECLARE_WAITQUEUE (wait, current); - -__add_wait_queue (&pci_cfg_wait, &wait);do { -set_current_state (TASK_UNINTERRUPTIBLE );raw_spin_unlock_irq (&pci_lock); -schedule (); +wait_event (pci_cfg_wait, !dev->block_cfg_access);raw_spin_lock_irq (&pci_lock); }while (dev->block_cfg_access); -__remove_wait_queue (&pci_cfg_wait, &wait); }/* Returns 0 on success, negative values indicate error. */
drivers/pci/controller/pcie-cadence-host.c +7 -2
@@ -102,6 +102,7 @@ static int cdns_pcie_host_init_root_port(struct cdns_pcie_rc *rc) {struct cdns_pcie *pcie = &rc->pcie;u32 value, ctrl; +u32 id;/* * Set the root complex BAR configuration register:
@@ -121,8 +122,12 @@ static int cdns_pcie_host_init_root_port(struct cdns_pcie_rc *rc)cdns_pcie_writel (pcie,CDNS_PCIE_LM_RC_BAR_CFG , value);/* Set root port configuration space */ -if (rc->vendor_id !=0xffff ) -cdns_pcie_rp_writew (pcie,PCI_VENDOR_ID , rc->vendor_id); +if (rc->vendor_id !=0xffff ) { + id =CDNS_PCIE_LM_ID_VENDOR (rc->vendor_id) | +CDNS_PCIE_LM_ID_SUBSYS (rc->vendor_id); +cdns_pcie_writel (pcie,CDNS_PCIE_LM_ID , id); + } +if (rc->device_id !=0xffff )cdns_pcie_rp_writew (pcie,PCI_DEVICE_ID , rc->device_id);
drivers/pci/controller/vmd.c +3 -0
@@ -718,6 +718,7 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)if (!vmd->bus) {pci_free_resource_list (&resources);irq_domain_remove (vmd->irq_domain); +irq_domain_free_fwnode (fn);return -ENODEV ; }
@@ -820,6 +821,7 @@ static void vmd_cleanup_srcu(struct vmd_dev *vmd)static void vmd_remove (struct pci_dev *dev) {struct vmd_dev *vmd =pci_get_drvdata (dev); +struct fwnode_handle *fn = vmd->irq_domain->fwnode;sysfs_remove_link (&vmd->dev->dev.kobj,"domain" );pci_stop_root_bus (vmd->bus);
@@ -828,6 +830,7 @@ static void vmd_remove(struct pci_dev *dev)vmd_teardown_dma_ops (vmd);vmd_detach_resources (vmd);irq_domain_remove (vmd->irq_domain); +irq_domain_free_fwnode (fn); }#ifdef CONFIG_PM_SLEEP
drivers/pci/pcie/aspm.c +1 -0
@@ -1164,6 +1164,7 @@ static int pcie_aspm_get_policy(char *buffer, const struct kernel_param *kp) cnt +=sprintf (buffer + cnt,"[%s] " , policy_str[i]); else cnt += sprintf(buffer + cnt, "%s ", policy_str[i]); + cnt +=sprintf (buffer + cnt,"\n" );return cnt; }
drivers/pci/quirks.c +2 -0
@@ -4334,6 +4334,8 @@ static int pci_quirk_amd_sb_acs(struct pci_dev *dev, u16 acs_flags)if (ACPI_FAILURE (status))return -ENODEV ; +acpi_put_table (header); +/* Filter out flags not applicable to multifunction */ acs_flags &= (PCI_ACS_RR |PCI_ACS_CR |PCI_ACS_EC |PCI_ACS_DT );
drivers/phy/samsung/phy-exynos5-usbdrd.c +3 -1
@@ -717,7 +717,9 @@ static int exynos5_usbdrd_phy_calibrate(struct phy *phy)struct phy_usb_instance *inst =phy_get_drvdata (phy);struct exynos5_usbdrd_phy *phy_drd =to_usbdrd_phy (inst); -return exynos5420_usbdrd_phy_calibrate (phy_drd); +if (inst->phy_cfg->id ==EXYNOS5_DRDPHY_UTMI ) +return exynos5420_usbdrd_phy_calibrate (phy_drd); +return 0 ; }static const struct phy_ops exynos5_usbdrd_phy_ops = {
drivers/pinctrl/pinctrl-single.c +7 -4
@@ -916,7 +916,7 @@ static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np,/* If pinconf isn't supported, don't parse properties in below. */ if (!PCS_HAS_PINCONF ) -return 0 ; +return -ENOTSUPP ;/* cacluate how much properties are supported in current node */ for (i =0 ; i <ARRAY_SIZE (prop2); i++) {
@@ -928,7 +928,7 @@ static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np, nconfs++; }if (!nconfs) -return 0 ; +return -ENOTSUPP ; func->conf = devm_kcalloc(pcs->dev, nconfs, sizeof(struct pcs_conf_vals),
@@ -1056,9 +1056,12 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,if (PCS_HAS_PINCONF && function) { res =pcs_parse_pinconf (pcs, np, function, map); -if (res) +if (res ==0 ) + *num_maps =2 ; +else if (res == -ENOTSUPP ) + *num_maps =1 ; +else goto free_pingroups; - *num_maps =2 ; }else { *num_maps =1 ; }
drivers/platform/x86/intel-hid.c +1 -1
@@ -564,7 +564,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)return AE_OK ;if (acpi_match_device_ids (dev, ids) ==0 ) -if (acpi_create_platform_device (dev,NULL )) +if (!IS_ERR_OR_NULL (acpi_create_platform_device (dev,NULL )))dev_info (&dev->dev,"intel-hid: created platform device\n" );
drivers/platform/x86/intel-vbtn.c +1 -1
@@ -272,7 +272,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)return AE_OK ;if (acpi_match_device_ids (dev, ids) ==0 ) -if (acpi_create_platform_device (dev,NULL )) +if (!IS_ERR_OR_NULL (acpi_create_platform_device (dev,NULL )))dev_info (&dev->dev,"intel-vbtn: created platform device\n" );
drivers/power/supply/88pm860x_battery.c +4 -2
@@ -436,7 +436,7 @@ static void pm860x_init_battery(struct pm860x_battery_info *info)int ret;int data;int bat_remove; -int soc; +int soc =0 ;/* measure enable on GPADC1 */ data =MEAS1_GP1 ;
@@ -499,7 +499,9 @@ static void pm860x_init_battery(struct pm860x_battery_info *info) }mutex_unlock (&info->lock); -calc_soc (info,OCV_MODE_ACTIVE , &soc); + ret =calc_soc (info,OCV_MODE_ACTIVE , &soc); +if (ret <0 ) + goto out; data =pm860x_reg_read (info->i2c,PM8607_POWER_UP_LOG ); bat_remove = data &BAT_WU_LOG ;
drivers/s390/net/qeth_l2_main.c +4 -0
@@ -1463,6 +1463,10 @@ static void qeth_bridge_state_change(struct qeth_card *card,int extrasize;QETH_CARD_TEXT (card,2 ,"brstchng" ); +if (qports->num_entries ==0 ) { +QETH_CARD_TEXT (card,2 ,"BPempty" ); +return ; + }if (qports->entry_length !=sizeof (struct qeth_sbp_port_entry )) {QETH_CARD_TEXT_ (card,2 ,"BPsz%04x" , qports->entry_length);return ;
drivers/scsi/arm/cumana_2.c +1 -1
@@ -454,7 +454,7 @@ static int cumanascsi2_probe(struct expansion_card *ec,if (info->info.scsi.dma !=NO_DMA )free_dma (info->info.scsi.dma); -free_irq (ec->irq, host); +free_irq (ec->irq, info); out_release:fas216_release (host);
drivers/scsi/arm/eesox.c +1 -1
@@ -575,7 +575,7 @@ static int eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)if (info->info.scsi.dma !=NO_DMA )free_dma (info->info.scsi.dma); -free_irq (ec->irq, host); +free_irq (ec->irq, info); out_remove:fas216_remove (host);
drivers/scsi/arm/powertec.c +1 -1
@@ -382,7 +382,7 @@ static int powertecscsi_probe(struct expansion_card *ec,if (info->info.scsi.dma !=NO_DMA )free_dma (info->info.scsi.dma); -free_irq (ec->irq, host); +free_irq (ec->irq, info); out_release:fas216_release (host);
drivers/scsi/mesh.c +7 -1
@@ -1044,6 +1044,8 @@ static void handle_error(struct mesh_state *ms)while ((in_8 (&mr->bus_status1) &BS1_RST ) !=0 )udelay (1 );printk ("done\n" ); +if (ms->dma_started) +halt_dma (ms);handle_reset (ms);/* request_q is empty, no point in mesh_start() */ return ;
@@ -1356,7 +1358,8 @@ static void halt_dma(struct mesh_state *ms) ms->conn_tgt, ms->data_ptr,scsi_bufflen (cmd), ms->tgts[ms->conn_tgt].data_goes_out); } -scsi_dma_unmap (cmd); +if (cmd) +scsi_dma_unmap (cmd); ms->dma_started =0 ; }
@@ -1711,6 +1714,9 @@ static int mesh_host_reset(struct scsi_cmnd *cmd)spin_lock_irqsave (ms->host->host_lock, flags); +if (ms->dma_started) +halt_dma (ms); +/* Reset the controller & dbdma channel */ out_le32 (&md->control, (RUN |PAUSE |FLUSH |WAKE ) <<16 );/* stop dma */ out_8 (&mr->exception,0xff );/* clear all exception bits */
drivers/scsi/scsi_debug.c +6 -0
@@ -5384,6 +5384,12 @@ static int __init scsi_debug_init(void)pr_err ("submit_queues must be 1 or more\n" );return -EINVAL ; } + +if ((sdebug_max_queue >SDEBUG_CANQUEUE ) || (sdebug_max_queue <1 )) { +pr_err ("max_queue must be in range [1, %d]\n" ,SDEBUG_CANQUEUE ); +return -EINVAL ; + } + sdebug_q_arr =kcalloc (submit_queues,sizeof (struct sdebug_queue ),GFP_KERNEL );if (sdebug_q_arr ==NULL )
drivers/soc/qcom/rpmh-rsc.c +1 -0
@@ -715,6 +715,7 @@ static struct platform_driver rpmh_driver = { .driver = { .name = "rpmh", .of_match_table = rpmh_drv_match, + .suppress_bind_attrs = true, }, };
drivers/spi/spi-lantiq-ssc.c +10 -0
@@ -187,6 +187,7 @@ struct lantiq_ssc_spi {unsigned int tx_fifo_size;unsigned int rx_fifo_size;unsigned int base_cs; +unsigned int fdx_tx_level; };static u32 lantiq_ssc_readl (const struct lantiq_ssc_spi *spi,u32 reg)
@@ -484,6 +485,7 @@ static void tx_fifo_write(struct lantiq_ssc_spi *spi)u32 data;unsigned int tx_free =tx_fifo_free (spi); + spi->fdx_tx_level =0 ;while (spi->tx_todo && tx_free) {switch (spi->bits_per_word) { case 2 ... 8:
@@ -512,6 +514,7 @@ static void tx_fifo_write(struct lantiq_ssc_spi *spi)lantiq_ssc_writel (spi, data,LTQ_SPI_TB ); tx_free--; + spi->fdx_tx_level++; } }
@@ -523,6 +526,13 @@ static void rx_fifo_read_full_duplex(struct lantiq_ssc_spi *spi)u32 data;unsigned int rx_fill =rx_fifo_level (spi); +/* +* Wait until all expected data to be shifted in. +* Otherwise, rx overrun may occur. +*/ +while (rx_fill != spi->fdx_tx_level) + rx_fill =rx_fifo_level (spi); +while (rx_fill) { data =lantiq_ssc_readl (spi,LTQ_SPI_RB );
drivers/spi/spidev.c +13 -8
@@ -232,6 +232,11 @@ static int spidev_message(struct spidev_data *spidev,for (n = n_xfers, k_tmp = k_xfers, u_tmp = u_xfers; n; n--, k_tmp++, u_tmp++) { +/* Ensure that also following allocations from rx_buf/tx_buf will meet +* DMA alignment requirements. +*/ +unsigned int len_aligned =ALIGN (u_tmp->len,ARCH_KMALLOC_MINALIGN ); + k_tmp->len = u_tmp->len; total += k_tmp->len;
@@ -247,17 +252,17 @@ static int spidev_message(struct spidev_data *spidev,if (u_tmp->rx_buf) {/* this transfer needs space in RX bounce buffer */ - rx_total += k_tmp->len; + rx_total += len_aligned;if (rx_total > bufsiz) { status = -EMSGSIZE ; goto done; } k_tmp->rx_buf = rx_buf; - rx_buf += k_tmp->len; + rx_buf += len_aligned; }if (u_tmp->tx_buf) {/* this transfer needs space in TX bounce buffer */ - tx_total += k_tmp->len; + tx_total += len_aligned;if (tx_total > bufsiz) { status = -EMSGSIZE ; goto done;
@@ -267,7 +272,7 @@ static int spidev_message(struct spidev_data *spidev, (uintptr_t) u_tmp->tx_buf, u_tmp->len)) goto done; - tx_buf += k_tmp->len; + tx_buf += len_aligned; } k_tmp->cs_change = !!u_tmp->cs_change;
@@ -297,16 +302,16 @@ static int spidev_message(struct spidev_data *spidev, goto done;/* copy any rx data out of bounce buffer */ - rx_buf = spidev->rx_buffer; -for (n = n_xfers, u_tmp = u_xfers; n; n--, u_tmp++) { +for (n = n_xfers, k_tmp = k_xfers, u_tmp = u_xfers; + n; + n--, k_tmp++, u_tmp++) {if (u_tmp->rx_buf) {if (copy_to_user ((u8 __user *) - (uintptr_t ) u_tmp->rx_buf, rx_buf, + (uintptr_t ) u_tmp->rx_buf, k_tmp->rx_buf, u_tmp->len)) { status = -EFAULT ; goto done; } - rx_buf += u_tmp->len; } } status = total;
drivers/staging/rtl8192u/r8192U_core.c +1 -1
@@ -2484,7 +2484,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) ret =eprom_read (dev, (EEPROM_TxPwIndex_CCK >>1 ));if (ret <0 )return ret; - priv->EEPROMTxPowerLevelCCK = ((u16 )ret &0xff ) >>8 ; + priv->EEPROMTxPowerLevelCCK = ((u16 )ret &0xff00 ) >>8 ; }else priv->EEPROMTxPowerLevelCCK =0x10 ;RT_TRACE (COMP_EPROM ,"CCK Tx Power Levl: 0x%02x\n" , priv->EEPROMTxPowerLevelCCK);
drivers/thermal/ti-soc-thermal/ti-thermal-common.c +1 -1
@@ -183,7 +183,7 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id, data =ti_bandgap_get_sensor_data (bgp, id); -if (!IS_ERR_OR_NULL (data)) +if (IS_ERR_OR_NULL (data)) data =ti_thermal_build_data (bgp, id);if (!data)
drivers/usb/core/quirks.c +12 -4
@@ -25,17 +25,23 @@ static unsigned int quirk_count;static char quirks_param[128 ]; -static int quirks_param_set (const char *val,const struct kernel_param *kp) +static int quirks_param_set (const char *value,const struct kernel_param *kp) { -char *p, *field; +char *val, *p, *field;u16 vid, pid;u32 flags;size_t i;int err; + val =kstrdup (value,GFP_KERNEL ); +if (!val) +return -ENOMEM ; + err =param_set_copystring (val, kp); -if (err) +if (err) { +kfree (val);return err; + }mutex_lock (&quirk_mutex);
@@ -60,10 +66,11 @@ static int quirks_param_set(const char *val, const struct kernel_param *kp)if (!quirk_list) { quirk_count =0 ;mutex_unlock (&quirk_mutex); +kfree (val);return -ENOMEM ; } -for (i =0 , p = (char *)val; p && *p;) { +for (i =0 , p = val; p && *p;) {/* Each entry consists of VID:PID:flags */ field =strsep (&p,":" );if (!field)
@@ -144,6 +151,7 @@ static int quirks_param_set(const char *val, const struct kernel_param *kp) unlock:mutex_unlock (&quirk_mutex); +kfree (val);return 0 ; }
drivers/usb/dwc2/platform.c +3 -1
@@ -499,6 +499,7 @@ static int dwc2_driver_probe(struct platform_device *dev)if (hsotg->gadget_enabled) { retval =usb_add_gadget_udc (hsotg->dev, &hsotg->gadget);if (retval) { + hsotg->gadget.udc =NULL ;dwc2_hsotg_remove (hsotg); goto error; }
@@ -507,7 +508,8 @@ static int dwc2_driver_probe(struct platform_device *dev)return 0 ; error: -dwc2_lowlevel_hw_disable (hsotg); +if (hsotg->dr_mode !=USB_DR_MODE_PERIPHERAL ) +dwc2_lowlevel_hw_disable (hsotg);return retval; }
drivers/usb/gadget/udc/bdc/bdc_core.c +11 -2
@@ -283,6 +283,7 @@ static void bdc_mem_init(struct bdc *bdc, bool reinit)* in that case reinit is passed as 1 */ if (reinit) { +int i;/* Enable interrupts */ temp =bdc_readl (bdc->regs,BDC_BDCSC ); temp |=BDC_GIE ;
@@ -292,6 +293,9 @@ static void bdc_mem_init(struct bdc *bdc, bool reinit)/* Initialize SRR to 0 */ memset (bdc->srr.sr_bds,0 ,NUM_SR_ENTRIES *sizeof (struct bdc_bd )); +/* clear ep flags to avoid post disconnect stops/deconfigs */ +for (i =1 ; i < bdc->num_eps; ++i) + bdc->bdc_ep_array[i]->flags =0 ; }else {/* One time initiaization only */ /* Enable status report function pointers */
@@ -604,9 +608,14 @@ static int bdc_remove(struct platform_device *pdev)static int bdc_suspend (struct device *dev) {struct bdc *bdc =dev_get_drvdata (dev); +int ret; -clk_disable_unprepare (bdc->clk); -return 0 ; +/* Halt the controller */ + ret =bdc_stop (bdc); +if (!ret) +clk_disable_unprepare (bdc->clk); + +return ret; }static int bdc_resume (struct device *dev)
drivers/usb/gadget/udc/bdc/bdc_ep.c +10 -6
@@ -615,7 +615,6 @@ int bdc_ep_enable(struct bdc_ep *ep) }bdc_dbg_bd_list (bdc, ep);/* only for ep0: config ep is called for ep0 from connect event */ - ep->flags |=BDC_EP_ENABLED ;if (ep->ep_num ==1 )return ret;
@@ -759,10 +758,13 @@ static int ep_dequeue(struct bdc_ep *ep, struct bdc_req *req) __func__, ep->name, start_bdi, end_bdi);dev_dbg (bdc->dev,"ep_dequeue ep=%p ep->desc=%p\n" , ep, (void *)ep->usb_ep.desc); -/* Stop the ep to see where the HW is ? */ - ret =bdc_stop_ep (bdc, ep->ep_num); -/* if there is an issue with stopping ep, then no need to go further */ -if (ret) +/* if still connected, stop the ep to see where the HW is ? */ +if (!(bdc_readl (bdc->regs,BDC_USPC ) &BDC_PST_MASK )) { + ret =bdc_stop_ep (bdc, ep->ep_num); +/* if there is an issue, then no need to go further */ +if (ret) +return 0 ; + }else return 0 ;/*
@@ -1911,7 +1913,9 @@ static int bdc_gadget_ep_disable(struct usb_ep *_ep) __func__, ep->name, ep->flags);if (!(ep->flags &BDC_EP_ENABLED )) { -dev_warn (bdc->dev,"%s is already disabled\n" , ep->name); +if (bdc->gadget.speed !=USB_SPEED_UNKNOWN ) +dev_warn (bdc->dev,"%s is already disabled\n" , + ep->name);return 0 ; }spin_lock_irqsave (&bdc->lock, flags);
drivers/usb/gadget/udc/net2280.c +3 -1
@@ -3782,8 +3782,10 @@ static int net2280_probe(struct pci_dev *pdev, const struct pci_device_id *id)return 0 ; done: -if (dev) +if (dev) {net2280_remove (pdev); +kfree (dev); + }return retval; }
drivers/usb/mtu3/mtu3_core.c +5 -1
@@ -128,8 +128,12 @@ static void mtu3_device_disable(struct mtu3 *mtu)mtu3_setbits (ibase,SSUSB_U2_CTRL (0 ),SSUSB_U2_PORT_DIS |SSUSB_U2_PORT_PDN ); -if (mtu->ssusb->dr_mode ==USB_DR_MODE_OTG ) +if (mtu->ssusb->dr_mode ==USB_DR_MODE_OTG ) {mtu3_clrbits (ibase,SSUSB_U2_CTRL (0 ),SSUSB_U2_PORT_OTG_SEL ); +if (mtu->is_u3_ip) +mtu3_clrbits (ibase,SSUSB_U3_CTRL (0 ), +SSUSB_U3_PORT_DUAL_MODE ); + }mtu3_setbits (ibase,U3D_SSUSB_IP_PW_CTRL2 ,SSUSB_IP_DEV_PDN ); }
drivers/usb/serial/cp210x.c +19 -0
@@ -271,6 +271,8 @@ static struct usb_serial_driver cp210x_device = { .break_ctl = cp210x_break_ctl, .set_termios = cp210x_set_termios, .tx_empty = cp210x_tx_empty, + .throttle = usb_serial_generic_throttle, + .unthrottle = usb_serial_generic_unthrottle, .tiocmget = cp210x_tiocmget, .tiocmset = cp210x_tiocmset, .attach = cp210x_attach,
@@ -893,6 +895,7 @@ static void cp210x_get_termios_port(struct usb_serial_port *port,u32 baud;u16 bits;u32 ctl_hs; +u32 flow_repl;cp210x_read_u32_reg (port,CP210X_GET_BAUDRATE , &baud);
@@ -993,6 +996,22 @@ static void cp210x_get_termios_port(struct usb_serial_port *port, ctl_hs =le32_to_cpu (flow_ctl.ulControlHandshake);if (ctl_hs &CP210X_SERIAL_CTS_HANDSHAKE ) {dev_dbg (dev,"%s - flow control = CRTSCTS\n" , __func__); +/* +* When the port is closed, the CP210x hardware disables +* auto-RTS and RTS is deasserted but it leaves auto-CTS when +* in hardware flow control mode. When re-opening the port, if +* auto-CTS is enabled on the cp210x, then auto-RTS must be +* re-enabled in the driver. +*/ + flow_repl =le32_to_cpu (flow_ctl.ulFlowReplace); + flow_repl &= ~CP210X_SERIAL_RTS_MASK ; + flow_repl |=CP210X_SERIAL_RTS_SHIFT (CP210X_SERIAL_RTS_FLOW_CTL ); + flow_ctl.ulFlowReplace =cpu_to_le32 (flow_repl); +cp210x_write_reg_block (port, +CP210X_SET_FLOW , + &flow_ctl, +sizeof (flow_ctl)); + cflag |=CRTSCTS ; }else {dev_dbg (dev,"%s - flow control = NONE\n" , __func__);
drivers/usb/serial/iuu_phoenix.c +8 -6
@@ -353,10 +353,11 @@ static void iuu_led_activity_on(struct urb *urb)struct usb_serial_port *port = urb->context;int result;char *buf_ptr = port->write_urb->transfer_buffer; - *buf_ptr++ =IUU_SET_LED ; +if (xmas) { -get_random_bytes (buf_ptr,6 ); - *(buf_ptr+7 ) =1 ; + buf_ptr[0 ] =IUU_SET_LED ; +get_random_bytes (buf_ptr +1 ,6 ); + buf_ptr[7 ] =1 ; }else {iuu_rgbf_fill_buffer (buf_ptr,255 ,255 ,0 ,0 ,0 ,0 ,255 ); }
@@ -374,13 +375,14 @@ static void iuu_led_activity_off(struct urb *urb)struct usb_serial_port *port = urb->context;int result;char *buf_ptr = port->write_urb->transfer_buffer; +if (xmas) {iuu_rxcmd (urb);return ; - }else { - *buf_ptr++ =IUU_SET_LED ; -iuu_rgbf_fill_buffer (buf_ptr,0 ,0 ,255 ,255 ,0 ,0 ,255 ); } + +iuu_rgbf_fill_buffer (buf_ptr,0 ,0 ,255 ,255 ,0 ,0 ,255 ); + usb_fill_bulk_urb(port->write_urb, port->serial->dev, usb_sndbulkpipe(port->serial->dev, port->bulk_out_endpointAddress),
drivers/video/console/newport_con.c +10 -2
@@ -31,6 +31,8 @@#include <linux/linux_logo.h> #include <linux/font.h> +#define NEWPORT_LEN 0x10000 +#define FONT_DATA ((unsigned char *)font_vga_8x16.data)/* borrowed from fbcon.c */
@@ -42,6 +44,7 @@static unsigned char *font_data[MAX_NR_CONSOLES ];static struct newport_regs *npregs; +static unsigned long newport_addr;static int logo_active;static int topscan;
@@ -701,7 +704,6 @@ const struct consw newport_con = {static int newport_probe (struct gio_device *dev,const struct gio_device_id *id) { -unsigned long newport_addr;int err;if (!dev->resource.start)
@@ -711,7 +713,7 @@ static int newport_probe(struct gio_device *dev,return -EBUSY ;/* we only support one Newport as console */ newport_addr = dev->resource.start +0xF0000 ; -if (!request_mem_region (newport_addr,0x10000 ,"Newport" )) +if (!request_mem_region (newport_addr,NEWPORT_LEN ,"Newport" ))return -ENODEV ; npregs = (struct newport_regs *)/* ioremap cannot fail */
@@ -719,6 +721,11 @@ static int newport_probe(struct gio_device *dev,console_lock (); err =do_take_over_console (&newport_con,0 ,MAX_NR_CONSOLES -1 ,1 );console_unlock (); + +if (err) { +iounmap ((void *)npregs); +release_mem_region (newport_addr,NEWPORT_LEN ); + }return err; }
@@ -726,6 +733,7 @@ static void newport_remove(struct gio_device *dev) {give_up_console (&newport_con);iounmap ((void *)npregs); +release_mem_region (newport_addr,NEWPORT_LEN ); }static struct gio_device_id newport_ids[] = {
drivers/video/fbdev/neofb.c +1 -0
@@ -1820,6 +1820,7 @@ static int neo_scan_monitor(struct fb_info *info)#else printk (KERN_ERR "neofb: Only 640x480, 800x600/480 and 1024x768 panels are currently supported\n" ); +kfree (info->monspecs.modedb);return -1 ;#endif default :
drivers/video/fbdev/pxafb.c +2 -2
@@ -2446,8 +2446,8 @@ static int pxafb_remove(struct platform_device *dev)free_pages_exact (fbi->video_mem, fbi->video_mem_size); -dma_free_wc (&dev->dev, fbi->dma_buff_size, fbi->dma_buff, - fbi->dma_buff_phys); +dma_free_coherent (&dev->dev, fbi->dma_buff_size, fbi->dma_buff, + fbi->dma_buff_phys);return 0 ; }
drivers/video/fbdev/sm712fb.c +2 -0
@@ -1429,6 +1429,8 @@ static int smtc_map_smem(struct smtcfb_info *sfb,static void smtc_unmap_smem (struct smtcfb_info *sfb) {if (sfb && sfb->fb->screen_base) { +if (sfb->chip_id ==0x720 ) + sfb->fb->screen_base -=0x00200000 ;iounmap (sfb->fb->screen_base); sfb->fb->screen_base =NULL ; }
drivers/xen/balloon.c +10 -2
@@ -570,11 +570,13 @@ static int add_ballooned_pages(int nr_pages)if (xen_hotplug_unpopulated) { st =reserve_additional_memory ();if (st !=BP_ECANCELED ) { +int rc; +mutex_unlock (&balloon_mutex); -wait_event (balloon_wq, + rc =wait_event_interruptible (balloon_wq, !list_empty (&ballooned_pages));mutex_lock (&balloon_mutex); -return 0 ; +return rc ? -ENOMEM :0 ; } }
@@ -632,6 +634,12 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages) out_undo:mutex_unlock (&balloon_mutex);free_xenballooned_pages (pgno, pages); +/* +* NB: free_xenballooned_pages will only subtract pgno pages, but since +* target_unpopulated is incremented with nr_pages at the start we need +* to remove the remaining ones also, or accounting will be screwed. +*/ + balloon_stats.target_unpopulated -= nr_pages - pgno;return ret; }EXPORT_SYMBOL (alloc_xenballooned_pages);
drivers/xen/gntdev-dmabuf.c +8 -0
@@ -641,6 +641,14 @@ dmabuf_imp_to_refs(struct gntdev_dmabuf_priv *priv, struct device *dev, goto fail_detach; } +/* Check that we have zero offset. */ +if (sgt->sgl->offset) { + ret =ERR_PTR (-EINVAL ); +pr_debug ("DMA buffer has %d bytes offset, user-space expects 0\n" , + sgt->sgl->offset); + goto fail_unmap; + } +/* Check number of pages that imported buffer has. */ if (attach->dmabuf->size != gntdev_dmabuf->nr_pages <<PAGE_SHIFT ) { ret =ERR_PTR (-EINVAL );
fs/9p/v9fs.c +2 -3
@@ -515,10 +515,9 @@ void v9fs_session_close(struct v9fs_session_info *v9ses) }#ifdef CONFIG_9P_FSCACHE -if (v9ses->fscache) { +if (v9ses->fscache)v9fs_cache_session_put_cookie (v9ses); -kfree (v9ses->cachetag); - } +kfree (v9ses->cachetag);#endif kfree (v9ses->uname);kfree (v9ses->aname);
fs/btrfs/extent_io.c +2 -0
@@ -4270,6 +4270,8 @@ int try_release_extent_mapping(struct page *page, gfp_t mask)/* once for us */ free_extent_map (em); + +cond_resched ();/* Allow large-extent preemption. */ } }return try_release_extent_state (tree, page, mask);
fs/dlm/lockspace.c +3 -3
@@ -633,6 +633,9 @@ static int new_lockspace(const char *name, const char *cluster,wait_event (ls->ls_recover_lock_wait,test_bit (LSFL_RECOVER_LOCK , &ls->ls_flags)); +/* let kobject handle freeing of ls if there's an error */ + do_unreg =1 ; + ls->ls_kobj.kset = dlm_kset; error =kobject_init_and_add (&ls->ls_kobj, &dlm_ktype,NULL ,"%s" , ls->ls_name);
@@ -640,9 +643,6 @@ static int new_lockspace(const char *name, const char *cluster, goto out_recoverd;kobject_uevent (&ls->ls_kobj,KOBJ_ADD ); -/* let kobject handle freeing of ls if there's an error */ - do_unreg =1 ; -/* This uevent triggers dlm_controld in userspace to add us to the group of nodes that are members of this lockspace (managed by the cluster infrastructure.) Once it's done that, it tells us who the
fs/minix/inode.c +34 -2
@@ -155,6 +155,23 @@ static int minix_remount (struct super_block * sb, int * flags, char * data)return 0 ; } +static bool minix_check_superblock (struct minix_sb_info *sbi) +{ +if (sbi->s_imap_blocks ==0 || sbi->s_zmap_blocks ==0 ) +return false; + +/* +* s_max_size must not exceed the block mapping limitation. This check +* is only needed for V1 filesystems, since V2/V3 support an extra level +* of indirect blocks which places the limit well above U32_MAX. +*/ +if (sbi->s_version ==MINIX_V1 && + sbi->s_max_size > (7 +512 +512 *512 ) *BLOCK_SIZE ) +return false; + +return true; +} +static int minix_fill_super (struct super_block *s,void *data,int silent) {struct buffer_head *bh;
@@ -233,11 +250,12 @@ static int minix_fill_super(struct super_block *s, void *data, int silent) }else goto out_no_fs; +if (!minix_check_superblock (sbi)) + goto out_illegal_sb; +/* * Allocate the buffer map to keep the superblock small. */ -if (sbi->s_imap_blocks ==0 || sbi->s_zmap_blocks ==0 ) - goto out_illegal_sb; i = (sbi->s_imap_blocks + sbi->s_zmap_blocks) *sizeof (bh); map =kzalloc (i,GFP_KERNEL );if (!map)
@@ -471,6 +489,13 @@ static struct inode *V1_minix_iget(struct inode *inode)iget_failed (inode);return ERR_PTR (-EIO ); } +if (raw_inode->i_nlinks ==0 ) { +printk ("MINIX-fs: deleted inode referenced: %lu\n" , + inode->i_ino); +brelse (bh); +iget_failed (inode); +return ERR_PTR (-ESTALE ); + } inode->i_mode = raw_inode->i_mode;i_uid_write (inode, raw_inode->i_uid);i_gid_write (inode, raw_inode->i_gid);
@@ -504,6 +529,13 @@ static struct inode *V2_minix_iget(struct inode *inode)iget_failed (inode);return ERR_PTR (-EIO ); } +if (raw_inode->i_nlinks ==0 ) { +printk ("MINIX-fs: deleted inode referenced: %lu\n" , + inode->i_ino); +brelse (bh); +iget_failed (inode); +return ERR_PTR (-ESTALE ); + } inode->i_mode = raw_inode->i_mode;i_uid_write (inode, raw_inode->i_uid);i_gid_write (inode, raw_inode->i_gid);
fs/minix/itree_common.c +7 -1
@@ -75,6 +75,7 @@ static int alloc_branch(struct inode *inode,int n =0 ;int i;int parent =minix_new_block (inode); +int err = -ENOSPC ; branch[0 ].key =cpu_to_block (parent);if (parent)for (n =1 ; n < num; n++) {
@@ -85,6 +86,11 @@ static int alloc_branch(struct inode *inode,break ; branch[n].key =cpu_to_block (nr); bh =sb_getblk (inode->i_sb, parent); +if (!bh) { +minix_free_block (inode, nr); + err = -ENOMEM ; +break ; + }lock_buffer (bh);memset (bh->b_data,0 , bh->b_size); branch[n].bh = bh;
@@ -103,7 +109,7 @@ static int alloc_branch(struct inode *inode,bforget (branch[i].bh);for (i =0 ; i < n; i++)minix_free_block (inode,block_to_cpu (branch[i].key)); -return -ENOSPC ; +return err; } static inline int splice_branch(struct inode *inode,
fs/nfs/pnfs.c +16 -30
70 lines not on this page · raw message
fs/ocfs2/dlmglue.c +7 -1
@@ -2867,9 +2867,15 @@ int ocfs2_nfs_sync_lock(struct ocfs2_super *osb, int ex) status =ocfs2_cluster_lock (osb, lockres, ex ?LKM_EXMODE :LKM_PRMODE ,0 ,0 ); -if (status <0 ) +if (status <0 ) {
Lines of this file are not shown. View the raw message.
net/ipv4/inet_connection_sock.c +51 -42
93 lines not on this page · raw message
sound/usb/quirks-table.h +63 -1
64 lines not on this page · raw message
tools/testing/selftests/powerpc/benchmarks/context_switch.c +16 -5
Lines of this file are not shown. View the raw message.
tools/testing/selftests/powerpc/utils.c +25 -12
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.