Skip to contentSkip to conversation

Linux 4.19.276

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Mar 11, 2023 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 4.19.276 kernel.

All users of the 4.19 kernel series must upgrade.

The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/admin-guide/hw-vuln/spectre.rst                       |   21 
 Documentation/dev-tools/gdb-kernel-debugging.rst                    |    4 
 Makefile                                                            |   15 
 arch/alpha/kernel/traps.c                                           |   30 
 arch/arm/boot/dts/exynos3250-rinato.dts                             |    2 
 arch/arm/boot/dts/exynos4-cpu-thermal.dtsi                          |    2 
 arch/arm/boot/dts/exynos4.dtsi                                      |    2 
 arch/arm/boot/dts/exynos5410-odroidxu.dts                           |    1 
 arch/arm/boot/dts/exynos5420.dtsi                                   |    2 
 arch/arm/boot/dts/spear320-hmi.dts                                  |    2 
 arch/arm/mach-imx/mmdc.c                                            |   24 
 arch/arm/mach-omap1/timer.c                                         |    2 
 arch/arm/mach-omap2/timer.c                                         |    1 
 arch/arm/mach-zynq/slcr.c                                           |    1 
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi                          |   26 
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi                           |    6 
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi                          |    2 
 arch/arm64/boot/dts/mediatek/mt7622.dtsi                            |    1 
 arch/m68k/68000/entry.S                                             |    2 
 arch/m68k/Kconfig.devices                                           |    1 
 arch/m68k/coldfire/entry.S                                          |    2 
 arch/m68k/kernel/entry.S                                            |    3 
 arch/mips/include/asm/syscall.h                                     |    2 
 arch/mips/include/asm/vpe.h                                         |    1 
 arch/mips/kernel/vpe-mt.c                                           |    7 
 arch/mips/lantiq/prom.c                                             |    6 
 arch/powerpc/Makefile                                               |    2 
 arch/powerpc/kernel/rtas.c                                          |   24 
 arch/powerpc/platforms/powernv/pci-ioda.c                           |    3 
 arch/powerpc/platforms/pseries/lparcfg.c                            |   20 
 arch/riscv/kernel/time.c                                            |    3 
 arch/s390/kernel/kprobes.c                                          |    4 
 arch/s390/kernel/setup.c                                            |    1 
 arch/s390/kernel/vmlinux.lds.S                                      |    1 
 arch/s390/mm/maccess.c                                              |   16 
 arch/sparc/Kconfig                                                  |    2 
 arch/um/drivers/vector_kern.c                                       |    1 
 arch/x86/include/asm/microcode.h                                    |    4 
 arch/x86/include/asm/microcode_amd.h                                |    4 
 arch/x86/include/asm/msr-index.h                                    |    4 
 arch/x86/include/asm/reboot.h                                       |    2 
 arch/x86/include/asm/virtext.h                                      |   16 
 arch/x86/kernel/cpu/bugs.c                                          |   35 
 arch/x86/kernel/cpu/microcode/amd.c                                 |   53 
 arch/x86/kernel/cpu/microcode/core.c                                |    6 
 arch/x86/kernel/crash.c                                             |   17 
 arch/x86/kernel/kprobes/opt.c                                       |    6 
 arch/x86/kernel/reboot.c                                            |   88 -
 arch/x86/kernel/smp.c                                               |    6 
 arch/x86/kernel/sysfb_efi.c                                         |    8 
 arch/x86/um/vdso/um_vdso.c                                          |   12 
 block/bio-integrity.c                                               |    1 
 block/blk-mq-sched.c                                                |    3 
 crypto/rsa-pkcs1pad.c                                               |   34 
 crypto/seqiv.c                                                      |    2 
 drivers/acpi/acpica/Makefile                                        |    2 
 drivers/acpi/acpica/hwvalid.c                                       |    7 
 drivers/acpi/acpica/nsrepair.c                                      |   12 
 drivers/acpi/battery.c                                              |    2 
 drivers/acpi/video_detect.c                                         |    2 
 drivers/block/rbd.c                                                 |   20 
 drivers/clk/clk.c                                                   |   11 
 drivers/crypto/amcc/crypto4xx_core.c                                |   10 
 drivers/firmware/google/framebuffer-coreboot.c                      |    4 
 drivers/gpio/gpio-vf610.c                                           |    2 
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c                   |    6 
 drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c            |    6 
 drivers/gpu/drm/drm_mipi_dsi.c                                      |   52 
 drivers/gpu/drm/mediatek/mtk_drm_drv.c                              |    1 
 drivers/gpu/drm/mediatek/mtk_drm_gem.c                              |    2 
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c                            |    2 
 drivers/gpu/drm/msm/dsi/dsi_host.c                                  |    3 
 drivers/gpu/drm/msm/hdmi/hdmi.c                                     |    4 
 drivers/gpu/drm/msm/msm_fence.c                                     |    2 
 drivers/gpu/drm/mxsfb/Kconfig                                       |    1 
 drivers/gpu/drm/radeon/atombios_encoders.c                          |    5 
 drivers/gpu/drm/radeon/radeon_device.c                              |    1 
 drivers/gpu/drm/vc4/vc4_dpi.c                                       |   66 
 drivers/gpu/host1x/hw/syncpt_hw.c                                   |    3 
 drivers/gpu/ipu-v3/ipu-common.c                                     |    1 
 drivers/hid/hid-asus.c                                              |   38 
 drivers/hwmon/ltc2945.c                                             |    2 
 drivers/hwmon/mlxreg-fan.c                                          |    6 
 drivers/iio/accel/mma9551_core.c                                    |   10 
 drivers/input/touchscreen/ads7846.c                                 |   13 
 drivers/irqchip/irq-alpine-msi.c                                    |    1 
 drivers/irqchip/irq-bcm7120-l2.c                                    |    3 
 drivers/irqchip/irq-brcmstb-l2.c                                    |    6 
 drivers/irqchip/irq-mvebu-gicp.c                                    |    1 
 drivers/md/dm-cache-target.c                                        |    4 
 drivers/md/dm-flakey.c                                              |   30 
 drivers/md/dm-thin.c                                                |    2 
 drivers/md/dm.c                                                     |    1 
 drivers/media/i2c/ov7670.c                                          |    2 
 drivers/media/i2c/ov772x.c                                          |    3 
 drivers/media/pci/intel/ipu3/ipu3-cio2.c                            |    3 
 drivers/media/platform/omap3isp/isp.c                               |    9 
 drivers/media/rc/ene_ir.c                                           |    3 
 drivers/media/usb/siano/smsusb.c                                    |    1 
 drivers/media/usb/uvc/uvc_ctrl.c                                    |   30 
 drivers/media/usb/uvc/uvc_driver.c                                  |   48 
 drivers/media/usb/uvc/uvc_entity.c                                  |    2 
 drivers/media/usb/uvc/uvc_status.c                                  |   40 
 drivers/media/usb/uvc/uvc_video.c                                   |    4 
 drivers/media/usb/uvc/uvcvideo.h                                    |    5 
 drivers/mfd/pcf50633-adc.c                                          |    7 
 drivers/misc/mei/bus-fixup.c                                        |    8 
 drivers/mtd/nand/raw/sunxi_nand.c                                   |    2 
 drivers/mtd/ubi/build.c                                             |    7 
 drivers/mtd/ubi/vmt.c                                               |   18 
 drivers/mtd/ubi/wl.c                                                |   25 
 drivers/net/can/usb/esd_usb2.c                                      |    4 
 drivers/net/ethernet/broadcom/genet/bcmgenet.c                      |    8 
 drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c            |    2 
 drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c                 |    3 
 drivers/net/wireless/ath/ath9k/hif_usb.c                            |   60 
 drivers/net/wireless/ath/ath9k/htc.h                                |   32 
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c                       |   10 
 drivers/net/wireless/ath/ath9k/htc_hst.c                            |    4 
 drivers/net/wireless/ath/ath9k/wmi.c                                |    1 
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c           |    7 
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c             |    1 
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c           |    5 
 drivers/net/wireless/intel/ipw2x00/ipw2100.c                        |  121 -
 drivers/net/wireless/intel/ipw2x00/ipw2200.c                        |   67 
 drivers/net/wireless/intel/iwlegacy/3945-mac.c                      |   16 
 drivers/net/wireless/intel/iwlegacy/4965-mac.c                      |   12 
 drivers/net/wireless/intersil/orinoco/hw.c                          |    2 
 drivers/net/wireless/marvell/libertas/cmdresp.c                     |    2 
 drivers/net/wireless/marvell/libertas/if_usb.c                      |    2 
 drivers/net/wireless/marvell/libertas/main.c                        |    3 
 drivers/net/wireless/marvell/libertas_tf/if_usb.c                   |    2 
 drivers/net/wireless/marvell/mwifiex/11n.c                          |    6 
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c              |    5 
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c               |   11 
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c                |   91 -
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c              |    4 
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.h              |    4 
 drivers/net/wireless/rsi/rsi_91x_coex.c                             |    1 
 drivers/net/wireless/wl3501_cs.c                                    |    2 
 drivers/nfc/st-nci/se.c                                             |    6 
 drivers/nfc/st21nfca/se.c                                           |    6 
 drivers/pci/quirks.c                                                |    1 
 drivers/phy/rockchip/phy-rockchip-typec.c                           |    3 
 drivers/pinctrl/pinctrl-at91-pio4.c                                 |    4 
 drivers/pinctrl/pinctrl-at91.c                                      |    2 
 drivers/pinctrl/pinctrl-rockchip.c                                  |   23 
 drivers/powercap/powercap_sys.c                                     |   14 
 drivers/pwm/pwm-stm32-lp.c                                          |    2 
 drivers/regulator/max77802-regulator.c                              |   34 
 drivers/regulator/s5m8767.c                                         |    6 
 drivers/rpmsg/qcom_glink_native.c                                   |    1 
 drivers/rtc/rtc-pm8xxx.c                                            |   24 
 drivers/scsi/aic94xx/aic94xx_task.c                                 |    3 
 drivers/scsi/ipr.c                                                  |   41 
 drivers/scsi/qla2xxx/qla_os.c                                       |    9 
 drivers/scsi/ses.c                                                  |   64 
 drivers/spi/spi-bcm63xx-hsspi.c                                     |   20 
 drivers/thermal/intel_powerclamp.c                                  |   20 
 drivers/thermal/intel_quark_dts_thermal.c                           |   12 
 drivers/thermal/intel_soc_dts_iosf.c                                |    2 
 drivers/tty/serial/fsl_lpuart.c                                     |   24 
 drivers/tty/tty_io.c                                                |    8 
 drivers/tty/vt/vc_screen.c                                          |    4 
 drivers/usb/host/xhci-mvebu.c                                       |    2 
 drivers/usb/storage/ene_ub6250.c                                    |    2 
 drivers/watchdog/at91sam9_wdt.c                                     |    7 
 drivers/watchdog/pcwd_usb.c                                         |    6 
 drivers/watchdog/watchdog_dev.c                                     |    2 
 fs/cifs/smbdirect.c                                                 |    4 
 fs/ext4/xattr.c                                                     |   35 
 fs/f2fs/data.c                                                      |    4 
 fs/f2fs/inline.c                                                    |   13 
 fs/gfs2/aops.c                                                      |    3 
 fs/hfs/bnode.c                                                      |    1 
 fs/hfsplus/super.c                                                  |    4 
 fs/jfs/jfs_dmap.c                                                   |    3 
 fs/nfsd/nfs4layouts.c                                               |    4 
 fs/ocfs2/move_extents.c                                             |   34 
 fs/ubifs/budget.c                                                   |    9 
 fs/ubifs/dir.c                                                      |   13 
 fs/ubifs/file.c                                                     |   12 
 fs/ubifs/tnc.c                                                      |   24 
 fs/udf/file.c                                                       |   26 
 fs/udf/inode.c                                                      |   58 
 fs/udf/udf_sb.h                                                     |    2 
 include/drm/drm_connector.h                                         |   36 
 include/drm/drm_mipi_dsi.h                                          |    4 
 include/linux/ima.h                                                 |    6 
 include/linux/kernel_stat.h                                         |    2 
 include/linux/kprobes.h                                             |    2 
 include/uapi/linux/usb/video.h                                      |   30 
 include/uapi/linux/uvcvideo.h                                       |    2 
 kernel/irq/irqdomain.c                                              |   31 
 kernel/kprobes.c                                                    |    6 
 kernel/rcu/tree_exp.h                                               |    2 
 kernel/time/hrtimer.c                                               |    2 
 kernel/time/posix-stubs.c                                           |    2 
 kernel/time/posix-timers.c                                          |    2 
 kernel/trace/ring_buffer.c                                          |    7 
 lib/mpi/mpicoder.c                                                  |    3 
 net/9p/trans_rdma.c                                                 |   15 
 net/9p/trans_xen.c                                                  |   48 
 net/bluetooth/hci_sock.c                                            |   11 
 net/bluetooth/l2cap_core.c                                          |   24 
 net/bluetooth/l2cap_sock.c                                          |    8 
 net/core/dev.c                                                      |    4 
 net/ipv4/inet_connection_sock.c                                     |    1 
 net/ipv4/inet_hashtables.c                                          |   12 
 net/ipv4/tcp_minisocks.c                                            |    7 
 net/mac80211/sta_info.c                                             |    2 
 net/netfilter/nf_conntrack_netlink.c                                |    5 
 net/nfc/netlink.c                                                   |    4 
 net/rds/message.c                                                   |    2 
 net/sched/Kconfig                                                   |   11 
 net/sched/Makefile                                                  |    1 
 net/sched/cls_tcindex.c                                             |  698 ----------
 net/wireless/sme.c                                                  |   31 
 security/integrity/ima/ima_main.c                                   |    7 
 security/security.c                                                 |    7 
 sound/pci/hda/patch_ca0132.c                                        |    2 
 sound/pci/ice1712/aureon.c                                          |    2 
 sound/soc/kirkwood/kirkwood-dma.c                                   |    2 
 sound/soc/soc-compress.c                                            |    2 
 tools/iio/iio_utils.c                                               |   23 
 tools/lib/bpf/nlattr.c                                              |    2 
 tools/perf/perf-completion.sh                                       |   11 
 tools/perf/util/llvm-utils.c                                        |   25 
 tools/testing/ktest/ktest.pl                                        |   26 
 tools/testing/ktest/sample.conf                                     |    5 
 tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc |    2 
 tools/testing/selftests/net/fib_tests.sh                            |    2 
 232 files changed, 1670 insertions(+), 1665 deletions(-)

Al Viro (1):
alpha: fix FEN fault handling

Alexander Usyskin (1):
mei: bus-fixup:upon error print return values of send and receive

Alexander Wetzel (1):
wifi: cfg80211: Fix use after free for wext

Alexey Kodanev (1):
wifi: orinoco: check return value of hermes_write_wordrec()

Alexey V. Vissarionov (1):
ALSA: hda/ca0132: minor fix for allocation size

Alper Nebi Yasak (1):
firmware: coreboot: framebuffer: Ignore reserved pixel color bits

Ammar Faizi (1):
x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list

Andreas Gruenbacher (1):
gfs2: jdata writepage fix

AngeloGioacchino Del Regno (1):
arm64: dts: mediatek: mt7622: Add missing pwm-cells to pwm node

Angus Chen (1):
ARM: imx: Call ida_simple_remove() for ida_simple_get

Armin Wolf (1):
ACPI: battery: Fix missing NUL-termination with large strings

Arnd Bergmann (3):
rtlwifi: fix -Wpointer-sign warning
wifi: ath9k: use proper statements in conditionals
scsi: ipr: Work around fortify-string warning

Benjamin Coddington (1):
nfsd: fix race to check ls_layouts

Bitterblue Smith (1):
wifi: rtl8xxxu: Use a longer retry limit of 48

Bjorn Andersson (1):
rpmsg: glink: Avoid infinite loop on intent for missing channel

Borislav Petkov (AMD) (3):
x86/microcode/amd: Remove load_microcode_amd()'s bsp parameter x86/microcode/AMD: Add a @cpu parameter to the reloading functions x86/microcode/AMD: Fix mixed steppings support

Breno Leitao (1):
x86/bugs: Reset speculation control settings on init

Chen Hui (1):
ARM: OMAP2+: Fix memory leak in realtime_counter_init()

Chen Jun (1):
watchdog: Fix kmemleak in watchdog_cdev_register

Chen-Yu Tsai (1):
clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled()

Christophe JAILLET (1):
ipw2x00: switch from 'pci_' to 'dma_' API

Claudiu Beznea (1):
pinctrl: at91: use devm_kasprintf() to avoid potential leaks

Conor Dooley (1):
RISC-V: time: initialize hrtimer based broadcast clock event device

Damien Le Moal (1):
PCI: Avoid FLR for AMD FCH AHCI adapters

Dan Carpenter (2):
wifi: mwifiex: fix loop iterator in mwifiex_update_ampdu_txwinsize()
thermal: intel: quark_dts: fix error pointer dereference

Daniel Mentz (1):
drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness

Daniel Scally (1):
usb: uvc: Enumerate valid values for color matching

Daniil Tatianin (1):
ACPICA: nsrepair: handle cases without a return value correctly

Darrell Kavanagh (1):
firmware/efi sysfb_efi: Add quirk for Lenovo IdeaPad Duet 3

Dave Stevenson (2):
drm/vc4: dpi: Add option for inverting pixel clock and output enable drm/vc4: dpi: Fix format mapping for RGB565

Dmitry Baryshkov (1):
drm/msm: use strscpy instead of strncpy

Dmitry Fomin (1):

      ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls()

Dmitry Goncharov (1):
kbuild: Port silent mode detection to future gnu make.

Dongliang Mu (1):
fs: hfsplus: fix UAF issue in hfsplus_put_super

Duoming Zhou (2):
media: rc: Fix use-after-free bugs caused by ene_tx_irqsim()
media: usb: siano: Fix use after free bugs caused by do_submit_urb

Elvira Khabirova (1):
mips: fix syscall_get_nr

Eric Biggers (2):
f2fs: fix information leak in f2fs_move_inline_dirents()
f2fs: fix cgroup writeback accounting with fs-layer encryption

Eric Dumazet (2):
net: fix __dev_kfree_skb_any() vs drop monitor
tcp: tcp_check_req() can be called from process context

Fabrice Gasnier (1):
pwm: stm32-lp: fix the check on arr and cmp registers update

Fedor Pchelkin (3):
wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function
wifi: ath9k: hif_usb: clean up skbs if ath9k_hif_usb_rx_stream() fails
nfc: fix memory leak of se_io context in nfc_genl_se_io

Florian Fainelli (3):
irqchip/irq-brcmstb-l2: Set IRQ_LEVEL for level triggered interrupts irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts
net: bcmgenet: Add a check for oversized packets

Frank Jungclaus (1):
can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error

Frederic Barrat (1):
powerpc/powernv/ioda: Skip unallocated resources when mapping to PE

Geert Uytterhoeven (1):

      drm: mxsfb: DRM_MXSFB should depend on ARCH_MXS || ARCH_MXC

George Kennedy (2):
ubi: ensure that VID header offset + VID header size <= alloc, size
vc_screen: modify vcs_size() handling in vcs_read()

Greg Kroah-Hartman (1):

      Linux 4.19.276

Guenter Roeck (1):
media: uvcvideo: Handle errors from calls to usb_string

Haibo Chen (1):
gpio: vf610: connect GPIO label to dev name

Hangyu Hua (1):
netfilter: ctnetlink: fix possible refcount leak in ctnetlink_create_conntrack()

Hans Verkuil (1):
media: i2c: ov7670: 0 instead of -EINVAL was returned

Hans de Goede (1):
ACPI: video: Fix Lenovo Ideapad Z570 DMI match

Harshit Mogalapalli (2):
iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word()
iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word()

Heming Zhao via Ocfs2-devel (2):
ocfs2: fix defrag path triggering jbd2 ASSERT
ocfs2: fix non-auto defrag path not working issue

Herbert Xu (4):
lib/mpi: Fix buffer overrun when SG is too long
crypto: seqiv - Handle EBUSY correctly
crypto: rsa-pkcs1pad - Use akcipher_request_complete
crypto: crypto4xx - Call dma_unmap_page when done

Ian Rogers (1):
perf llvm: Fix inadvertent file creation

Ilya Dryomov (1):
rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails

Ilya Leoshkevich (2):
libbpf: Fix alen calculation in libbpf_nla_dump_errormsg()
s390: discard .interp section

Jack Morgenstein (1):
net/mlx5: Enhance debug print in page allocation failure

Jakob Koschel (1):
docs/scripts/gdb: add necessary make scripts_gdb step

Jamal Hadi Salim (1):
net/sched: Retire tcindex classifier

James Bottomley (1):
scsi: ses: Don't attach if enclosure has no components

Jan Kara (5):
udf: Define EFSCORRUPTED error code
udf: Truncate added extents on failed expansion
udf: Do not bother merging very long extents
udf: Do not update file length for failed writes to inline files
udf: Fix file corruption when appending just after end of preallocated extent

Jann Horn (1):
timers: Prevent union confusion from unexpected restart_syscall()

Jerome Brunet (1):
arm64: dts: meson-axg: enable SCPI

Jia-Ju Bai (1):
tracing: Add NULL checks for buffer in ring_buffer_free_read_page()

Jiapeng Chong (1):
phy: rockchip-typec: Fix unsigned comparison with less than zero

Jiasheng Jiang (7):
wifi: iwl3945: Add missing check for create_singlethread_workqueue
wifi: iwl4965: Add missing check for create_singlethread_workqueue() drm/msm/hdmi: Add missing check for alloc_ordered_workqueue drm/msm/dpu: Add check for pstates
scsi: aic94xx: Add missing check for dma_map_single()
media: platform: ti: Add missing check for devm_regulator_get drm/msm/dsi: Add missing check for alloc_ordered_workqueue

Jisoo Jang (2):
wifi: brcmfmac: Fix potential stack-out-of-bounds in brcmf_c_preinit_dcmds()
wifi: brcmfmac: ensure CLM version is null-terminated to prevent stack-out-of-bounds

Johan Hovold (4):
rtc: pm8xxx: fix set-alarm race
irqdomain: Fix association race
irqdomain: Fix disassociation race
irqdomain: Drop bogus fwspec-mapping error handling

Jonathan Cormier (1):
hwmon: (ltc2945) Handle error case in ltc2945_value_store

Juergen Gross (2):
9p/xen: fix version parsing
9p/xen: fix connection sequence

Jun ASAKA (1):
wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu

Jun Nie (2):
ext4: optimize ea_inode block expansion
ext4: refuse to create ea block when umounted

KP Singh (2):
x86/speculation: Allow enabling STIBP with legacy IBRS Documentation/hw-vuln: Document the interaction between IBRS and STIBP

Kees Cook (6):
ASoC: kirkwood: Iterate over array indexes instead of using pointer math
regulator: max77802: Bounds check regulator id against opmode
regulator: s5m8767: Bounds check id indexing into arrays
media: uvcvideo: Silence memcpy() run-time false positive warnings
usb: host: xhci: mvebu: Iterate over array indexes instead of using pointer math
USB: ene_usb6250: Allocate enough memory for full object

Kemeng Shi (1):
blk-mq: remove stale comment for blk_mq_sched_mark_restart_hctx

Krzysztof Kozlowski (5):
ARM: dts: exynos: correct wr-active property in Exynos3250 Rinato
ARM: dts: exynos: correct HDMI phy compatible in Exynos4
ARM: dts: exynos: correct TMU phandle in Exynos4
ARM: dts: exynos: correct TMU phandle in Odroid XU
ARM: dts: spear320-hmi: correct STMPE GPIO compatible

Kuninori Morimoto (1):
ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress()

Kuniyuki Iwashima (1):

      tcp: Fix listen() regression in 4.19.270

Laurent Pinchart (1):
drm: Clarify definition of the DRM_BUS_FLAG_(PIXDATA|SYNC)_* macros

Lee Jones (1):
pinctrl: pinctrl-rockchip: Fix a bunch of kerneldoc misdemeanours

Li Hua (1):
watchdog: pcwd_usb: Fix attempting to access uninitialized memory

Li Zetao (3):
wifi: rtlwifi: Fix global-out-of-bounds bug in _rtl8812ae_phy_set_txpower_limit()
ubi: Fix use-after-free when volume resizing failed
ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume()

Liang He (1):
gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id()

Liu Shixin (1):
hfs: fix missing hfs_bnode_get() in __hfs_bnode_create

Liu Shixin via Jfs-discussion (1):
fs/jfs: fix shift exponent db_agl2size negative

Liwei Song (1):
drm/radeon: free iio for atombios when driver shutdown

Luca Ellero (2):
Input: ads7846 - don't report pressure for ads7845
Input: ads7846 - don't check penirq immediately for 7845

Luiz Augusto von Dentz (1):
Bluetooth: L2CAP: Fix potential user-after-free

Luke D. Jones (1):
HID: asus: Remove check for same LED brightness on set

Mario Limonciello (1):
ACPICA: Drop port I/O validation for some regions

Mark Hawrylak (1):
drm/radeon: Fix eDP for single-display iMac11,2

Mark Rutland (1):
ACPI: Don't build ACPICA with '-Os'

Markuss Broks (1):
ARM: dts: exynos: Use Exynos5420 compatible for the MIPI video phy

Martin Blumenstingl (2):
arm64: dts: meson-gx: Fix Ethernet MAC address unit name
arm64: dts: meson-gx: Fix the SCPI DVFS node name and unit address

Martin K. Petersen (1):
block: bio-integrity: Copy flags when bio_integrity_payload is cloned

Masami Hiramatsu (Google) (1):

      selftests/ftrace: Fix bash specific "==" operator

Miaoqian Lin (3):
irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_probe
pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups

Michael Schmitz (1):
m68k: Check syscall_trace_enter() return code

Mike Snitzer (3):
dm: remove flush_scheduled_work() during local_exit() dm thin: add cond_resched() to various workqueue loops dm cache: add cond_resched() to various workqueue loops

Mikko Perttunen (1):
gpu: host1x: Don't skip assigning syncpoints to channels

Mikulas Patocka (2):
dm flakey: fix logic when corrupting a bio
dm flakey: don't corrupt the zero page

Minsuk Kang (1):
wifi: ath9k: Fix potential stack-out-of-bounds write in ath9k_wmi_rsp_callback()

Nathan Chancellor (1):
powerpc: Remove linker flag from KBUILD_AFLAGS

Nathan Lynch (3):
powerpc/pseries/lparcfg: add missing RTAS retry status handling powerpc/rtas: make all exports GPL
powerpc/rtas: ensure 4KB alignment for rtas_data_buf

Neil Armstrong (5):
arm64: dts: amlogic: meson-gx: fix SCPI clock dvfs node name
arm64: dts: amlogic: meson-axg: fix SCPI clock dvfs node name
arm64: dts: amlogic: meson-gx: add missing SCPI sensors compatible
arm64: dts: amlogic: meson-gx: add missing unit address to rng node name
arm64: dts: amlogic: meson-gxl: add missing unit address to eth-phy-mux node name

Nguyen Dinh Phi (1):
Bluetooth: hci_sock: purge socket queues in the destruct() callback

Nícolas F. R. A. Prado (1):
drm/mediatek: Clean dangling pointer on bind error path

Paul E. McKenney (1):
rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait()

Pavel Skripkin (1):
ath9k: htc: clean up statistics macros

Pietro Borrello (4):
HID: asus: use spinlock to protect concurrent accesses
HID: asus: use spinlock to safely schedule workers
rds: rds_rm_zerocopy_callback() correct order for list_add_tail()
inet: fix fast path in __inet_hash_connect()

Qiheng Lin (2):
ARM: zynq: Fix refcount leak in zynq_early_slcr_init
mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read()

Quinn Tran (2):
scsi: qla2xxx: Fix link failure in NPIV environment
scsi: qla2xxx: Fix erroneous link down

Randy Dunlap (3):
m68k: /proc/hardware should depend on PROC_FS
sparc: allow PM configs for sparc32 COMPILE_TEST
MIPS: vpe-mt: drop physical_memsize

Ricardo Ribalda (3):
media: uvcvideo: Handle cameras with invalid descriptors
media: uvcvideo: Provide sync and async uvc_ctrl_status_event
media: uvcvideo: Fix race condition with usb_kill_urb

Rob Clark (1):
drm/mediatek: Drop unbalanced obj unref

Roberto Sassu (1):
ima: Align ima_file_mmap() parameters with mmap_file LSM hook

Roman Li (1):
drm/amd/display: Fix potential null-deref in dm_resume

Roxana Nicolescu (1):
selftest: fib_tests: Always cleanup before exit

Sakari Ailus (1):
media: ipu3-cio2: Fix PM runtime usage_count in driver unbind

Samuel Holland (1):
mtd: rawnand: sunxi: Fix the size of the last OOB region

Sean Christopherson (4):
x86/virt: Force GIF=1 prior to disabling SVM (for reboot flows) x86/crash: Disable virt in core NMI crash handler to avoid double shootdown x86/reboot: Disable virtualization in an emergency if SVM is supported x86/reboot: Disable SVM, not just VMX, when stopping CPUs

Shay Drory (1):
net/mlx5: fw_tracer: Fix debug print

Shayne Chen (1):

      wifi: mac80211: make rate u32 in sta_set_rate_info_rx()

Sherry Sun (1):
tty: serial: fsl_lpuart: disable the CTS when send break signal

Srinivas Pandruvada (1):
thermal: intel: powerclamp: Fix cur_state for multi package system

Steven Rostedt (3):
ktest.pl: Give back console on Ctrt^C on monitor ktest.pl: Fix missing "end_monitor" when machine check fails ktest.pl: Add RUN_TIMEOUT option with default unlimited

Sven Schnelle (1):
tty: fix out-of-bounds access in tty_driver_lookup_tty()

Tomas Henzl (4):
scsi: ses: Fix slab-out-of-bounds in ses_enclosure_data_process()
scsi: ses: Fix possible addl_desc_ptr out-of-bounds accesses
scsi: ses: Fix possible desc_ptr out-of-bounds accesses
scsi: ses: Fix slab-out-of-bounds in ses_intf_remove()

Vadim Pasternak (1):
hwmon: (mlxreg-fan) Return zero speed for broken fan

Vasily Gorbik (4):
s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler s390/kprobes: fix current_kprobe never cleared after kprobes reenter s390/maccess: add no DAT mode to kernel_write
s390/setup: init jump labels before command line parsing

Wan Jiabing (1):
ath9k: hif_usb: simplify if-if to if-else

William Zhang (1):
spi: bcm63xx-hsspi: Fix multi-bit mode setting

Xiang Yang (1):
um: vector: Fix memory leak in vector_config

Yang Jihong (2):
x86/kprobes: Fix __recover_optprobed_insn check optimizing logic x86/kprobes: Fix arch_check_optimized_kprobe check within optimized_kprobe range

Yang Li (1):
thermal: intel: Fix unsigned comparison with less than zero

Yang Yingliang (10):
ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init()
wifi: rtl8xxxu: don't call dev_kfree_skb() under spin_lock_irqsave()
wifi: ipw2x00: don't call dev_kfree_skb() under spin_lock_irqsave()
wifi: libertas_tf: don't call kfree_skb() under spin_lock_irqsave()
wifi: libertas: if_usb: don't call kfree_skb() under spin_lock_irqsave()
wifi: libertas: main: don't call kfree_skb() under spin_lock_irqsave()
wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave()
wifi: wl3501_cs: don't call kfree_skb() under spin_lock_irqsave()
powercap: fix possible name leak in powercap_register_zone()
ubi: Fix possible null-ptr-deref in ubi_free_volume()

Yicong Yang (1):
perf tools: Fix auto-complete on aarch64

Yuan Can (3):
wifi: rsi: Fix memory leak in rsi_coex_attach() drm/bridge: megachips: Fix error handling in i2c_register_driver()
media: i2c: ov772x: Fix memleak in ov772x_probe()

Yulong Zhang (1):
tools/iio/iio_utils:fix memory leak

Zhang Changzhong (1):
wifi: brcmfmac: fix potential memory leak in brcmf_netdev_start_xmit()

Zhang Xiaoxu (2):
cifs: Fix lost destroy smbd connection when MR allocate failed
cifs: Fix warning and UAF when destroy the MR list

Zhen Lei (1):
genirq: Fix the return type of kstat_cpu_irqs_sum()

Zhengchao Shao (4):
wifi: libertas: fix memory leak in lbs_init_adapter()
wifi: ipw2200: fix memory leak in ipw_wdev_init()
wifi: brcmfmac: unmap dma buffer in brcmf_msgbuf_alloc_pktid() 9p/rdma: unmap receive dma buffer in rdma_request()/post_recv()

Zhihao Cheng (10):
ubifs: Rectify space budget for ubifs_symlink() if symlink is encrypted
ubifs: Rectify space budget for ubifs_xrename()
ubifs: Fix wrong dirty space budget for dirty inode
ubifs: do_rename: Fix wrong space budget when target inode's nlink > 1
ubifs: Reserve one leb for each journal head while doing budget
ubifs: Re-statistic cleaned znode count if commit failed
ubifs: dirty_cow_znode: Fix memleak in error handling path
ubifs: ubifs_writepage: Mark page dirty after writing inode failed
ubi: Fix UAF wear-leveling entry in eraseblk_count_seq_show()
ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed

ruanjinjie (1):
watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path

Álvaro Fernández Rojas (1):
spi: bcm63xx-hsspi: fix pm_runtime

author maintainer
#1 lore raw
Documentation/admin-guide/hw-vuln/spectre.rst +16 -5
index 7e061ed449aa..0fba3758d0da 100644
@@ -479,8 +479,16 @@ Spectre variant 2
    On Intel Skylake-era systems the mitigation covers most, but not all,
    cases. See :ref:`[3] <spec_ref3>` for more details.
 
-   On CPUs with hardware mitigation for Spectre variant 2 (e.g. Enhanced
-   IBRS on x86), retpoline is automatically disabled at run time.
+   On CPUs with hardware mitigation for Spectre variant 2 (e.g. IBRS
+   or enhanced IBRS on x86), retpoline is automatically disabled at run time.
+
+   Systems which support enhanced IBRS (eIBRS) enable IBRS protection once at
+   boot, by setting the IBRS bit, and they're automatically protected against
+   Spectre v2 variant attacks, including cross-thread branch target injections
+   on SMT systems (STIBP). In other words, eIBRS enables STIBP too.
+
+   Legacy IBRS systems clear the IBRS bit on exit to userspace and
+   therefore explicitly enable STIBP for that
 
    The retpoline mitigation is turned on by default on vulnerable
    CPUs. It can be forced on or off by the administrator
@@ -504,9 +512,12 @@ Spectre variant 2
    For Spectre variant 2 mitigation, individual user programs
    can be compiled with return trampolines for indirect branches.
    This protects them from consuming poisoned entries in the branch
-   target buffer left by malicious software.  Alternatively, the
-   programs can disable their indirect branch speculation via prctl()
-   (See :ref:`Documentation/userspace-api/spec_ctrl.rst <set_spec_ctrl>`).
+   target buffer left by malicious software.
+
+   On legacy IBRS systems, at return to userspace, implicit STIBP is disabled
+   because the kernel clears the IBRS bit. In this case, the userspace programs
+   can disable indirect branch speculation via prctl() (See
+   :ref:`Documentation/userspace-api/spec_ctrl.rst <set_spec_ctrl>`).
    On x86, this will turn on STIBP to guard against attacks from the
    sibling thread when the user program is running, and use IBPB to
    flush the branch target buffer when switching to/from the program.
Documentation/dev-tools/gdb-kernel-debugging.rst +4 -0
index 19df79286f00..afe4bc206486 100644
@@ -39,6 +39,10 @@ Setup
   this mode. In this case, you should build the kernel with
   CONFIG_RANDOMIZE_BASE disabled if the architecture supports KASLR.
 
+- Build the gdb scripts (required on kernels v5.1 and above)::
+
+    make scripts_gdb
+
 - Enable the gdb stub of QEMU/KVM, either
 
     - at VM startup time by appending "-s" to the QEMU command line
Makefile +11 -4
index 684987d4984b..7f6669dae46b 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 19
-SUBLEVEL = 275
+SUBLEVEL = 276
 EXTRAVERSION =
 NAME = "People's Front"
 
@@ -88,10 +88,17 @@ endif
 
 # If the user is running make -s (silent mode), suppress echoing of
 # commands
+# make-4.0 (and later) keep single letter options in the 1st word of MAKEFLAGS.
 
-ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
-  quiet=silent_
-  tools_silent=s
+ifeq ($(filter 3.%,$(MAKE_VERSION)),)
+silence:=$(findstring s,$(firstword -$(MAKEFLAGS)))
+else
+silence:=$(findstring s,$(filter-out --%,$(MAKEFLAGS)))
+endif
+
+ifeq ($(silence),s)
+quiet=silent_
+tools_silent=s
 endif
 
 export quiet Q KBUILD_VERBOSE
arch/alpha/kernel/traps.c +15 -15
index 22f5c27b96b7..e2c96f309881 100644
@@ -235,7 +235,21 @@ do_entIF(unsigned long type, struct pt_regs *regs)
 {
 	int signo, code;
 
-	if ((regs->ps & ~IPL_MAX) == 0) {
+	if (type == 3) { /* FEN fault */
+		/* Irritating users can call PAL_clrfen to disable the
+		   FPU for the process.  The kernel will then trap in
+		   do_switch_stack and undo_switch_stack when we try
+		   to save and restore the FP registers.
+
+		   Given that GCC by default generates code that uses the
+		   FP registers, PAL_clrfen is not useful except for DoS
+		   attacks.  So turn the bleeding FPU back on and be done
+		   with it.  */
+		current_thread_info()->pcb.flags |= 1;
+		__reload_thread(&current_thread_info()->pcb);
+		return;
+	}
+	if (!user_mode(regs)) {
 		if (type == 1) {
 			const unsigned int *data
 			  = (const unsigned int *) regs->pc;
@@ -368,20 +382,6 @@ do_entIF(unsigned long type, struct pt_regs *regs)
 		}
 		break;
 
-	      case 3: /* FEN fault */
-		/* Irritating users can call PAL_clrfen to disable the
-		   FPU for the process.  The kernel will then trap in
-		   do_switch_stack and undo_switch_stack when we try
-		   to save and restore the FP registers.
-
-		   Given that GCC by default generates code that uses the
-		   FP registers, PAL_clrfen is not useful except for DoS
-		   attacks.  So turn the bleeding FPU back on and be done
-		   with it.  */
-		current_thread_info()->pcb.flags |= 1;
-		__reload_thread(&current_thread_info()->pcb);
-		return;
-
 	      case 5: /* illoc */
 	      default: /* unexpected instruction-fault type */
 		      ;
arch/arm/boot/dts/exynos3250-rinato.dts +1 -1
index 29df4cfa9165..e398604b2ce0 100644
@@ -237,7 +237,7 @@
 	i80-if-timings {
 		cs-setup = <0>;
 		wr-setup = <0>;
-		wr-act = <1>;
+		wr-active = <1>;
 		wr-hold = <0>;
 	};
 };
arch/arm/boot/dts/exynos4-cpu-thermal.dtsi +1 -1
index 021d9fc1b492..27a1a8952665 100644
@@ -10,7 +10,7 @@
 / {
 thermal-zones {
 	cpu_thermal: cpu-thermal {
-		thermal-sensors = <&tmu 0>;
+		thermal-sensors = <&tmu>;
 		polling-delay-passive = <0>;
 		polling-delay = <0>;
 		trips {
arch/arm/boot/dts/exynos4.dtsi +1 -1
index 6085e92ac2d7..3f7488833745 100644
@@ -611,7 +611,7 @@
 			status = "disabled";
 
 			hdmi_i2c_phy: hdmiphy@38 {
-				compatible = "exynos4210-hdmiphy";
+				compatible = "samsung,exynos4210-hdmiphy";
 				reg = <0x38>;
 			};
 		};
arch/arm/boot/dts/exynos5410-odroidxu.dts +0 -1
index 840a854ee838..8a7c98f8d4eb 100644
@@ -113,7 +113,6 @@
 };
 
 &cpu0_thermal {
-	thermal-sensors = <&tmu_cpu0 0>;
 	polling-delay-passive = <0>;
 	polling-delay = <0>;
 
arch/arm/boot/dts/exynos5420.dtsi +1 -1
index aaff15880761..99e2e0b0b9cd 100644
@@ -530,7 +530,7 @@
 		};
 
 		mipi_phy: mipi-video-phy {
-			compatible = "samsung,s5pv210-mipi-video-phy";
+			compatible = "samsung,exynos5420-mipi-video-phy";
 			syscon = <&pmu_system_controller>;
 			#phy-cells = <1>;
 		};
arch/arm/boot/dts/spear320-hmi.dts +1 -1
index 0d0da1f65f0e..1e54748799a6 100644
@@ -248,7 +248,7 @@
 					irq-trigger = <0x1>;
 
 					stmpegpio: stmpe-gpio {
-						compatible = "stmpe,gpio";
+						compatible = "st,stmpe-gpio";
 						reg = <0>;
 						gpio-controller;
 						#gpio-cells = <2>;
arch/arm/mach-imx/mmdc.c +12 -12
index 14be73ca107a..965a41572283 100644
@@ -105,6 +105,7 @@ struct mmdc_pmu {
 	cpumask_t cpu;
 	struct hrtimer hrtimer;
 	unsigned int active_events;
+	int id;
 	struct device *dev;
 	struct perf_event *mmdc_events[MMDC_NUM_COUNTERS];
 	struct hlist_node node;
@@ -445,8 +446,6 @@ static enum hrtimer_restart mmdc_pmu_timer_handler(struct hrtimer *hrtimer)
 static int mmdc_pmu_init(struct mmdc_pmu *pmu_mmdc,
 		void __iomem *mmdc_base, struct device *dev)
 {
-	int mmdc_num;
-
 	*pmu_mmdc = (struct mmdc_pmu) {
 		.pmu = (struct pmu) {
 			.task_ctx_nr    = perf_invalid_context,
@@ -463,15 +462,16 @@ static int mmdc_pmu_init(struct mmdc_pmu *pmu_mmdc,
 		.active_events = 0,
 	};
 
-	mmdc_num = ida_simple_get(&mmdc_ida, 0, 0, GFP_KERNEL);
+	pmu_mmdc->id = ida_simple_get(&mmdc_ida, 0, 0, GFP_KERNEL);
 
-	return mmdc_num;
+	return pmu_mmdc->id;
 }
 
 static int imx_mmdc_remove(struct platform_device *pdev)
 {
 	struct mmdc_pmu *pmu_mmdc = platform_get_drvdata(pdev);
 
+	ida_simple_remove(&mmdc_ida, pmu_mmdc->id);
 	cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node);
 	perf_pmu_unregister(&pmu_mmdc->pmu);
 	iounmap(pmu_mmdc->mmdc_base);
@@ -485,7 +485,6 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
 {
 	struct mmdc_pmu *pmu_mmdc;
 	char *name;
-	int mmdc_num;
 	int ret;
 	const struct of_device_id *of_id =
 		of_match_device(imx_mmdc_dt_ids, &pdev->dev);
@@ -508,14 +507,14 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
 		cpuhp_mmdc_state = ret;
 	}
 
-	mmdc_num = mmdc_pmu_init(pmu_mmdc, mmdc_base, &pdev->dev);
-	pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk;
-	if (mmdc_num == 0)
-		name = "mmdc";
-	else
-		name = devm_kasprintf(&pdev->dev,
-				GFP_KERNEL, "mmdc%d", mmdc_num);
+	ret = mmdc_pmu_init(pmu_mmdc, mmdc_base, &pdev->dev);
+	if (ret < 0)
+		goto  pmu_free;
 
+	name = devm_kasprintf(&pdev->dev,
+				GFP_KERNEL, "mmdc%d", ret);
+
+	pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk;
 	pmu_mmdc->devtype_data = (struct fsl_mmdc_devtype_data *)of_id->data;
 
 	hrtimer_init(&pmu_mmdc->hrtimer, CLOCK_MONOTONIC,
@@ -536,6 +535,7 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
 
 pmu_register_err:
 	pr_warn("MMDC Perf PMU failed (%d), disabled\n", ret);
+	ida_simple_remove(&mmdc_ida, pmu_mmdc->id);
 	cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node);
 	hrtimer_cancel(&pmu_mmdc->hrtimer);
 pmu_free:
arch/arm/mach-omap1/timer.c +1 -1
index 4447210c9b0d..291bc376d30e 100644
@@ -165,7 +165,7 @@ static int __init omap1_dm_timer_init(void)
 	kfree(pdata);
 
 err_free_pdev:
-	platform_device_unregister(pdev);
+	platform_device_put(pdev);
 
 	return ret;
 }
arch/arm/mach-omap2/timer.c +1 -0
index c4ba848e8af6..d98aa78b9be9 100644
@@ -701,6 +701,7 @@ static void __init realtime_counter_init(void)
 	}
 
 	rate = clk_get_rate(sys_clk);
+	clk_put(sys_clk);
 
 	if (soc_is_dra7xx()) {
 		/*
arch/arm/mach-zynq/slcr.c +1 -0
index f0292a30e6f6..6b75ef7be3fd 100644
@@ -222,6 +222,7 @@ int __init zynq_early_slcr_init(void)
 	zynq_slcr_regmap = syscon_regmap_lookup_by_compatible("xlnx,zynq-slcr");
 	if (IS_ERR(zynq_slcr_regmap)) {
 		pr_err("%s: failed to find zynq-slcr\n", __func__);
+		of_node_put(np);
 		return -ENODEV;
 	}
 
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +26 -0
index 90e9cbcc891f..d5f2f7593c67 100644
@@ -47,6 +47,7 @@
 			reg = <0x0 0x0>;
 			enable-method = "psci";
 			next-level-cache = <&l2>;
+			clocks = <&scpi_dvfs 0>;
 		};
 
 		cpu1: cpu@1 {
@@ -55,6 +56,7 @@
 			reg = <0x0 0x1>;
 			enable-method = "psci";
 			next-level-cache = <&l2>;
+			clocks = <&scpi_dvfs 0>;
 		};
 
 		cpu2: cpu@2 {
@@ -63,6 +65,7 @@
 			reg = <0x0 0x2>;
 			enable-method = "psci";
 			next-level-cache = <&l2>;
+			clocks = <&scpi_dvfs 0>;
 		};
 
 		cpu3: cpu@3 {
@@ -71,6 +74,7 @@
 			reg = <0x0 0x3>;
 			enable-method = "psci";
 			next-level-cache = <&l2>;
+			clocks = <&scpi_dvfs 0>;
 		};
 
 		l2: l2-cache0 {
@@ -151,6 +155,28 @@
 		#clock-cells = <0>;
 	};
 
+	scpi {
+		compatible = "arm,scpi-pre-1.0";
+		mboxes = <&mailbox 1 &mailbox 2>;
+		shmem = <&cpu_scp_lpri &cpu_scp_hpri>;
+
+		scpi_clocks: clocks {
+			compatible = "arm,scpi-clocks";
+
+			scpi_dvfs: clocks-0 {
+				compatible = "arm,scpi-dvfs-clocks";
+				#clock-cells = <1>;
+				clock-indices = <0>;
+				clock-output-names = "vcpu";
+			};
+		};
+
+		scpi_sensors: sensors {
+			compatible = "amlogic,meson-gxbb-scpi-sensors", "arm,scpi-sensors";
+			#thermal-sensor-cells = <1>;
+		};
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <2>;
arch/arm64/boot/dts/amlogic/meson-gx.dtsi +3 -3
index a127657526c7..c167023ca1db 100644
@@ -150,7 +150,7 @@
 			reg = <0x14 0x10>;
 		};
 
-		eth_mac: eth_mac@34 {
+		eth_mac: eth-mac@34 {
 			reg = <0x34 0x10>;
 		};
 
@@ -167,7 +167,7 @@
 		scpi_clocks: clocks {
 			compatible = "arm,scpi-clocks";
 
-			scpi_dvfs: scpi_clocks@0 {
+			scpi_dvfs: clocks-0 {
 				compatible = "arm,scpi-dvfs-clocks";
 				#clock-cells = <1>;
 				clock-indices = <0>;
@@ -423,7 +423,7 @@
 			#size-cells = <2>;
 			ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>;
 
-			hwrng: rng {
+			hwrng: rng@0 {
 				compatible = "amlogic,meson-rng";
 				reg = <0x0 0x0 0x0 0x4>;
 			};
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +1 -1
index 5d7724b3a612..f999a92d174b 100644
@@ -636,7 +636,7 @@
 		};
 	};
 
-	eth-phy-mux {
+	eth-phy-mux@55c {
 		compatible = "mdio-mux-mmioreg", "mdio-mux";
 		#address-cells = <1>;
 		#size-cells = <0>;
arch/arm64/boot/dts/mediatek/mt7622.dtsi +1 -0
index 2bcee994898a..5cb0470ede72 100644
@@ -380,6 +380,7 @@
 	pwm: pwm@11006000 {
 		compatible = "mediatek,mt7622-pwm";
 		reg = <0 0x11006000 0 0x1000>;
+		#pwm-cells = <2>;
 		interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
 		clocks = <&topckgen CLK_TOP_PWM_SEL>,
 			 <&pericfg CLK_PERI_PWM_PD>,
arch/m68k/68000/entry.S +2 -0
index 259b3661b614..94abf3d8afc5 100644
@@ -47,6 +47,8 @@ do_trace:
 	jbsr	syscall_trace_enter
 	RESTORE_SWITCH_STACK
 	addql	#4,%sp
+	addql	#1,%d0
+	jeq	ret_from_exception
 	movel	%sp@(PT_OFF_ORIG_D0),%d1
 	movel	#-ENOSYS,%d0
 	cmpl	#NR_syscalls,%d1
arch/m68k/Kconfig.devices +1 -0
index 3e9b0b826f8a..6fb693bb0771 100644
@@ -19,6 +19,7 @@ config HEARTBEAT
 # We have a dedicated heartbeat LED. :-)
 config PROC_HARDWARE
 	bool "/proc/hardware support"
+	depends on PROC_FS
 	help
 	  Say Y here to support the /proc/hardware file, which gives you
 	  access to information about the machine you're running on,
arch/m68k/coldfire/entry.S +2 -0
index 52d312d5b4d4..fb3b06567745 100644
@@ -92,6 +92,8 @@ ENTRY(system_call)
 	jbsr	syscall_trace_enter
 	RESTORE_SWITCH_STACK
 	addql	#4,%sp
+	addql	#1,%d0
+	jeq	ret_from_exception
 	movel	%d3,%a0
 	jbsr	%a0@
 	movel	%d0,%sp@(PT_OFF_D0)		/* save the return value */
arch/m68k/kernel/entry.S +3 -0
index 97cd3ea5f10b..9a66657773be 100644
@@ -160,9 +160,12 @@ do_trace_entry:
 	jbsr	syscall_trace
 	RESTORE_SWITCH_STACK
 	addql	#4,%sp
+	addql	#1,%d0			| optimization for cmpil #-1,%d0
+	jeq	ret_from_syscall
 	movel	%sp@(PT_OFF_ORIG_D0),%d0
 	cmpl	#NR_syscalls,%d0
 	jcs	syscall
+	jra	ret_from_syscall
 badsys:
 	movel	#-ENOSYS,%sp@(PT_OFF_D0)
 	jra	ret_from_syscall
arch/mips/include/asm/syscall.h +1 -1
index 6cf8ffb5367e..94d8c945ea8e 100644
@@ -38,7 +38,7 @@ static inline bool mips_syscall_is_indirect(struct task_struct *task,
 static inline long syscall_get_nr(struct task_struct *task,
 				  struct pt_regs *regs)
 {
-	return current_thread_info()->syscall;
+	return task_thread_info(task)->syscall;
 }
 
 static inline void mips_syscall_update_nr(struct task_struct *task,
arch/mips/include/asm/vpe.h +0 -1
index 80e70dbd1f64..012731546cf6 100644
@@ -104,7 +104,6 @@ struct vpe_control {
 	struct list_head tc_list;       /* Thread contexts */
 };
 
-extern unsigned long physical_memsize;
 extern struct vpe_control vpecontrol;
 extern const struct file_operations vpe_fops;
 
arch/mips/kernel/vpe-mt.c +3 -4
index 9fd7cd48ea1d..496ed8f362f6 100644
@@ -92,12 +92,11 @@ int vpe_run(struct vpe *v)
 	write_tc_c0_tchalt(read_tc_c0_tchalt() & ~TCHALT_H);
 
 	/*
-	 * The sde-kit passes 'memsize' to __start in $a3, so set something
-	 * here...  Or set $a3 to zero and define DFLT_STACK_SIZE and
-	 * DFLT_HEAP_SIZE when you compile your program
+	 * We don't pass the memsize here, so VPE programs need to be
+	 * compiled with DFLT_STACK_SIZE and DFLT_HEAP_SIZE defined.
 	 */
+	mttgpr(7, 0);
 	mttgpr(6, v->ntcs);
-	mttgpr(7, physical_memsize);
 
 	/* set up VPE1 */
 	/*
arch/mips/lantiq/prom.c +0 -6
index dceab67e481a..02cf9b27b785 100644
@@ -24,12 +24,6 @@
 DEFINE_SPINLOCK(ebu_lock);
 EXPORT_SYMBOL_GPL(ebu_lock);
 
-/*
- * This is needed by the VPE loader code, just set it to 0 and assume
- * that the firmware hardcodes this value to something useful.
- */
-unsigned long physical_memsize = 0L;
-
 /*
  * this struct is filled by the soc specific detection code and holds
  * information about the specific soc type, revision and name
arch/powerpc/Makefile +1 -1
index 5987ae0d8fbb..9b33cd4e0e17 100644
@@ -109,7 +109,7 @@ aflags-$(CONFIG_CPU_LITTLE_ENDIAN)	+= -mlittle-endian
 
 ifeq ($(HAS_BIARCH),y)
 KBUILD_CFLAGS	+= -m$(BITS)
-KBUILD_AFLAGS	+= -m$(BITS) -Wl,-a$(BITS)
+KBUILD_AFLAGS	+= -m$(BITS)
 KBUILD_LDFLAGS	+= -m elf$(BITS)$(LDEMULATION)
 KBUILD_ARFLAGS	+= --target=elf$(BITS)-$(GNUTARGET)
 endif
arch/powerpc/kernel/rtas.c +12 -12
index a3f08a380c99..7c7648e6f1c2 100644
@@ -54,10 +54,10 @@ struct rtas_t rtas = {
 EXPORT_SYMBOL(rtas);
 
 DEFINE_SPINLOCK(rtas_data_buf_lock);
-EXPORT_SYMBOL(rtas_data_buf_lock);
+EXPORT_SYMBOL_GPL(rtas_data_buf_lock);
 
-char rtas_data_buf[RTAS_DATA_BUF_SIZE] __cacheline_aligned;
-EXPORT_SYMBOL(rtas_data_buf);
+char rtas_data_buf[RTAS_DATA_BUF_SIZE] __aligned(SZ_4K);
+EXPORT_SYMBOL_GPL(rtas_data_buf);
 
 unsigned long rtas_rmo_buf;
 
@@ -66,7 +66,7 @@ unsigned long rtas_rmo_buf;
  * This is done like this so rtas_flash can be a module.
  */
 void (*rtas_flash_term_hook)(int);
-EXPORT_SYMBOL(rtas_flash_term_hook);
+EXPORT_SYMBOL_GPL(rtas_flash_term_hook);
 
 /* RTAS use home made raw locking instead of spin_lock_irqsave
  * because those can be called from within really nasty contexts
@@ -314,7 +314,7 @@ void rtas_progress(char *s, unsigned short hex)
  
 	spin_unlock(&progress_lock);
 }
-EXPORT_SYMBOL(rtas_progress);		/* needed by rtas_flash module */
+EXPORT_SYMBOL_GPL(rtas_progress);		/* needed by rtas_flash module */
 
 int rtas_token(const char *service)
 {
@@ -324,7 +324,7 @@ int rtas_token(const char *service)
 	tokp = of_get_property(rtas.dev, service, NULL);
 	return tokp ? be32_to_cpu(*tokp) : RTAS_UNKNOWN_SERVICE;
 }
-EXPORT_SYMBOL(rtas_token);
+EXPORT_SYMBOL_GPL(rtas_token);
 
 int rtas_service_present(const char *service)
 {
@@ -484,7 +484,7 @@ int rtas_call(int token, int nargs, int nret, int *outputs, ...)
 	}
 	return ret;
 }
-EXPORT_SYMBOL(rtas_call);
+EXPORT_SYMBOL_GPL(rtas_call);
 
 /* For RTAS_BUSY (-2), delay for 1 millisecond.  For an extended busy status
  * code of 990n, perform the hinted delay of 10^n (last digit) milliseconds.
@@ -519,7 +519,7 @@ unsigned int rtas_busy_delay(int status)
 
 	return ms;
 }
-EXPORT_SYMBOL(rtas_busy_delay);
+EXPORT_SYMBOL_GPL(rtas_busy_delay);
 
 static int rtas_error_rc(int rtas_rc)
 {
@@ -565,7 +565,7 @@ int rtas_get_power_level(int powerdomain, int *level)
 		return rtas_error_rc(rc);
 	return rc;
 }
-EXPORT_SYMBOL(rtas_get_power_level);
+EXPORT_SYMBOL_GPL(rtas_get_power_level);
 
 int rtas_set_power_level(int powerdomain, int level, int *setlevel)
 {
@@ -583,7 +583,7 @@ int rtas_set_power_level(int powerdomain, int level, int *setlevel)
 		return rtas_error_rc(rc);
 	return rc;
 }
-EXPORT_SYMBOL(rtas_set_power_level);
+EXPORT_SYMBOL_GPL(rtas_set_power_level);
 
 int rtas_get_sensor(int sensor, int index, int *state)
 {
@@ -601,7 +601,7 @@ int rtas_get_sensor(int sensor, int index, int *state)
 		return rtas_error_rc(rc);
 	return rc;
 }
-EXPORT_SYMBOL(rtas_get_sensor);
+EXPORT_SYMBOL_GPL(rtas_get_sensor);
 
 int rtas_get_sensor_fast(int sensor, int index, int *state)
 {
@@ -662,7 +662,7 @@ int rtas_set_indicator(int indicator, int index, int new_value)
 		return rtas_error_rc(rc);
 	return rc;
 }
-EXPORT_SYMBOL(rtas_set_indicator);
+EXPORT_SYMBOL_GPL(rtas_set_indicator);
 
 /*
  * Ignoring RTAS extended delay
arch/powerpc/platforms/powernv/pci-ioda.c +2 -1
index ecd211c5f24a..cd3e5ed7d77c 100644
@@ -3123,7 +3123,8 @@ static void pnv_ioda_setup_pe_res(struct pnv_ioda_pe *pe,
 	int index;
 	int64_t rc;
 
-	if (!res || !res->flags || res->start > res->end)
+	if (!res || !res->flags || res->start > res->end ||
+	    res->flags & IORESOURCE_UNSET)
 		return;
 
 	if (res->flags & IORESOURCE_IO) {
arch/powerpc/platforms/pseries/lparcfg.c +10 -10
index 7c872dc01bdb..d1b338b7dbde 100644
@@ -291,6 +291,7 @@ static void parse_mpp_x_data(struct seq_file *m)
  */
 static void parse_system_parameter_string(struct seq_file *m)
 {
+	const s32 token = rtas_token("ibm,get-system-parameter");
 	int call_status;
 
 	unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
@@ -300,16 +301,15 @@ static void parse_system_parameter_string(struct seq_file *m)
 		return;
 	}
 
-	spin_lock(&rtas_data_buf_lock);
-	memset(rtas_data_buf, 0, SPLPAR_MAXLENGTH);
-	call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
-				NULL,
-				SPLPAR_CHARACTERISTICS_TOKEN,
-				__pa(rtas_data_buf),
-				RTAS_DATA_BUF_SIZE);
-	memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
-	local_buffer[SPLPAR_MAXLENGTH - 1] = '\0';
-	spin_unlock(&rtas_data_buf_lock);
+	do {
+		spin_lock(&rtas_data_buf_lock);
+		memset(rtas_data_buf, 0, SPLPAR_MAXLENGTH);
+		call_status = rtas_call(token, 3, 1, NULL, SPLPAR_CHARACTERISTICS_TOKEN,
+					__pa(rtas_data_buf), RTAS_DATA_BUF_SIZE);
+		memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
+		local_buffer[SPLPAR_MAXLENGTH - 1] = '\0';
+		spin_unlock(&rtas_data_buf_lock);
+	} while (rtas_busy_delay(call_status));
 
 	if (call_status != 0) {
 		printk(KERN_INFO
arch/riscv/kernel/time.c +3 -0
index 15f4ab40e222..50bb7e0d44ba 100644
@@ -13,6 +13,7 @@
  */
 
 #include <linux/of_clk.h>
+#include <linux/clockchips.h>
 #include <linux/clocksource.h>
 #include <linux/delay.h>
 #include <asm/sbi.h>
@@ -33,4 +34,6 @@ void __init time_init(void)
 
 	of_clk_init(NULL);
 	timer_probe();
+
+	tick_setup_hrtimer_broadcast();
 }
arch/s390/kernel/kprobes.c +2 -2
index 7c0a095e9c5f..b52ca21be367 100644
@@ -254,6 +254,7 @@ static void pop_kprobe(struct kprobe_ctlblk *kcb)
 {
 	__this_cpu_write(current_kprobe, kcb->prev_kprobe.kp);
 	kcb->kprobe_status = kcb->prev_kprobe.status;
+	kcb->prev_kprobe.kp = NULL;
 }
 NOKPROBE_SYMBOL(pop_kprobe);
 
@@ -508,12 +509,11 @@ static int post_kprobe_handler(struct pt_regs *regs)
 	if (!p)
 		return 0;
 
+	resume_execution(p, regs);
 	if (kcb->kprobe_status != KPROBE_REENTER && p->post_handler) {
 		kcb->kprobe_status = KPROBE_HIT_SSDONE;
 		p->post_handler(p, regs, 0);
 	}
-
-	resume_execution(p, regs);
 	pop_kprobe(kcb);
 	preempt_enable_no_resched();
 
arch/s390/kernel/setup.c +1 -0
index bfd6c01a68f0..f54f5bfd83ad 100644
@@ -909,6 +909,7 @@ void __init setup_arch(char **cmdline_p)
 	if (IS_ENABLED(CONFIG_EXPOLINE_AUTO))
 		nospec_auto_detect();
 
+	jump_label_init();
 	parse_early_param();
 #ifdef CONFIG_CRASH_DUMP
 	/* Deactivate elfcorehdr= kernel parameter */
arch/s390/kernel/vmlinux.lds.S +1 -0
index 160a05c6ce88..04c3e56da0f2 100644
@@ -153,5 +153,6 @@ SECTIONS
 	DISCARDS
 	/DISCARD/ : {
 		*(.eh_frame)
+		*(.interp)
 	}
 }
arch/s390/mm/maccess.c +11 -5
index 7be06475809b..a40739ea3805 100644
@@ -58,13 +58,19 @@ static notrace long s390_kernel_write_odd(void *dst, const void *src, size_t siz
  */
 void notrace s390_kernel_write(void *dst, const void *src, size_t size)
 {
+	unsigned long flags;
 	long copied;
 
-	while (size) {
-		copied = s390_kernel_write_odd(dst, src, size);
-		dst += copied;
-		src += copied;
-		size -= copied;
+	flags = arch_local_save_flags();
+	if (!(flags & PSW_MASK_DAT)) {
+		memcpy(dst, src, size);
+	} else {
+		while (size) {
+			copied = s390_kernel_write_odd(dst, src, size);
+			dst += copied;
+			src += copied;
+			size -= copied;
+		}
 	}
 }
 
arch/sparc/Kconfig +1 -1
index 1f1a7583fa90..426accab2a88 100644
@@ -329,7 +329,7 @@ config FORCE_MAX_ZONEORDER
 	  This config option is actually maximum order plus one. For example,
 	  a value of 13 means that the largest free memory block is 2^12 pages.
 
-if SPARC64
+if SPARC64 || COMPILE_TEST
 source "kernel/power/Kconfig"
 endif
 
arch/um/drivers/vector_kern.c +1 -0
index 50ee3bb5a63a..b0b124025b48 100644
@@ -741,6 +741,7 @@ static int vector_config(char *str, char **error_out)
 
 	if (parsed == NULL) {
 		*error_out = "vector_config failed to parse parameters";
+		kfree(params);
 		return -EINVAL;
 	}
 
arch/x86/include/asm/microcode.h +2 -2
index 91a06cef50c1..8e915e3813f6 100644
@@ -130,7 +130,7 @@ static inline unsigned int x86_cpuid_family(void)
 int __init microcode_init(void);
 extern void __init load_ucode_bsp(void);
 extern void load_ucode_ap(void);
-void reload_early_microcode(void);
+void reload_early_microcode(unsigned int cpu);
 extern bool get_builtin_firmware(struct cpio_data *cd, const char *name);
 extern bool initrd_gone;
 void microcode_bsp_resume(void);
@@ -138,7 +138,7 @@ void microcode_bsp_resume(void);
 static inline int __init microcode_init(void)			{ return 0; };
 static inline void __init load_ucode_bsp(void)			{ }
 static inline void load_ucode_ap(void)				{ }
-static inline void reload_early_microcode(void)			{ }
+static inline void reload_early_microcode(unsigned int cpu)	{ }
 static inline void microcode_bsp_resume(void)			{ }
 static inline bool
 get_builtin_firmware(struct cpio_data *cd, const char *name)	{ return false; }
arch/x86/include/asm/microcode_amd.h +2 -2
index 5c524d4f71cd..a645b25ee442 100644
@@ -47,12 +47,12 @@ struct microcode_amd {
 extern void __init load_ucode_amd_bsp(unsigned int family);
 extern void load_ucode_amd_ap(unsigned int family);
 extern int __init save_microcode_in_initrd_amd(unsigned int family);
-void reload_ucode_amd(void);
+void reload_ucode_amd(unsigned int cpu);
 #else
 static inline void __init load_ucode_amd_bsp(unsigned int family) {}
 static inline void load_ucode_amd_ap(unsigned int family) {}
 static inline int __init
 save_microcode_in_initrd_amd(unsigned int family) { return -EINVAL; }
-void reload_ucode_amd(void) {}
+static inline void reload_ucode_amd(unsigned int cpu) {}
 #endif
 #endif /* _ASM_X86_MICROCODE_AMD_H */
arch/x86/include/asm/msr-index.h +4 -0
index 0bd07699dba3..847f3f5820d2 100644
@@ -50,6 +50,10 @@
 #define SPEC_CTRL_RRSBA_DIS_S_SHIFT	6	   /* Disable RRSBA behavior */
 #define SPEC_CTRL_RRSBA_DIS_S		BIT(SPEC_CTRL_RRSBA_DIS_S_SHIFT)
 
+/* A mask for bits which the kernel toggles when controlling mitigations */
+#define SPEC_CTRL_MITIGATIONS_MASK	(SPEC_CTRL_IBRS | SPEC_CTRL_STIBP | SPEC_CTRL_SSBD \
+							| SPEC_CTRL_RRSBA_DIS_S)
+
 #define MSR_IA32_PRED_CMD		0x00000049 /* Prediction Command */
 #define PRED_CMD_IBPB			BIT(0)	   /* Indirect Branch Prediction Barrier */
 
arch/x86/include/asm/reboot.h +2 -0
index a671a1145906..9177b4354c3f 100644
@@ -25,6 +25,8 @@ void __noreturn machine_real_restart(unsigned int type);
 #define MRR_BIOS	0
 #define MRR_APM		1
 
+void cpu_emergency_disable_virtualization(void);
+
 typedef void (*nmi_shootdown_cb)(int, struct pt_regs*);
 void nmi_shootdown_cpus(nmi_shootdown_cb callback);
 void run_crash_ipi_callback(struct pt_regs *regs);
arch/x86/include/asm/virtext.h +15 -1
index 0116b2ee9e64..4699acd602af 100644
@@ -114,7 +114,21 @@ static inline void cpu_svm_disable(void)
 
 	wrmsrl(MSR_VM_HSAVE_PA, 0);
 	rdmsrl(MSR_EFER, efer);
-	wrmsrl(MSR_EFER, efer & ~EFER_SVME);
+	if (efer & EFER_SVME) {
+		/*
+		 * Force GIF=1 prior to disabling SVM to ensure INIT and NMI
+		 * aren't blocked, e.g. if a fatal error occurred between CLGI
+		 * and STGI.  Note, STGI may #UD if SVM is disabled from NMI
+		 * context between reading EFER and executing STGI.  In that
+		 * case, GIF must already be set, otherwise the NMI would have
+		 * been blocked, so just eat the fault.
+		 */
+		asm_volatile_goto("1: stgi\n\t"
+				  _ASM_EXTABLE(1b, %l[fault])
+				  ::: "memory" : fault);
+fault:
+		wrmsrl(MSR_EFER, efer & ~EFER_SVME);
+	}
 }
 
 /** Makes sure SVM is disabled, if it is supported on the CPU
arch/x86/kernel/cpu/bugs.c +27 -8
index e298ec9d5d53..680fa070e18b 100644
@@ -135,9 +135,17 @@ void __init check_bugs(void)
 	 * have unknown values. AMD64_LS_CFG MSR is cached in the early AMD
 	 * init code as it is not enumerated and depends on the family.
 	 */
-	if (boot_cpu_has(X86_FEATURE_MSR_SPEC_CTRL))
+	if (cpu_feature_enabled(X86_FEATURE_MSR_SPEC_CTRL)) {
 		rdmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
 
+		/*
+		 * Previously running kernel (kexec), may have some controls
+		 * turned ON. Clear them and let the mitigations setup below
+		 * rediscover them based on configuration.
+		 */
+		x86_spec_ctrl_base &= ~SPEC_CTRL_MITIGATIONS_MASK;
+	}
+
 	/* Select the proper CPU mitigations before patching alternatives: */
 	spectre_v1_select_mitigation();
 	spectre_v2_select_mitigation();
@@ -975,14 +983,18 @@ spectre_v2_parse_user_cmdline(void)
 	return SPECTRE_V2_USER_CMD_AUTO;
 }
 
-static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode)
+static inline bool spectre_v2_in_eibrs_mode(enum spectre_v2_mitigation mode)
 {
-	return mode == SPECTRE_V2_IBRS ||
-	       mode == SPECTRE_V2_EIBRS ||
+	return mode == SPECTRE_V2_EIBRS ||
 	       mode == SPECTRE_V2_EIBRS_RETPOLINE ||
 	       mode == SPECTRE_V2_EIBRS_LFENCE;
 }
 
+static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode)
+{
+	return spectre_v2_in_eibrs_mode(mode) || mode == SPECTRE_V2_IBRS;
+}
+
 static void __init
 spectre_v2_user_select_mitigation(void)
 {
@@ -1045,12 +1057,19 @@ spectre_v2_user_select_mitigation(void)
 	}
 
 	/*
-	 * If no STIBP, IBRS or enhanced IBRS is enabled, or SMT impossible,
-	 * STIBP is not required.
+	 * If no STIBP, enhanced IBRS is enabled, or SMT impossible, STIBP
+	 * is not required.
+	 *
+	 * Enhanced IBRS also protects against cross-thread branch target
+	 * injection in user-mode as the IBRS bit remains always set which
+	 * implicitly enables cross-thread protections.  However, in legacy IBRS
+	 * mode, the IBRS bit is set only on kernel entry and cleared on return
+	 * to userspace. This disables the implicit cross-thread protection,
+	 * so allow for STIBP to be selected in that case.
 	 */
 	if (!boot_cpu_has(X86_FEATURE_STIBP) ||
 	    !smt_possible ||
-	    spectre_v2_in_ibrs_mode(spectre_v2_enabled))
+	    spectre_v2_in_eibrs_mode(spectre_v2_enabled))
 		return;
 
 	/*
@@ -2102,7 +2121,7 @@ static ssize_t mmio_stale_data_show_state(char *buf)
 
 static char *stibp_state(void)
 {
-	if (spectre_v2_in_ibrs_mode(spectre_v2_enabled))
+	if (spectre_v2_in_eibrs_mode(spectre_v2_enabled))
 		return "";
 
 	switch (spectre_v2_user_stibp) {
arch/x86/kernel/cpu/microcode/amd.c +27 -26

118 lines not on this page · raw message

arch/x86/kernel/cpu/microcode/core.c +3 -3
index 985ef98c8ba2..963b989710f9 100644
@@ -326,7 +326,7 @@ struct cpio_data find_microcode_in_initrd(const char *path, bool use_pa)
 #endif
 }
 
-void reload_early_microcode(void)
+void reload_early_microcode(unsigned int cpu)
 {
 	int vendor, family;
 
@@ -340,7 +340,7 @@ void reload_early_microcode(void)
 		break;
 	case X86_VENDOR_AMD:
 		if (family >= 0x10)
-			reload_ucode_amd();
+			reload_ucode_amd(cpu);
 		break;
 	default:
 		break;
@@ -783,7 +783,7 @@ void microcode_bsp_resume(void)
 	if (uci->valid && uci->mc)
 		microcode_ops->apply_microcode(cpu);
 	else if (!uci->mc)
-		reload_early_microcode();
+		reload_early_microcode(cpu);
 }
 
 static struct syscore_ops mc_syscore_ops = {
arch/x86/kernel/crash.c +1 -16
index 91b3483e5085..e40bb50c5c4f 100644
@@ -35,7 +35,6 @@
 #include <linux/kdebug.h>
 #include <asm/cpu.h>
 #include <asm/reboot.h>
-#include <asm/virtext.h>
 #include <asm/intel_pt.h>
 
 /* Used while preparing memory map entries for second kernel */
@@ -86,15 +85,6 @@ static void kdump_nmi_callback(int cpu, struct pt_regs *regs)
 	 */
 	cpu_crash_vmclear_loaded_vmcss();
 
-	/* Disable VMX or SVM if needed.
-	 *
-	 * We need to disable virtualization on all CPUs.
-	 * Having VMX or SVM enabled on any CPU may break rebooting
-	 * after the kdump kernel has finished its task.
-	 */
-	cpu_emergency_vmxoff();
-	cpu_emergency_svm_disable();
-
 	/*
 	 * Disable Intel PT to stop its logging
 	 */
@@ -153,12 +143,7 @@ void native_machine_crash_shutdown(struct pt_regs *regs)
 	 */
 	cpu_crash_vmclear_loaded_vmcss();
 
-	/* Booting kdump kernel with VMX or SVM enabled won't work,
-	 * because (among other limitations) we can't disable paging
-	 * with the virt flags.
-	 */
-	cpu_emergency_vmxoff();
-	cpu_emergency_svm_disable();
+	cpu_emergency_disable_virtualization();
 
 	/*
 	 * Disable Intel PT to stop its logging
arch/x86/kernel/kprobes/opt.c +3 -3
index 544bd41a514c..36b5a493e5b4 100644
@@ -56,8 +56,8 @@ unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr)
 		/* This function only handles jump-optimized kprobe */
 		if (kp && kprobe_optimized(kp)) {
 			op = container_of(kp, struct optimized_kprobe, kp);
-			/* If op->list is not empty, op is under optimizing */
-			if (list_empty(&op->list))
+			/* If op is optimized or under unoptimizing */
+			if (list_empty(&op->list) || optprobe_queued_unopt(op))
 				goto found;
 		}
 	}
@@ -328,7 +328,7 @@ int arch_check_optimized_kprobe(struct optimized_kprobe *op)
 
 	for (i = 1; i < op->optinsn.size; i++) {
 		p = get_kprobe(op->kp.addr + i);
-		if (p && !kprobe_disabled(p))
+		if (p && !kprobe_disarmed(p))
 			return -EEXIST;
 	}
 
arch/x86/kernel/reboot.c +64 -24

148 lines not on this page · raw message

arch/x86/kernel/smp.c +3 -3
index b2b87b91f336..c94ed0b37bcd 100644
@@ -33,7 +33,7 @@
 #include <asm/mce.h>
 #include <asm/trace/irq_vectors.h>
 #include <asm/kexec.h>
-#include <asm/virtext.h>
+#include <asm/reboot.h>
 
 /*
  *	Some notes on x86 processor bugs affecting SMP operation:
@@ -163,7 +163,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)
 	if (raw_smp_processor_id() == atomic_read(&stopping_cpu))
 		return NMI_HANDLED;
 
-	cpu_emergency_vmxoff();
+	cpu_emergency_disable_virtualization();
 	stop_this_cpu(NULL);
 
 	return NMI_HANDLED;
@@ -176,7 +176,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)
 asmlinkage __visible void smp_reboot_interrupt(void)
 {
 	ipi_entering_ack_irq();
-	cpu_emergency_vmxoff();
+	cpu_emergency_disable_virtualization();
 	stop_this_cpu(NULL);
 	irq_exit();
 }
arch/x86/kernel/sysfb_efi.c +8 -0
index 897da526e40e..dd8d7636c542 100644
@@ -265,6 +265,14 @@ static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
 					"Lenovo ideapad D330-10IGM"),
 		},
 	},
+	{
+		/* Lenovo IdeaPad Duet 3 10IGL5 with 1200x1920 portrait screen */
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
+					"IdeaPad Duet 3 10IGL5"),
+		},
+	},
 	{},
 };
 
arch/x86/um/vdso/um_vdso.c +8 -4
index 7c441b59d375..be99ff25c503 100644
@@ -20,8 +20,10 @@ int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
 {
 	long ret;
 
-	asm("syscall" : "=a" (ret) :
-		"0" (__NR_clock_gettime), "D" (clock), "S" (ts) : "memory");
+	asm("syscall"
+		: "=a" (ret)
+		: "0" (__NR_clock_gettime), "D" (clock), "S" (ts)
+		: "rcx", "r11", "memory");
 
 	return ret;
 }
@@ -32,8 +34,10 @@ int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
 {
 	long ret;
 
-	asm("syscall" : "=a" (ret) :
-		"0" (__NR_gettimeofday), "D" (tv), "S" (tz) : "memory");
+	asm("syscall"
+		: "=a" (ret)
+		: "0" (__NR_gettimeofday), "D" (tv), "S" (tz)
+		: "rcx", "r11", "memory");
 
 	return ret;
 }
block/bio-integrity.c +1 -0
index 2e22a3f7466a..469e30a6d3cd 100644
@@ -444,6 +444,7 @@ int bio_integrity_clone(struct bio *bio, struct bio *bio_src,
 
 	bip->bip_vcnt = bip_src->bip_vcnt;
 	bip->bip_iter = bip_src->bip_iter;
+	bip->bip_flags = bip_src->bip_flags & ~BIP_BLOCK_INTEGRITY;
 
 	return 0;
 }
block/blk-mq-sched.c +1 -2
index d89a757cbde0..dfa0a21a1fe4 100644
@@ -51,8 +51,7 @@ void blk_mq_sched_assign_ioc(struct request *rq, struct bio *bio)
 }
 
 /*
- * Mark a hardware queue as needing a restart. For shared queues, maintain
- * a count of how many hardware queues are marked for restart.
+ * Mark a hardware queue as needing a restart.
  */
 void blk_mq_sched_mark_restart_hctx(struct blk_mq_hw_ctx *hctx)
 {
crypto/rsa-pkcs1pad.c +15 -19
index 812476e46821..444a3c630924 100644
@@ -216,16 +216,14 @@ static void pkcs1pad_encrypt_sign_complete_cb(
 		struct crypto_async_request *child_async_req, int err)
 {
 	struct akcipher_request *req = child_async_req->data;
-	struct crypto_async_request async_req;
 
 	if (err == -EINPROGRESS)
-		return;
+		goto out;
+
+	err = pkcs1pad_encrypt_sign_complete(req, err);
 
-	async_req.data = req->base.data;
-	async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req));
-	async_req.flags = child_async_req->flags;
-	req->base.complete(&async_req,
-			pkcs1pad_encrypt_sign_complete(req, err));
+out:
+	akcipher_request_complete(req, err);
 }
 
 static int pkcs1pad_encrypt(struct akcipher_request *req)
@@ -334,15 +332,14 @@ static void pkcs1pad_decrypt_complete_cb(
 		struct crypto_async_request *child_async_req, int err)
 {
 	struct akcipher_request *req = child_async_req->data;
-	struct crypto_async_request async_req;
 
 	if (err == -EINPROGRESS)
-		return;
+		goto out;
+
+	err = pkcs1pad_decrypt_complete(req, err);
 
-	async_req.data = req->base.data;
-	async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req));
-	async_req.flags = child_async_req->flags;
-	req->base.complete(&async_req, pkcs1pad_decrypt_complete(req, err));
+out:
+	akcipher_request_complete(req, err);
 }
 
 static int pkcs1pad_decrypt(struct akcipher_request *req)
@@ -500,15 +497,14 @@ static void pkcs1pad_verify_complete_cb(
 		struct crypto_async_request *child_async_req, int err)
 {
 	struct akcipher_request *req = child_async_req->data;
-	struct crypto_async_request async_req;
 
 	if (err == -EINPROGRESS)
-		return;
+		goto out;
 
-	async_req.data = req->base.data;
-	async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req));
-	async_req.flags = child_async_req->flags;
-	req->base.complete(&async_req, pkcs1pad_verify_complete(req, err));
+	err = pkcs1pad_verify_complete(req, err);
+
+out:
+	akcipher_request_complete(req, err);
 }
 
 /*
crypto/seqiv.c +1 -1
index 39dbf2f7e5f5..ca68608ab14e 100644
@@ -30,7 +30,7 @@ static void seqiv_aead_encrypt_complete2(struct aead_request *req, int err)
 	struct aead_request *subreq = aead_request_ctx(req);
 	struct crypto_aead *geniv;
 
-	if (err == -EINPROGRESS)
+	if (err == -EINPROGRESS || err == -EBUSY)
 		return;
 
 	if (err)
drivers/acpi/acpica/Makefile +1 -1
index 71f6f2624deb..8ce51f0f40ce 100644
@@ -3,7 +3,7 @@
 # Makefile for ACPICA Core interpreter
 #
 
-ccflags-y			:= -Os -D_LINUX -DBUILDING_ACPICA
+ccflags-y			:= -D_LINUX -DBUILDING_ACPICA
 ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT
 
 # use acpi.o to put all files here into acpi.o modparam namespace
drivers/acpi/acpica/hwvalid.c +4 -3
index 24f9b61aa404..b081177c421a 100644
@@ -23,8 +23,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width);
  *
  * The table is used to implement the Microsoft port access rules that
  * first appeared in Windows XP. Some ports are always illegal, and some
- * ports are only illegal if the BIOS calls _OSI with a win_XP string or
- * later (meaning that the BIOS itelf is post-XP.)
+ * ports are only illegal if the BIOS calls _OSI with nothing newer than
+ * the specific _OSI strings.
  *
  * This provides ACPICA with the desired port protections and
  * Microsoft compatibility.
@@ -145,7 +145,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
 
 			/* Port illegality may depend on the _OSI calls made by the BIOS */
 
-			if (acpi_gbl_osi_data >= port_info->osi_dependency) {
+			if (port_info->osi_dependency == ACPI_ALWAYS_ILLEGAL ||
+			    acpi_gbl_osi_data == port_info->osi_dependency) {
 				ACPI_DEBUG_PRINT((ACPI_DB_VALUES,
 						  "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n",
 						  ACPI_FORMAT_UINT64(address),
drivers/acpi/acpica/nsrepair.c +7 -5
index ff2ab8fbec38..8de80bf7802b 100644
@@ -181,8 +181,9 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
 	 * Try to fix if there was no return object. Warning if failed to fix.
 	 */
 	if (!return_object) {
-		if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) {
-			if (package_index != ACPI_NOT_PACKAGE_ELEMENT) {
+		if (expected_btypes) {
+			if (!(expected_btypes & ACPI_RTYPE_NONE) &&
+			    package_index != ACPI_NOT_PACKAGE_ELEMENT) {
 				ACPI_WARN_PREDEFINED((AE_INFO,
 						      info->full_pathname,
 						      ACPI_WARN_ALWAYS,
@@ -196,14 +197,15 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
 				if (ACPI_SUCCESS(status)) {
 					return (AE_OK);	/* Repair was successful */
 				}
-			} else {
+			}
+
+			if (expected_btypes != ACPI_RTYPE_NONE) {
 				ACPI_WARN_PREDEFINED((AE_INFO,
 						      info->full_pathname,
 						      ACPI_WARN_ALWAYS,
 						      "Missing expected return value"));
+				return (AE_AML_NO_RETURN_VALUE);
 			}
-
-			return (AE_AML_NO_RETURN_VALUE);
 		}
 	}
 
drivers/acpi/battery.c +1 -1
index c0c533206e02..88f4040d6c1f 100644
@@ -478,7 +478,7 @@ static int extract_package(struct acpi_battery *battery,
 			u8 *ptr = (u8 *)battery + offsets[i].offset;
 			if (element->type == ACPI_TYPE_STRING ||
 			    element->type == ACPI_TYPE_BUFFER)
-				strncpy(ptr, element->string.pointer, 32);
+				strscpy(ptr, element->string.pointer, 32);
 			else if (element->type == ACPI_TYPE_INTEGER) {
 				strncpy(ptr, (u8 *)&element->integer.value,
 					sizeof(u64));
drivers/acpi/video_detect.c +1 -1
index 0ec74ab2a399..b4f16073ef43 100644
@@ -300,7 +300,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 	 .ident = "Lenovo Ideapad Z570",
 	 .matches = {
 		DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "102434U"),
+		DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"),
 		},
 	},
 	{
drivers/block/rbd.c +9 -11
index 9f1265ce2e36..6edd642b7ab6 100644
@@ -4381,8 +4381,7 @@ static void rbd_dev_release(struct device *dev)
 		module_put(THIS_MODULE);
 }
 
-static struct rbd_device *__rbd_dev_create(struct rbd_client *rbdc,
-					   struct rbd_spec *spec)
+static struct rbd_device *__rbd_dev_create(struct rbd_spec *spec)
 {
 	struct rbd_device *rbd_dev;
 
@@ -4421,9 +4420,6 @@ static struct rbd_device *__rbd_dev_create(struct rbd_client *rbdc,
 	rbd_dev->dev.parent = &rbd_root_dev;
 	device_initialize(&rbd_dev->dev);
 
-	rbd_dev->rbd_client = rbdc;
-	rbd_dev->spec = spec;
-
 	return rbd_dev;
 }
 
@@ -4436,12 +4432,10 @@ static struct rbd_device *rbd_dev_create(struct rbd_client *rbdc,
 {
 	struct rbd_device *rbd_dev;
 
-	rbd_dev = __rbd_dev_create(rbdc, spec);
+	rbd_dev = __rbd_dev_create(spec);
 	if (!rbd_dev)
 		return NULL;
 
-	rbd_dev->opts = opts;
-
 	/* get an id and fill in device name */
 	rbd_dev->dev_id = ida_simple_get(&rbd_dev_id_ida, 0,
 					 minor_to_rbd_dev_id(1 << MINORBITS),
@@ -4458,6 +4452,10 @@ static struct rbd_device *rbd_dev_create(struct rbd_client *rbdc,
 	/* we have a ref from do_rbd_add() */
 	__module_get(THIS_MODULE);
 
+	rbd_dev->rbd_client = rbdc;
+	rbd_dev->spec = spec;
+	rbd_dev->opts = opts;
+
 	dout("%s rbd_dev %p dev_id %d\n", __func__, rbd_dev, rbd_dev->dev_id);
 	return rbd_dev;
 
@@ -5618,7 +5616,7 @@ static int rbd_dev_probe_parent(struct rbd_device *rbd_dev, int depth)
 		goto out_err;
 	}
 
-	parent = __rbd_dev_create(rbd_dev->rbd_client, rbd_dev->parent_spec);
+	parent = __rbd_dev_create(rbd_dev->parent_spec);
 	if (!parent) {
 		ret = -ENOMEM;
 		goto out_err;
@@ -5628,8 +5626,8 @@ static int rbd_dev_probe_parent(struct rbd_device *rbd_dev, int depth)
 	 * Images related by parent/child relationships always share
 	 * rbd_client and spec/parent_spec, so bump their refcounts.
 	 */
-	__rbd_get_client(rbd_dev->rbd_client);
-	rbd_spec_get(rbd_dev->parent_spec);
+	parent->rbd_client = __rbd_get_client(rbd_dev->rbd_client);
+	parent->spec = rbd_spec_get(rbd_dev->parent_spec);
 
 	ret = rbd_dev_image_probe(parent, depth);
 	if (ret < 0)
drivers/clk/clk.c +11 -0
index 53ac3a0e741d..a8d68ac9d0de 100644
@@ -244,6 +244,17 @@ static bool clk_core_is_enabled(struct clk_core *core)
 		}
 	}
 
+	/*
+	 * This could be called with the enable lock held, or from atomic
+	 * context. If the parent isn't enabled already, we can't do
+	 * anything here. We can also assume this clock isn't enabled.
+	 */
+	if ((core->flags & CLK_OPS_PARENT_ENABLE) && core->parent)
+		if (!clk_core_is_enabled(core->parent)) {
+			ret = false;
+			goto done;
+		}
+
 	ret = core->ops->is_enabled(core->hw);
 done:
 	if (core->dev)
drivers/crypto/amcc/crypto4xx_core.c +4 -6
index cd00afb5786e..2c70a64cc831 100644
@@ -529,7 +529,6 @@ static void crypto4xx_cipher_done(struct crypto4xx_device *dev,
 {
 	struct skcipher_request *req;
 	struct scatterlist *dst;
-	dma_addr_t addr;
 
 	req = skcipher_request_cast(pd_uinfo->async_req);
 
@@ -538,8 +537,8 @@ static void crypto4xx_cipher_done(struct crypto4xx_device *dev,
 					  req->cryptlen, req->dst);
 	} else {
 		dst = pd_uinfo->dest_va;
-		addr = dma_map_page(dev->core_dev->device, sg_page(dst),
-				    dst->offset, dst->length, DMA_FROM_DEVICE);
+		dma_unmap_page(dev->core_dev->device, pd->dest, dst->length,
+			       DMA_FROM_DEVICE);
 	}
 
 	if (pd_uinfo->sa_va->sa_command_0.bf.save_iv == SA_SAVE_IV) {
@@ -564,10 +563,9 @@ static void crypto4xx_ahash_done(struct crypto4xx_device *dev,
 	struct ahash_request *ahash_req;
 
 	ahash_req = ahash_request_cast(pd_uinfo->async_req);
-	ctx  = crypto_tfm_ctx(ahash_req->base.tfm);
+	ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(ahash_req));
 
-	crypto4xx_copy_digest_to_dst(ahash_req->result, pd_uinfo,
-				     crypto_tfm_ctx(ahash_req->base.tfm));
+	crypto4xx_copy_digest_to_dst(ahash_req->result, pd_uinfo, ctx);
 	crypto4xx_ret_sg_desc(dev, pd_uinfo);
 
 	if (pd_uinfo->state & PD_ENTRY_BUSY)
drivers/firmware/google/framebuffer-coreboot.c +1 -3
index b8b49c067157..58b1dae60c19 100644
@@ -51,9 +51,7 @@ static int framebuffer_probe(struct coreboot_device *dev)
 		    fb->green_mask_pos     == formats[i].green.offset &&
 		    fb->green_mask_size    == formats[i].green.length &&
 		    fb->blue_mask_pos      == formats[i].blue.offset &&
-		    fb->blue_mask_size     == formats[i].blue.length &&
-		    fb->reserved_mask_pos  == formats[i].transp.offset &&
-		    fb->reserved_mask_size == formats[i].transp.length)
+		    fb->blue_mask_size     == formats[i].blue.length)
 			pdata.format = formats[i].name;
 	}
 	if (!pdata.format)
drivers/gpio/gpio-vf610.c +1 -1
index f7692999df47..01865b3e0a5f 100644
@@ -279,7 +279,7 @@ static int vf610_gpio_probe(struct platform_device *pdev)
 	gc = &port->gc;
 	gc->of_node = np;
 	gc->parent = dev;
-	gc->label = "vf610-gpio";
+	gc->label = dev_name(dev);
 	gc->ngpio = VF610_GPIO_PER_PORT;
 	gc->base = of_alias_get_id(np, "gpio") * VF610_GPIO_PER_PORT;
 
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -2
index 57678e6dcdc4..98d51bc20417 100644
@@ -773,12 +773,14 @@ static int dm_resume(void *handle)
 	list_for_each_entry(connector, &ddev->mode_config.connector_list, head) {
 		aconnector = to_amdgpu_dm_connector(connector);
 
+		if (!aconnector->dc_link)
+			continue;
+
 		/*
 		 * this is the case when traversing through already created
 		 * MST connectors, should be skipped
 		 */
-		if (aconnector->dc_link &&
-		    aconnector->dc_link->type == dc_connection_mst_branch)
+		if (aconnector->dc_link->type == dc_connection_mst_branch)
 			continue;
 
 		mutex_lock(&aconnector->hpd_lock);
drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c +5 -1
index 07e3a8aaa0e4..dfc0ada99b5c 100644
@@ -437,7 +437,11 @@ static int __init stdpxxxx_ge_b850v3_init(void)
 	if (ret)
 		return ret;
 
-	return i2c_add_driver(&stdp2690_ge_b850v3_fw_driver);
+	ret = i2c_add_driver(&stdp2690_ge_b850v3_fw_driver);
+	if (ret)
+		i2c_del_driver(&stdp4028_ge_b850v3_fw_driver);
+
+	return ret;
 }
 module_init(stdpxxxx_ge_b850v3_init);
 
drivers/gpu/drm/drm_mipi_dsi.c +52 -0

58 lines not on this page · raw message

drivers/gpu/drm/mediatek/mtk_drm_drv.c +1 -0
index d14321763607..eeb1277794db 100644
@@ -425,6 +425,7 @@ static int mtk_drm_bind(struct device *dev)
 err_deinit:
 	mtk_drm_kms_deinit(drm);
 err_free:
+	private->drm = NULL;
 	drm_dev_put(drm);
 	return ret;
 }
drivers/gpu/drm/mediatek/mtk_drm_gem.c +0 -2
index 259b7b0de1d2..b09a37a38e0a 100644
@@ -148,8 +148,6 @@ static int mtk_drm_gem_object_mmap(struct drm_gem_object *obj,
 
 	ret = dma_mmap_attrs(priv->dma_dev, vma, mtk_gem->cookie,
 			     mtk_gem->dma_addr, obj->size, mtk_gem->dma_attrs);
-	if (ret)
-		drm_gem_vm_close(vma);
 
 	return ret;
 }
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +2 -0
index 3c3b7f7013e8..2efdc3c9f291 100644
@@ -1477,6 +1477,8 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
 	}
 
 	pstates = kzalloc(sizeof(*pstates) * DPU_STAGE_MAX * 4, GFP_KERNEL);
+	if (!pstates)
+		return -ENOMEM;
 
 	dpu_crtc = to_dpu_crtc(crtc);
 	cstate = to_dpu_crtc_state(state);
drivers/gpu/drm/msm/dsi/dsi_host.c +3 -0
index 56cfa0a03fd5..059578faa1c6 100644
@@ -1883,6 +1883,9 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
 
 	/* setup workqueue */
 	msm_host->workqueue = alloc_ordered_workqueue("dsi_drm_work", 0);
+	if (!msm_host->workqueue)
+		return -ENOMEM;
+
 	INIT_WORK(&msm_host->err_work, dsi_err_worker);
 	INIT_WORK(&msm_host->hpd_work, dsi_hpd_worker);
 
drivers/gpu/drm/msm/hdmi/hdmi.c +4 -0
index e03f08757b25..b75067854b4d 100644
@@ -254,6 +254,10 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 
 	hdmi->workq = alloc_ordered_workqueue("msm_hdmi", 0);
+	if (!hdmi->workq) {
+		ret = -ENOMEM;
+		goto fail;
+	}
 
 	hdmi->i2c = msm_hdmi_i2c_init(hdmi);
 	if (IS_ERR(hdmi->i2c)) {
drivers/gpu/drm/msm/msm_fence.c +1 -1
index 6c11be79574e..ef79c3661acb 100644
@@ -31,7 +31,7 @@ msm_fence_context_alloc(struct drm_device *dev, const char *name)
 		return ERR_PTR(-ENOMEM);
 
 	fctx->dev = dev;
-	strncpy(fctx->name, name, sizeof(fctx->name));
+	strscpy(fctx->name, name, sizeof(fctx->name));
 	fctx->context = dma_fence_context_alloc(1);
 	init_waitqueue_head(&fctx->event);
 	spin_lock_init(&fctx->spinlock);
drivers/gpu/drm/mxsfb/Kconfig +1 -0
index 3ed6849d63cb..1a2805c7a0eb 100644
@@ -7,6 +7,7 @@ config DRM_MXSFB
 	tristate "i.MX23/i.MX28/i.MX6SX MXSFB LCD controller"
 	depends on DRM && OF
 	depends on COMMON_CLK
+	depends on ARCH_MXS || ARCH_MXC || COMPILE_TEST
 	select DRM_MXS
 	select DRM_KMS_HELPER
 	select DRM_KMS_CMA_HELPER
drivers/gpu/drm/radeon/atombios_encoders.c +3 -2
index 79aef5c063fa..5f1b503def55 100644
@@ -2188,11 +2188,12 @@ int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder, int fe_idx)
 
 	/*
 	 * On DCE32 any encoder can drive any block so usually just use crtc id,
-	 * but Apple thinks different at least on iMac10,1, so there use linkb,
+	 * but Apple thinks different at least on iMac10,1 and iMac11,2, so there use linkb,
 	 * otherwise the internal eDP panel will stay dark.
 	 */
 	if (ASIC_IS_DCE32(rdev)) {
-		if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1"))
+		if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1") ||
+		    dmi_match(DMI_PRODUCT_NAME, "iMac11,2"))
 			enc_idx = (dig->linkb) ? 1 : 0;
 		else
 			enc_idx = radeon_crtc->crtc_id;
drivers/gpu/drm/radeon/radeon_device.c +1 -0
index cc1c07963116..bcca0dd67fd1 100644
@@ -1015,6 +1015,7 @@ void radeon_atombios_fini(struct radeon_device *rdev)
 {
 	if (rdev->mode_info.atom_context) {
 		kfree(rdev->mode_info.atom_context->scratch);
+		kfree(rdev->mode_info.atom_context->iio);
 	}
 	kfree(rdev->mode_info.atom_context);
 	rdev->mode_info.atom_context = NULL;
drivers/gpu/drm/vc4/vc4_dpi.c +38 -28

73 lines not on this page · raw message

drivers/gpu/host1x/hw/syncpt_hw.c +0 -3
index a23bb3352d02..b40a537884dd 100644
@@ -113,9 +113,6 @@ static void syncpt_assign_to_channel(struct host1x_syncpt *sp,
 #if HOST1X_HW >= 6
 	struct host1x *host = sp->host;
 
-	if (!host->hv_regs)
-		return;
-
 	host1x_sync_writel(host,
 			   HOST1X_SYNC_SYNCPT_CH_APP_CH(ch ? ch->id : 0xff),
 			   HOST1X_SYNC_SYNCPT_CH_APP(sp->id));
drivers/gpu/ipu-v3/ipu-common.c +1 -0
index 0a7d4395d427..f6e74ff7ef75 100644
@@ -1238,6 +1238,7 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
 		pdev = platform_device_alloc(reg->name, id++);
 		if (!pdev) {
 			ret = -ENOMEM;
+			of_node_put(of_node);
 			goto err_register;
 		}
 
drivers/hid/hid-asus.c +31 -7
index 800b2364e29e..4dddf3ce32d7 100644
@@ -84,6 +84,7 @@ struct asus_kbd_leds {
 	struct hid_device *hdev;
 	struct work_struct work;
 	unsigned int brightness;
+	spinlock_t lock;
 	bool removed;
 };
 
@@ -313,24 +314,42 @@ static int asus_kbd_get_functions(struct hid_device *hdev,
 	return ret;
 }
 
+static void asus_schedule_work(struct asus_kbd_leds *led)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&led->lock, flags);
+	if (!led->removed)
+		schedule_work(&led->work);
+	spin_unlock_irqrestore(&led->lock, flags);
+}
+
 static void asus_kbd_backlight_set(struct led_classdev *led_cdev,
 				   enum led_brightness brightness)
 {
 	struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds,
 						 cdev);
-	if (led->brightness == brightness)
-		return;
+	unsigned long flags;
 
+	spin_lock_irqsave(&led->lock, flags);
 	led->brightness = brightness;
-	schedule_work(&led->work);
+	spin_unlock_irqrestore(&led->lock, flags);
+
+	asus_schedule_work(led);
 }
 
 static enum led_brightness asus_kbd_backlight_get(struct led_classdev *led_cdev)
 {
 	struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds,
 						 cdev);
+	enum led_brightness brightness;
+	unsigned long flags;
+
+	spin_lock_irqsave(&led->lock, flags);
+	brightness = led->brightness;
+	spin_unlock_irqrestore(&led->lock, flags);
 
-	return led->brightness;
+	return brightness;
 }
 
 static void asus_kbd_backlight_work(struct work_struct *work)
@@ -338,11 +357,11 @@ static void asus_kbd_backlight_work(struct work_struct *work)
 	struct asus_kbd_leds *led = container_of(work, struct asus_kbd_leds, work);
 	u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
 	int ret;
+	unsigned long flags;
 
-	if (led->removed)
-		return;
-
+	spin_lock_irqsave(&led->lock, flags);
 	buf[4] = led->brightness;
+	spin_unlock_irqrestore(&led->lock, flags);
 
 	ret = asus_kbd_set_report(led->hdev, buf, sizeof(buf));
 	if (ret < 0)
@@ -383,6 +402,7 @@ static int asus_kbd_register_leds(struct hid_device *hdev)
 	drvdata->kbd_backlight->cdev.brightness_set = asus_kbd_backlight_set;
 	drvdata->kbd_backlight->cdev.brightness_get = asus_kbd_backlight_get;
 	INIT_WORK(&drvdata->kbd_backlight->work, asus_kbd_backlight_work);
+	spin_lock_init(&drvdata->kbd_backlight->lock);
 
 	ret = devm_led_classdev_register(&hdev->dev, &drvdata->kbd_backlight->cdev);
 	if (ret < 0) {
@@ -692,9 +712,13 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
 static void asus_remove(struct hid_device *hdev)
 {
 	struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
+	unsigned long flags;
 
 	if (drvdata->kbd_backlight) {
+		spin_lock_irqsave(&drvdata->kbd_backlight->lock, flags);
 		drvdata->kbd_backlight->removed = true;
+		spin_unlock_irqrestore(&drvdata->kbd_backlight->lock, flags);
+
 		cancel_work_sync(&drvdata->kbd_backlight->work);
 	}
 
drivers/hwmon/ltc2945.c +2 -0
index 1b92e4f6e234..efabe514ec56 100644
@@ -257,6 +257,8 @@ static ssize_t ltc2945_set_value(struct device *dev,
 
 	/* convert to register value, then clamp and write result */
 	regval = ltc2945_val_to_reg(dev, reg, val);
+	if (regval < 0)
+		return regval;
 	if (is_power_reg(reg)) {
 		regval = clamp_val(regval, 0, 0xffffff);
 		regbuf[0] = regval >> 16;
drivers/hwmon/mlxreg-fan.c +6 -0
index e57b0c5119ce..ec68dace3cf9 100644
@@ -125,6 +125,12 @@ mlxreg_fan_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
 			if (err)
 				return err;
 
+			if (MLXREG_FAN_GET_FAULT(regval, tacho->mask)) {
+				/* FAN is broken - return zero for FAN speed. */
+				*val = 0;
+				return 0;
+			}
+
 			*val = MLXREG_FAN_GET_RPM(regval, fan->divider,
 						  fan->samples);
 			break;
drivers/iio/accel/mma9551_core.c +8 -2
index c34c5ce8123b..19b4fbc682e6 100644
@@ -304,9 +304,12 @@ int mma9551_read_config_word(struct i2c_client *client, u8 app_id,
 
 	ret = mma9551_transfer(client, app_id, MMA9551_CMD_READ_CONFIG,
 			       reg, NULL, 0, (u8 *)&v, 2);
+	if (ret < 0)
+		return ret;
+
 	*val = be16_to_cpu(v);
 
-	return ret;
+	return 0;
 }
 EXPORT_SYMBOL(mma9551_read_config_word);
 
@@ -362,9 +365,12 @@ int mma9551_read_status_word(struct i2c_client *client, u8 app_id,
 
 	ret = mma9551_transfer(client, app_id, MMA9551_CMD_READ_STATUS,
 			       reg, NULL, 0, (u8 *)&v, 2);
+	if (ret < 0)
+		return ret;
+
 	*val = be16_to_cpu(v);
 
-	return ret;
+	return 0;
 }
 EXPORT_SYMBOL(mma9551_read_status_word);
 
drivers/input/touchscreen/ads7846.c +4 -9
index b536768234b7..fe6c9e187041 100644
@@ -790,14 +790,8 @@ static void ads7846_report_state(struct ads7846 *ts)
 	if (x == MAX_12BIT)
 		x = 0;
 
-	if (ts->model == 7843) {
+	if (ts->model == 7843 || ts->model == 7845) {
 		Rt = ts->pressure_max / 2;
-	} else if (ts->model == 7845) {
-		if (get_pendown_state(ts))
-			Rt = ts->pressure_max / 2;
-		else
-			Rt = 0;
-		dev_vdbg(&ts->spi->dev, "x/y: %d/%d, PD %d\n", x, y, Rt);
 	} else if (likely(x && z1)) {
 		/* compute touch pressure resistance using equation #2 */
 		Rt = z2;
@@ -1374,8 +1368,9 @@ static int ads7846_probe(struct spi_device *spi)
 			pdata->y_min ? : 0,
 			pdata->y_max ? : MAX_12BIT,
 			0, 0);
-	input_set_abs_params(input_dev, ABS_PRESSURE,
-			pdata->pressure_min, pdata->pressure_max, 0, 0);
+	if (ts->model != 7845)
+		input_set_abs_params(input_dev, ABS_PRESSURE,
+				pdata->pressure_min, pdata->pressure_max, 0, 0);
 
 	ads7846_setup_spi_msg(ts, pdata);
 
drivers/irqchip/irq-alpine-msi.c +1 -0
index ede02dc2bcd0..1819bb1d2723 100644
@@ -199,6 +199,7 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv,
 	}
 
 	gic_domain = irq_find_host(gic_node);
+	of_node_put(gic_node);
 	if (!gic_domain) {
 		pr_err("Failed to find the GIC domain\n");
 		return -ENXIO;
drivers/irqchip/irq-bcm7120-l2.c +2 -1
index 8968e5e93fcb..fefafe1af116 100644
@@ -271,7 +271,8 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
 		flags |= IRQ_GC_BE_IO;
 
 	ret = irq_alloc_domain_generic_chips(data->domain, IRQS_PER_WORD, 1,
-				dn->full_name, handle_level_irq, clr, 0, flags);
+				dn->full_name, handle_level_irq, clr,
+				IRQ_LEVEL, flags);
 	if (ret) {
 		pr_err("failed to allocate generic irq chip\n");
 		goto out_free_domain;
drivers/irqchip/irq-brcmstb-l2.c +5 -1
index 83364fedbf0a..3f1ae63233cb 100644
@@ -169,6 +169,7 @@ static int __init brcmstb_l2_intc_of_init(struct device_node *np,
 					  *init_params)
 {
 	unsigned int clr = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
+	unsigned int set = 0;
 	struct brcmstb_l2_intc_data *data;
 	struct irq_chip_type *ct;
 	int ret;
@@ -216,9 +217,12 @@ static int __init brcmstb_l2_intc_of_init(struct device_node *np,
 	if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN))
 		flags |= IRQ_GC_BE_IO;
 
+	if (init_params->handler == handle_level_irq)
+		set |= IRQ_LEVEL;
+
 	/* Allocate a single Generic IRQ chip for this node */
 	ret = irq_alloc_domain_generic_chips(data->domain, 32, 1,
-			np->full_name, init_params->handler, clr, 0, flags);
+			np->full_name, init_params->handler, clr, set, flags);
 	if (ret) {
 		pr_err("failed to allocate generic irq chip\n");
 		goto out_free_domain;
drivers/irqchip/irq-mvebu-gicp.c +1 -0
index 3be5c5dba1da..5caec411059f 100644
@@ -223,6 +223,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
 	}
 
 	parent_domain = irq_find_host(irq_parent_dn);
+	of_node_put(irq_parent_dn);
 	if (!parent_domain) {
 		dev_err(&pdev->dev, "failed to find parent IRQ domain\n");
 		return -ENODEV;
drivers/md/dm-cache-target.c +4 -0
index df7bc45bc0ce..b3371812a215 100644
@@ -1905,6 +1905,7 @@ static void process_deferred_bios(struct work_struct *ws)
 
 		else
 			commit_needed = process_bio(cache, bio) || commit_needed;
+		cond_resched();
 	}
 
 	if (commit_needed)
@@ -1927,6 +1928,7 @@ static void requeue_deferred_bios(struct cache *cache)
 	while ((bio = bio_list_pop(&bios))) {
 		bio->bi_status = BLK_STS_DM_REQUEUE;
 		bio_endio(bio);
+		cond_resched();
 	}
 }
 
@@ -1967,6 +1969,8 @@ static void check_migrations(struct work_struct *ws)
 		r = mg_start(cache, op, NULL);
 		if (r)
 			break;
+
+		cond_resched();
 	}
 }
 
drivers/md/dm-flakey.c +18 -12
index 2fcf62fb2844..1f1614af5e97 100644
@@ -301,8 +301,11 @@ static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc)
 	 */
 	bio_for_each_segment(bvec, bio, iter) {
 		if (bio_iter_len(bio, iter) > corrupt_bio_byte) {
-			char *segment = (page_address(bio_iter_page(bio, iter))
-					 + bio_iter_offset(bio, iter));
+			char *segment;
+			struct page *page = bio_iter_page(bio, iter);
+			if (unlikely(page == ZERO_PAGE(0)))
+				break;
+			segment = (page_address(page) + bio_iter_offset(bio, iter));
 			segment[corrupt_bio_byte] = fc->corrupt_bio_value;
 			DMDEBUG("Corrupting data bio=%p by writing %u to byte %u "
 				"(rw=%c bi_opf=%u bi_sector=%llu size=%u)\n",
@@ -364,9 +367,11 @@ static int flakey_map(struct dm_target *ti, struct bio *bio)
 		/*
 		 * Corrupt matching writes.
 		 */
-		if (fc->corrupt_bio_byte && (fc->corrupt_bio_rw == WRITE)) {
-			if (all_corrupt_bio_flags_match(bio, fc))
-				corrupt_bio_data(bio, fc);
+		if (fc->corrupt_bio_byte) {
+			if (fc->corrupt_bio_rw == WRITE) {
+				if (all_corrupt_bio_flags_match(bio, fc))
+					corrupt_bio_data(bio, fc);
+			}
 			goto map_bio;
 		}
 
@@ -397,13 +402,14 @@ static int flakey_end_io(struct dm_target *ti, struct bio *bio,
 	}
 
 	if (!*error && pb->bio_submitted && (bio_data_dir(bio) == READ)) {
-		if (fc->corrupt_bio_byte && (fc->corrupt_bio_rw == READ) &&
-		    all_corrupt_bio_flags_match(bio, fc)) {
-			/*
-			 * Corrupt successful matching READs while in down state.
-			 */
-			corrupt_bio_data(bio, fc);
-
+		if (fc->corrupt_bio_byte) {
+			if ((fc->corrupt_bio_rw == READ) &&
+			    all_corrupt_bio_flags_match(bio, fc)) {
+				/*
+				 * Corrupt successful matching READs while in down state.
+				 */
+				corrupt_bio_data(bio, fc);
+			}
 		} else if (!test_bit(DROP_WRITES, &fc->flags) &&
 			   !test_bit(ERROR_WRITES, &fc->flags)) {
 			/*
drivers/md/dm-thin.c +2 -0
index 386cb3395378..969ea013c74e 100644
@@ -2222,6 +2222,7 @@ static void process_thin_deferred_bios(struct thin_c *tc)
 			throttle_work_update(&pool->throttle);
 			dm_pool_issue_prefetches(pool->pmd);
 		}
+		cond_resched();
 	}
 	blk_finish_plug(&plug);
 }
@@ -2305,6 +2306,7 @@ static void process_thin_deferred_cells(struct thin_c *tc)
 			else
 				pool->process_cell(tc, cell);
 		}
+		cond_resched();
 	} while (!list_empty(&cells));
 }
 
drivers/md/dm.c +0 -1
index 324d1dd58e2b..3d9a77f4e20f 100644
@@ -279,7 +279,6 @@ static int __init local_init(void)
 
 static void local_exit(void)
 {
-	flush_scheduled_work();
 	destroy_workqueue(deferred_remove_workqueue);
 
 	kmem_cache_destroy(_rq_cache);
drivers/media/i2c/ov7670.c +1 -1
index 1f71c14c8aab..4f906d25ce5c 100644
@@ -1750,7 +1750,7 @@ static int ov7670_parse_dt(struct device *dev,
 
 	if (bus_cfg.bus_type != V4L2_MBUS_PARALLEL) {
 		dev_err(dev, "Unsupported media bus type\n");
-		return ret;
+		return -EINVAL;
 	}
 	info->mbus_config = bus_cfg.bus.parallel.flags;
 
drivers/media/i2c/ov772x.c +1 -2
index 4eae5f2f7d31..11deaec9afbf 100644
@@ -1424,7 +1424,7 @@ static int ov772x_probe(struct i2c_client *client,
 	priv->subdev.ctrl_handler = &priv->hdl;
 	if (priv->hdl.error) {
 		ret = priv->hdl.error;
-		goto error_mutex_destroy;
+		goto error_ctrl_free;
 	}
 
 	priv->clk = clk_get(&client->dev, NULL);
@@ -1473,7 +1473,6 @@ static int ov772x_probe(struct i2c_client *client,
 	clk_put(priv->clk);
 error_ctrl_free:
 	v4l2_ctrl_handler_free(&priv->hdl);
-error_mutex_destroy:
 	mutex_destroy(&priv->lock);
 
 	return ret;
drivers/media/pci/intel/ipu3/ipu3-cio2.c +3 -0
index cdf4d07343a7..070ddb52c823 100644
@@ -1860,6 +1860,9 @@ static void cio2_pci_remove(struct pci_dev *pci_dev)
 	v4l2_device_unregister(&cio2->v4l2_dev);
 	media_device_cleanup(&cio2->media_dev);
 	mutex_destroy(&cio2->lock);
+
+	pm_runtime_forbid(&pci_dev->dev);
+	pm_runtime_get_noresume(&pci_dev->dev);
 }
 
 static int __maybe_unused cio2_runtime_suspend(struct device *dev)
drivers/media/platform/omap3isp/isp.c +9 -0
index 00e52f0b8251..b559cc179d70 100644
@@ -2247,7 +2247,16 @@ static int isp_probe(struct platform_device *pdev)
 
 	/* Regulators */
 	isp->isp_csiphy1.vdd = devm_regulator_get(&pdev->dev, "vdd-csiphy1");
+	if (IS_ERR(isp->isp_csiphy1.vdd)) {
+		ret = PTR_ERR(isp->isp_csiphy1.vdd);
+		goto error;
+	}
+
 	isp->isp_csiphy2.vdd = devm_regulator_get(&pdev->dev, "vdd-csiphy2");
+	if (IS_ERR(isp->isp_csiphy2.vdd)) {
+		ret = PTR_ERR(isp->isp_csiphy2.vdd);
+		goto error;
+	}
 
 	/* Clocks
 	 *
drivers/media/rc/ene_ir.c +2 -1
index 71b8c9bbf6c4..8cf2a5c0575a 100644
@@ -1116,6 +1116,8 @@ static void ene_remove(struct pnp_dev *pnp_dev)
 	struct ene_device *dev = pnp_get_drvdata(pnp_dev);
 	unsigned long flags;
 
+	rc_unregister_device(dev->rdev);
+	del_timer_sync(&dev->tx_sim_timer);
 	spin_lock_irqsave(&dev->hw_lock, flags);
 	ene_rx_disable(dev);
 	ene_rx_restore_hw_buffer(dev);
@@ -1123,7 +1125,6 @@ static void ene_remove(struct pnp_dev *pnp_dev)
 
 	free_irq(dev->irq, dev);
 	release_region(dev->hw_io, ENE_IO_SIZE);
-	rc_unregister_device(dev->rdev);
 	kfree(dev);
 }
 
drivers/media/usb/siano/smsusb.c +1 -0
index 3071d9bc77f4..2df3d730ea76 100644
@@ -190,6 +190,7 @@ static void smsusb_stop_streaming(struct smsusb_device_t *dev)
 
 	for (i = 0; i < MAX_URBS; i++) {
 		usb_kill_urb(&dev->surbs[i].urb);
+		cancel_work_sync(&dev->surbs[i].wq);
 
 		if (dev->surbs[i].cb) {
 			smscore_putbuffer(dev->coredev, dev->surbs[i].cb);
drivers/media/usb/uvc/uvc_ctrl.c +20 -10
index cb6046481aed..84b1339c2c6e 100644
@@ -11,6 +11,7 @@
  *
  */
 
+#include <asm/barrier.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/module.h>
@@ -1280,17 +1281,12 @@ static void uvc_ctrl_send_slave_event(struct uvc_video_chain *chain,
 	uvc_ctrl_send_event(chain, handle, ctrl, mapping, val, changes);
 }
 
-static void uvc_ctrl_status_event_work(struct work_struct *work)
+void uvc_ctrl_status_event(struct uvc_video_chain *chain,
+			   struct uvc_control *ctrl, const u8 *data)
 {
-	struct uvc_device *dev = container_of(work, struct uvc_device,
-					      async_ctrl.work);
-	struct uvc_ctrl_work *w = &dev->async_ctrl;
-	struct uvc_video_chain *chain = w->chain;
 	struct uvc_control_mapping *mapping;
-	struct uvc_control *ctrl = w->ctrl;
 	struct uvc_fh *handle;
 	unsigned int i;
-	int ret;
 
 	mutex_lock(&chain->ctrl_mutex);
 
@@ -1298,7 +1294,7 @@ static void uvc_ctrl_status_event_work(struct work_struct *work)
 	ctrl->handle = NULL;
 
 	list_for_each_entry(mapping, &ctrl->info.mappings, list) {
-		s32 value = __uvc_ctrl_get_value(mapping, w->data);
+		s32 value = __uvc_ctrl_get_value(mapping, data);
 
 		/*
 		 * handle may be NULL here if the device sends auto-update
@@ -1317,6 +1313,20 @@ static void uvc_ctrl_status_event_work(struct work_struct *work)
 	}
 
 	mutex_unlock(&chain->ctrl_mutex);
+}
+
+static void uvc_ctrl_status_event_work(struct work_struct *work)
+{
+	struct uvc_device *dev = container_of(work, struct uvc_device,
+					      async_ctrl.work);
+	struct uvc_ctrl_work *w = &dev->async_ctrl;
+	int ret;
+
+	uvc_ctrl_status_event(w->chain, w->ctrl, w->data);
+
+	/* The barrier is needed to synchronize with uvc_status_stop(). */
+	if (smp_load_acquire(&dev->flush_status))
+		return;
 
 	/* Resubmit the URB. */
 	w->urb->interval = dev->int_ep->desc.bInterval;
@@ -1326,8 +1336,8 @@ static void uvc_ctrl_status_event_work(struct work_struct *work)
 			   ret);
 }
 
-bool uvc_ctrl_status_event(struct urb *urb, struct uvc_video_chain *chain,
-			   struct uvc_control *ctrl, const u8 *data)
+bool uvc_ctrl_status_event_async(struct urb *urb, struct uvc_video_chain *chain,
+				 struct uvc_control *ctrl, const u8 *data)
 {
 	struct uvc_device *dev = chain->dev;
 	struct uvc_ctrl_work *w = &dev->async_ctrl;
drivers/media/usb/uvc/uvc_driver.c +19 -29

84 lines not on this page · raw message

drivers/media/usb/uvc/uvc_entity.c +1 -1
index f2457953f27c..0d5aaaa7e2d9 100644
@@ -42,7 +42,7 @@ static int uvc_mc_create_links(struct uvc_video_chain *chain,
 			continue;
 
 		remote = uvc_entity_by_id(chain->dev, entity->baSourceID[i]);
-		if (remote == NULL)
+		if (remote == NULL || remote->num_pads == 0)
 			return -EINVAL;
 
 		source = (UVC_ENTITY_TYPE(remote) == UVC_TT_STREAMING)
drivers/media/usb/uvc/uvc_status.c +39 -1
index 883e4cab45e7..141ac1ffb42e 100644
@@ -11,6 +11,7 @@
  *
  */
 
+#include <asm/barrier.h>
 #include <linux/kernel.h>
 #include <linux/input.h>
 #include <linux/slab.h>
@@ -184,7 +185,8 @@ static bool uvc_event_control(struct urb *urb,
 
 	switch (status->bAttribute) {
 	case UVC_CTRL_VALUE_CHANGE:
-		return uvc_ctrl_status_event(urb, chain, ctrl, status->bValue);
+		return uvc_ctrl_status_event_async(urb, chain, ctrl,
+						   status->bValue);
 
 	case UVC_CTRL_INFO_CHANGE:
 	case UVC_CTRL_FAILURE_CHANGE:
@@ -314,5 +316,41 @@ int uvc_status_start(struct uvc_device *dev, gfp_t flags)
 
 void uvc_status_stop(struct uvc_device *dev)
 {
+	struct uvc_ctrl_work *w = &dev->async_ctrl;
+
+	/*
+	 * Prevent the asynchronous control handler from requeing the URB. The
+	 * barrier is needed so the flush_status change is visible to other
+	 * CPUs running the asynchronous handler before usb_kill_urb() is
+	 * called below.
+	 */
+	smp_store_release(&dev->flush_status, true);
+
+	/*
+	 * Cancel any pending asynchronous work. If any status event was queued,
+	 * process it synchronously.
+	 */
+	if (cancel_work_sync(&w->work))
+		uvc_ctrl_status_event(w->chain, w->ctrl, w->data);
+
+	/* Kill the urb. */
 	usb_kill_urb(dev->int_urb);
+
+	/*
+	 * The URB completion handler may have queued asynchronous work. This
+	 * won't resubmit the URB as flush_status is set, but it needs to be
+	 * cancelled before returning or it could then race with a future
+	 * uvc_status_start() call.
+	 */
+	if (cancel_work_sync(&w->work))
+		uvc_ctrl_status_event(w->chain, w->ctrl, w->data);
+
+	/*
+	 * From this point, there are no events on the queue and the status URB
+	 * is dead. No events will be queued until uvc_status_start() is called.
+	 * The barrier is needed to make sure that flush_status is visible to
+	 * uvc_ctrl_status_event_work() when uvc_status_start() will be called
+	 * again.
+	 */
+	smp_store_release(&dev->flush_status, false);
 }
drivers/media/usb/uvc/uvc_video.c +3 -1
index b431f06d5a1f..1c0249df5256 100644
@@ -1278,7 +1278,9 @@ static void uvc_video_decode_meta(struct uvc_streaming *stream,
 	if (has_scr)
 		memcpy(stream->clock.last_scr, scr, 6);
 
-	memcpy(&meta->length, mem, length);
+	meta->length = mem[0];
+	meta->flags  = mem[1];
+	memcpy(meta->buf, &mem[2], length - 2);
 	meta_buf->bytesused += length + sizeof(meta->ns) + sizeof(meta->sof);
 
 	uvc_trace(UVC_TRACE_FRAME,
drivers/media/usb/uvc/uvcvideo.h +4 -1
index 839ba3cc5311..e8b06164b27a 100644
@@ -603,6 +603,7 @@ struct uvc_device {
 	/* Status Interrupt Endpoint */
 	struct usb_host_endpoint *int_ep;
 	struct urb *int_urb;
+	bool flush_status;
 	u8 *status;
 	struct input_dev *input;
 	char input_phys[64];
@@ -768,7 +769,9 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,
 int uvc_ctrl_init_device(struct uvc_device *dev);
 void uvc_ctrl_cleanup_device(struct uvc_device *dev);
 int uvc_ctrl_restore_values(struct uvc_device *dev);
-bool uvc_ctrl_status_event(struct urb *urb, struct uvc_video_chain *chain,
+bool uvc_ctrl_status_event_async(struct urb *urb, struct uvc_video_chain *chain,
+				 struct uvc_control *ctrl, const u8 *data);
+void uvc_ctrl_status_event(struct uvc_video_chain *chain,
 			   struct uvc_control *ctrl, const u8 *data);
 
 int uvc_ctrl_begin(struct uvc_video_chain *chain);
drivers/mfd/pcf50633-adc.c +6 -1
index c1984b0d1b65..a4a765055ee6 100644
@@ -140,6 +140,7 @@ int pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
 			     void *callback_param)
 {
 	struct pcf50633_adc_request *req;
+	int ret;
 
 	/* req is freed when the result is ready, in interrupt handler */
 	req = kmalloc(sizeof(*req), GFP_KERNEL);
@@ -151,7 +152,11 @@ int pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
 	req->callback = callback;
 	req->callback_param = callback_param;
 
-	return adc_enqueue_request(pcf, req);
+	ret = adc_enqueue_request(pcf, req);
+	if (ret)
+		kfree(req);
+
+	return ret;
 }
 EXPORT_SYMBOL_GPL(pcf50633_adc_async_read);
 
drivers/misc/mei/bus-fixup.c +4 -4
index 198e030e5b3d..14f3e05643fc 100644
@@ -174,7 +174,7 @@ static int mei_fwver(struct mei_cl_device *cldev)
 	ret = __mei_cl_send(cldev->cl, buf, sizeof(struct mkhi_msg_hdr),
 			    MEI_CL_IO_TX_BLOCKING);
 	if (ret < 0) {
-		dev_err(&cldev->dev, "Could not send ReqFWVersion cmd\n");
+		dev_err(&cldev->dev, "Could not send ReqFWVersion cmd ret = %d\n", ret);
 		return ret;
 	}
 
@@ -186,7 +186,7 @@ static int mei_fwver(struct mei_cl_device *cldev)
 		 * Should be at least one version block,
 		 * error out if nothing found
 		 */
-		dev_err(&cldev->dev, "Could not read FW version\n");
+		dev_err(&cldev->dev, "Could not read FW version ret = %d\n", bytes_recv);
 		return -EIO;
 	}
 
@@ -335,7 +335,7 @@ static int mei_nfc_if_version(struct mei_cl *cl,
 	ret = __mei_cl_send(cl, (u8 *)&cmd, sizeof(struct mei_nfc_cmd),
 			    MEI_CL_IO_TX_BLOCKING);
 	if (ret < 0) {
-		dev_err(bus->dev, "Could not send IF version cmd\n");
+		dev_err(bus->dev, "Could not send IF version cmd ret = %d\n", ret);
 		return ret;
 	}
 
@@ -350,7 +350,7 @@ static int mei_nfc_if_version(struct mei_cl *cl,
 	ret = 0;
 	bytes_recv = __mei_cl_recv(cl, (u8 *)reply, if_version_length, 0, 0);
 	if (bytes_recv < 0 || (size_t)bytes_recv < if_version_length) {
-		dev_err(bus->dev, "Could not read IF version\n");
+		dev_err(bus->dev, "Could not read IF version ret = %d\n", bytes_recv);
 		ret = -EIO;
 		goto err;
 	}
drivers/mtd/nand/raw/sunxi_nand.c +1 -1
index 88075e420f90..fe7bfcdf7c69 100644
@@ -1670,7 +1670,7 @@ static int sunxi_nand_ooblayout_free(struct mtd_info *mtd, int section,
 	if (section < ecc->steps)
 		oobregion->length = 4;
 	else
-		oobregion->offset = mtd->oobsize - oobregion->offset;
+		oobregion->length = mtd->oobsize - oobregion->offset;
 
 	return 0;
 }
drivers/mtd/ubi/build.c +7 -0
index 1ea3a4977c61..3d0241f8f3ec 100644
@@ -480,6 +480,7 @@ static int uif_init(struct ubi_device *ubi)
 			err = ubi_add_volume(ubi, ubi->volumes[i]);
 			if (err) {
 				ubi_err(ubi, "cannot add volume %d", i);
+				ubi->volumes[i] = NULL;
 				goto out_volumes;
 			}
 		}
@@ -656,6 +657,12 @@ static int io_init(struct ubi_device *ubi, int max_beb_per1024)
 	ubi->ec_hdr_alsize = ALIGN(UBI_EC_HDR_SIZE, ubi->hdrs_min_io_size);
 	ubi->vid_hdr_alsize = ALIGN(UBI_VID_HDR_SIZE, ubi->hdrs_min_io_size);
 
+	if (ubi->vid_hdr_offset && ((ubi->vid_hdr_offset + UBI_VID_HDR_SIZE) >
+	    ubi->vid_hdr_alsize)) {
+		ubi_err(ubi, "VID header offset %d too large.", ubi->vid_hdr_offset);
+		return -EINVAL;
+	}
+
 	dbg_gen("min_io_size      %d", ubi->min_io_size);
 	dbg_gen("max_write_size   %d", ubi->max_write_size);
 	dbg_gen("hdrs_min_io_size %d", ubi->hdrs_min_io_size);
drivers/mtd/ubi/vmt.c +10 -8
index 9f6ffd340a3e..c5dec58846ce 100644
@@ -477,7 +477,7 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs)
 		for (i = 0; i < -pebs; i++) {
 			err = ubi_eba_unmap_leb(ubi, vol, reserved_pebs + i);
 			if (err)
-				goto out_acc;
+				goto out_free;
 		}
 		spin_lock(&ubi->volumes_lock);
 		ubi->rsvd_pebs += pebs;
@@ -525,8 +525,10 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs)
 		ubi->avail_pebs += pebs;
 		spin_unlock(&ubi->volumes_lock);
 	}
+	return err;
+
 out_free:
-	kfree(new_eba_tbl);
+	ubi_eba_destroy_table(new_eba_tbl);
 	return err;
 }
 
@@ -593,6 +595,7 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol)
 	if (err) {
 		ubi_err(ubi, "cannot add character device for volume %d, error %d",
 			vol_id, err);
+		vol_release(&vol->dev);
 		return err;
 	}
 
@@ -603,15 +606,14 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol)
 	vol->dev.groups = volume_dev_groups;
 	dev_set_name(&vol->dev, "%s_%d", ubi->ubi_name, vol->vol_id);
 	err = device_register(&vol->dev);
-	if (err)
-		goto out_cdev;
+	if (err) {
+		cdev_del(&vol->cdev);
+		put_device(&vol->dev);
+		return err;
+	}
 
 	self_check_volumes(ubi);
 	return err;
-
-out_cdev:
-	cdev_del(&vol->cdev);
-	return err;
 }
 
 /**
drivers/mtd/ubi/wl.c +22 -3
index ac336164f625..7f0847ee53f2 100644
@@ -865,8 +865,11 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
 
 	err = do_sync_erase(ubi, e1, vol_id, lnum, 0);
 	if (err) {
-		if (e2)
+		if (e2) {
+			spin_lock(&ubi->wl_lock);
 			wl_entry_destroy(ubi, e2);
+			spin_unlock(&ubi->wl_lock);
+		}
 		goto out_ro;
 	}
 
@@ -948,11 +951,11 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
 	spin_lock(&ubi->wl_lock);
 	ubi->move_from = ubi->move_to = NULL;
 	ubi->move_to_put = ubi->wl_scheduled = 0;
+	wl_entry_destroy(ubi, e1);
+	wl_entry_destroy(ubi, e2);
 	spin_unlock(&ubi->wl_lock);
 
 	ubi_free_vid_buf(vidb);
-	wl_entry_destroy(ubi, e1);
-	wl_entry_destroy(ubi, e2);
 
 out_ro:
 	ubi_ro_mode(ubi);
@@ -1096,14 +1099,18 @@ static int __erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk)
 		/* Re-schedule the LEB for erasure */
 		err1 = schedule_erase(ubi, e, vol_id, lnum, 0, false);
 		if (err1) {
+			spin_lock(&ubi->wl_lock);
 			wl_entry_destroy(ubi, e);
+			spin_unlock(&ubi->wl_lock);
 			err = err1;
 			goto out_ro;
 		}
 		return err;
 	}
 
+	spin_lock(&ubi->wl_lock);
 	wl_entry_destroy(ubi, e);
+	spin_unlock(&ubi->wl_lock);
 	if (err != -EIO)
 		/*
 		 * If this is not %-EIO, we have no idea what to do. Scheduling
@@ -1219,6 +1226,18 @@ int ubi_wl_put_peb(struct ubi_device *ubi, int vol_id, int lnum,
 retry:
 	spin_lock(&ubi->wl_lock);
 	e = ubi->lookuptbl[pnum];
+	if (!e) {
+		/*
+		 * This wl entry has been removed for some errors by other
+		 * process (eg. wear leveling worker), corresponding process
+		 * (except __erase_worker, which cannot concurrent with
+		 * ubi_wl_put_peb) will set ubi ro_mode at the same time,
+		 * just ignore this wl entry.
+		 */
+		spin_unlock(&ubi->wl_lock);
+		up_read(&ubi->fm_protect);
+		return 0;
+	}
 	if (e == ubi->move_from) {
 		/*
 		 * User is putting the physical eraseblock which was selected to
drivers/net/can/usb/esd_usb2.c +3 -1
index ffdee5aeb8a9..d46599871919 100644
@@ -290,7 +290,6 @@ static void esd_usb2_rx_event(struct esd_usb2_net_priv *priv,
 				cf->data[2] |= CAN_ERR_PROT_STUFF;
 				break;
 			default:
-				cf->data[3] = ecc & SJA1000_ECC_SEG;
 				break;
 			}
 
@@ -298,6 +297,9 @@ static void esd_usb2_rx_event(struct esd_usb2_net_priv *priv,
 			if (!(ecc & SJA1000_ECC_DIR))
 				cf->data[2] |= CAN_ERR_PROT_TX;
 
+			/* Bit stream position in CAN frame as the error was detected */
+			cf->data[3] = ecc & SJA1000_ECC_SEG;
+
 			if (priv->can.state == CAN_STATE_ERROR_WARNING ||
 			    priv->can.state == CAN_STATE_ERROR_PASSIVE) {
 				cf->data[1] = (txerr > rxerr) ?
drivers/net/ethernet/broadcom/genet/bcmgenet.c +8 -0
index 96ef2dd46c78..84bcb3ce00f7 100644
@@ -1825,6 +1825,14 @@ static unsigned int bcmgenet_desc_rx(struct bcmgenet_rx_ring *ring,
 			  __func__, p_index, ring->c_index,
 			  ring->read_ptr, dma_length_status);
 
+		if (unlikely(len > RX_BUF_LENGTH)) {
+			netif_err(priv, rx_status, dev, "oversized packet\n");
+			dev->stats.rx_length_errors++;
+			dev->stats.rx_errors++;
+			dev_kfree_skb_any(skb);
+			goto next;
+		}
+
 		if (unlikely(!(dma_flag & DMA_EOP) || !(dma_flag & DMA_SOP))) {
 			netif_err(priv, rx_status, dev,
 				  "dropping fragmented packet!\n");
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +1 -1
index ef9f932f0226..5a2feadd80f0 100644
@@ -564,7 +564,7 @@ static int mlx5_tracer_handle_string_trace(struct mlx5_fw_tracer *tracer,
 	} else {
 		cur_string = mlx5_tracer_message_get(tracer, tracer_event);
 		if (!cur_string) {
-			pr_debug("%s Got string event for unknown string tdsm: %d\n",
+			pr_debug("%s Got string event for unknown string tmsn: %d\n",
 				 __func__, tracer_event->string_event.tmsn);
 			return -1;
 		}
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c +2 -1
index 9c3653e06886..fc880c02459d 100644
@@ -164,7 +164,8 @@ static int alloc_4k(struct mlx5_core_dev *dev, u64 *addr)
 	fp = list_entry(dev->priv.free_list.next, struct fw_page, list);
 	n = find_first_bit(&fp->bitmask, 8 * sizeof(fp->bitmask));
 	if (n >= MLX5_NUM_4K_IN_PAGE) {
-		mlx5_core_warn(dev, "alloc 4k bug\n");
+		mlx5_core_warn(dev, "alloc 4k bug: fw page = 0x%llx, n = %u, bitmask: %lu, max num of 4K pages: %d\n",
+			       fp->addr, n, fp->bitmask,  MLX5_NUM_4K_IN_PAGE);
 		return -ENOENT;
 	}
 	clear_bit(n, &fp->bitmask);
drivers/net/wireless/ath/ath9k/hif_usb.c +36 -24

143 lines not on this page · raw message

drivers/net/wireless/ath/ath9k/htc.h +18 -14
index 81107100e368..232e93dfbc83 100644
@@ -325,14 +325,18 @@ static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb)
 }
 
 #ifdef CONFIG_ATH9K_HTC_DEBUGFS
-#define __STAT_SAFE(expr) (hif_dev->htc_handle->drv_priv ? (expr) : 0)
-#define TX_STAT_INC(c) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.tx_stats.c++)
-#define TX_STAT_ADD(c, a) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a)
-#define RX_STAT_INC(c) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c++)
-#define RX_STAT_ADD(c, a) __STAT_SAFE(hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c += a)
-#define CAB_STAT_INC   priv->debug.tx_stats.cab_queued++
-
-#define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++)
+#define __STAT_SAFE(hif_dev, expr)	do { ((hif_dev)->htc_handle->drv_priv ? (expr) : 0); } while (0)
+#define CAB_STAT_INC(priv)		do { ((priv)->debug.tx_stats.cab_queued++); } while (0)
+#define TX_QSTAT_INC(priv, q)		do { ((priv)->debug.tx_stats.queue_stats[q]++); } while (0)
+
+#define TX_STAT_INC(hif_dev, c) \
+		__STAT_SAFE((hif_dev), (hif_dev)->htc_handle->drv_priv->debug.tx_stats.c++)
+#define TX_STAT_ADD(hif_dev, c, a) \
+		__STAT_SAFE((hif_dev), (hif_dev)->htc_handle->drv_priv->debug.tx_stats.c += a)
+#define RX_STAT_INC(hif_dev, c) \
+		__STAT_SAFE((hif_dev), (hif_dev)->htc_handle->drv_priv->debug.skbrx_stats.c++)
+#define RX_STAT_ADD(hif_dev, c, a) \
+		__STAT_SAFE((hif_dev), (hif_dev)->htc_handle->drv_priv->debug.skbrx_stats.c += a)
 
 void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,
 			   struct ath_rx_status *rs);
@@ -372,13 +376,13 @@ void ath9k_htc_get_et_stats(struct ieee80211_hw *hw,
 			    struct ethtool_stats *stats, u64 *data);
 #else
 
-#define TX_STAT_INC(c) do { } while (0)
-#define TX_STAT_ADD(c, a) do { } while (0)
-#define RX_STAT_INC(c) do { } while (0)
-#define RX_STAT_ADD(c, a) do { } while (0)
-#define CAB_STAT_INC   do { } while (0)
+#define TX_STAT_INC(hif_dev, c)		do { } while (0)
+#define TX_STAT_ADD(hif_dev, c, a)	do { } while (0)
+#define RX_STAT_INC(hif_dev, c)		do { } while (0)
+#define RX_STAT_ADD(hif_dev, c, a)	do { } while (0)
 
-#define TX_QSTAT_INC(c) do { } while (0)
+#define CAB_STAT_INC(priv)
+#define TX_QSTAT_INC(priv, c)
 
 static inline void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,
 					 struct ath_rx_status *rs)
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +5 -5
index 3cd3f3ca1000..979ac31a77a0 100644
@@ -106,20 +106,20 @@ static inline enum htc_endpoint_id get_htc_epid(struct ath9k_htc_priv *priv,
 
 	switch (qnum) {
 	case 0:
-		TX_QSTAT_INC(IEEE80211_AC_VO);
+		TX_QSTAT_INC(priv, IEEE80211_AC_VO);
 		epid = priv->data_vo_ep;
 		break;
 	case 1:
-		TX_QSTAT_INC(IEEE80211_AC_VI);
+		TX_QSTAT_INC(priv, IEEE80211_AC_VI);
 		epid = priv->data_vi_ep;
 		break;
 	case 2:
-		TX_QSTAT_INC(IEEE80211_AC_BE);
+		TX_QSTAT_INC(priv, IEEE80211_AC_BE);
 		epid = priv->data_be_ep;
 		break;
 	case 3:
 	default:
-		TX_QSTAT_INC(IEEE80211_AC_BK);
+		TX_QSTAT_INC(priv, IEEE80211_AC_BK);
 		epid = priv->data_bk_ep;
 		break;
 	}
@@ -323,7 +323,7 @@ static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,
 	memcpy(tx_fhdr, (u8 *) &tx_hdr, sizeof(tx_hdr));
 
 	if (is_cab) {
-		CAB_STAT_INC;
+		CAB_STAT_INC(priv);
 		tx_ctl->epid = priv->cab_ep;
 		return;
 	}
drivers/net/wireless/ath/ath9k/htc_hst.c +3 -1
index 6d69cf69fd86..6331c98088e0 100644
@@ -394,7 +394,7 @@ static void ath9k_htc_fw_panic_report(struct htc_target *htc_handle,
  * HTC Messages are handled directly here and the obtained SKB
  * is freed.
  *
- * Service messages (Data, WMI) passed to the corresponding
+ * Service messages (Data, WMI) are passed to the corresponding
  * endpoint RX handlers, which have to free the SKB.
  */
 void ath9k_htc_rx_msg(struct htc_target *htc_handle,
@@ -481,6 +481,8 @@ void ath9k_htc_rx_msg(struct htc_target *htc_handle,
 		if (endpoint->ep_callbacks.rx)
 			endpoint->ep_callbacks.rx(endpoint->ep_callbacks.priv,
 						  skb, epid);
+		else
+			goto invalid;
 	}
 }
 
drivers/net/wireless/ath/ath9k/wmi.c +1 -0
index 066677bb83eb..e4ea6f5cc78a 100644
@@ -338,6 +338,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
 	if (!time_left) {
 		ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n",
 			wmi_cmd_to_name(cmd_id));
+		wmi->last_seq_id = 0;
 		mutex_unlock(&wmi->op_mutex);
 		kfree_skb(skb);
 		return -ETIMEDOUT;
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +5 -2
index 8510d207ee87..3626ea9be92a 100644
@@ -273,6 +273,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
 			  err);
 		goto done;
 	}
+	buf[sizeof(buf) - 1] = '\0';
 	ptr = (char *)buf;
 	strsep(&ptr, "\n");
 
@@ -289,15 +290,17 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
 	if (err) {
 		brcmf_dbg(TRACE, "retrieving clmver failed, %d\n", err);
 	} else {
+		buf[sizeof(buf) - 1] = '\0';
 		clmver = (char *)buf;
-		/* store CLM version for adding it to revinfo debugfs file */
-		memcpy(ifp->drvr->clmver, clmver, sizeof(ifp->drvr->clmver));
 
 		/* Replace all newline/linefeed characters with space
 		 * character
 		 */
 		strreplace(clmver, '\n', ' ');
 
+		/* store CLM version for adding it to revinfo debugfs file */
+		memcpy(ifp->drvr->clmver, clmver, sizeof(ifp->drvr->clmver));
+
 		brcmf_dbg(INFO, "CLM version = %s\n", clmver);
 	}
 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +1 -0
index 31bf2eb47b49..6fd155187263 100644
@@ -313,6 +313,7 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
 			brcmf_err("%s: failed to expand headroom\n",
 				  brcmf_ifname(ifp));
 			atomic_inc(&drvr->bus_if->stats.pktcow_failed);
+			dev_kfree_skb(skb);
 			goto done;
 		}
 	}
drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c +4 -1
index 768a99c15c08..e81e892ddacc 100644
@@ -339,8 +339,11 @@ brcmf_msgbuf_alloc_pktid(struct device *dev,
 		count++;
 	} while (count < pktids->array_size);
 
-	if (count == pktids->array_size)
+	if (count == pktids->array_size) {
+		dma_unmap_single(dev, *physaddr, skb->len - data_offset,
+				 pktids->direction);
 		return -ENOMEM;
+	}
 
 	array[*idx].data_offset = data_offset;
 	array[*idx].physaddr = *physaddr;
drivers/net/wireless/intel/ipw2x00/ipw2100.c +59 -62

159 lines not on this page · raw message

drivers/net/wireless/intel/ipw2x00/ipw2200.c +37 -30

67 lines not on this page · raw message

drivers/net/wireless/intel/iwlegacy/3945-mac.c +12 -4
index b536ec20eacc..d51a23815e18 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlegacy/4965-mac.c +10 -2
index 6fc51c74cdb8..4970c19df582 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intersil/orinoco/hw.c +2 -0
index 61af5a28f269..af49aa421e47 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/libertas/cmdresp.c +1 -1
index b73d08381398..5908f07d62ed 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/libertas/if_usb.c +1 -1
index d75763410cdc..885abbd665e6 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/libertas/main.c +2 -1
index f22e1c220cba..997c246b971e 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/libertas_tf/if_usb.c +1 -1
index 60941c319b42..5e7edc030975 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/11n.c +3 -3
index 5dcc305cc812..452ac56cdc92 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c +5 -0
index 837a1b9d189d..eb8f046ae20d 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +1 -10
index e5aac9694ade..9c811fe30358 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +40 -51

91 lines not on this page · raw message

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c +2 -2
index ac44fd5d0597..e1e7fa990132 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.h +2 -2
index 36c2388b60bc..f8550a0122e8 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/rsi/rsi_91x_coex.c +1 -0
index c8ba148f8c6c..acf4d8cb4b47 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/wl3501_cs.c +1 -1
index f33ece937047..cfde9b94b4b6 100644

Lines of this file are not shown. View the raw message.

drivers/nfc/st-nci/se.c +6 -0
index cdf9e915c974..f702aa9c7cf5 100644

Lines of this file are not shown. View the raw message.

drivers/nfc/st21nfca/se.c +6 -0
index 52e209950c43..8a96354796c7 100644

Lines of this file are not shown. View the raw message.

drivers/pci/quirks.c +1 -0
index f494e76faaa0..afa6acb58eec 100644

Lines of this file are not shown. View the raw message.

drivers/phy/rockchip/phy-rockchip-typec.c +1 -2
index 76a4b58ec771..ca4b80d0d8b7 100644

Lines of this file are not shown. View the raw message.

drivers/pinctrl/pinctrl-at91-pio4.c +2 -2
index 9e2f3738bf3e..89d88e447d44 100644

Lines of this file are not shown. View the raw message.

drivers/pinctrl/pinctrl-at91.c +1 -1
index fad0e132ead8..ad01cc579823 100644

Lines of this file are not shown. View the raw message.

drivers/pinctrl/pinctrl-rockchip.c +13 -10
index dc405d7aa1b7..fb7f2282635e 100644

Lines of this file are not shown. View the raw message.

drivers/powercap/powercap_sys.c +9 -5
index 60c8375c3c81..0a63fac54fd9 100644

Lines of this file are not shown. View the raw message.

drivers/pwm/pwm-stm32-lp.c +1 -1
index e92a14007422..7c8c2bb8f6a2 100644

Lines of this file are not shown. View the raw message.

drivers/regulator/max77802-regulator.c +24 -10
index c30cf5c9f2de..ef314de7c2c0 100644

Lines of this file are not shown. View the raw message.

drivers/regulator/s5m8767.c +5 -1
index 4818df3f8ec9..24c0c82b08a5 100644

Lines of this file are not shown. View the raw message.

drivers/rpmsg/qcom_glink_native.c +1 -0
index c10230ad90b2..940f099c2092 100644

Lines of this file are not shown. View the raw message.

drivers/rtc/rtc-pm8xxx.c +10 -14
index e03104b734fc..a5455b2a3cbe 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/aic94xx/aic94xx_task.c +3 -0
index cdd4ab683be9..4de4bbca1f92 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ipr.c +21 -20

41 lines not on this page · raw message

drivers/scsi/qla2xxx/qla_os.c +6 -3
index 207af1d5ed29..7863ad1390f8 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ses.c +47 -17

64 lines not on this page · raw message

drivers/spi/spi-bcm63xx-hsspi.c +16 -4
index 2ad7b3f3666b..d4692f54492f 100644

Lines of this file are not shown. View the raw message.

drivers/thermal/intel_powerclamp.c +16 -4
index dffefcde0628..351fa43c1ee3 100644

Lines of this file are not shown. View the raw message.

drivers/thermal/intel_quark_dts_thermal.c +2 -10
index 5d33b350da1c..ad92d8f0add1 100644

Lines of this file are not shown. View the raw message.

drivers/thermal/intel_soc_dts_iosf.c +1 -1
index e0813dfaa278..435a09399800 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/fsl_lpuart.c +22 -2
index 069d02354c82..6ea1d23623e5 100644

Lines of this file are not shown. View the raw message.

drivers/tty/tty_io.c +5 -3
index b6f42d0ee626..d3e6b6615553 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/vc_screen.c +1 -3
index 5b5e800ab154..28bc9c70de3e 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/xhci-mvebu.c +1 -1
index 32e158568788..fc9d6189c310 100644

Lines of this file are not shown. View the raw message.

drivers/usb/storage/ene_ub6250.c +1 -1
index 54679679c825..16b63f2cd661 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/at91sam9_wdt.c +3 -4
index f4050a229eb5..aaa3c5a8c457 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/pcwd_usb.c +4 -2
index 4d02f26156f9..b7b9d562da13 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/watchdog_dev.c +1 -1
index 8fe59b7d8eec..808896c9e1c2 100644

Lines of this file are not shown. View the raw message.

fs/cifs/smbdirect.c +3 -1
index 591cd5c70432..ea1d8cfab430 100644

Lines of this file are not shown. View the raw message.

fs/ext4/xattr.c +24 -11
index 0772941bbe92..23334cfeac55 100644

Lines of this file are not shown. View the raw message.

fs/f2fs/data.c +2 -2
index c63f5e32630e..56b2dadd623b 100644

Lines of this file are not shown. View the raw message.

fs/f2fs/inline.c +6 -7
index 6bf78cf63ea2..7ad78aa9c7b8 100644

Lines of this file are not shown. View the raw message.

fs/gfs2/aops.c +1 -2
index 31e8270d0b26..c5390421cca2 100644

Lines of this file are not shown. View the raw message.

fs/hfs/bnode.c +1 -0
index c0a73a6ffb28..397e02a56697 100644

Lines of this file are not shown. View the raw message.

fs/hfsplus/super.c +2 -2
index eb4535eba95d..3b1356b10a47 100644

Lines of this file are not shown. View the raw message.

fs/jfs/jfs_dmap.c +2 -1
index f06796cad9aa..3ad0a33e0443 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4layouts.c +2 -2
index f4cf1c0793c6..cf81b5bc3e15 100644

Lines of this file are not shown. View the raw message.

fs/ocfs2/move_extents.c +13 -21
index 1565dd8e8856..fbbc30f20173 100644

Lines of this file are not shown. View the raw message.

fs/ubifs/budget.c +4 -5
index 7ef22baf9d15..30c7bd63c2ad 100644

Lines of this file are not shown. View the raw message.

fs/ubifs/dir.c +11 -2
index 111905ddbfc2..3b93b14e0041 100644

Lines of this file are not shown. View the raw message.

fs/ubifs/file.c +9 -3
index 3dbb5ac630e4..ae836e8bb293 100644

Lines of this file are not shown. View the raw message.

fs/ubifs/tnc.c +23 -1
index f15ac37956e7..4665c4d7d76a 100644

Lines of this file are not shown. View the raw message.

fs/udf/file.c +12 -14
index cd31e4f6d6da..88b7fb8e9998 100644

Lines of this file are not shown. View the raw message.

fs/udf/inode.c +24 -34

58 lines not on this page · raw message

fs/udf/udf_sb.h +2 -0
index d12e507e9eb2..aa58173b468f 100644

Lines of this file are not shown. View the raw message.

include/drm/drm_connector.h +32 -4
index e5f641cdab5a..f9f85a466cb8 100644

Lines of this file are not shown. View the raw message.

include/drm/drm_mipi_dsi.h +4 -0
index 4fef19064b0f..689f615471ab 100644

Lines of this file are not shown. View the raw message.

include/linux/ima.h +4 -2
index 97914a2833d1..edd6d9195ce1 100644

Lines of this file are not shown. View the raw message.

include/linux/kernel_stat.h +1 -1
index 7ee2bb43b251..f7f20cf1bd3b 100644

Lines of this file are not shown. View the raw message.

include/linux/kprobes.h +2 -0
index 304e7a0f6b16..08875d2d5649 100644

Lines of this file are not shown. View the raw message.

include/uapi/linux/usb/video.h +30 -0
index ff6cc6cb4227..0c5087c39a9f 100644

Lines of this file are not shown. View the raw message.

include/uapi/linux/uvcvideo.h +1 -1
index f80f05b3c423..214092366193 100644

Lines of this file are not shown. View the raw message.

kernel/irq/irqdomain.c +20 -11
index 1e42fc2ad4d5..3ebe231a5eda 100644

Lines of this file are not shown. View the raw message.

kernel/kprobes.c +3 -3
index 33aba4e2e3e3..e1fb6453e8e9 100644

Lines of this file are not shown. View the raw message.

kernel/rcu/tree_exp.h +2 -0
index 72770a551c24..fa6ae9ed2e1d 100644

Lines of this file are not shown. View the raw message.

kernel/time/hrtimer.c +2 -0
index 32ee24f5142a..8512f06f0ebe 100644

Lines of this file are not shown. View the raw message.

kernel/time/posix-stubs.c +2 -0
index 2c6847d5d69b..362c159fb3f8 100644

Lines of this file are not shown. View the raw message.

kernel/time/posix-timers.c +2 -0
index 48758108e055..1234868b3b03 100644

Lines of this file are not shown. View the raw message.

kernel/trace/ring_buffer.c +6 -1
index 5e5b0c067f61..bef3d01b8ff6 100644

Lines of this file are not shown. View the raw message.

lib/mpi/mpicoder.c +2 -1
index eead4b339466..4f73db248009 100644

Lines of this file are not shown. View the raw message.

net/9p/trans_rdma.c +12 -3
index 119103bfa82e..4bbb8683d451 100644

Lines of this file are not shown. View the raw message.

net/9p/trans_xen.c +31 -17

48 lines not on this page · raw message

net/bluetooth/hci_sock.c +7 -4
index 3ba0c6df73ce..6908817a5a70 100644

Lines of this file are not shown. View the raw message.

net/bluetooth/l2cap_core.c +0 -24
index fd95631205a6..0e034925e360 100644

Lines of this file are not shown. View the raw message.

net/bluetooth/l2cap_sock.c +8 -0
index d938311c58a8..1c6d01a27e0e 100644

Lines of this file are not shown. View the raw message.

net/core/dev.c +3 -1
index 880b096eef8a..b778f3596543 100644

Lines of this file are not shown. View the raw message.

net/ipv4/inet_connection_sock.c +1 -0
index 457f619a3461..0f9085220ecf 100644

Lines of this file are not shown. View the raw message.

net/ipv4/inet_hashtables.c +1 -11
index d64522af9c3a..5a272d09b824 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp_minisocks.c +5 -2
index 0fc238d79b03..bae0199a943b 100644

Lines of this file are not shown. View the raw message.

net/mac80211/sta_info.c +1 -1
index 3a907ba7f763..5e28be07cad8 100644

Lines of this file are not shown. View the raw message.

net/netfilter/nf_conntrack_netlink.c +4 -1
index 2850a638401d..58bba2e2691f 100644

Lines of this file are not shown. View the raw message.

net/nfc/netlink.c +4 -0
index 8953b03d5a52..2c5443ce449c 100644

Lines of this file are not shown. View the raw message.

net/rds/message.c +1 -1
index 309b54cc62ae..29f67ad483ea 100644

Lines of this file are not shown. View the raw message.

net/sched/Kconfig +0 -11
index e95741388311..4547022ed7f4 100644

Lines of this file are not shown. View the raw message.

net/sched/Makefile +0 -1
index f0403f49edcb..5eed580cdb42 100644

Lines of this file are not shown. View the raw message.

net/sched/cls_tcindex.c deleted +0 -698

698 lines not on this page · raw message

net/wireless/sme.c +26 -5
index 9d8b106deb0b..501c0ec50328 100644

Lines of this file are not shown. View the raw message.

security/integrity/ima/ima_main.c +5 -2
index 2d31921fbda4..c85aab3bd398 100644

Lines of this file are not shown. View the raw message.

security/security.c +4 -3
index fc1410550b79..21c27424a44b 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_ca0132.c +1 -1
index 23f00ba993cb..ca8a37388d56 100644

Lines of this file are not shown. View the raw message.

sound/pci/ice1712/aureon.c +1 -1
index c9411dfff5a4..3473f1040d92 100644

Lines of this file are not shown. View the raw message.

sound/soc/kirkwood/kirkwood-dma.c +1 -1
index 255cc45905b8..51f75523b691 100644

Lines of this file are not shown. View the raw message.

sound/soc/soc-compress.c +1 -1
index 409d082e80d1..7745a3e9044f 100644

Lines of this file are not shown. View the raw message.

tools/iio/iio_utils.c +6 -17
index d60a252577f0..d174487b2f22 100644

Lines of this file are not shown. View the raw message.

tools/lib/bpf/nlattr.c +1 -1
index 4719434278b2..ac979b429055 100644

Lines of this file are not shown. View the raw message.

tools/perf/perf-completion.sh +8 -3
index fdf75d45efff..978249d7868c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/llvm-utils.c +24 -1
index 46ec9a1bb94c..1ff4788bcb4e 100644

Lines of this file are not shown. View the raw message.

tools/testing/ktest/ktest.pl +21 -5
index a0b53309c5d8..128a7fe45a1e 100755

Lines of this file are not shown. View the raw message.

tools/testing/ktest/sample.conf +5 -0
index 6ca6ca0ce695..b487e34bbf45 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc +1 -1
index 79d614f1fe8e..d620223a3f0f 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/net/fib_tests.sh +2 -0
index a5ba149761bf..f34e14e34d0d 100755

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.