Linux 4.14.283
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.283 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/testing/sysfs-ata | 5 Documentation/conf.py | 2 Documentation/devicetree/bindings/gpio/gpio-altera.txt | 5 Makefile | 2 arch/arm/boot/dts/bcm2835-rpi-b.dts | 13 +- arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 22 ++- arch/arm/boot/dts/exynos5250-smdk5250.dts | 4 arch/arm/boot/dts/ox820.dtsi | 2 arch/arm/mach-hisi/platsmp.c | 4 arch/arm/mach-omap1/clock.c | 2 arch/arm/mach-vexpress/dcscb.c | 1 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 arch/m68k/Kconfig.cpu | 2 arch/m68k/Kconfig.machine | 1 arch/m68k/include/asm/pgtable_no.h | 3 arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h | 1 arch/mips/kernel/mips-cpc.c | 1 arch/openrisc/include/asm/timex.h | 1 arch/openrisc/kernel/head.S | 9 + arch/powerpc/kernel/idle.c | 2 arch/powerpc/kernel/ptrace.c | 18 ++- arch/powerpc/perf/isa207-common.c | 3 arch/powerpc/platforms/4xx/cpm.c | 2 arch/powerpc/sysdev/cpm1.c | 1 arch/powerpc/sysdev/fsl_rio.c | 2 arch/powerpc/sysdev/xics/icp-opal.c | 1 arch/s390/include/asm/preempt.h | 15 +- arch/um/drivers/chan_user.c | 9 - arch/x86/entry/vdso/vma.c | 2 arch/x86/include/asm/acenv.h | 14 ++ arch/x86/include/asm/suspend_32.h | 2 arch/x86/include/asm/suspend_64.h | 12 +- arch/x86/kernel/apic/apic.c | 2 arch/x86/kernel/cpu/intel.c | 2 arch/x86/kernel/step.c | 3 arch/x86/kernel/sys_x86_64.c | 7 - arch/x86/lib/delay.c | 4 arch/x86/mm/pat.c | 2 arch/x86/um/ldt.c | 6 - arch/xtensa/kernel/ptrace.c | 4 arch/xtensa/kernel/signal.c | 4 drivers/ata/libata-transport.c | 2 drivers/ata/pata_octeon_cf.c | 3 drivers/base/node.c | 1 drivers/block/nbd.c | 37 ++++-- drivers/char/ipmi/ipmi_ssif.c | 23 +++ drivers/clocksource/timer-oxnas-rps.c | 2 drivers/clocksource/timer-sp804.c | 10 - drivers/extcon/extcon.c | 29 ++-- drivers/firmware/dmi-sysfs.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 14 -- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 8 - drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 13 ++ drivers/gpu/drm/gma500/psb_intel_display.c | 7 - drivers/gpu/drm/imx/ipuv3-crtc.c | 2 drivers/gpu/drm/mediatek/mtk_cec.c | 2 drivers/gpu/drm/msm/dsi/dsi_host.c | 21 ++- drivers/gpu/drm/msm/hdmi/hdmi.c | 4 drivers/gpu/drm/msm/msm_gem_prime.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 6 - drivers/gpu/drm/radeon/radeon_connectors.c | 4 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 drivers/gpu/drm/virtio/virtgpu_display.c | 2 drivers/hid/hid-led.c | 2 drivers/hwtracing/coresight/coresight-cpu-debug.c | 7 - drivers/i2c/busses/i2c-cadence.c | 12 +- drivers/iio/dummy/iio_simple_dummy.c | 20 ++- drivers/infiniband/hw/hfi1/file_ops.c | 2 drivers/infiniband/hw/hfi1/init.c | 2 drivers/infiniband/sw/rxe/rxe_req.c | 2 drivers/input/misc/sparcspkr.c | 1 drivers/input/mouse/bcm5974.c | 7 + drivers/iommu/amd_iommu_init.c | 2 drivers/iommu/msm_iommu.c | 11 + drivers/iommu/mtk_iommu.c | 3 drivers/irqchip/irq-armada-370-xp.c | 11 + drivers/irqchip/irq-aspeed-i2c-ic.c | 4 drivers/irqchip/irq-xtensa-mx.c | 18 ++- drivers/macintosh/Kconfig | 4 drivers/macintosh/Makefile | 3 drivers/macintosh/via-pmu.c | 2 drivers/mailbox/mailbox.c | 19 ++- drivers/md/md.c | 33 +++-- drivers/md/raid0.c | 31 ++--- drivers/media/pci/cx23885/cx23885-core.c | 6 - drivers/media/pci/cx25821/cx25821-core.c | 2 drivers/media/platform/exynos4-is/fimc-is.c | 2 drivers/media/platform/exynos4-is/fimc-isp-video.h | 2 drivers/media/platform/qcom/venus/hfi.c | 3 drivers/media/platform/sti/delta/delta-v4l2.c | 6 - drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 7 - drivers/media/usb/uvc/uvc_v4l2.c | 20 +-- drivers/mfd/ipaq-micro.c | 2 drivers/mfd/rtsx_usb.c | 1 drivers/misc/lkdtm_usercopy.c | 17 ++ drivers/mtd/chips/cfi_cmdset_0002.c | 93 +++++++++------- drivers/mtd/ubi/vmt.c | 1 drivers/net/dsa/mv88e6xxx/chip.c | 1 drivers/net/ethernet/altera/altera_tse_main.c | 6 - drivers/net/ethernet/broadcom/Makefile | 5 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 8 - drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2 drivers/net/phy/mdio_bus.c | 1 drivers/net/phy/micrel.c | 11 + drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 8 + drivers/net/wireless/ath/carl9170/tx.c | 3 drivers/net/wireless/broadcom/b43/phy_n.c | 2 drivers/net/wireless/broadcom/b43legacy/phy.c | 2 drivers/net/wireless/intel/ipw2x00/libipw_tx.c | 2 drivers/net/wireless/intel/iwlwifi/mvm/power.c | 3 drivers/net/wireless/marvell/mwifiex/11h.c | 2 drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 8 + drivers/net/wireless/realtek/rtlwifi/usb.c | 2 drivers/nfc/st21nfca/se.c | 15 +- drivers/nvme/host/pci.c | 1 drivers/pci/dwc/pcie-qcom.c | 7 + drivers/pci/pci.c | 10 - drivers/pcmcia/Kconfig | 2 drivers/phy/qualcomm/phy-qcom-qmp.c | 11 + drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 drivers/pwm/pwm-lp3943.c | 1 drivers/regulator/pfuze100-regulator.c | 2 drivers/rpmsg/qcom_smd.c | 2 drivers/rtc/rtc-mt6397.c | 2 drivers/scsi/dc395x.c | 15 ++ drivers/scsi/fcoe/fcoe_ctlr.c | 2 drivers/scsi/megaraid.c | 2 drivers/scsi/ufs/ufs-qcom.c | 7 - drivers/soc/qcom/smp2p.c | 1 drivers/soc/qcom/smsm.c | 1 drivers/soc/rockchip/grf.c | 2 drivers/spi/spi-img-spfi.c | 2 drivers/spi/spi-ti-qspi.c | 5 drivers/staging/greybus/audio_codec.c | 4 drivers/staging/rtl8192e/rtllib_softmac.c | 2 drivers/staging/rtl8712/usb_intf.c | 6 - drivers/tty/goldfish.c | 2 drivers/tty/serial/digicolor-usart.c | 2 drivers/tty/serial/icom.c | 2 drivers/tty/serial/meson_uart.c | 13 ++ drivers/tty/serial/msm_serial.c | 5 drivers/tty/serial/sa1100.c | 4 drivers/tty/serial/serial_txx9.c | 2 drivers/tty/serial/sh-sci.c | 6 - drivers/tty/serial/st-asc.c | 4 drivers/tty/synclink_gt.c | 2 drivers/tty/tty_buffer.c | 3 drivers/usb/core/hcd-pci.c | 4 drivers/usb/core/quirks.c | 3 drivers/usb/dwc2/gadget.c | 1 drivers/usb/host/isp116x-hcd.c | 6 - drivers/usb/host/oxu210hp-hcd.c | 2 drivers/usb/serial/option.c | 2 drivers/usb/storage/karma.c | 15 +- drivers/usb/usbip/stub_dev.c | 2 drivers/usb/usbip/stub_rx.c | 2 drivers/vhost/vringh.c | 10 + drivers/video/fbdev/amba-clcd.c | 5 drivers/video/fbdev/pxa3xx-gcu.c | 12 +- fs/binfmt_flat.c | 27 ++++ fs/btrfs/disk-io.c | 4 fs/btrfs/volumes.c | 8 - fs/cifs/smb2pdu.c | 3 fs/dlm/lock.c | 11 + fs/dlm/plock.c | 12 -- fs/ext4/inline.c | 12 ++ fs/ext4/namei.c | 84 +++++++++++--- fs/fat/fatent.c | 7 - fs/fs-writeback.c | 13 +- fs/jffs2/fs.c | 1 fs/jfs/jfs_dmap.c | 3 fs/kernfs/dir.c | 31 +++-- fs/notify/fdinfo.c | 11 - fs/notify/inotify/inotify.h | 12 ++ fs/notify/inotify/inotify_user.c | 2 fs/notify/mark.c | 6 - fs/ocfs2/dlmfs/userdlm.c | 16 ++ include/drm/drm_edid.h | 6 - include/linux/efi.h | 2 include/linux/mailbox_controller.h | 1 include/linux/mtd/cfi.h | 1 include/linux/nodemask.h | 51 ++++---- include/linux/ptrace.h | 6 - include/scsi/libfcoe.h | 3 include/sound/jack.h | 1 include/trace/events/vmscan.h | 4 kernel/ptrace.c | 5 kernel/trace/trace.c | 13 +- lib/dma-debug.c | 2 lib/nodemask.c | 4 mm/hugetlb.c | 9 + net/bluetooth/sco.c | 21 ++- net/ipv4/tcp_input.c | 11 + net/ipv4/tcp_output.c | 4 net/ipv4/xfrm4_protocol.c | 1 net/ipv6/addrconf.c | 3 net/ipv6/seg6_hmac.c | 1 net/key/af_key.c | 10 + net/mac80211/chan.c | 7 - net/mac80211/ieee80211_i.h | 5 net/mac80211/scan.c | 20 +++ net/netfilter/nf_tables_api.c | 16 +- net/netfilter/nft_dynset.c | 3 net/nfc/core.c | 1 net/rxrpc/call_event.c | 3 net/rxrpc/sendmsg.c | 6 + net/rxrpc/sysctl.c | 4 net/sctp/input.c | 4 net/sunrpc/xdr.c | 6 - net/sunrpc/xprtrdma/rpc_rdma.c | 5 scripts/mod/modpost.c | 5 sound/core/jack.c | 34 ++++- sound/pci/hda/patch_conexant.c | 7 + sound/soc/codecs/rt5514.c | 2 sound/soc/codecs/rt5645.c | 7 + sound/soc/codecs/wm2000.c | 6 - sound/soc/mediatek/mt2701/mt2701-wm8960.c | 9 + sound/soc/mediatek/mt8173/mt8173-max98090.c | 5 sound/soc/mxs/mxs-saif.c | 1 sound/soc/soc-dapm.c | 2 tools/perf/builtin-c2c.c | 10 + tools/perf/pmu-events/jevents.c | 2 226 files changed, 1109 insertions(+), 524 deletions(-)
Akira Yokosawa (1):
docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0
Alexander Aring (2):
dlm: fix plock invalid read
dlm: fix missing lkb refcount handling
Alexander Lobakin (1):
modpost: fix removing numeric suffixes
Alexander Wetzel (1):
rtl818x: Prevent using not initialized queues
Amadeusz Sławiński (1):
ALSA: jack: Access input_dev under mutex
Amir Goldstein (2):
inotify: show inotify mask flags in proc fdinfo
fsnotify: fix wrong lockdep annotations
Ammar Faizi (1):
x86/delay: Fix the wrong asm constraint in delay_loop()
Andre Przywara (1):
clocksource/drivers/sp804: Avoid error on multiple instances
Baokun Li (1):
jffs2: fix memory leak in jffs2_do_fill_super
Björn Ardö (1):
mailbox: forward the hrtimer if not queued and under a lock
Brian Norris (1):
drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX
Carl Yin(殷张成) (1):
USB: serial: option: add Quectel BG95 modem
Christophe de Dinechin (1):
nodemask.h: fix compilation error with GCC12
Chuck Lever (1):
SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()
Corey Minyard (1):
ipmi:ssif: Check for NULL msg when handling events and messages
Dan Carpenter (3):
ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix drm/msm: return an error pointer in msm_gem_prime_get_sg_table()
net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()
Dave Airlie (1):
drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
David Howells (3):
rxrpc: Return an error to sendmsg if call failed
rxrpc: Fix listen() setting the bar too high for the prealloc rings
rxrpc: Don't try to resend the request if we're receiving the reply
Dennis Dalessandro (1):
RDMA/hfi1: Fix potential integer multiplication overflow errors
Dinh Nguyen (1):
dt-bindings: gpio: altera: correct interrupt-cells
Dmitry Baryshkov (1):
drm/msm/dsi: fix error checks and return values for DSI xmit functions
Dongliang Mu (1):
rtlwifi: Use pr_warn instead of WARN_ONCE
Douglas Miller (1):
RDMA/hfi1: Prevent panic when SDMA is disabled
Duoming Zhou (3):
drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()
drivers: tty: serial: Fix deadlock in sa1100_set_termios()
drivers: usb: host: Fix deadlock in oxu_bus_suspend()
Emmanuel Grumbach (1):
iwlwifi: mvm: fix assert 1F04 upon reconfig
Eric Dumazet (3):
sctp: read sk->sk_bound_dev_if once in sctp_rcv()
tcp: tcp_rtx_synack() can be called from process context
tcp: fix tcp_mtup_probe_success vs wrong snd_cwnd
Eric W. Biederman (2):
ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
Evan Green (1):
USB: hcd-pci: Fully suspend across freeze/thaw cycle
Evan Quan (1):
drm/amd/pm: fix the compile warning
Fabio Estevam (1):
net: phy: micrel: Allow probing without .driver_data
Felix Fietkau (1):
mac80211: upgrade passive scan to active scan on DFS channels after beacon rx
Finn Thain (1):
macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled
Gal Pressman (1):
net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure
Geert Uytterhoeven (1):
m68k: math-emu: Fix dependencies of math emulation support
Gong Yuanjun (2):
mips: cpc: Fix refcount leak in mips_cpc_default_phys_base drm/radeon: fix a possible null pointer dereference
Greg Kroah-Hartman (1):
Linux 4.14.283
Greg Ungerer (2):
m68knommu: set ZERO_PAGE() to the allocated zeroed page
m68knommu: fix undefined reference to `_init_sp'
Guilherme G. Piccoli (1):
coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier
Guoqing Jiang (1):
md: protect md_unregister_thread from reentrancy
Gustavo A. R. Silva (1):
scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac()
Hangyu Hua (1):
usb: usbip: fix a refcount leak in stub_probe()
Hao Luo (1):
kernfs: Separate kernfs_pr_cont_buf and rename_lock.
Haowen Bai (3):
b43legacy: Fix assigning negative value to unsigned variable
b43: Fix assigning negative value to unsigned variable
ipw2x00: Fix potential NULL dereference in libipw_xmit()
Heiko Carstens (1):
s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES
Huang Guobin (1):
tty: Fix a possible resource leak in icom_probe
Ilpo Järvinen (4):
serial: digicolor-usart: Don't allow CS5-6
serial: txx9: Don't allow CS5-6
serial: sh-sci: Don't allow CS5-6
serial: st-asc: Sanitize CSIZE and correct PARENB for CS7
Jakob Koschel (1):
staging: greybus: codecs: fix type confusion of list iterator variable
Jakub Kicinski (1):
eth: tg3: silence the GCC 12 array-bounds warning
Jan Kara (2):
ext4: verify dir block before splitting it
ext4: avoid cycles in directory h-tree
Jan Kiszka (1):
efi: Add missing prototype for efi_capsule_setup_info
Janusz Krzysztofik (1):
ARM: OMAP1: clock: Fix UART rate reporting algorithm
Jason A. Donenfeld (1):
openrisc: start CPU timer early in boot
Joerg Roedel (1):
iommu/amd: Increase timeout waiting for GA log enablement
Johan Hovold (3):
phy: qcom-qmp: fix struct clk leak on probe errors
phy: qcom-qmp: fix reset-controller leak on probe errors
PCI: qcom: Fix unbalanced PHY init on probe errors
Johannes Berg (2):
wifi: mac80211: fix use-after-free in chanctx code
um: chan_user: Fix winch_tramp() return value
John Ogness (2):
serial: meson: acquire port->lock in startup()
serial: msm_serial: disable interrupts in __msm_console_write()
Jonathan Teh (1):
HID: hid-led: fix maximum brightness for Dream Cheeky
Jun Miao (1):
tracing: Fix sleeping function called from invalid context on RT kernel
Junxiao Bi via Ocfs2-devel (1):
ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock
Kajol Jain (1):
powerpc/perf: Fix the threshold compare group constraint for power9
Kathiravan T (1):
arm64: dts: qcom: ipq8074: fix the sleep clock frequency
Kees Cook (2):
lkdtm/usercopy: Expand size of "out of frame" object
nodemask: Fix return values to be unsigned
Keita Suzuki (1):
drm/amd/pm: fix double free in si_parse_power_table()
Kinglong Mee (1):
xprtrdma: treat all calls not a bcall when bc_serv is NULL
Kirill A. Shutemov (1):
ACPICA: Avoid cache flush inside virtual machines
Krzysztof Kozlowski (6):
ARM: dts: ox820: align interrupt controller node name with dtschema
ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value
pinctrl: mvebu: Fix irq_of_parse_and_map() return value
rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
Kwanghoon Son (1):
media: exynos4-is: Fix compile warning
Leo Yan (2):
perf c2c: Use stdio interface if slang is not supported perf c2c: Fix sorting in percent_rmt_hitm_cmp()
Lin Ma (3):
ASoC: rt5645: Fix errorenous cleanup order
NFC: NULL out the dev->rfkill to prevent UAF
USB: storage: karma: fix rio_karma_init return
Linus Torvalds (2):
drm: fix EDID struct for old ARM OABI format
drm: imx: fix compiler warning with gcc-12
Liu Zixian (1):
drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes
Luca Weiss (1):
media: venus: hfi: avoid null dereference in deinit
Lucas Tanure (1):
i2c: cadence: Increase timeout per message if necessary
Lv Ruyi (3):
scsi: megaraid: Fix error check return value of register_chrdev() powerpc/xics: fix refcount leak in icp_opal_init()
mfd: ipaq-micro: Fix error check return value of platform_get_irq()
Maciej W. Rozycki (1):
MIPS: IP27: Remove incorrect `cpu_has_fpu' override
Manivannan Sadhasivam (1):
scsi: ufs: qcom: Add a readl() to make sure ref_clk gets enabled
Marek Szyprowski (1):
usb: dwc2: gadget: don't reset gadget's driver->bus
Mark Brown (2):
ASoC: dapm: Don't fold register value changes into notifications
ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control
Mark-PK Tsai (1):
tracing: Avoid adding tracer option before update_tracer_options
Martin Faltesek (2):
nfc: st21nfca: fix incorrect validating logic in EVT_TRANSACTION
nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling
Masahiro Yamada (4):
net: mdio: unexport __init-annotated mdio_bus_init()
net: xfrm: unexport __init-annotated xfrm4_protocol_init()
net: ipv6: unexport __init-annotated seg6_hmac_init()
modpost: fix undefined behavior of is_arm_mapping_symbol()
Mathias Nyman (1):
Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag
Matthieu Baerts (1):
x86/pm: Fix false positive kmemleak report in msr_build_context()
Max Filippov (1):
irqchip: irq-xtensa-mx: fix initial IRQ affinity
Miaohe Lin (1):
drivers/base/node.c: fix compaction sysfs file leak
Miaoqian Lin (17):
ASoC: mediatek: Fix error handling in mt8173_max98090_dev_probe
ASoC: mediatek: Fix missing of_node_put in mt2701_wm8960_machine_probe
spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout
ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
media: st-delta: Fix PM disable depth imbalance in delta_probe
media: exynos4-is: Change clk_disable to clk_disable_unprepare
soc: qcom: smp2p: Fix missing of_node_put() in smp2p_parse_ipc
soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc
Input: sparcspkr - fix refcount leak in bbc_beep_probe powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup
video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup
soc: rockchip: Fix refcount leak in rockchip_grf_init
firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle
net: dsa: mv88e6xxx: Fix refcount leak in mv88e6xxx_mdios_register
ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe
net: altera: Fix refcount leak in altera_tse_mdio_create
Michael Ellerman (1):
powerpc/32: Fix overread/overwrite of thread_struct via ptrace
Michal Kubecek (1):
Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
Mike Kravetz (1):
hugetlb: fix huge_pmd_unshare address update
Mikulas Patocka (1):
dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
Miles Chen (1):
drm/mediatek: Fix mtk_cec_mask()
Monish Kumar R (1):
USB: new quirk for Dell Gen 2 devices
Niels Dossche (2):
mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue
usb: usbip: add missing device lock on tweak configuration cmd
Niklas Cassel (1):
binfmt_flat: do not stop relocating GOT entries prematurely on riscv
OGAWA Hirofumi (1):
fat: add ratelimit to fat*_ent_bread()
Olivier Matz (2):
ixgbe: fix bcast packets Rx on VF after promisc removal
ixgbe: fix unexpected VLAN Rx in promisc mode on VF
Pablo Neira Ayuso (1):
netfilter: nf_tables: disallow non-stateful expression in sets earlier
Pali Rohár (1):
irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x
Pascal Hambourg (1):
md/raid0: Ignore RAID0 layout if the second zone has only one device
Pavel Skripkin (1):
media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init
Peng Wu (2):
ARM: versatile: Add missing of_node_put in dcscb_init
ARM: hisi: Add missing of_node_put after of_find_compatible_node
Phil Elwell (1):
ARM: dts: bcm2835-rpi-zero-w: Fix GPIO line name for Wifi/BT
Qi Zheng (1):
tty: fix deadlock caused by calling printk() under tty_port->lock
Qu Wenruo (2):
btrfs: add "0x" prefix for unsupported optional features
btrfs: repair super block num_devices automatically
Randy Dunlap (6):
x86: Fix return value of __setup handlers
x86/mm: Cleanup the control_va_addr_alignment() __setup handler powerpc/8xx: export 'cpm_setbrg' for modules powerpc/idle: Fix return value of __setup() handler powerpc/4xx/cpm: Fix return value of __setup() handler
pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards
Sergey Shtylyov (1):
ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files
Shuah Khan (1):
misc: rtsx: set NULL intfdata when probe fails
Shyam Prasad N (1):
cifs: return errors during session setup during reconnects
Smith, Kyle Miller (Nimble Kernel) (1):
nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags
Stefan Wahren (1):
ARM: dts: bcm2835-rpi-b: Fix GPIO line names
Thibaut VARÈNE (1):
ath9k: fix QCA9561 PA bias level
Tokunori Ikegami (2):
mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write
mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N
Uwe Kleine-König (1):
pwm: lp3943: Fix duty calculation in case period was clamped
Vasily Averin (1):
tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate
Vincent Whitchurch (1):
um: Fix out-of-bounds read in LDT setup
Wang Cheng (1):
staging: rtl8712: fix uninit-value in r871xu_drv_init()
Wang Weiyang (1):
tty: goldfish: Use tty_port_destroy() to destroy port
Wenli Looi (1):
ath9k: fix ar9003_get_eepmisc
Xiao Yang (1):
RDMA/rxe: Generate a completion for unsupported/invalid opcode
Xiaoke Wang (1):
iio: dummy: iio_simple_dummy: check the return value of kstrdup()
Xiaomeng Tong (8):
media: uvcvideo: Fix missing check to determine if element is found in list
scsi: dc395x: Fix a missing check on list iterator drm/nouveau/clk: Fix an incorrect NULL check on list iterator
md: fix an incorrect NULL check in does_sb_need_changing
md: fix an incorrect NULL check in md_reload_sb
iommu/msm: Fix an incorrect NULL check on list iterator
carl9170: tx: fix an incorrect use of list iterator
gma500: fix an incorrect NULL check on list iterator
Xie Yongji (1):
vringh: Fix loop descriptors check in the indirect cases
Yang Yingliang (5):
drm/msm/hdmi: check return value after calling platform_get_resource_byname() drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()
ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
rtc: mt6397: check return value after calling platform_get_resource()
video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()
Ye Bin (2):
ext4: fix use-after-free in ext4_rename_dir_prepare
ext4: fix bug_on in ext4_writepages
Yicong Yang (1):
PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store()
Ying Hsu (1):
Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout
Yong Wu (1):
iommu/mediatek: Add list_del in mtk_iommu_remove
Yu Kuai (3):
nbd: call genl_unregister_family() first in nbd_cleanup()
nbd: fix race between nbd_alloc_config() and module removal
nbd: fix io hung while disconnecting device
Zhen Ni (1):
USB: host: isp116x: check return value after calling platform_get_resource()
Zheng Yongjun (1):
spi: img-spfi: Fix pm_runtime_get_sync() error checking
Zhengjun Xing (1):
perf jevents: Fix event syntax error caused by ExtSel
Zheyu Ma (3):
media: pci: cx23885: Fix the error handling in cx23885_initdev()
media: cx25821: Fix the warning when removing the module
tty: synclink_gt: Fix null-pointer-dereference in slgt_clean()
Zhihao Cheng (2):
fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages
ubi: ubi_create_volume: Fix use-after-free when volume creation failed
Zixuan Fu (1):
fs: jfs: fix possible NULL pointer dereference in dbFree()
bumwoo lee (1):
extcon: Modify extcon device to be created after driver data is set
huangwenhui (1):
ALSA: hda/conexant - Fix loopback issue with CX20632
jianghaoran (1):
ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL
Greg Kroah-Hartman
maintainerDocumentation/ABI/testing/sysfs-ata +3 -2
@@ -59,17 +59,18 @@ class dma_mode - Transfer modes supported by the device when in DMA mode. + DMA transfer mode used by the device. Mostly used by PATA device. pio_mode - Transfer modes supported by the device when in PIO mode. + PIO transfer mode used by the device. Mostly used by PATA device. xfer_mode Current transfer mode. + Mostly used by PATA device. id
Documentation/conf.py +1 -1
@@ -96,7 +96,7 @@ finally: # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used:
Documentation/devicetree/bindings/gpio/gpio-altera.txt +3 -2
@@ -9,8 +9,9 @@ Required properties: - The second cell is reserved and is currently unused. - gpio-controller : Marks the device node as a GPIO controller. - interrupt-controller: Mark the device node as an interrupt controller -- #interrupt-cells : Should be 1. The interrupt type is fixed in the hardware. +- #interrupt-cells : Should be 2. The interrupt type is fixed in the hardware. - The first cell is the GPIO offset number within the GPIO controller. + - The second cell is the interrupt trigger type and level flags. - interrupts: Specify the interrupt. - altr,interrupt-type: Specifies the interrupt trigger type the GPIO hardware is synthesized. This field is required if the Altera GPIO controller
@@ -38,6 +39,6 @@ gpio_altr: gpio@0xff200000 { altr,interrupt-type = <IRQ_TYPE_EDGE_RISING>; #gpio-cells = <2>; gpio-controller; - #interrupt-cells = <1>; + #interrupt-cells = <2>; interrupt-controller; };
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 282 +SUBLEVEL = 283 EXTRAVERSION = NAME = Petit Gorille
arch/arm/boot/dts/bcm2835-rpi-b.dts +6 -7
@@ -48,18 +48,17 @@ "GPIO18", "NC", /* GPIO19 */ "NC", /* GPIO20 */ - "GPIO21", + "CAM_GPIO0", "GPIO22", "GPIO23", "GPIO24", "GPIO25", "NC", /* GPIO26 */ - "CAM_GPIO0", - /* Binary number representing build/revision */ - "CONFIG0", - "CONFIG1", - "CONFIG2", - "CONFIG3", + "GPIO27", + "GPIO28", + "GPIO29", + "GPIO30", + "GPIO31", "NC", /* GPIO32 */ "NC", /* GPIO33 */ "NC", /* GPIO34 */
arch/arm/boot/dts/bcm2835-rpi-zero-w.dts +12 -10
@@ -77,16 +77,18 @@ "GPIO27", "SDA0", "SCL0", - "NC", /* GPIO30 */ - "NC", /* GPIO31 */ - "NC", /* GPIO32 */ - "NC", /* GPIO33 */ - "NC", /* GPIO34 */ - "NC", /* GPIO35 */ - "NC", /* GPIO36 */ - "NC", /* GPIO37 */ - "NC", /* GPIO38 */ - "NC", /* GPIO39 */ + /* Used by BT module */ + "CTS0", + "RTS0", + "TXD0", + "RXD0", + /* Used by Wifi */ + "SD1_CLK", + "SD1_CMD", + "SD1_DATA0", + "SD1_DATA1", + "SD1_DATA2", + "SD1_DATA3", "CAM_GPIO1", /* GPIO40 */ "WL_ON", /* GPIO41 */ "NC", /* GPIO42 */
arch/arm/boot/dts/exynos5250-smdk5250.dts +2 -2
@@ -128,7 +128,7 @@ samsung,i2c-max-bus-freq = <20000>; eeprom@50 { - compatible = "samsung,s524ad0xd1"; + compatible = "samsung,s524ad0xd1", "atmel,24c128"; reg = <0x50>; };
@@ -287,7 +287,7 @@ samsung,i2c-max-bus-freq = <20000>; eeprom@51 { - compatible = "samsung,s524ad0xd1"; + compatible = "samsung,s524ad0xd1", "atmel,24c128"; reg = <0x51>; };
arch/arm/boot/dts/ox820.dtsi +1 -1
@@ -286,7 +286,7 @@ clocks = <&armclk>; }; - gic: gic@1000 { + gic: interrupt-controller@1000 { compatible = "arm,arm11mp-gic"; interrupt-controller; #interrupt-cells = <3>;
arch/arm/mach-hisi/platsmp.c +4 -0
@@ -70,14 +70,17 @@ static void __init hi3xxx_smp_prepare_cpus(unsigned int max_cpus) } ctrl_base =of_iomap (np,0 );if (!ctrl_base) { +of_node_put (np);pr_err ("failed to map address\n" );return ; }if (of_property_read_u32 (np,"smp-offset" , &offset) <0 ) { +of_node_put (np);pr_err ("failed to find smp-offset property\n" );return ; } ctrl_base += offset; +of_node_put (np); } }
@@ -163,6 +166,7 @@ static int hip01_boot_secondary(unsigned int cpu, struct task_struct *idle)if (WARN_ON (!node))return -1 ; ctrl_base =of_iomap (node,0 ); +of_node_put (node);/* set the secondary core boot from DDR */ remap_reg_value =readl_relaxed (ctrl_base +REG_SC_CTRL );
arch/arm/mach-omap1/clock.c +1 -1
@@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(clockfw_lock);unsigned long omap1_uart_recalc (struct clk *clk) {unsigned int val =__raw_readl (clk->enable_reg); -return val & clk->enable_bit ?48000000 :12000000 ; +return val &1 << clk->enable_bit ?48000000 :12000000 ; }unsigned long omap1_sossi_recalc (struct clk *clk)
arch/arm/mach-vexpress/dcscb.c +1 -0
@@ -146,6 +146,7 @@ static int __init dcscb_init(void)if (!node)return -ENODEV ; dcscb_base =of_iomap (node,0 ); +of_node_put (node);if (!dcscb_base)return -EADDRNOTAVAIL ; cfg =readl_relaxed (dcscb_base +DCS_CFG_R );
arch/arm64/boot/dts/qcom/ipq8074.dtsi +1 -1
@@ -181,7 +181,7 @@ clocks { sleep_clk: sleep_clk { compatible = "fixed-clock"; - clock-frequency = <32000>; + clock-frequency = <32768>; #clock-cells = <0>; };
arch/m68k/Kconfig.cpu +1 -1
@@ -308,7 +308,7 @@ comment "Processor Specific Options" config M68KFPU_EMU bool "Math emulation support" - depends on MMU + depends on M68KCLASSIC && FPU help At some point in the future, this will cause floating-point math instructions to be emulated by the kernel on machines that lack a
arch/m68k/Kconfig.machine +1 -0
@@ -309,6 +309,7 @@ comment "Machine Options" config UBOOT bool "Support for U-Boot command line parameters" + depends on COLDFIRE help If you say Y here kernel will try to collect command line parameters from the initial u-boot stack.
arch/m68k/include/asm/pgtable_no.h +2 -1
@@ -42,7 +42,8 @@ extern void paging_init(void);* ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc.. */ -#define ZERO_PAGE (vaddr) (virt_to_page(0)) +extern void *empty_zero_page; +#define ZERO_PAGE (vaddr) (virt_to_page(empty_zero_page))/* * No page table caches to initialise.
arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h +0 -1
@@ -28,7 +28,6 @@#define cpu_has_6k_cache 0#define cpu_has_8k_cache 0#define cpu_has_tx39_cache 0 -#define cpu_has_fpu 1#define cpu_has_nofpuex 0#define cpu_has_32fpr 1#define cpu_has_counter 1
arch/mips/kernel/mips-cpc.c +1 -0
@@ -31,6 +31,7 @@ phys_addr_t __weak mips_cpc_default_phys_base(void) cpc_node =of_find_compatible_node (of_root,NULL ,"mti,mips-cpc" );if (cpc_node) { err =of_address_to_resource (cpc_node,0 , &res); +of_node_put (cpc_node);if (!err)return res.start; }
arch/openrisc/include/asm/timex.h +1 -0
@@ -27,6 +27,7 @@ static inline cycles_t get_cycles(void) {return mfspr (SPR_TTCR ); } +#define get_cycles get_cycles/* This isn't really used any more */ #define CLOCK_TICK_RATE 1000
arch/openrisc/kernel/head.S +9 -0
@@ -459,6 +459,15 @@ _start: l.ori r3,r0,0x1 l.mtspr r0,r3,SPR_SR + /* + * Start the TTCR as early as possible, so that the RNG can make use of + * measurements of boot time from the earliest opportunity. Especially + * important is that the TTCR does not return zero by the time we reach + * rand_initialize(). + */ + l.movhi r3,hi(SPR_TTMR_CR) + l.mtspr r0,r3,SPR_TTMR + CLEAR_GPR(r1) CLEAR_GPR(r2) CLEAR_GPR(r3)
arch/powerpc/kernel/idle.c +1 -1
@@ -41,7 +41,7 @@ static int __init powersave_off(char *arg) { ppc_md.power_save =NULL ; cpuidle_disable =IDLE_POWERSAVE_OFF ; -return 0 ; +return 1 ; }__setup ("powersave=off" , powersave_off);
arch/powerpc/kernel/ptrace.c +14 -4
@@ -2920,8 +2920,13 @@ long arch_ptrace(struct task_struct *child, long request,flush_fp_to_thread (child);if (fpidx < (PT_FPSCR -PT_FPR0 )) -memcpy (&tmp, &child->thread.TS_FPR (fpidx), -sizeof (long )); +if (IS_ENABLED (CONFIG_PPC32 )) { +// On 32-bit the index we are passed refers to 32-bit words + tmp = ((u32 *)child->thread.fp_state.fpr)[fpidx]; + }else { +memcpy (&tmp, &child->thread.TS_FPR (fpidx), +sizeof (long )); + }else tmp = child->thread.fp_state.fpscr; }
@@ -2953,8 +2958,13 @@ long arch_ptrace(struct task_struct *child, long request,flush_fp_to_thread (child);if (fpidx < (PT_FPSCR -PT_FPR0 )) -memcpy (&child->thread.TS_FPR (fpidx), &data, -sizeof (long )); +if (IS_ENABLED (CONFIG_PPC32 )) { +// On 32-bit the index we are passed refers to 32-bit words + ((u32 *)child->thread.fp_state.fpr)[fpidx] = data; + }else { +memcpy (&child->thread.TS_FPR (fpidx), &data, +sizeof (long )); + }else child->thread.fp_state.fpscr = data; ret =0 ;
arch/powerpc/perf/isa207-common.c +2 -1
@@ -324,7 +324,8 @@ int isa207_get_constraint(u64 event, unsigned long *maskp, unsigned long *valp)if (event_is_threshold (event) &&is_thresh_cmp_valid (event)) { mask |=CNST_THRESH_MASK ; value |=CNST_THRESH_VAL (event >>EVENT_THRESH_SHIFT ); - } + }else if (event_is_threshold (event)) +return -1 ; }else {/* * Special case for PM_MRK_FAB_RSP_MATCH and PM_MRK_FAB_RSP_MATCH_CYC,
arch/powerpc/platforms/4xx/cpm.c +1 -1
@@ -341,6 +341,6 @@ late_initcall(cpm_init);static int __init cpm_powersave_off (char *arg) { cpm.powersave_off =1 ; -return 0 ; +return 1 ; }__setup ("powersave=off" , cpm_powersave_off);
arch/powerpc/sysdev/cpm1.c +1 -0
@@ -291,6 +291,7 @@ cpm_setbrg(uint brg, uint rate)out_be32 (bp, (((BRG_UART_CLK_DIV16 / rate) -1 ) <<1 ) |CPM_BRG_EN |CPM_BRG_DIV16 ); } +EXPORT_SYMBOL (cpm_setbrg);struct cpm_ioport16 {__be16 dir, par, odr_sor, dat, intr;
arch/powerpc/sysdev/fsl_rio.c +2 -0
@@ -509,8 +509,10 @@ int fsl_rio_setup(struct platform_device *dev)if (rc) {dev_err (&dev->dev,"Can't get %pOF property 'reg'\n" , rmu_node); +of_node_put (rmu_node); goto err_rmu; } +of_node_put (rmu_node); rmu_regs_win =ioremap (rmu_regs.start,resource_size (&rmu_regs));if (!rmu_regs_win) {dev_err (&dev->dev,"Unable to map rmu register window\n" );
arch/powerpc/sysdev/xics/icp-opal.c +1 -0
@@ -199,6 +199,7 @@ int icp_opal_init(void)printk ("XICS: Using OPAL ICP fallbacks\n" ); +of_node_put (np);return 0 ; }
arch/s390/include/asm/preempt.h +11 -4
@@ -50,10 +50,17 @@ static inline bool test_preempt_need_resched(void)static inline void __preempt_count_add (int val) { -if (__builtin_constant_p (val) && (val >=-128 ) && (val <=127 )) -__atomic_add_const (val, &S390_lowcore.preempt_count); -else -__atomic_add (val, &S390_lowcore.preempt_count); +/* +* With some obscure config options and CONFIG_PROFILE_ALL_BRANCHES +* enabled, gcc 12 fails to handle __builtin_constant_p(). +*/ +if (!IS_ENABLED (CONFIG_PROFILE_ALL_BRANCHES )) { +if (__builtin_constant_p (val) && (val >=-128 ) && (val <=127 )) { +__atomic_add_const (val, &S390_lowcore.preempt_count); +return ; + } + } +__atomic_add (val, &S390_lowcore.preempt_count); }static inline void __preempt_count_sub (int val)
arch/um/drivers/chan_user.c +5 -4
@@ -220,7 +220,7 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out, unsigned long *stack_out) {struct winch_data data; -int fds[2 ], n, err; +int fds[2 ], n, err, pid;char c; err =os_pipe (fds,1 ,1 );
@@ -238,8 +238,9 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out,* problem with /dev/net/tun, which if held open by this * thread, prevents the TUN/TAP device from being reused. */ - err =run_helper_thread (winch_thread, &data,CLONE_FILES , stack_out); -if (err <0 ) { + pid =run_helper_thread (winch_thread, &data,CLONE_FILES , stack_out); +if (pid <0 ) { + err = pid;printk (UM_KERN_ERR "fork of winch_thread failed - errno = %d\n" , -err); goto out_close;
@@ -263,7 +264,7 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out, goto out_close; } -return err; +return pid; out_close:close (fds[1 ]);
arch/x86/entry/vdso/vma.c +1 -1
@@ -328,7 +328,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)static __init int vdso_setup (char *s) { vdso64_enabled =simple_strtoul (s,NULL ,0 ); -return 0 ; +return 1 ; }__setup ("vdso=" , vdso_setup);#endif
arch/x86/include/asm/acenv.h +13 -1
@@ -16,7 +16,19 @@/* Asm macros */ -#define ACPI_FLUSH_CPU_CACHE () wbinvd() +/* +* ACPI_FLUSH_CPU_CACHE() flushes caches on entering sleep states. +* It is required to prevent data loss. +* +* While running inside virtual machine, the kernel can bypass cache flushing. +* Changing sleep state in a virtual machine doesn't affect the host system +* sleep state and cannot lead to data loss. +*/ +#define ACPI_FLUSH_CPU_CACHE () \ +do { \ + if (!cpu_feature_enabled(X86_FEATURE_HYPERVISOR)) \ + wbinvd(); \ +} while (0)int __acpi_acquire_global_lock (unsigned int *lock);int __acpi_release_global_lock (unsigned int *lock);
arch/x86/include/asm/suspend_32.h +1 -1
@@ -21,7 +21,6 @@ struct saved_context {#endif unsigned long cr0, cr2, cr3, cr4;u64 misc_enable; -bool misc_enable_saved;struct saved_msrs saved_msrs;struct desc_ptr gdt_desc;struct desc_ptr idt;
@@ -30,6 +29,7 @@ struct saved_context {unsigned long tr;unsigned long safety;unsigned long return_address; +bool misc_enable_saved; } __attribute__((packed));#endif /* _ASM_X86_SUSPEND_32_H */
arch/x86/include/asm/suspend_64.h +8 -4
@@ -14,9 +14,13 @@* Image of the saved processor state, used by the low level ACPI suspend to * RAM code and by the low level hibernation code. * -* If you modify it, fix arch/x86/kernel/acpi/wakeup_64.S and make sure that -* __save/__restore_processor_state(), defined in arch/x86/kernel/suspend_64.c, -* still work as required. +* If you modify it, check how it is used in arch/x86/kernel/acpi/wakeup_64.S +* and make sure that __save/__restore_processor_state(), defined in +* arch/x86/power/cpu.c, still work as required. +* +* Because the structure is packed, make sure to avoid unaligned members. For +* optimisation purposes but also because tools like kmemleak only search for +* pointers that are aligned. */ struct saved_context {struct pt_regs regs;
@@ -36,7 +40,6 @@ struct saved_context {unsigned long cr0, cr2, cr3, cr4, cr8;u64 misc_enable; -bool misc_enable_saved;struct saved_msrs saved_msrs;unsigned long efer;u16 gdt_pad;/* Unused */
@@ -48,6 +51,7 @@ struct saved_context {unsigned long tr;unsigned long safety;unsigned long return_address; +bool misc_enable_saved; } __attribute__((packed));#define loaddebug (thread,register) \
arch/x86/kernel/apic/apic.c +1 -1
@@ -167,7 +167,7 @@ static __init int setup_apicpmtimer(char *s) { apic_calibrate_pmtmr =1 ;notsc_setup (NULL ); -return 0 ; +return 1 ; }__setup ("apicpmtimer" , setup_apicpmtimer);#endif
arch/x86/kernel/cpu/intel.c +1 -1
@@ -71,7 +71,7 @@ static bool ring3mwait_disabled __read_mostly;static int __init ring3mwait_disable (char *__unused) { ring3mwait_disabled = true; -return 0 ; +return 1 ; }__setup ("ring3mwait=disable" , ring3mwait_disable);
arch/x86/kernel/step.c +1 -2
@@ -175,8 +175,7 @@ void set_task_blockstep(struct task_struct *task, bool on)* * NOTE: this means that set/clear TIF_BLOCKSTEP is only safe if * task is current or it can't be running, otherwise we can race -* with __switch_to_xtra(). We rely on ptrace_freeze_traced() but -* PTRACE_KILL is not safe. +* with __switch_to_xtra(). We rely on ptrace_freeze_traced(). */ local_irq_disable (); debugctl =get_debugctlmsr ();
arch/x86/kernel/sys_x86_64.c +2 -5
@@ -70,9 +70,6 @@ static int __init control_va_addr_alignment(char *str)if (*str ==0 )return 1 ; -if (*str =='=' ) - str++; -if (!strcmp (str,"32" )) va_align.flags =ALIGN_VA_32 ;else if (!strcmp (str,"64" ))
@@ -82,11 +79,11 @@ static int __init control_va_addr_alignment(char *str)else if (!strcmp (str,"on" )) va_align.flags =ALIGN_VA_32 |ALIGN_VA_64 ;else -return 0 ; +pr_warn ("invalid option value: 'align_va_addr=%s'\n" , str);return 1 ; } -__setup ("align_va_addr" , control_va_addr_alignment); +__setup ("align_va_addr=" , control_va_addr_alignment); SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, unsigned long, prot, unsigned long, flags,
arch/x86/lib/delay.c +2 -2
@@ -43,8 +43,8 @@ static void delay_loop(unsigned long loops)" jnz 2b \n" "3: dec %0 \n" - : /* we don't need output */ - :"a" (loops) + : "+a" (loops) + : ); }
arch/x86/mm/pat.c +1 -1
@@ -74,7 +74,7 @@ int pat_debug_enable;static int __init pat_debug_setup (char *str) { pat_debug_enable =1 ; -return 0 ; +return 1 ; }__setup ("debugpat" , pat_debug_setup);
arch/x86/um/ldt.c +4 -2
@@ -23,9 +23,11 @@ static long write_ldt_entry(struct mm_id *mm_idp, int func, {long res;void *stub_addr; + +BUILD_BUG_ON (sizeof (*desc) %sizeof (long )); + res =syscall_stub_data (mm_idp, (unsigned long *)desc, - (sizeof (*desc) +sizeof (long ) -1 ) & - ~(sizeof (long ) -1 ), +sizeof (*desc) /sizeof (long ), addr, &stub_addr);if (!res) { unsigned long args[] = { func,
arch/xtensa/kernel/ptrace.c +2 -2
@@ -35,12 +35,12 @@void user_enable_single_step (struct task_struct *child) { - child->ptrace |=PT_SINGLESTEP ; +set_tsk_thread_flag (child,TIF_SINGLESTEP ); }void user_disable_single_step (struct task_struct *child) { - child->ptrace &= ~PT_SINGLESTEP ; +clear_tsk_thread_flag (child,TIF_SINGLESTEP ); }/*
arch/xtensa/kernel/signal.c +2 -2
@@ -459,7 +459,7 @@ static void do_signal(struct pt_regs *regs)/* Set up the stack frame */ ret =setup_frame (&ksig,sigmask_to_save (), regs);signal_setup_done (ret, &ksig,0 ); -if (current->ptrace &PT_SINGLESTEP ) +if (test_thread_flag (TIF_SINGLESTEP ))task_pt_regs (current)->icountlevel =1 ;return ;
@@ -485,7 +485,7 @@ static void do_signal(struct pt_regs *regs)/* If there's no signal to deliver, we just restore the saved mask. */ restore_saved_sigmask (); -if (current->ptrace &PT_SINGLESTEP ) +if (test_thread_flag (TIF_SINGLESTEP ))task_pt_regs (current)->icountlevel =1 ;return ; }
drivers/ata/libata-transport.c +1 -1
@@ -196,7 +196,7 @@ static struct { { XFER_PIO_0, "XFER_PIO_0" }, { XFER_PIO_SLOW, "XFER_PIO_SLOW" } }; -ata_bitfield_name_match (xfer,ata_xfer_names) +ata_bitfield_name_search (xfer, ata_xfer_names)/* * ATA Port attributes
drivers/ata/pata_octeon_cf.c +3 -0
@@ -888,12 +888,14 @@ static int octeon_cf_probe(struct platform_device *pdev)int i; res_dma =platform_get_resource (dma_dev,IORESOURCE_MEM ,0 );if (!res_dma) { +put_device (&dma_dev->dev);of_node_put (dma_node);return -EINVAL ; } cf_port->dma_base = (u64 )devm_ioremap_nocache (&pdev->dev, res_dma->start,resource_size (res_dma));if (!cf_port->dma_base) { +put_device (&dma_dev->dev);of_node_put (dma_node);return -EINVAL ; }
@@ -903,6 +905,7 @@ static int octeon_cf_probe(struct platform_device *pdev) irq = i; irq_handler = octeon_cf_interrupt; } +put_device (&dma_dev->dev); }of_node_put (dma_node); }
drivers/base/node.c +1 -0
@@ -337,6 +337,7 @@ static int register_node(struct node *node, int num)*/ void unregister_node (struct node *node) { +compaction_unregister_node (node);hugetlb_unregister_node (node);/* no-op, if memoryless node */ device_unregister (&node->dev);
drivers/block/nbd.c +26 -11
@@ -1275,7 +1275,7 @@ static int nbd_start_device_ioctl(struct nbd_device *nbd, struct block_device *bstatic void nbd_clear_sock_ioctl (struct nbd_device *nbd,struct block_device *bdev) { -sock_shutdown (nbd); +nbd_clear_sock (nbd);__invalidate_device (bdev, true);nbd_bdev_reset (bdev); if (test_and_clear_bit(NBD_HAS_CONFIG_REF,
@@ -1382,15 +1382,20 @@ static struct nbd_config *nbd_alloc_config(void) {struct nbd_config *config; +if (!try_module_get (THIS_MODULE )) +return ERR_PTR (-ENODEV ); + config =kzalloc (sizeof (struct nbd_config ),GFP_NOFS ); -if (!config) -return NULL ; +if (!config) { +module_put (THIS_MODULE ); +return ERR_PTR (-ENOMEM ); + } +atomic_set (&config->recv_threads,0 );init_waitqueue_head (&config->recv_wq);init_waitqueue_head (&config->conn_wait); config->blksize =NBD_DEF_BLKSIZE ;atomic_set (&config->live_connections,0 ); -try_module_get (THIS_MODULE );return config; }
@@ -1417,12 +1422,13 @@ static int nbd_open(struct block_device *bdev, fmode_t mode)mutex_unlock (&nbd->config_lock); goto out; } - config = nbd->config =nbd_alloc_config (); -if (!config) { - ret = -ENOMEM ; + config =nbd_alloc_config (); +if (IS_ERR (config)) { + ret =PTR_ERR (config);mutex_unlock (&nbd->config_lock); goto out; } + nbd->config = config;refcount_set (&nbd->config_refs,1 );refcount_inc (&nbd->refs);mutex_unlock (&nbd->config_lock);
@@ -1803,13 +1809,14 @@ static int nbd_genl_connect(struct sk_buff *skb, struct genl_info *info)nbd_put (nbd);return -EINVAL ; } - config = nbd->config =nbd_alloc_config (); -if (!nbd->config) { + config =nbd_alloc_config (); +if (IS_ERR (config)) {mutex_unlock (&nbd->config_lock);nbd_put (nbd);printk (KERN_ERR "nbd: couldn't allocate config\n" ); -return -ENOMEM ; +return PTR_ERR (config); } + nbd->config = config;refcount_set (&nbd->config_refs,1 );set_bit (NBD_BOUND , &config->runtime_flags);
@@ -2319,6 +2326,12 @@ static void __exit nbd_cleanup(void)struct nbd_device *nbd;LIST_HEAD (del_list); +/* +* Unregister netlink interface prior to waiting +* for the completion of netlink commands. +*/ +genl_unregister_family (&nbd_genl_family); +nbd_dbg_close ();mutex_lock (&nbd_index_mutex);
@@ -2328,13 +2341,15 @@ static void __exit nbd_cleanup(void)while (!list_empty (&del_list)) { nbd = list_first_entry(&del_list, struct nbd_device, list);list_del_init (&nbd->list); +if (refcount_read (&nbd->config_refs)) +printk (KERN_ERR "nbd: possibly leaking nbd_config (ref %d)\n" , +refcount_read (&nbd->config_refs));if (refcount_read (&nbd->refs) !=1 )printk (KERN_ERR "nbd: possibly leaking a device\n" );nbd_put (nbd); }idr_destroy (&nbd_index_idr); -genl_unregister_family (&nbd_genl_family);unregister_blkdev (NBD_MAJOR ,"nbd" ); }
drivers/char/ipmi/ipmi_ssif.c +23 -0
@@ -816,6 +816,14 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,break ;case SSIF_GETTING_EVENTS : +if (!msg) { +/* Should never happen, but just in case. */ +dev_warn (&ssif_info->client->dev, +"No message set while getting events\n" ); +ipmi_ssif_unlock_cond (ssif_info, flags); +break ; + } +if ((result <0 ) || (len <3 ) || (msg->rsp[2 ] !=0 )) {/* Error getting event, probably done. */ msg->done (msg);
@@ -839,6 +847,14 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,break ;case SSIF_GETTING_MESSAGES : +if (!msg) { +/* Should never happen, but just in case. */ +dev_warn (&ssif_info->client->dev, +"No message set while getting messages\n" ); +ipmi_ssif_unlock_cond (ssif_info, flags); +break ; + } +if ((result <0 ) || (len <3 ) || (msg->rsp[2 ] !=0 )) {/* Error getting event, probably done. */ msg->done (msg);
@@ -861,6 +877,13 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,deliver_recv_msg (ssif_info, msg); }break ; + +default : +/* Should never happen, but just in case. */ +dev_warn (&ssif_info->client->dev, +"Invalid state in message done handling: %d\n" , + ssif_info->ssif_state); +ipmi_ssif_unlock_cond (ssif_info, flags); } flags =ipmi_ssif_lock_cond (ssif_info, &oflags);
drivers/clocksource/timer-oxnas-rps.c +1 -1
@@ -247,7 +247,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np) } rps->irq =irq_of_parse_and_map (np,0 ); -if (rps->irq <0 ) { +if (!rps->irq) { ret = -EINVAL ; goto err_iomap; }
drivers/clocksource/timer-sp804.c +5 -5
@@ -227,6 +227,11 @@ static int __init sp804_of_init(struct device_node *np)struct clk *clk1, *clk2;const char *name =of_get_property (np,"compatible" ,NULL ); +if (initialized) { +pr_debug ("%pOF: skipping further SP804 timer device\n" , np); +return 0 ; + } + base =of_iomap (np,0 );if (!base)return -ENXIO ;
@@ -235,11 +240,6 @@ static int __init sp804_of_init(struct device_node *np)writel (0 , base +TIMER_CTRL );writel (0 , base +TIMER_2_BASE +TIMER_CTRL ); -if (initialized || !of_device_is_available (np)) { - ret = -EINVAL ; - goto err; - } - clk1 =of_clk_get (np,0 );if (IS_ERR (clk1)) clk1 =NULL ;
drivers/extcon/extcon.c +17 -12
@@ -1241,19 +1241,14 @@ int extcon_dev_register(struct extcon_dev *edev) edev->dev.type = &edev->extcon_dev_type; } - ret =device_register (&edev->dev); -if (ret) { -put_device (&edev->dev); - goto err_dev; - } -spin_lock_init (&edev->lock); - edev->nh =devm_kcalloc (&edev->dev, edev->max_supported, -sizeof (*edev->nh),GFP_KERNEL ); -if (!edev->nh) { - ret = -ENOMEM ; -device_unregister (&edev->dev); - goto err_dev; +if (edev->max_supported) { + edev->nh =kcalloc (edev->max_supported,sizeof (*edev->nh), +GFP_KERNEL ); +if (!edev->nh) { + ret = -ENOMEM ; + goto err_alloc_nh; + } }for (index =0 ; index < edev->max_supported; index++)
@@ -1264,6 +1259,12 @@ int extcon_dev_register(struct extcon_dev *edev)dev_set_drvdata (&edev->dev, edev); edev->state =0 ; + ret =device_register (&edev->dev); +if (ret) { +put_device (&edev->dev); + goto err_dev; + } +mutex_lock (&extcon_dev_list_lock);list_add (&edev->entry, &extcon_dev_list);mutex_unlock (&extcon_dev_list_lock);
@@ -1271,6 +1272,9 @@ int extcon_dev_register(struct extcon_dev *edev)return 0 ; err_dev: +if (edev->max_supported) +kfree (edev->nh); +err_alloc_nh:if (edev->max_supported)kfree (edev->extcon_dev_type.groups); err_alloc_groups:
@@ -1331,6 +1335,7 @@ void extcon_dev_unregister(struct extcon_dev *edev)if (edev->max_supported) {kfree (edev->extcon_dev_type.groups);kfree (edev->cables); +kfree (edev->nh); }put_device (&edev->dev);
drivers/firmware/dmi-sysfs.c +1 -1
@@ -602,7 +602,7 @@ static void __init dmi_sysfs_register_handle(const struct dmi_header *dh, "%d-%d", dh->type, entry->instance);if (*ret) { -kfree (entry); +kobject_put (&entry->kobj);return ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
@@ -84,7 +84,7 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)int ret;if (cs->in.num_chunks ==0 ) -return 0 ; +return -EINVAL ; chunk_array =kmalloc_array (cs->in.num_chunks,sizeof (uint64_t ),GFP_KERNEL );if (!chunk_array)
drivers/gpu/drm/amd/amdgpu/kv_dpm.c +1 -13
@@ -1608,19 +1608,7 @@ static int kv_update_samu_dpm(struct amdgpu_device *adev, bool gate)static u8 kv_get_acp_boot_level (struct amdgpu_device *adev) { -u8 i; -struct amdgpu_clock_voltage_dependency_table *table = - &adev->pm.dpm.dyn_state.acp_clock_voltage_dependency_table; - -for (i =0 ; i < table->count; i++) { -if (table->entries[i].clk >=0 )/* XXX */ -break ; - } - -if (i >= table->count) - i = table->count -1 ; - -return i; +return 0 ; }static void kv_update_acp_boot_level (struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/si_dpm.c +3 -5
@@ -7238,17 +7238,15 @@ static int si_parse_power_table(struct amdgpu_device *adev)if (!adev->pm.dpm.ps)return -ENOMEM ; power_state_offset = (u8 *)state_array->states; -for (i =0 ; i < state_array->ucNumEntries; i++) { +for (adev->pm.dpm.num_ps =0 , i =0 ; i < state_array->ucNumEntries; i++) {u8 *idx; power_state = (union pplib_power_state *)power_state_offset; non_clock_array_index = power_state->v2.nonClockInfoIndex; non_clock_info = (struct _ATOM_PPLIB_NONCLOCK_INFO *) &non_clock_info_array->nonClockInfo[non_clock_array_index]; ps =kzalloc (sizeof (struct si_ps ),GFP_KERNEL ); -if (ps ==NULL ) { -kfree (adev->pm.dpm.ps); +if (ps ==NULL )return -ENOMEM ; - } adev->pm.dpm.ps[i].ps_priv = ps; si_parse_pplib_non_clock_info(adev, &adev->pm.dpm.ps[i], non_clock_info,
@@ -7270,8 +7268,8 @@ static int si_parse_power_table(struct amdgpu_device *adev) k++; } power_state_offset +=2 + power_state->v2.ucNumDPMLevels; + adev->pm.dpm.num_ps++; } - adev->pm.dpm.num_ps = state_array->ucNumEntries;/* fill in the vce power states */ for (i =0 ; i < adev->pm.dpm.num_of_vce_states; i++) {
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +12 -1
@@ -1279,8 +1279,19 @@ static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg) {struct analogix_dp_device *dp =to_dp (aux); +int ret; + +pm_runtime_get_sync (dp->dev); -return analogix_dp_transfer (dp, msg); + ret =analogix_dp_detect_hpd (dp); +if (ret) + goto out; + + ret =analogix_dp_transfer (dp, msg); +out: +pm_runtime_put (dp->dev); + +return ret; } int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
drivers/gpu/drm/gma500/psb_intel_display.c +4 -3
@@ -543,14 +543,15 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,struct drm_crtc *psb_intel_get_crtc_from_pipe (struct drm_device *dev,int pipe) { -struct drm_crtc *crtc =NULL ; +struct drm_crtc *crtc;list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) {struct gma_crtc *gma_crtc =to_gma_crtc (crtc); +if (gma_crtc->pipe == pipe) -break ; +return crtc; } -return crtc; +return NULL ; }int gma_connector_clones (struct drm_device *dev,int type_mask)
drivers/gpu/drm/imx/ipuv3-crtc.c +1 -1
@@ -72,7 +72,7 @@ static void ipu_crtc_disable_planes(struct ipu_crtc *ipu_crtc,drm_atomic_crtc_state_for_each_plane (plane, old_crtc_state) {if (plane == &ipu_crtc->plane[0 ]->base) disable_full = true; -if (&ipu_crtc->plane[1 ] && plane == &ipu_crtc->plane[1 ]->base) +if (ipu_crtc->plane[1 ] && plane == &ipu_crtc->plane[1 ]->base) disable_partial = true; }
drivers/gpu/drm/mediatek/mtk_cec.c +1 -1
@@ -91,7 +91,7 @@ static void mtk_cec_mask(struct mtk_cec *cec, unsigned int offset,u32 tmp =readl (cec->regs + offset) & ~mask; tmp |= val & mask; -writel (val, cec->regs + offset); +writel (tmp, cec->regs + offset); } void mtk_cec_set_hpd_event(struct device *dev,
drivers/gpu/drm/msm/dsi/dsi_host.c +14 -7
@@ -1240,10 +1240,10 @@ static int dsi_cmds2buf_tx(struct msm_dsi_host *msm_host,dsi_get_bpp (msm_host->format) /8 ; len =dsi_cmd_dma_add (msm_host, msg); -if (!len) { +if (len <0 ) {pr_err ("%s: failed to add cmd type = 0x%x\n" , __func__, msg->type); -return -EINVAL ; +return len; }/* for video mode, do not send cmds more than
@@ -1262,10 +1262,14 @@ static int dsi_cmds2buf_tx(struct msm_dsi_host *msm_host, } ret =dsi_cmd_dma_tx (msm_host, len); -if (ret < len) { -pr_err ("%s: cmd dma tx failed, type=0x%x, data0=0x%x, len=%d\n" , - __func__, msg->type, (*(u8 *)(msg->tx_buf)), len); -return -ECOMM ; +if (ret <0 ) { +pr_err ("%s: cmd dma tx failed, type=0x%x, data0=0x%x, len=%d, ret=%d\n" , + __func__, msg->type, (*(u8 *)(msg->tx_buf)), len, ret); +return ret; + }else if (ret < len) { +pr_err ("%s: cmd dma tx failed, type=0x%x, data0=0x%x, ret=%d len=%d\n" , + __func__, msg->type, (*(u8 *)(msg->tx_buf)), ret, len); +return -EIO ; }return len;
@@ -1988,9 +1992,12 @@ int msm_dsi_host_cmd_rx(struct mipi_dsi_host *host, } ret =dsi_cmds2buf_tx (msm_host, msg); -if (ret < msg->tx_len) { +if (ret <0 ) {pr_err ("%s: Read cmd Tx failed, %d\n" , __func__, ret);return ret; + }else if (ret < msg->tx_len) { +pr_err ("%s: Read cmd Tx failed, too short: %d\n" , __func__, ret); +return -ECOMM ; }/*
drivers/gpu/drm/msm/hdmi/hdmi.c +4 -0
@@ -148,6 +148,10 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev)/* HDCP needs physical address of hdmi register */ res =platform_get_resource_byname (pdev,IORESOURCE_MEM , config->mmio_name); +if (!res) { + ret = -EINVAL ; + goto fail; + } hdmi->mmio_phy_addr = res->start; hdmi->qfprom_mmio = msm_ioremap(pdev,
drivers/gpu/drm/msm/msm_gem_prime.c +1 -1
@@ -26,7 +26,7 @@ struct sg_table *msm_gem_prime_get_sg_table(struct drm_gem_object *obj)int npages = obj->size >>PAGE_SHIFT ;if (WARN_ON (!msm_obj->pages))/* should have already pinned! */ -return NULL ; +return ERR_PTR (-ENOMEM );return drm_prime_pages_to_sg (msm_obj->pages, npages); }
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c +4 -2
@@ -136,10 +136,10 @@ nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate,for (cstate = start; &cstate->head != &pstate->list; cstate =list_entry (cstate->head.prev,typeof (*cstate), head)) {if (nvkm_cstate_valid (clk, cstate, max_volt, clk->temp)) -break ; +return cstate; } -return cstate; +return NULL ; } static struct nvkm_cstate *
@@ -170,6 +170,8 @@ nvkm_cstate_prog(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei)if (!list_empty (&pstate->list)) { cstate =nvkm_cstate_get (clk, pstate, cstatei); cstate =nvkm_cstate_find_best (clk, pstate, cstate); +if (!cstate) +return -EINVAL ; }else { cstate = &pstate->base; }
drivers/gpu/drm/radeon/radeon_connectors.c +4 -0
@@ -489,6 +489,8 @@ static struct drm_display_mode *radeon_fp_native_mode(struct drm_encoder *encode native_mode->vdisplay != 0 && native_mode->clock != 0) { mode =drm_mode_duplicate (dev, native_mode); +if (!mode) +return NULL ; mode->type =DRM_MODE_TYPE_PREFERRED |DRM_MODE_TYPE_DRIVER ;drm_mode_set_name (mode);
@@ -503,6 +505,8 @@ static struct drm_display_mode *radeon_fp_native_mode(struct drm_encoder *encode* simpler. */ mode =drm_cvt_mode (dev, native_mode->hdisplay, native_mode->vdisplay,60 , true, false, false); +if (!mode) +return NULL ; mode->type =DRM_MODE_TYPE_PREFERRED |DRM_MODE_TYPE_DRIVER ;DRM_DEBUG_KMS ("Adding cvt approximation of native panel mode %s\n" , mode->name); }
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +1 -1
@@ -1551,10 +1551,10 @@ static int vop_bind(struct device *dev, struct device *master, void *data)vop_win_init (vop); res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - vop->len =resource_size (res); vop->regs =devm_ioremap_resource (dev, res);if (IS_ERR (vop->regs))return PTR_ERR (vop->regs); + vop->len =resource_size (res); vop->regsbak =devm_kzalloc (dev, vop->len,GFP_KERNEL );if (!vop->regsbak)
drivers/gpu/drm/virtio/virtgpu_display.c +2 -0
@@ -187,6 +187,8 @@ static int virtio_gpu_conn_get_modes(struct drm_connector *connector)DRM_DEBUG ("add mode: %dx%d\n" , width, height); mode =drm_cvt_mode (connector->dev, width, height,60 , false, false, false); +if (!mode) +return count; mode->type |=DRM_MODE_TYPE_PREFERRED ;drm_mode_probed_add (connector, mode); count++;
drivers/hid/hid-led.c +1 -1
@@ -369,7 +369,7 @@ static const struct hidled_config hidled_configs[] = { .type = DREAM_CHEEKY, .name = "Dream Cheeky Webmail Notifier", .short_name = "dream_cheeky", - .max_brightness = 31, + .max_brightness = 63, .num_leds = 1, .report_size = 9, .report_type = RAW_REQUEST,
drivers/hwtracing/coresight/coresight-cpu-debug.c +4 -3
@@ -391,9 +391,10 @@ static int debug_notifier_call(struct notifier_block *self,int cpu;struct debug_drvdata *drvdata; -mutex_lock (&debug_lock); +/* Bail out if we can't acquire the mutex or the functionality is off */ +if (!mutex_trylock (&debug_lock)) +return NOTIFY_DONE ; -/* Bail out if the functionality is disabled */ if (!debug_enable) goto skip_dump;
@@ -412,7 +413,7 @@ static int debug_notifier_call(struct notifier_block *self, skip_dump:mutex_unlock (&debug_lock); -return 0 ; +return NOTIFY_DONE ; }static struct notifier_block debug_notifier = {
drivers/i2c/busses/i2c-cadence.c +10 -2
@@ -511,7 +511,7 @@ static void cdns_i2c_master_reset(struct i2c_adapter *adap)static int cdns_i2c_process_msg (struct cdns_i2c *id,struct i2c_msg *msg,struct i2c_adapter *adap) { -unsigned long time_left; +unsigned long time_left, msg_timeout;u32 reg; id->p_msg = msg;
@@ -536,8 +536,16 @@ static int cdns_i2c_process_msg(struct cdns_i2c *id, struct i2c_msg *msg,else cdns_i2c_msend (id); +/* Minimal time to execute this message */ + msg_timeout =msecs_to_jiffies ((1000 * msg->len *BITS_PER_BYTE ) / id->i2c_clk); +/* Plus some wiggle room */ + msg_timeout +=msecs_to_jiffies (500 ); + +if (msg_timeout < adap->timeout) + msg_timeout = adap->timeout; +/* Wait for the signal of completion */ - time_left =wait_for_completion_timeout (&id->xfer_done, adap->timeout); + time_left =wait_for_completion_timeout (&id->xfer_done, msg_timeout);if (time_left ==0 ) {cdns_i2c_master_reset (adap); dev_err(id->adap.dev.parent,
drivers/iio/dummy/iio_simple_dummy.c +12 -8
@@ -572,10 +572,9 @@ static struct iio_sw_device *iio_dummy_probe(const char *name)struct iio_sw_device *swd; swd =kzalloc (sizeof (*swd),GFP_KERNEL ); -if (!swd) { - ret = -ENOMEM ; - goto error_kzalloc; - } +if (!swd) +return ERR_PTR (-ENOMEM ); +/* * Allocate an IIO device. *
@@ -587,7 +586,7 @@ static struct iio_sw_device *iio_dummy_probe(const char *name) indio_dev =iio_device_alloc (sizeof (*st));if (!indio_dev) { ret = -ENOMEM ; - goto error_ret; + goto error_free_swd; } st =iio_priv (indio_dev);
@@ -618,6 +617,10 @@ static struct iio_sw_device *iio_dummy_probe(const char *name)* indio_dev->name = spi_get_device_id(spi)->name; */ indio_dev->name =kstrdup (name,GFP_KERNEL ); +if (!indio_dev->name) { + ret = -ENOMEM ; + goto error_free_device; + }/* Provide description of available channels */ indio_dev->channels = iio_dummy_channels;
@@ -634,7 +637,7 @@ static struct iio_sw_device *iio_dummy_probe(const char *name) ret =iio_simple_dummy_events_register (indio_dev);if (ret <0 ) - goto error_free_device; + goto error_free_name; ret =iio_simple_dummy_configure_buffer (indio_dev);if (ret <0 )
@@ -651,11 +654,12 @@ static struct iio_sw_device *iio_dummy_probe(const char *name)iio_simple_dummy_unconfigure_buffer (indio_dev); error_unregister_events:iio_simple_dummy_events_unregister (indio_dev); +error_free_name: +kfree (indio_dev->name); error_free_device:iio_device_free (indio_dev); -error_ret: +error_free_swd:kfree (swd); -error_kzalloc:return ERR_PTR (ret); }
drivers/infiniband/hw/hfi1/file_ops.c +2 -0
@@ -424,6 +424,8 @@ static ssize_t hfi1_write_iter(struct kiocb *kiocb, struct iov_iter *from)unsigned long dim = from->nr_segs;int idx; +if (!HFI1_CAP_IS_KSET (SDMA )) +return -EINVAL ; idx =srcu_read_lock (&fd->pq_srcu); pq =srcu_dereference (fd->pq, &fd->pq_srcu);if (!cq || !pq) {
drivers/infiniband/hw/hfi1/init.c +1 -1
@@ -515,7 +515,7 @@ void set_link_ipg(struct hfi1_pportdata *ppd)u16 shift, mult;u64 src;u32 current_egress_rate;/* Mbits /sec */ -u32 max_pkt_time; +u64 max_pkt_time;/* * max_pkt_time is the maximum packet egress time in units * of the fabric clock period 1/(805 MHz).
drivers/infiniband/sw/rxe/rxe_req.c +1 -1
@@ -680,7 +680,7 @@ int rxe_requester(void *arg) opcode =next_opcode (qp, wqe, wqe->wr.opcode);if (unlikely (opcode <0 )) { wqe->status =IB_WC_LOC_QP_OP_ERR ; - goto exit; + goto err; } mask = rxe_opcode[opcode].mask;
drivers/input/misc/sparcspkr.c +1 -0
@@ -204,6 +204,7 @@ static int bbc_beep_probe(struct platform_device *op) info = &state->u.bbc; info->clock_freq =of_getintprop_default (dp,"clock-frequency" ,0 ); +of_node_put (dp);if (!info->clock_freq) goto out_free;
drivers/input/mouse/bcm5974.c +6 -1
@@ -956,17 +956,22 @@ static int bcm5974_probe(struct usb_interface *iface,if (!dev->tp_data) goto err_free_bt_buffer; -if (dev->bt_urb) +if (dev->bt_urb) {usb_fill_int_urb (dev->bt_urb, udev,usb_rcvintpipe (udev, cfg->bt_ep), dev->bt_data, dev->cfg.bt_datalen, bcm5974_irq_button, dev,1 ); + dev->bt_urb->transfer_flags |=URB_NO_TRANSFER_DMA_MAP ; + } +usb_fill_int_urb (dev->tp_urb, udev,usb_rcvintpipe (udev, cfg->tp_ep), dev->tp_data, dev->cfg.tp_datalen, bcm5974_irq_trackpad, dev,1 ); + dev->tp_urb->transfer_flags |=URB_NO_TRANSFER_DMA_MAP ; +/* create bcm5974 device */ usb_make_path (udev, dev->phys,sizeof (dev->phys));strlcat (dev->phys,"/input0" ,sizeof (dev->phys));
drivers/iommu/amd_iommu_init.c +1 -1
@@ -89,7 +89,7 @@#define ACPI_DEVFLAG_LINT1 0x80#define ACPI_DEVFLAG_ATSDIS 0x10000000 -#define LOOP_TIMEOUT 100000 +#define LOOP_TIMEOUT 2000000/* * ACPI table definitions *
drivers/iommu/msm_iommu.c +7 -4
@@ -638,16 +638,19 @@ static void insert_iommu_master(struct device *dev,static int qcom_iommu_of_xlate (struct device *dev,struct of_phandle_args *spec) { -struct msm_iommu_dev *iommu; +struct msm_iommu_dev *iommu =NULL , *iter;unsigned long flags;int ret =0 ;spin_lock_irqsave (&msm_iommu_lock, flags); -list_for_each_entry (iommu, &qcom_iommu_devices, dev_node) -if (iommu->dev->of_node == spec->np) +list_for_each_entry (iter, &qcom_iommu_devices, dev_node) { +if (iter->dev->of_node == spec->np) { + iommu = iter;break ; + } + } -if (!iommu || iommu->dev->of_node != spec->np) { +if (!iommu) { ret = -ENODEV ; goto fail; }
drivers/iommu/mtk_iommu.c +1 -2
@@ -696,8 +696,7 @@ static int mtk_iommu_remove(struct platform_device *pdev)iommu_device_sysfs_remove (&data->iommu);iommu_device_unregister (&data->iommu); -if (iommu_present (&platform_bus_type)) -bus_set_iommu (&platform_bus_type,NULL ); +list_del (&data->list);clk_disable_unprepare (data->bclk);devm_free_irq (&pdev->dev, data->irq, data);
drivers/irqchip/irq-armada-370-xp.c +10 -1
@@ -392,7 +392,16 @@ static void armada_xp_mpic_smp_cpu_init(void)static void armada_xp_mpic_perf_init (void ) { -unsigned long cpuid =cpu_logical_map (smp_processor_id ()); +unsigned long cpuid; + +/* +* This Performance Counter Overflow interrupt is specific for +* Armada 370 and XP. It is not available on Armada 375, 38x and 39x. +*/ +if (!of_machine_is_compatible ("marvell,armada-370-xp" )) +return ; + + cpuid =cpu_logical_map (smp_processor_id ());/* Enable Performance Counter Overflow interrupts */ writel(ARMADA_370_XP_INT_CAUSE_PERF(cpuid),
drivers/irqchip/irq-aspeed-i2c-ic.c +2 -2
@@ -82,8 +82,8 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node, } i2c_ic->parent_irq =irq_of_parse_and_map (node,0 ); -if (i2c_ic->parent_irq <0 ) { - ret = i2c_ic->parent_irq; +if (!i2c_ic->parent_irq) { + ret = -EINVAL ; goto err_iounmap; }
drivers/irqchip/irq-xtensa-mx.c +14 -4
@@ -143,14 +143,25 @@ static struct irq_chip xtensa_mx_irq_chip = { .irq_set_affinity = xtensa_mx_irq_set_affinity, }; +static void __init xtensa_mx_init_common (struct irq_domain *root_domain) +{ +unsigned int i; + +irq_set_default_host (root_domain); +secondary_init_irq (); + +/* Initialize default IRQ routing to CPU 0 */ +for (i =0 ; i <XCHAL_NUM_EXTINTERRUPTS ; ++i) +set_er (1 ,MIROUT (i)); +} +int __init xtensa_mx_init_legacy (struct device_node *interrupt_parent) {struct irq_domain *root_domain =irq_domain_add_legacy (NULL ,NR_IRQS -1 ,1 ,0 , &xtensa_mx_irq_domain_ops, &xtensa_mx_irq_chip); -irq_set_default_host (root_domain); -secondary_init_irq (); +xtensa_mx_init_common (root_domain);return 0 ; }
@@ -160,8 +171,7 @@ static int __init xtensa_mx_init(struct device_node *np,struct irq_domain *root_domain =irq_domain_add_linear (np,NR_IRQS , &xtensa_mx_irq_domain_ops, &xtensa_mx_irq_chip); -irq_set_default_host (root_domain); -secondary_init_irq (); +xtensa_mx_init_common (root_domain);return 0 ; }IRQCHIP_DECLARE (xtensa_mx_irq_chip,"cdns,xtensa-mx" , xtensa_mx_init);
drivers/macintosh/Kconfig +4 -0
@@ -77,6 +77,10 @@ config ADB_PMU this device; you should do so if your machine is one of those mentioned above. +config ADB_PMU_EVENT + def_bool y + depends on ADB_PMU && INPUT=y + config ADB_PMU_LED bool "Support for the Power/iBook front LED" depends on ADB_PMU
drivers/macintosh/Makefile +2 -1
@@ -12,7 +12,8 @@ obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o obj-$(CONFIG_INPUT_ADBHID) += adbhid.o obj-$(CONFIG_ANSLCD) += ans-lcd.o -obj-$(CONFIG_ADB_PMU) += via-pmu.o via-pmu-event.o +obj-$(CONFIG_ADB_PMU) += via-pmu.o +obj-$(CONFIG_ADB_PMU_EVENT) += via-pmu-event.o obj-$(CONFIG_ADB_PMU_LED) += via-pmu-led.o obj-$(CONFIG_PMAC_BACKLIGHT) += via-pmu-backlight.o obj-$(CONFIG_ADB_CUDA) += via-cuda.o
drivers/macintosh/via-pmu.c +1 -1
@@ -1440,7 +1440,7 @@ pmu_handle_data(unsigned char *data, int len)pmu_pass_intr (data, len);/* len == 6 is probably a bad check. But how do I * know what PMU versions send what events here? */ -if (len ==6 ) { +if (IS_ENABLED (CONFIG_ADB_PMU_EVENT ) && len ==6 ) {via_pmu_event (PMU_EVT_POWER , !!(data[1 ]&8 ));via_pmu_event (PMU_EVT_LID , data[1 ]&1 ); }
drivers/mailbox/mailbox.c +13 -6
@@ -85,11 +85,11 @@ static void msg_submit(struct mbox_chan *chan) exit:spin_unlock_irqrestore (&chan->lock, flags); -/* kick start the timer immediately to avoid delays */ if (!err && (chan->txdone_method &TXDONE_BY_POLL )) { -/* but only if not already active */ -if (!hrtimer_active (&chan->mbox->poll_hrt)) -hrtimer_start (&chan->mbox->poll_hrt,0 ,HRTIMER_MODE_REL ); +/* kick start the timer immediately to avoid delays */ +spin_lock_irqsave (&chan->mbox->poll_hrt_lock, flags); +hrtimer_start (&chan->mbox->poll_hrt,0 ,HRTIMER_MODE_REL ); +spin_unlock_irqrestore (&chan->mbox->poll_hrt_lock, flags); } }
@@ -123,20 +123,26 @@ static enum hrtimer_restart txdone_hrtimer(struct hrtimer *hrtimer) container_of(hrtimer, struct mbox_controller, poll_hrt);bool txdone, resched = false;int i; +unsigned long flags;for (i =0 ; i < mbox->num_chans; i++) {struct mbox_chan *chan = &mbox->chans[i];if (chan->active_req && chan->cl) { - resched = true; txdone = chan->mbox->ops->last_tx_done (chan);if (txdone)tx_tick (chan,0 ); +else + resched = true; } }if (resched) { -hrtimer_forward_now (hrtimer,ms_to_ktime (mbox->txpoll_period)); +spin_lock_irqsave (&mbox->poll_hrt_lock, flags); +if (!hrtimer_is_queued (hrtimer)) +hrtimer_forward_now (hrtimer,ms_to_ktime (mbox->txpoll_period)); +spin_unlock_irqrestore (&mbox->poll_hrt_lock, flags); +return HRTIMER_RESTART ; }return HRTIMER_NORESTART ;
@@ -473,6 +479,7 @@ int mbox_controller_register(struct mbox_controller *mbox)hrtimer_init (&mbox->poll_hrt,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); mbox->poll_hrt.function = txdone_hrtimer; +spin_lock_init (&mbox->poll_hrt_lock); }for (i =0 ; i < mbox->num_chans; i++) {
drivers/md/md.c +21 -12
@@ -2427,14 +2427,16 @@ static void sync_sbs(struct mddev *mddev, int nospares)static bool does_sb_need_changing (struct mddev *mddev) { -struct md_rdev *rdev; +struct md_rdev *rdev =NULL , *iter;struct mdp_superblock_1 *sb;int role;/* Find a good rdev */ -rdev_for_each (rdev, mddev) -if ((rdev->raid_disk >=0 ) && !test_bit (Faulty, &rdev->flags)) +rdev_for_each (iter, mddev) +if ((iter->raid_disk >=0 ) && !test_bit (Faulty, &iter->flags)) { + rdev = iter;break ; + }/* No good device found. */ if (!rdev)
@@ -7588,17 +7590,22 @@ EXPORT_SYMBOL(md_register_thread);void md_unregister_thread (struct md_thread **threadp) { -struct md_thread *thread = *threadp; -if (!thread) -return ; -pr_debug ("interrupting MD-thread pid %d\n" ,task_pid_nr (thread->tsk)); -/* Locking ensures that mddev_unlock does not wake_up a +struct md_thread *thread; + +/* +* Locking ensures that mddev_unlock does not wake_up a * non-existent thread */ spin_lock (&pers_lock); + thread = *threadp; +if (!thread) { +spin_unlock (&pers_lock); +return ; + } *threadp =NULL ;spin_unlock (&pers_lock); +pr_debug ("interrupting MD-thread pid %d\n" ,task_pid_nr (thread->tsk));kthread_stop (thread->tsk);kfree (thread); }
@@ -9264,16 +9271,18 @@ static int read_rdev(struct mddev *mddev, struct md_rdev *rdev)void md_reload_sb (struct mddev *mddev,int nr) { -struct md_rdev *rdev; +struct md_rdev *rdev =NULL , *iter;int err;/* Find the rdev */ -rdev_for_each_rcu (rdev, mddev) { -if (rdev->desc_nr == nr) +rdev_for_each_rcu (iter, mddev) { +if (iter->desc_nr == nr) { + rdev = iter;break ; + } } -if (!rdev || rdev->desc_nr != nr) { +if (!rdev) {pr_warn ("%s: %d Could not find rdev with nr %d\n" , __func__, __LINE__, nr);return ; }
drivers/md/raid0.c +16 -15
@@ -150,21 +150,6 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)pr_debug ("md/raid0:%s: FINAL %d zones\n" ,mdname (mddev), conf->nr_strip_zones); -if (conf->nr_strip_zones ==1 ) { - conf->layout =RAID0_ORIG_LAYOUT ; - }else if (mddev->layout ==RAID0_ORIG_LAYOUT || - mddev->layout ==RAID0_ALT_MULTIZONE_LAYOUT ) { - conf->layout = mddev->layout; - }else if (default_layout ==RAID0_ORIG_LAYOUT || - default_layout ==RAID0_ALT_MULTIZONE_LAYOUT ) { - conf->layout = default_layout; - }else { -pr_err ("md/raid0:%s: cannot assemble multi-zone RAID0 with default_layout setting\n" , -mdname (mddev)); -pr_err ("md/raid0: please set raid0.default_layout to 1 or 2\n" ); - err = -ENOTSUPP ; - goto abort; - }/* * now since we have the hard sector sizes, we can make sure * chunk size is a multiple of that sector size
@@ -293,6 +278,22 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf) (unsigned long long)smallest->sectors); } +if (conf->nr_strip_zones ==1 || conf->strip_zone[1 ].nb_dev ==1 ) { + conf->layout =RAID0_ORIG_LAYOUT ; + }else if (mddev->layout ==RAID0_ORIG_LAYOUT || + mddev->layout ==RAID0_ALT_MULTIZONE_LAYOUT ) { + conf->layout = mddev->layout; + }else if (default_layout ==RAID0_ORIG_LAYOUT || + default_layout ==RAID0_ALT_MULTIZONE_LAYOUT ) { + conf->layout = default_layout; + }else { +pr_err ("md/raid0:%s: cannot assemble multi-zone RAID0 with default_layout setting\n" , +mdname (mddev)); +pr_err ("md/raid0: please set raid0.default_layout to 1 or 2\n" ); + err = -EOPNOTSUPP ; + goto abort; + } +pr_debug ("md/raid0:%s: done.\n" ,mdname (mddev)); *private_conf = conf;
drivers/media/pci/cx23885/cx23885-core.c +3 -3
@@ -2005,7 +2005,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev, err =pci_set_dma_mask (pci_dev,0xffffffff );if (err) {pr_err ("%s/0: Oops: no 32bit PCI DMA ???\n" , dev->name); - goto fail_ctrl; + goto fail_dma_set_mask; } err = request_irq(pci_dev->irq, cx23885_irq,
@@ -2013,7 +2013,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev,if (err <0 ) {pr_err ("%s: can't get IRQ %d\n" , dev->name, pci_dev->irq); - goto fail_irq; + goto fail_dma_set_mask; }switch (dev->board) {
@@ -2035,7 +2035,7 @@ static int cx23885_initdev(struct pci_dev *pci_dev,return 0 ; -fail_irq: +fail_dma_set_mask:cx23885_dev_unregister (dev); fail_ctrl:v4l2_ctrl_handler_free (hdl);
drivers/media/pci/cx25821/cx25821-core.c +1 -1
@@ -1350,11 +1350,11 @@ static void cx25821_finidev(struct pci_dev *pci_dev)struct cx25821_dev *dev =get_cx25821 (v4l2_dev);cx25821_shutdown (dev); -pci_disable_device (pci_dev);/* unregister stuff */ if (pci_dev->irq)free_irq (pci_dev->irq, dev); +pci_disable_device (pci_dev);cx25821_dev_unregister (dev);v4l2_device_unregister (v4l2_dev);
drivers/media/platform/exynos4-is/fimc-is.c +1 -1
@@ -144,7 +144,7 @@ static int fimc_is_enable_clocks(struct fimc_is *is)dev_err (&is->pdev->dev,"clock %s enable failed\n" , fimc_is_clocks[i]);for (--i; i >=0 ; i--) -clk_disable (is->clocks[i]); +clk_disable_unprepare (is->clocks[i]);return ret; }pr_debug ("enabled clock: %s\n" , fimc_is_clocks[i]);
drivers/media/platform/exynos4-is/fimc-isp-video.h +1 -1
@@ -35,7 +35,7 @@ static inline int fimc_isp_video_device_register(struct fimc_isp *isp,return 0 ; } -void fimc_isp_video_device_unregister (struct fimc_isp *isp, +static inline void fimc_isp_video_device_unregister (struct fimc_isp *isp,enum v4l2_buf_type type) { }
drivers/media/platform/qcom/venus/hfi.c +3 -0
@@ -117,6 +117,9 @@ int hfi_core_deinit(struct venus_core *core, bool blocking)mutex_lock (&core->lock); } +if (!core->ops) + goto unlock; + ret = core->ops->core_deinit (core);if (!ret)
drivers/media/platform/sti/delta/delta-v4l2.c +4 -2
@@ -1880,7 +1880,7 @@ static int delta_probe(struct platform_device *pdev)if (ret) {dev_err (delta->dev,"%s failed to initialize firmware ipc channel\n" ,DELTA_PREFIX ); - goto err; + goto err_pm_disable; }/* register all available decoders */
@@ -1894,7 +1894,7 @@ static int delta_probe(struct platform_device *pdev)if (ret) {dev_err (delta->dev,"%s failed to register V4L2 device\n" ,DELTA_PREFIX ); - goto err; + goto err_pm_disable; } delta->work_queue =create_workqueue (DELTA_NAME );
@@ -1919,6 +1919,8 @@ static int delta_probe(struct platform_device *pdev)destroy_workqueue (delta->work_queue); err_v4l2:v4l2_device_unregister (&delta->v4l2_dev); +err_pm_disable: +pm_runtime_disable (dev); err:return ret; }
drivers/media/usb/pvrusb2/pvrusb2-hdw.c +5 -2
@@ -2563,6 +2563,11 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, }while (0 );mutex_unlock (&pvr2_unit_mtx); +INIT_WORK (&hdw->workpoll, pvr2_hdw_worker_poll); + +if (hdw->unit_number ==-1 ) + goto fail; + cnt1 =0 ; cnt2 =scnprintf (hdw->name+cnt1,sizeof (hdw->name)-cnt1,"pvrusb2" ); cnt1 += cnt2;
@@ -2574,8 +2579,6 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,if (cnt1 >=sizeof (hdw->name)) cnt1 =sizeof (hdw->name)-1 ; hdw->name[cnt1] =0 ; -INIT_WORK (&hdw->workpoll,pvr2_hdw_worker_poll); -pvr2_trace (PVR2_TRACE_INIT ,"Driver unit number is %d, name is %s" , hdw->unit_number,hdw->name);
drivers/media/usb/uvc/uvc_v4l2.c +11 -9
@@ -841,29 +841,31 @@ static int uvc_ioctl_enum_input(struct file *file, void *fh,struct uvc_video_chain *chain = handle->chain;const struct uvc_entity *selector = chain->selector;struct uvc_entity *iterm =NULL ; +struct uvc_entity *it;u32 index = input->index; -int pin =0 ;if (selector ==NULL || (chain->dev->quirks &UVC_QUIRK_IGNORE_SELECTOR_UNIT )) {if (index !=0 )return -EINVAL ; -list_for_each_entry (iterm, &chain->entities, chain) { -if (UVC_ENTITY_IS_ITERM (iterm)) +list_for_each_entry (it, &chain->entities, chain) { +if (UVC_ENTITY_IS_ITERM (it)) { + iterm = it;break ; + } } - pin = iterm->id; }else if (index < selector->bNrInPins) { - pin = selector->baSourceID[index]; -list_for_each_entry (iterm, &chain->entities, chain) { -if (!UVC_ENTITY_IS_ITERM (iterm)) +list_for_each_entry (it, &chain->entities, chain) { +if (!UVC_ENTITY_IS_ITERM (it))continue ; -if (iterm->id == pin) +if (it->id == selector->baSourceID[index]) { + iterm = it;break ; + } } } -if (iterm ==NULL || iterm->id != pin) +if (iterm ==NULL )return -EINVAL ;memset (input,0 ,sizeof (*input));
drivers/mfd/ipaq-micro.c +1 -1
@@ -410,7 +410,7 @@ static int __init micro_probe(struct platform_device *pdev)micro_reset_comm (micro); irq =platform_get_irq (pdev,0 ); -if (!irq) +if (irq <0 )return -EINVAL ; ret = devm_request_irq(&pdev->dev, irq, micro_serial_isr, IRQF_SHARED, "ipaq-micro",
drivers/mfd/rtsx_usb.c +1 -0
@@ -678,6 +678,7 @@ static int rtsx_usb_probe(struct usb_interface *intf,return 0 ; out_init_fail: +usb_set_intfdata (ucr->pusb_intf,NULL );usb_free_coherent (ucr->pusb_dev,IOBUF_SIZE , ucr->iobuf, ucr->iobuf_dma);return ret;
drivers/misc/lkdtm_usercopy.c +14 -3
@@ -30,12 +30,12 @@ static const unsigned char test_text[] = "This is a test.\n";*/ static noinline unsigned char *trick_compiler(unsigned char *stack) { -return stack +0 ; +return stack + unconst; } static noinline unsigned char *do_usercopy_stack_callee(int value) { -unsigned char buf[32 ]; +unsigned char buf[128 ];int i;/* Exercise stack to avoid everything living in registers. */
@@ -43,7 +43,12 @@ static noinline unsigned char *do_usercopy_stack_callee(int value) buf[i] = value &0xff ; } -return trick_compiler (buf); +/* +* Put the target buffer in the middle of stack allocation +* so that we don't step on future stack users regardless +* of stack growth direction. +*/ +return trick_compiler (&buf[(128 /2 )-32 ]); } static noinline void do_usercopy_stack(bool to_user, bool bad_frame)
@@ -66,6 +71,12 @@ static noinline void do_usercopy_stack(bool to_user, bool bad_frame) bad_stack -=sizeof (unsigned long ); } +#ifdef ARCH_HAS_CURRENT_STACK_POINTER +pr_info ("stack : %px\n" , (void *)current_stack_pointer); +#endif +pr_info ("good_stack: %px-%px\n" , good_stack, good_stack +sizeof (good_stack)); +pr_info ("bad_stack : %px-%px\n" , bad_stack, bad_stack +sizeof (good_stack)); + user_addr =vm_mmap (NULL ,0 ,PAGE_SIZE ,PROT_READ |PROT_WRITE |PROT_EXEC ,MAP_ANONYMOUS |MAP_PRIVATE ,0 );
drivers/mtd/chips/cfi_cmdset_0002.c +53 -40
229 lines not on this page · raw message
drivers/mtd/ubi/vmt.c +0 -1
@@ -315,7 +315,6 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) ubi->volumes[vol_id] =NULL ; ubi->vol_count -=1 ;spin_unlock (&ubi->volumes_lock); -ubi_eba_destroy_table (eba_tbl); out_acc:spin_lock (&ubi->volumes_lock); ubi->rsvd_pebs -= vol->reserved_pebs;
drivers/net/dsa/mv88e6xxx/chip.c +1 -0
@@ -2317,6 +2317,7 @@ static int mv88e6xxx_mdios_register(struct mv88e6xxx_chip *chip,*/ child =of_get_child_by_name (np,"mdio" ); err =mv88e6xxx_mdio_register (chip, child, false); +of_node_put (child);if (err)return err;
drivers/net/ethernet/altera/altera_tse_main.c +5 -1
@@ -174,7 +174,8 @@ static int altera_tse_mdio_create(struct net_device *dev, unsigned int id) mdio =mdiobus_alloc ();if (mdio ==NULL ) {netdev_err (dev,"Error allocating MDIO bus\n" ); -return -ENOMEM ; + ret = -ENOMEM ; + goto put_node; } mdio->name =ALTERA_TSE_RESOURCE_NAME ;
@@ -191,6 +192,7 @@ static int altera_tse_mdio_create(struct net_device *dev, unsigned int id) mdio->id); goto out_free_mdio; } +of_node_put (mdio_node);if (netif_msg_drv (priv))netdev_info (dev,"MDIO bus %s: created\n" , mdio->id);
@@ -200,6 +202,8 @@ static int altera_tse_mdio_create(struct net_device *dev, unsigned int id) out_free_mdio:mdiobus_free (mdio); mdio =NULL ; +put_node: +of_node_put (mdio_node);return ret; }
drivers/net/ethernet/broadcom/Makefile +5 -0
@@ -16,3 +16,8 @@ obj-$(CONFIG_BGMAC_BCMA) += bgmac-bcma.o bgmac-bcma-mdio.o obj-$(CONFIG_BGMAC_PLATFORM) += bgmac-platform.o obj-$(CONFIG_SYSTEMPORT) += bcmsysport.o obj-$(CONFIG_BNXT) += bnxt/ + +# FIXME: temporarily silence -Warray-bounds on non W=1+ builds +ifndef KBUILD_EXTRA_WARN +CFLAGS_tg3.o += -Wno-array-bounds +endif
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +4 -4
@@ -1156,9 +1156,9 @@ static int ixgbe_update_vf_xcast_mode(struct ixgbe_adapter *adapter,switch (xcast_mode) {case IXGBEVF_XCAST_MODE_NONE : - disable =IXGBE_VMOLR_BAM |IXGBE_VMOLR_ROMPE | + disable =IXGBE_VMOLR_ROMPE |IXGBE_VMOLR_MPE |IXGBE_VMOLR_UPE |IXGBE_VMOLR_VPE ; - enable =0 ; + enable =IXGBE_VMOLR_BAM ;break ;case IXGBEVF_XCAST_MODE_MULTI : disable =IXGBE_VMOLR_MPE |IXGBE_VMOLR_UPE |IXGBE_VMOLR_VPE ;
@@ -1180,9 +1180,9 @@ static int ixgbe_update_vf_xcast_mode(struct ixgbe_adapter *adapter,return -EPERM ; } - disable =0 ; + disable =IXGBE_VMOLR_VPE ; enable =IXGBE_VMOLR_BAM |IXGBE_VMOLR_ROMPE | -IXGBE_VMOLR_MPE |IXGBE_VMOLR_UPE |IXGBE_VMOLR_VPE ; +IXGBE_VMOLR_MPE |IXGBE_VMOLR_UPE ;break ;default :return -EOPNOTSUPP ;
drivers/net/ethernet/mediatek/mtk_eth_soc.c +3 -0
@@ -1579,6 +1579,9 @@ static int mtk_hwlro_get_fdir_entry(struct net_device *dev,struct ethtool_rx_flow_spec *fsp = (struct ethtool_rx_flow_spec *)&cmd->fs; +if (fsp->location >=ARRAY_SIZE (mac->hwlro_ip)) +return -EINVAL ; +/* only tcp dst ipv4 is meaningful, others are meaningless */ fsp->flow_type =TCP_V4_FLOW ; fsp->h_u.tcp_ip4_spec.ip4dst =ntohl (mac->hwlro_ip[fsp->location]);
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +1 -1
@@ -2055,7 +2055,7 @@ static int mlx4_en_get_module_eeprom(struct net_device *dev,en_err (priv,"mlx4_get_module_info i(%d) offset(%d) bytes_to_read(%d) - FAILED (0x%x)\n" , i, offset, ee->len - i, ret); -return 0 ; +return ret; } i += ret;
drivers/net/phy/mdio_bus.c +0 -1
@@ -716,7 +716,6 @@ int __init mdio_bus_init(void)return ret; } -EXPORT_SYMBOL_GPL (mdio_bus_init);#if IS_ENABLED (CONFIG_PHYLIB )void mdio_bus_exit (void )
drivers/net/phy/micrel.c +6 -5
@@ -285,7 +285,7 @@ static int kszphy_config_reset(struct phy_device *phydev) } } -if (priv->led_mode >=0 ) +if (priv->type && priv->led_mode >=0 )kszphy_setup_led (phydev, priv->type->led_mode_reg, priv->led_mode);return 0 ;
@@ -301,10 +301,10 @@ static int kszphy_config_init(struct phy_device *phydev) type = priv->type; -if (type->has_broadcast_disable) +if (type && type->has_broadcast_disable)kszphy_broadcast_disable (phydev); -if (type->has_nand_tree_disable) +if (type && type->has_nand_tree_disable)kszphy_nand_tree_disable (phydev);return kszphy_config_reset (phydev);
@@ -764,7 +764,7 @@ static int kszphy_probe(struct phy_device *phydev) priv->type = type; -if (type->led_mode_reg) { +if (type && type->led_mode_reg) { ret =of_property_read_u32 (np,"micrel,led-mode" , &priv->led_mode);if (ret)
@@ -785,7 +785,8 @@ static int kszphy_probe(struct phy_device *phydev)unsigned long rate =clk_get_rate (clk);bool rmii_ref_clk_sel_25_mhz; - priv->rmii_ref_clk_sel = type->has_rmii_ref_clk_sel; +if (type) + priv->rmii_ref_clk_sel = type->has_rmii_ref_clk_sel; rmii_ref_clk_sel_25_mhz =of_property_read_bool (np,"micrel,rmii-reference-clock-select-25-mhz" );
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +1 -1
@@ -5501,7 +5501,7 @@ unsigned int ar9003_get_paprd_scale_factor(struct ath_hw *ah,static u8 ar9003_get_eepmisc (struct ath_hw *ah) { -return ah->eeprom.map4k.baseEepHeader.eepMisc; +return ah->eeprom.ar9300_eep.baseEepHeader.opCapFlags.eepMisc; }const struct eeprom_ops eep_ar9300_ops = {
drivers/net/wireless/ath/ath9k/ar9003_phy.h +1 -1
@@ -720,7 +720,7 @@#define AR_CH0_TOP2 (AR_SREV_9300(ah) ? 0x1628c : \ (AR_SREV_9462(ah) ? 0x16290 : 0x16284))#define AR_CH0_TOP2_XPABIASLVL (AR_SREV_9561(ah) ? 0x1e00 : 0xf000) -#define AR_CH0_TOP2_XPABIASLVL_S 12 +#define AR_CH0_TOP2_XPABIASLVL_S (AR_SREV_9561(ah) ? 9 : 12)#define AR_CH0_XTAL (AR_SREV_9300(ah) ? 0x16294 : \ ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x16298 : \
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +8 -0
@@ -1005,6 +1005,14 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv, goto rx_next; } +if (rxstatus->rs_keyix >=ATH_KEYMAX && + rxstatus->rs_keyix !=ATH9K_RXKEYIX_INVALID ) { +ath_dbg (common,ANY , +"Invalid keyix, dropping (keyix: %d)\n" , + rxstatus->rs_keyix); + goto rx_next; + } +/* Get the RX status information */ memset (rx_status,0 ,sizeof (struct ieee80211_rx_status ));
drivers/net/wireless/ath/carl9170/tx.c +3 -0
@@ -1554,6 +1554,9 @@ static struct carl9170_vif_info *carl9170_pick_beaconing_vif(struct ar9170 *ar) goto out; } }while (ar->beacon_enabled && i--); + +/* no entry found in list */ +return NULL ; } out:
drivers/net/wireless/broadcom/b43/phy_n.c +1 -1
@@ -594,7 +594,7 @@ static void b43_nphy_adjust_lna_gain_table(struct b43_wldev *dev)u16 data[4 ];s16 gain[2 ];u16 minmax[2 ]; -static const u16 lna_gain[4 ] = {-2 ,10 ,19 ,25 }; +static const s16 lna_gain[4 ] = {-2 ,10 ,19 ,25 };if (nphy->hang_avoid)b43_nphy_stay_in_carrier_search (dev,1 );
drivers/net/wireless/broadcom/b43legacy/phy.c +1 -1
@@ -1148,7 +1148,7 @@ void b43legacy_phy_lo_b_measure(struct b43legacy_wldev *dev)struct b43legacy_phy *phy = &dev->phy;u16 regstack[12 ] = {0 };u16 mls; -u16 fval; +s16 fval;int i;int j;
drivers/net/wireless/intel/ipw2x00/libipw_tx.c +1 -1
@@ -397,7 +397,7 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev)/* Each fragment may need to have room for encryption * pre/postfix */ -if (host_encrypt) +if (host_encrypt && crypt && crypt->ops) bytes_per_frag -= crypt->ops->extra_mpdu_prefix_len + crypt->ops->extra_mpdu_postfix_len;
drivers/net/wireless/intel/iwlwifi/mvm/power.c +3 -0
@@ -611,6 +611,9 @@ static void iwl_mvm_power_get_vifs_iterator(void *_data, u8 *mac,struct iwl_power_vifs *power_iterator = _data;bool active = mvmvif->phy_ctxt && mvmvif->phy_ctxt->id <NUM_PHY_CTX ; +if (!mvmvif->uploaded) +return ; +switch (ieee80211_vif_type_p2p (vif)) {case NL80211_IFTYPE_P2P_DEVICE :break ;
drivers/net/wireless/marvell/mwifiex/11h.c +2 -0
@@ -303,5 +303,7 @@ void mwifiex_dfs_chan_sw_work_queue(struct work_struct *work)mwifiex_dbg (priv->adapter,MSG ,"indicating channel switch completion to kernel\n" ); +mutex_lock (&priv->wdev.mtx);cfg80211_ch_switch_notify (priv->netdev, &priv->dfs_chandef); +mutex_unlock (&priv->wdev.mtx); }
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c +6 -2
@@ -460,8 +460,10 @@ static void rtl8180_tx(struct ieee80211_hw *dev,struct rtl8180_priv *priv = dev->priv;struct rtl8180_tx_ring *ring;struct rtl8180_tx_desc *entry; +unsigned int prio =0 ;unsigned long flags; -unsigned int idx, prio, hw_prio; +unsigned int idx, hw_prio; +dma_addr_t mapping;u32 tx_flags;u8 rc_flags;
@@ -470,7 +472,9 @@ static void rtl8180_tx(struct ieee80211_hw *dev,/* do arithmetic and then convert to le16 */ u16 frame_duration =0 ; - prio =skb_get_queue_mapping (skb); +/* rtl8180/rtl8185 only has one useable tx queue */ +if (dev->queues >IEEE80211_AC_BK ) + prio =skb_get_queue_mapping (skb); ring = &priv->tx_ring[prio]; mapping = pci_map_single(priv->pdev, skb->data,
drivers/net/wireless/realtek/rtlwifi/usb.c +1 -1
@@ -1060,7 +1060,7 @@ int rtl_usb_probe(struct usb_interface *intf, hw =ieee80211_alloc_hw (sizeof (struct rtl_priv ) +sizeof (struct rtl_usb_priv ), &rtl_ops);if (!hw) { -WARN_ONCE (true,"rtl_usb: ieee80211 alloc failed\n" ); +pr_warn ("rtl_usb: ieee80211 alloc failed\n" );return -ENOMEM ; } rtlpriv = hw->priv;
drivers/nfc/st21nfca/se.c +11 -4
@@ -320,7 +320,7 @@ int st21nfca_connectivity_event_received(struct nfc_hci_dev *hdev, u8 host,* AID 81 5 to 16 * PARAMETERS 82 0 to 255 */ -if (skb->len <NFC_MIN_AID_LENGTH +2 && +if (skb->len <NFC_MIN_AID_LENGTH +2 || skb->data[0 ] !=NFC_EVT_TRANSACTION_AID_TAG )return -EPROTO ;
@@ -332,22 +332,29 @@ int st21nfca_connectivity_event_received(struct nfc_hci_dev *hdev, u8 host, transaction->aid_len = skb->data[1 ];/* Checking if the length of the AID is valid */ -if (transaction->aid_len >sizeof (transaction->aid)) +if (transaction->aid_len >sizeof (transaction->aid)) { +devm_kfree (dev, transaction);return -EINVAL ; + }memcpy (transaction->aid, &skb->data[2 ], transaction->aid_len);/* Check next byte is PARAMETERS tag (82) */ if (skb->data[transaction->aid_len +2 ] != -NFC_EVT_TRANSACTION_PARAMS_TAG ) +NFC_EVT_TRANSACTION_PARAMS_TAG ) { +devm_kfree (dev, transaction);return -EPROTO ; + } transaction->params_len = skb->data[transaction->aid_len +3 ];/* Total size is allocated (skb->len - 2) minus fixed array members */ -if (transaction->params_len > ((skb->len -2 ) -sizeof (struct nfc_evt_transaction ))) +if (transaction->params_len > ((skb->len -2 ) - +sizeof (struct nfc_evt_transaction ))) { +devm_kfree (dev, transaction);return -EINVAL ; + }memcpy (transaction->params, skb->data + transaction->aid_len +4 , transaction->params_len);
drivers/nvme/host/pci.c +1 -0
@@ -1424,6 +1424,7 @@ static int nvme_alloc_admin_tags(struct nvme_dev *dev) dev->ctrl.admin_q =blk_mq_init_queue (&dev->admin_tagset);if (IS_ERR (dev->ctrl.admin_q)) {blk_mq_free_tag_set (&dev->admin_tagset); + dev->ctrl.admin_q =NULL ;return -ENOMEM ; }if (!blk_get_queue (dev->ctrl.admin_q)) {
drivers/pci/dwc/pcie-qcom.c +6 -1
@@ -1302,10 +1302,15 @@ static int qcom_pcie_probe(struct platform_device *pdev) ret =dw_pcie_host_init (pp);if (ret) {dev_err (dev,"cannot initialize host\n" ); -return ret; + goto err_phy_exit; }return 0 ; + +err_phy_exit: +phy_exit (pcie->phy); + +return ret; }static const struct of_device_id qcom_pcie_match[] = {
drivers/pci/pci.c +5 -5
@@ -4153,18 +4153,18 @@ static int pci_dev_reset_slot_function(struct pci_dev *dev, int probe)static void pci_dev_lock (struct pci_dev *dev) { -pci_cfg_access_lock (dev);/* block PM suspend, driver probe, etc. */ device_lock (&dev->dev); +pci_cfg_access_lock (dev); }/* Return 1 on successful lock, 0 on contention */ static int pci_dev_trylock (struct pci_dev *dev) { -if (pci_cfg_access_trylock (dev)) { -if (device_trylock (&dev->dev)) +if (device_trylock (&dev->dev)) { +if (pci_cfg_access_trylock (dev))return 1 ; -pci_cfg_access_unlock (dev); +device_unlock (&dev->dev); }return 0 ;
@@ -4172,8 +4172,8 @@ static int pci_dev_trylock(struct pci_dev *dev)static void pci_dev_unlock (struct pci_dev *dev) { -device_unlock (&dev->dev);pci_cfg_access_unlock (dev); +device_unlock (&dev->dev); }static void pci_dev_save_and_disable (struct pci_dev *dev)
drivers/pcmcia/Kconfig +1 -1
@@ -146,7 +146,7 @@ config TCIC config PCMCIA_ALCHEMY_DEVBOARD tristate "Alchemy Db/Pb1xxx PCMCIA socket services" - depends on MIPS_ALCHEMY && PCMCIA + depends on MIPS_DB1XXX && PCMCIA help Enable this driver of you want PCMCIA support on your Alchemy Db1000, Db/Pb1100, Db/Pb1500, Db/Pb1550, Db/Pb1200, DB1300
drivers/phy/qualcomm/phy-qcom-qmp.c +10 -1
@@ -1086,6 +1086,11 @@ static const struct phy_ops qcom_qmp_phy_gen_ops = { .owner = THIS_MODULE, }; +static void qcom_qmp_reset_control_put (void *data) +{ +reset_control_put (data); +} +static int qcom_qmp_phy_create (struct device *dev,struct device_node *np,int id) {
@@ -1123,7 +1128,7 @@ int qcom_qmp_phy_create(struct device *dev, struct device_node *np, int id)* all phys that don't need this. */ snprintf (prop_name,sizeof (prop_name),"pipe%d" , id); - qphy->pipe_clk =of_clk_get_by_name (np, prop_name); + qphy->pipe_clk =devm_get_clk_from_child (dev, np, prop_name);if (IS_ERR (qphy->pipe_clk)) {if (qmp->cfg->type ==PHY_TYPE_PCIE || qmp->cfg->type ==PHY_TYPE_USB3 ) {
@@ -1145,6 +1150,10 @@ int qcom_qmp_phy_create(struct device *dev, struct device_node *np, int id)dev_err (dev,"failed to get lane%d reset\n" , id);return PTR_ERR (qphy->lane_rst); } + ret =devm_add_action_or_reset (dev, qcom_qmp_reset_control_put, + qphy->lane_rst); +if (ret) +return ret; } generic_phy =devm_phy_create (dev, np, &qcom_qmp_phy_gen_ops);
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +1 -1
@@ -710,7 +710,7 @@ static int armada_37xx_irqchip_register(struct platform_device *pdev,for (i =0 ; i < nr_irq_parent; i++) {int irq =irq_of_parse_and_map (np, i); -if (irq <0 ) +if (!irq)continue ; gpiochip_set_chained_irqchip(gc, irqchip, irq,
drivers/pwm/pwm-lp3943.c +1 -0
@@ -128,6 +128,7 @@ static int lp3943_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,if (err)return err; + duty_ns =min (duty_ns, period_ns); val = (u8)(duty_ns *LP3943_MAX_DUTY / period_ns);return lp3943_write_byte (lp3943, reg_duty, val);
drivers/regulator/pfuze100-regulator.c +2 -0
@@ -431,6 +431,7 @@ static int pfuze_parse_regulators_dt(struct pfuze_chip *chip) parent =of_get_child_by_name (np,"regulators" );if (!parent) {dev_err (dev,"regulators node not found\n" ); +of_node_put (np);return -EINVAL ; }
@@ -455,6 +456,7 @@ static int pfuze_parse_regulators_dt(struct pfuze_chip *chip) }of_node_put (parent); +of_node_put (np);if (ret <0 ) {dev_err (dev,"Error parsing regulator init data: %d\n" , ret);
drivers/rpmsg/qcom_smd.c +1 -1
@@ -1299,7 +1299,7 @@ static int qcom_smd_parse_edge(struct device *dev, edge->name = node->name; irq =irq_of_parse_and_map (node,0 ); -if (irq <0 ) { +if (!irq) {dev_err (dev,"required smd interrupt missing\n" );return -EINVAL ; }
drivers/rtc/rtc-mt6397.c +2 -0
@@ -339,6 +339,8 @@ static int mtk_rtc_probe(struct platform_device *pdev)return -ENOMEM ; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!res) +return -EINVAL ; rtc->addr_base = res->start; res =platform_get_resource (pdev,IORESOURCE_IRQ ,0 );
drivers/scsi/dc395x.c +12 -3
@@ -3775,10 +3775,19 @@ static struct DeviceCtlBlk *device_alloc(struct AdapterCtlBlk *acb,#endif if (dcb->target_lun !=0 ) {/* Copy settings */ -struct DeviceCtlBlk *p; -list_for_each_entry (p, &acb->dcb_list, list) -if (p->target_id == dcb->target_id) +struct DeviceCtlBlk *p =NULL , *iter; + +list_for_each_entry (iter, &acb->dcb_list, list) +if (iter->target_id == dcb->target_id) { + p = iter;break ; + } + +if (!p) { +kfree (dcb); +return NULL ; + } + dprintkdbg(DBG_1, "device_alloc: <%02i-%i> copy from <%02i-%i>\n", dcb->target_id, dcb->target_lun,
drivers/scsi/fcoe/fcoe_ctlr.c +1 -1
@@ -1978,7 +1978,7 @@ EXPORT_SYMBOL(fcoe_ctlr_recv_flogi);* * Returns: u64 fc world wide name */ -u64 fcoe_wwn_from_mac (unsigned char mac[MAX_ADDR_LEN ], +u64 fcoe_wwn_from_mac (unsigned char mac[ETH_ALEN ],unsigned int scheme,unsigned int port) {u64 wwn;
drivers/scsi/megaraid.c +1 -1
@@ -4707,7 +4707,7 @@ static int __init megaraid_init(void)* major number allocation. */ major =register_chrdev (0 ,"megadev_legacy" , &megadev_fops); -if (!major) { +if (major <0 ) {printk (KERN_WARNING "megaraid: failed to register char device\n" ); }
drivers/scsi/ufs/ufs-qcom.c +5 -2
@@ -915,8 +915,11 @@ static void ufs_qcom_dev_ref_clk_ctrl(struct ufs_qcom_host *host, bool enable)writel_relaxed (temp, host->dev_ref_clk_ctrl_mmio); -/* ensure that ref_clk is enabled/disabled before we return */ -wmb (); +/* +* Make sure the write to ref_clk reaches the destination and +* not stored in a Write Buffer (WB). +*/ +readl (host->dev_ref_clk_ctrl_mmio);/* * If we call hibern8 exit after this, we need to make sure that
drivers/soc/qcom/smp2p.c +1 -0
@@ -416,6 +416,7 @@ static int smp2p_parse_ipc(struct qcom_smp2p *smp2p) } smp2p->ipc_regmap =syscon_node_to_regmap (syscon); +of_node_put (syscon);if (IS_ERR (smp2p->ipc_regmap))return PTR_ERR (smp2p->ipc_regmap);
drivers/soc/qcom/smsm.c +1 -0
@@ -367,6 +367,7 @@ static int smsm_parse_ipc(struct qcom_smsm *smsm, unsigned host_id)return 0 ; host->ipc_regmap =syscon_node_to_regmap (syscon); +of_node_put (syscon);if (IS_ERR (host->ipc_regmap))return PTR_ERR (host->ipc_regmap);
drivers/soc/rockchip/grf.c +2 -0
@@ -123,12 +123,14 @@ static int __init rockchip_grf_init(void)return -ENODEV ;if (!match || !match->data) {pr_err ("%s: missing grf data\n" , __func__); +of_node_put (np);return -EINVAL ; } grf_info = match->data; grf =syscon_node_to_regmap (np); +of_node_put (np);if (IS_ERR (grf)) {pr_err ("%s: could not get grf syscon\n" , __func__);return PTR_ERR (grf);
drivers/spi/spi-img-spfi.c +1 -1
@@ -771,7 +771,7 @@ static int img_spfi_resume(struct device *dev)int ret; ret =pm_runtime_get_sync (dev); -if (ret) { +if (ret <0 ) {pm_runtime_put_noidle (dev);return ret; }
drivers/spi/spi-ti-qspi.c +3 -2
@@ -405,6 +405,7 @@ static int ti_qspi_dma_xfer(struct ti_qspi *qspi, dma_addr_t dma_dst,enum dma_ctrl_flags flags =DMA_CTRL_ACK |DMA_PREP_INTERRUPT ;struct dma_async_tx_descriptor *tx;int ret; +unsigned long time_left; tx =dmaengine_prep_dma_memcpy (chan, dma_dst, dma_src, len, flags);if (!tx) {
@@ -424,9 +425,9 @@ static int ti_qspi_dma_xfer(struct ti_qspi *qspi, dma_addr_t dma_dst, }dma_async_issue_pending (chan); - ret =wait_for_completion_timeout (&qspi->transfer_complete, + time_left =wait_for_completion_timeout (&qspi->transfer_complete,msecs_to_jiffies (len)); -if (ret <=0 ) { +if (time_left ==0 ) {dmaengine_terminate_sync (chan);dev_err (qspi->dev,"DMA wait_for_completion_timeout\n" );return -ETIMEDOUT ;
drivers/staging/greybus/audio_codec.c +2 -2
@@ -622,8 +622,8 @@ static int gbcodec_mute_stream(struct snd_soc_dai *dai, int mute, int stream)break ; }if (!data) { -dev_err (dai->dev,"%s:%s DATA connection missing\n" , - dai->name, module->name); +dev_err (dai->dev,"%s DATA connection missing\n" , + dai->name);mutex_unlock (&codec->lock);return -ENODEV ; }
drivers/staging/rtl8192e/rtllib_softmac.c +1 -1
@@ -654,9 +654,9 @@ static void rtllib_beacons_stop(struct rtllib_device *ieee)spin_lock_irqsave (&ieee->beacon_lock, flags); ieee->beacon_txing =0 ; -del_timer_sync (&ieee->beacon_timer);spin_unlock_irqrestore (&ieee->beacon_lock, flags); +del_timer_sync (&ieee->beacon_timer); }
drivers/staging/rtl8712/usb_intf.c +3 -3
@@ -569,13 +569,13 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, }else { AutoloadFail = false; } -if (((mac[0 ] ==0xff ) && (mac[1 ] ==0xff ) && +if ((!AutoloadFail) || + ((mac[0 ] ==0xff ) && (mac[1 ] ==0xff ) && (mac[2 ] ==0xff ) && (mac[3 ] ==0xff ) && (mac[4 ] ==0xff ) && (mac[5 ] ==0xff )) || ((mac[0 ] ==0x00 ) && (mac[1 ] ==0x00 ) && (mac[2 ] ==0x00 ) && (mac[3 ] ==0x00 ) && - (mac[4 ] ==0x00 ) && (mac[5 ] ==0x00 )) || - (!AutoloadFail)) { + (mac[4 ] ==0x00 ) && (mac[5 ] ==0x00 ))) { mac[0 ] =0x00 ; mac[1 ] =0xe0 ; mac[2 ] =0x4c ;
drivers/tty/goldfish.c +2 -0
@@ -414,6 +414,7 @@ static int goldfish_tty_probe(struct platform_device *pdev) err_tty_register_device_failed:free_irq (irq, qtty); err_dec_line_count: +tty_port_destroy (&qtty->port); goldfish_tty_current_line_count--;if (goldfish_tty_current_line_count ==0 )goldfish_tty_delete_driver ();
@@ -435,6 +436,7 @@ static int goldfish_tty_remove(struct platform_device *pdev)iounmap (qtty->base); qtty->base =NULL ;free_irq (qtty->irq, pdev); +tty_port_destroy (&qtty->port); goldfish_tty_current_line_count--;if (goldfish_tty_current_line_count ==0 )goldfish_tty_delete_driver ();
drivers/tty/serial/digicolor-usart.c +2 -0
@@ -313,6 +313,8 @@ static void digicolor_uart_set_termios(struct uart_port *port,case CS8 :default : config |=UA_CONFIG_CHAR_LEN ; + termios->c_cflag &= ~CSIZE ; + termios->c_cflag |=CS8 ;break ; }
drivers/tty/serial/icom.c +1 -1
@@ -1515,7 +1515,7 @@ static int icom_probe(struct pci_dev *dev, retval =pci_read_config_dword (dev,PCI_COMMAND , &command_reg);if (retval) {dev_err (&dev->dev,"PCI Config read FAILED\n" ); -return retval; + goto probe_exit0; } pci_write_config_dword(dev, PCI_COMMAND,
drivers/tty/serial/meson_uart.c +13 -0
@@ -253,6 +253,14 @@ static const char *meson_uart_type(struct uart_port *port)return (port->type ==PORT_MESON ) ?"meson_uart" :NULL ; } +/* +* This function is called only from probe() using a temporary io mapping +* in order to perform a reset before setting up the device. Since the +* temporarily mapped region was successfully requested, there can be no +* console on this port at this time. Hence it is not necessary for this +* function to acquire the port->lock. (Since there is no console on this +* port at this time, the port->lock is not initialized yet.) +*/ static void meson_uart_reset (struct uart_port *port) {u32 val;
@@ -267,9 +275,12 @@ static void meson_uart_reset(struct uart_port *port)static int meson_uart_startup (struct uart_port *port) { +unsigned long flags;u32 val;int ret =0 ; +spin_lock_irqsave (&port->lock, flags); + val =readl (port->membase +AML_UART_CONTROL ); val |=AML_UART_CLR_ERR ;writel (val, port->membase +AML_UART_CONTROL );
@@ -285,6 +296,8 @@ static int meson_uart_startup(struct uart_port *port) val = (AML_UART_RECV_IRQ (1 ) |AML_UART_XMIT_IRQ (port->fifosize /2 ));writel (val, port->membase +AML_UART_MISC ); +spin_unlock_irqrestore (&port->lock, flags); + ret =request_irq (port->irq, meson_uart_interrupt,0 , port->name, port);
drivers/tty/serial/msm_serial.c +5 -0
@@ -1587,6 +1587,7 @@ static inline struct uart_port *msm_get_port_from_line(unsigned int line)static void __msm_console_write (struct uart_port *port,const char *s,unsigned int count,bool is_uartdm) { +unsigned long flags;int i;int num_newlines =0 ;bool replaced = false;
@@ -1604,6 +1605,8 @@ static void __msm_console_write(struct uart_port *port, const char *s, num_newlines++; count += num_newlines; +local_irq_save (flags); +if (port->sysrq) locked =0 ;else if (oops_in_progress)
@@ -1649,6 +1652,8 @@ static void __msm_console_write(struct uart_port *port, const char *s,if (locked)spin_unlock (&port->lock); + +local_irq_restore (flags); } static void msm_console_write(struct console *co, const char *s,
drivers/tty/serial/sa1100.c +2 -2
@@ -452,6 +452,8 @@ sa1100_set_termios(struct uart_port *port, struct ktermios *termios, baud =uart_get_baud_rate (port, termios, old,0 , port->uartclk/16 ); quot =uart_get_divisor (port, baud); +del_timer_sync (&sport->timer); +spin_lock_irqsave (&sport->port.lock, flags); sport->port.read_status_mask &=UTSR0_TO_SM (UTSR0_TFS );
@@ -482,8 +484,6 @@ sa1100_set_termios(struct uart_port *port, struct ktermios *termios,UTSR1_TO_SM (UTSR1_ROR ); } -del_timer_sync (&sport->timer); -/* * Update the per-port timeout. */
drivers/tty/serial/serial_txx9.c +2 -0
@@ -652,6 +652,8 @@ serial_txx9_set_termios(struct uart_port *port, struct ktermios *termios,case CS6 :/* not supported */ case CS8 : cval |=TXX9_SILCR_UMODE_8BIT ; + termios->c_cflag &= ~CSIZE ; + termios->c_cflag |=CS8 ;break ; }
drivers/tty/serial/sh-sci.c +5 -1
@@ -2267,8 +2267,12 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,unsigned long max_freq =0 ;int best_clk =-1 ; -if ((termios->c_cflag &CSIZE ) ==CS7 ) +if ((termios->c_cflag &CSIZE ) ==CS7 ) { smr_val |=SCSMR_CHR ; + }else { + termios->c_cflag &= ~CSIZE ; + termios->c_cflag |=CS8 ; + }if (termios->c_cflag &PARENB ) smr_val |=SCSMR_PE ;if (termios->c_cflag &PARODD )
drivers/tty/serial/st-asc.c +4 -0
@@ -545,10 +545,14 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,/* set character length */ if ((cflag &CSIZE ) ==CS7 ) { ctrl_val |=ASC_CTL_MODE_7BIT_PAR ; + cflag |=PARENB ; }else { ctrl_val |= (cflag &PARENB ) ?ASC_CTL_MODE_8BIT_PAR :ASC_CTL_MODE_8BIT ; + cflag &= ~CSIZE ; + cflag |=CS8 ; } + termios->c_cflag = cflag;/* set stop bit */ ctrl_val |= (cflag &CSTOPB ) ?ASC_CTL_STOP_2BIT :ASC_CTL_STOP_1BIT ;
drivers/tty/synclink_gt.c +2 -0
@@ -1822,6 +1822,8 @@ static int hdlcdev_init(struct slgt_info *info)*/ static void hdlcdev_exit (struct slgt_info *info) { +if (!info->netdev) +return ;unregister_hdlc_device (info->netdev);free_netdev (info->netdev); info->netdev =NULL ;
drivers/tty/tty_buffer.c +2 -1
@@ -166,7 +166,8 @@ static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)have queued and recycle that ? */ if (atomic_read (&port->buf.mem_used) > port->buf.mem_limit)return NULL ; - p =kmalloc (sizeof (struct tty_buffer ) +2 * size,GFP_ATOMIC ); + p =kmalloc (sizeof (struct tty_buffer ) +2 * size, +GFP_ATOMIC | __GFP_NOWARN);if (p ==NULL )return NULL ;
drivers/usb/core/hcd-pci.c +2 -2
@@ -632,10 +632,10 @@ const struct dev_pm_ops usb_hcd_pci_pm_ops = { .suspend_noirq = hcd_pci_suspend_noirq, .resume_noirq = hcd_pci_resume_noirq, .resume = hcd_pci_resume, - .freeze = check_root_hub_suspended, + .freeze = hcd_pci_suspend, .freeze_noirq = check_root_hub_suspended, .thaw_noirq = NULL, - .thaw = NULL, + .thaw = hcd_pci_resume, .poweroff = hcd_pci_suspend, .poweroff_noirq = hcd_pci_suspend_noirq, .restore_noirq = hcd_pci_resume_noirq,
drivers/usb/core/quirks.c +3 -0
@@ -328,6 +328,9 @@ static const struct usb_device_id usb_quirk_list[] = {/* DJI CineSSD */ { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM }, + /* DELL USB GEN2 */ + { USB_DEVICE(0x413c, 0xb062), .driver_info = USB_QUIRK_NO_LPM | USB_QUIRK_RESET_RESUME }, + /* VCOM device */ { USB_DEVICE(0x4296, 0x7570), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
drivers/usb/dwc2/gadget.c +0 -1
@@ -4302,7 +4302,6 @@ static int dwc2_hsotg_udc_start(struct usb_gadget *gadget,WARN_ON (hsotg->driver); - driver->driver.bus =NULL ; hsotg->driver = driver; hsotg->gadget.dev.of_node = hsotg->dev->of_node; hsotg->gadget.speed =USB_SPEED_UNKNOWN ;
drivers/usb/host/isp116x-hcd.c +4 -2
@@ -1551,10 +1551,12 @@ static int isp116x_remove(struct platform_device *pdev)iounmap (isp116x->data_reg); res =platform_get_resource (pdev,IORESOURCE_MEM ,1 ); -release_mem_region (res->start,2 ); +if (res) +release_mem_region (res->start,2 );iounmap (isp116x->addr_reg); res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); -release_mem_region (res->start,2 ); +if (res) +release_mem_region (res->start,2 );usb_put_hcd (hcd);return 0 ;
drivers/usb/host/oxu210hp-hcd.c +2 -0
@@ -3489,8 +3489,10 @@ static int oxu_bus_suspend(struct usb_hcd *hcd) } } +spin_unlock_irq (&oxu->lock);/* turn off now-idle HC */ del_timer_sync (&oxu->watchdog); +spin_lock_irq (&oxu->lock);ehci_halt (oxu); hcd->state =HC_STATE_SUSPENDED ;
drivers/usb/serial/option.c +2 -0
@@ -1140,6 +1140,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0620, 0xff, 0xff, 0x30) }, /* EM160R-GL */ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, 0x0620, 0xff, 0, 0) }, + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, 0x0700, 0xff), /* BG95 */ + .driver_info = RSVD(3) | ZLP }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x30) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10),
drivers/usb/storage/karma.c +8 -7
@@ -185,23 +185,24 @@ static void rio_karma_destructor(void *extra)static int rio_karma_init (struct us_data *us) { -int ret =0 ;struct karma_data *data =kzalloc (sizeof (struct karma_data ),GFP_NOIO );if (!data) - goto out; +return -ENOMEM ; data->recv =kmalloc (RIO_RECV_LEN ,GFP_NOIO );if (!data->recv) {kfree (data); - goto out; +return -ENOMEM ; } us->extra = data; us->extra_destructor = rio_karma_destructor; - ret =rio_karma_send_command (RIO_ENTER_STORAGE , us); - data->in_storage = (ret ==0 ); -out: -return ret; +if (rio_karma_send_command (RIO_ENTER_STORAGE , us)) +return -EIO ; + + data->in_storage =1 ; + +return 0 ; }static struct scsi_host_template karma_host_template;
drivers/usb/usbip/stub_dev.c +1 -1
@@ -441,7 +441,6 @@ static int stub_probe(struct usb_device *udev) (struct usb_dev_state *) udev); err_port:dev_set_drvdata (&udev->dev,NULL ); -usb_put_dev (udev);/* we already have busid_priv, just lock busid_lock */ spin_lock (&busid_priv->busid_lock);
@@ -456,6 +455,7 @@ static int stub_probe(struct usb_device *udev)put_busid_priv (busid_priv); sdev_free: +usb_put_dev (udev);stub_device_free (sdev);return rc;
drivers/usb/usbip/stub_rx.c +2 -0
@@ -152,7 +152,9 @@ static int tweak_set_configuration_cmd(struct urb *urb) req = (struct usb_ctrlrequest *) urb->setup_packet; config =le16_to_cpu (req->wValue); +usb_lock_device (sdev->udev); err =usb_set_configuration (sdev->udev, config); +usb_unlock_device (sdev->udev);if (err && err != -ENODEV )dev_err (&sdev->udev->dev,"can't set config #%d, error %d\n" , config, err);
drivers/vhost/vringh.c +8 -2
@@ -263,7 +263,7 @@ __vringh_iov(struct vringh *vrh, u16 i,gfp_t gfp, int (*copy)(void *dst, const void *src, size_t len)) { - int err, count = 0, up_next, desc_max; + int err, count = 0, indirect_count = 0, up_next, desc_max;struct vring_desc desc, *descs;struct vringh_range range = {-1ULL ,0 }, slowrange;bool slow = false;
@@ -320,7 +320,12 @@ __vringh_iov(struct vringh *vrh, u16 i,continue ; } -if (count++ == vrh->vring.num) { +if (up_next ==-1 ) + count++; +else + indirect_count++; + +if (count > vrh->vring.num || indirect_count > desc_max) {vringh_bad ("Descriptor loop in %p" , descs); err = -ELOOP ; goto fail;
@@ -382,6 +387,7 @@ __vringh_iov(struct vringh *vrh, u16 i, i =return_from_indirect (vrh, &up_next, &descs, &desc_max); slow = false; + indirect_count =0 ; }else break ; }
drivers/video/fbdev/amba-clcd.c +4 -1
@@ -838,12 +838,15 @@ static int clcdfb_of_vram_setup(struct clcd_fb *fb)return -ENODEV ; fb->fb.screen_base =of_iomap (memory,0 ); -if (!fb->fb.screen_base) +if (!fb->fb.screen_base) { +of_node_put (memory);return -ENOMEM ; + } fb->fb.fix.smem_start =of_translate_address (memory,of_get_address (memory,0 , &size,NULL )); fb->fb.fix.smem_len = size; +of_node_put (memory);return 0 ; }
drivers/video/fbdev/pxa3xx-gcu.c +7 -5
@@ -662,6 +662,7 @@ static int pxa3xx_gcu_probe(struct platform_device *pdev)for (i =0 ; i <8 ; i++) { ret =pxa3xx_gcu_add_buffer (dev, priv);if (ret) { +pxa3xx_gcu_free_buffers (dev, priv);dev_err (dev,"failed to allocate DMA memory\n" ); goto err_disable_clk; }
@@ -677,15 +678,15 @@ static int pxa3xx_gcu_probe(struct platform_device *pdev) SHARED_SIZE, irq);return 0 ; -err_free_dma: -dma_free_coherent (dev,SHARED_SIZE , - priv->shared, priv->shared_phys); +err_disable_clk: +clk_disable_unprepare (priv->clk); err_misc_deregister:misc_deregister (&priv->misc_dev); -err_disable_clk: -clk_disable_unprepare (priv->clk); +err_free_dma: +dma_free_coherent (dev,SHARED_SIZE , + priv->shared, priv->shared_phys);return ret; }
@@ -698,6 +699,7 @@ static int pxa3xx_gcu_remove(struct platform_device *pdev)pxa3xx_gcu_wait_idle (priv);misc_deregister (&priv->misc_dev);dma_free_coherent (dev,SHARED_SIZE , priv->shared, priv->shared_phys); +clk_disable_unprepare (priv->clk);pxa3xx_gcu_free_buffers (dev, priv);return 0 ;
fs/binfmt_flat.c +26 -1
@@ -408,6 +408,30 @@ static void old_reloc(unsigned long rl)/****************************************************************************/ +static inline u32 __user *skip_got_header (u32 __user *rp) +{ +if (IS_ENABLED (CONFIG_RISCV )) { +/* +* RISC-V has a 16 byte GOT PLT header for elf64-riscv +* and 8 byte GOT PLT header for elf32-riscv. +* Skip the whole GOT PLT header, since it is reserved +* for the dynamic linker (ld.so). +*/ +u32 rp_val0, rp_val1; + +if (get_user (rp_val0, rp)) +return rp; +if (get_user (rp_val1, rp +1 )) +return rp; + +if (rp_val0 ==0xffffffff && rp_val1 ==0xffffffff ) + rp +=4 ; +else if (rp_val0 ==0xffffffff ) + rp +=2 ; + } +return rp; +} +static int load_flat_file (struct linux_binprm *bprm,struct lib_info *libinfo,int id,unsigned long *extra_stack) {
@@ -745,7 +769,8 @@ static int load_flat_file(struct linux_binprm *bprm,* image. */ if (flags &FLAT_FLAG_GOTPIC ) { -for (rp = (u32 __user *)datapos; ; rp++) { + rp =skip_got_header ((u32 __user *) datapos); +for (; ; rp++) {u32 addr, rp_val;if (get_user (rp_val, rp))return -EFAULT ;
fs/btrfs/disk-io.c +2 -2
@@ -2653,7 +2653,7 @@ int open_ctree(struct super_block *sb, ~BTRFS_FEATURE_INCOMPAT_SUPP ;if (features) {btrfs_err (fs_info, -"cannot mount because of unsupported optional features (%llx)" , +"cannot mount because of unsupported optional features (0x%llx)" , features); err = -EINVAL ; goto fail_alloc;
@@ -2713,7 +2713,7 @@ int open_ctree(struct super_block *sb, ~BTRFS_FEATURE_COMPAT_RO_SUPP ;if (!sb_rdonly (sb) && features) {btrfs_err (fs_info, -"cannot mount read-write because of unsupported optional features (%llx)" , +"cannot mount read-write because of unsupported optional features (0x%llx)" , features); err = -EINVAL ; goto fail_alloc;
fs/btrfs/volumes.c +4 -4
@@ -6975,12 +6975,12 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)* do another round of validation checks. */ if (total_dev != fs_info->fs_devices->total_devices) { -btrfs_err (fs_info, -"super_num_devices %llu mismatch with num_devices %llu found here" , +btrfs_warn (fs_info, +"super block num_devices %llu mismatch with DEV_ITEM count %llu, will be repaired on next transaction commit" ,btrfs_super_num_devices (fs_info->super_copy), total_dev); - ret = -EINVAL ; - goto error; + fs_info->fs_devices->total_devices = total_dev; +btrfs_set_super_num_devices (fs_info->super_copy, total_dev); }if (btrfs_super_total_bytes (fs_info->super_copy) < fs_info->fs_devices->total_rw_bytes) {
fs/cifs/smb2pdu.c +3 -0
@@ -263,6 +263,9 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon) rc = -EHOSTDOWN ;mutex_unlock (&tcon->ses->session_mutex); goto failed; + }else if (rc) { +mutex_unlock (&ses->session_mutex); + goto out; } }if (rc || !tcon->need_reconnect) {
fs/dlm/lock.c +9 -2
@@ -1554,6 +1554,7 @@ static int _remove_from_waiters(struct dlm_lkb *lkb, int mstype, lkb->lkb_wait_type =0 ; lkb->lkb_flags &= ~DLM_IFL_OVERLAP_CANCEL ; lkb->lkb_wait_count--; +unhold_lkb (lkb); goto out_del; }
@@ -1580,6 +1581,7 @@ static int _remove_from_waiters(struct dlm_lkb *lkb, int mstype,log_error (ls,"remwait error %x reply %d wait_type %d overlap" , lkb->lkb_id, mstype, lkb->lkb_wait_type); lkb->lkb_wait_count--; +unhold_lkb (lkb); lkb->lkb_wait_type =0 ; }
@@ -5311,11 +5313,16 @@ int dlm_recover_waiters_post(struct dlm_ls *ls) lkb->lkb_flags &= ~DLM_IFL_OVERLAP_UNLOCK ; lkb->lkb_flags &= ~DLM_IFL_OVERLAP_CANCEL ; lkb->lkb_wait_type =0 ; - lkb->lkb_wait_count =0 ; +/* drop all wait_count references we still +* hold a reference for this iteration. +*/ +while (lkb->lkb_wait_count) { + lkb->lkb_wait_count--; +unhold_lkb (lkb); + }mutex_lock (&ls->ls_waiters_mutex);list_del_init (&lkb->lkb_wait_reply);mutex_unlock (&ls->ls_waiters_mutex); -unhold_lkb (lkb);/* for waiters list */ if (oc || ou) {/* do an unlock or cancel instead of resending */
fs/dlm/plock.c +5 -7
@@ -26,11 +26,11 @@ struct plock_op {struct list_head list;int done;struct dlm_plock_info info; +int (*callback)(struct file_lock *fl,int result); };struct plock_xop {struct plock_op xop; -int (*callback)(struct file_lock *fl,int result);void *fl;void *file;struct file_lock flc;
@@ -132,19 +132,18 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,/* fl_owner is lockd which doesn't distinguish processes on the nfs client */ op->info.owner = (__u64 ) fl->fl_pid; - xop->callback = fl->fl_lmops->lm_grant; + op->callback = fl->fl_lmops->lm_grant;locks_init_lock (&xop->flc);locks_copy_lock (&xop->flc, fl); xop->fl = fl; xop->file = file; }else { op->info.owner = (__u64 )(long ) fl->fl_owner; - xop->callback =NULL ; }send_op (op); -if (xop->callback ==NULL ) { +if (!op->callback) { rv =wait_event_interruptible (recv_wq, (op->done !=0 ));if (rv == -ERESTARTSYS ) { log_debug(ls, "dlm_posix_lock: wait killed %llx",
@@ -206,7 +205,7 @@ static int dlm_plock_callback(struct plock_op *op) file = xop->file; flc = &xop->flc; fl = xop->fl; - notify = xop->callback; + notify = op->callback;if (op->info.rv) {notify (fl, op->info.rv);
@@ -439,10 +438,9 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count,if (op->info.fsid == info.fsid && op->info.number == info.number && op->info.owner == info.owner) { -struct plock_xop *xop = (struct plock_xop *)op;list_del_init (&op->list);memcpy (&op->info, &info,sizeof (info)); -if (xop->callback) +if (op->callback) do_callback =1 ;else op->done =1 ;
fs/ext4/inline.c +12 -0
@@ -1995,6 +1995,18 @@ int ext4_convert_inline_data(struct inode *inode)if (!ext4_has_inline_data (inode)) {ext4_clear_inode_state (inode,EXT4_STATE_MAY_INLINE_DATA );return 0 ; + }else if (!ext4_test_inode_state (inode,EXT4_STATE_MAY_INLINE_DATA )) { +/* +* Inode has inline data but EXT4_STATE_MAY_INLINE_DATA is +* cleared. This means we are in the middle of moving of +* inline data to delay allocated block. Just force writeout +* here to finish conversion. +*/ + error =filemap_flush (inode->i_mapping); +if (error) +return error; +if (!ext4_has_inline_data (inode)) +return 0 ; } needed_blocks =ext4_writepage_trans_blocks (inode);
fs/ext4/namei.c +67 -17
10 lines not on this page · raw message
include/linux/nodemask.h +25 -26
51 lines not on this page · raw message
sound/soc/mediatek/mt2701/mt2701-wm8960.c +7 -2
Lines of this file are not shown. View the raw message.
sound/soc/mediatek/mt8173/mt8173-max98090.c +4 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.