Skip to contentSkip to conversation

Linux 5.15.12

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Dec 29, 2021 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 5.15.12 kernel.

All users of the 5.15 kernel series must upgrade.

The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.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/kernel-parameters.txt                |    8 
 Documentation/hwmon/lm90.rst                                   |   10 
 Documentation/networking/bonding.rst                           |   11 
 Documentation/sound/hd-audio/models.rst                        |    2 
 Makefile                                                       |    2 
 arch/arm/boot/dts/imx6qdl-wandboard.dtsi                       |    1 
 arch/arm/kernel/entry-armv.S                                   |    8 
 arch/arm/kernel/head-nommu.S                                   |    1 
 arch/arm64/Kconfig                                             |    3 
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts |    2 
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi                 |    4 
 arch/arm64/kernel/vdso32/Makefile                              |   17 
 arch/parisc/include/asm/futex.h                                |    4 
 arch/parisc/kernel/syscall.S                                   |    2 
 arch/x86/include/asm/kvm-x86-ops.h                             |    1 
 arch/x86/include/asm/kvm_host.h                                |    1 
 arch/x86/include/asm/pkru.h                                    |    4 
 arch/x86/kernel/setup.c                                        |   72 +---
 arch/x86/kvm/mmu/tdp_iter.c                                    |    6 
 arch/x86/kvm/mmu/tdp_iter.h                                    |    6 
 arch/x86/kvm/mmu/tdp_mmu.c                                     |   29 -
 arch/x86/kvm/svm/svm.c                                         |   21 -
 arch/x86/kvm/vmx/vmx.c                                         |   45 +-
 arch/x86/kvm/x86.c                                             |    9 
 drivers/base/power/main.c                                      |    2 
 drivers/bus/sunxi-rsb.c                                        |    8 
 drivers/char/ipmi/ipmi_msghandler.c                            |   21 -
 drivers/char/ipmi/ipmi_ssif.c                                  |    7 
 drivers/gpio/gpio-dln2.c                                       |   19 -
 drivers/gpio/gpio-virtio.c                                     |    6 
 drivers/gpu/drm/mediatek/mtk_hdmi.c                            |   12 
 drivers/hid/hid-holtek-mouse.c                                 |   15 
 drivers/hid/hid-vivaldi.c                                      |    3 
 drivers/hwmon/Kconfig                                          |    2 
 drivers/hwmon/lm90.c                                           |  175 ++++++----
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c                     |   64 +++
 drivers/infiniband/hw/hns/hns_roce_hw_v2.h                     |    8 
 drivers/infiniband/hw/hns/hns_roce_srq.c                       |    2 
 drivers/infiniband/hw/qib/qib_user_sdma.c                      |    2 
 drivers/input/misc/iqs626a.c                                   |   21 -
 drivers/input/mouse/elantech.c                                 |    8 
 drivers/input/touchscreen/atmel_mxt_ts.c                       |    2 
 drivers/input/touchscreen/elants_i2c.c                         |   46 ++
 drivers/input/touchscreen/goodix.c                             |    1 
 drivers/mmc/core/core.c                                        |    7 
 drivers/mmc/core/core.h                                        |    1 
 drivers/mmc/core/host.c                                        |    9 
 drivers/mmc/host/meson-mx-sdhc-mmc.c                           |   16 
 drivers/mmc/host/mmci_stm32_sdmmc.c                            |    2 
 drivers/mmc/host/sdhci-tegra.c                                 |   43 +-
 drivers/net/bonding/bond_options.c                             |    2 
 drivers/net/ethernet/intel/ice/ice_txrx.h                      |   16 
 drivers/net/ethernet/intel/ice/ice_xsk.c                       |   64 +--
 drivers/net/ethernet/intel/igb/igb_main.c                      |   19 -
 drivers/net/ethernet/marvell/prestera/prestera_main.c          |   35 +-
 drivers/net/ethernet/micrel/ks8851_par.c                       |    2 
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h              |    2 
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c       |   12 
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c           |    4 
 drivers/net/ethernet/sfc/falcon/rx.c                           |    5 
 drivers/net/ethernet/sfc/rx_common.c                           |    5 
 drivers/net/ethernet/smsc/smc911x.c                            |    5 
 drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c           |    2 
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c               |    2 
 drivers/net/fjes/fjes_main.c                                   |    5 
 drivers/net/hamradio/mkiss.c                                   |    5 
 drivers/net/tun.c                                              |  115 +++---
 drivers/net/usb/asix_common.c                                  |    8 
 drivers/net/usb/lan78xx.c                                      |    6 
 drivers/net/usb/r8152.c                                        |   43 ++
 drivers/net/veth.c                                             |    8 
 drivers/pinctrl/bcm/pinctrl-bcm2835.c                          |   29 -
 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c               |    8 
 drivers/pinctrl/stm32/pinctrl-stm32.c                          |    8 
 drivers/platform/x86/Makefile                                  |    2 
 drivers/platform/x86/amd-pmc.c                                 |    3 
 drivers/platform/x86/intel/Kconfig                             |   15 
 drivers/platform/x86/intel/pmc/pltdrv.c                        |    2 
 drivers/spi/spi-armada-3700.c                                  |    2 
 drivers/tee/optee/shm_pool.c                                   |    6 
 drivers/tee/tee_shm.c                                          |  171 +++------
 fs/ext4/extents.c                                              |   95 +++--
 fs/f2fs/xattr.c                                                |   11 
 fs/io_uring.c                                                  |   10 
 fs/ksmbd/ndr.c                                                 |    2 
 fs/ksmbd/smb2ops.c                                             |    3 
 fs/ksmbd/smb2pdu.c                                             |   29 +
 fs/netfs/read_helper.c                                         |    6 
 fs/nfsd/nfs3proc.c                                             |   11 
 fs/nfsd/nfsproc.c                                              |    8 
 include/linux/compiler.h                                       |    4 
 include/linux/instrumentation.h                                |    4 
 include/linux/ipv6.h                                           |    1 
 include/linux/tee_drv.h                                        |    4 
 include/linux/virtio_net.h                                     |   25 +
 include/net/inet_sock.h                                        |    3 
 include/net/sock.h                                             |    7 
 include/uapi/linux/byteorder/big_endian.h                      |    1 
 include/uapi/linux/byteorder/little_endian.h                   |    1 
 kernel/crash_core.c                                            |   11 
 kernel/ucount.c                                                |   15 
 mm/damon/dbgfs.c                                               |    2 
 mm/kfence/core.c                                               |    1 
 mm/memory-failure.c                                            |   14 
 mm/mempolicy.c                                                 |    3 
 net/ax25/af_ax25.c                                             |    4 
 net/bridge/br_ioctl.c                                          |    8 
 net/ipv4/af_inet.c                                             |    2 
 net/ipv4/tcp.c                                                 |    3 
 net/ipv4/tcp_input.c                                           |    2 
 net/ipv4/tcp_ipv4.c                                            |   17 
 net/ipv4/udp.c                                                 |    6 
 net/ipv6/tcp_ipv6.c                                            |   23 -
 net/ipv6/udp.c                                                 |    8 
 net/mac80211/cfg.c                                             |    3 
 net/netfilter/nf_tables_api.c                                  |    4 
 net/netfilter/nfnetlink_log.c                                  |    3 
 net/netfilter/nfnetlink_queue.c                                |    3 
 net/phonet/pep.c                                               |    2 
 sound/core/jack.c                                              |    4 
 sound/core/rawmidi.c                                           |    1 
 sound/drivers/opl3/opl3_midi.c                                 |    2 
 sound/pci/hda/patch_hdmi.c                                     |   21 -
 sound/pci/hda/patch_realtek.c                                  |   29 +
 sound/soc/codecs/rt5682.c                                      |    4 
 sound/soc/codecs/tas2770.c                                     |    4 
 sound/soc/meson/aiu-encoder-i2s.c                              |   33 -
 sound/soc/meson/aiu-fifo-i2s.c                                 |   19 +
 sound/soc/meson/aiu-fifo.c                                     |    6 
 sound/soc/sof/intel/pci-tgl.c                                  |    4 
 sound/soc/tegra/tegra_asoc_machine.c                           |   11 
 sound/soc/tegra/tegra_asoc_machine.h                           |    1 
 tools/testing/selftests/kvm/include/kvm_util.h                 |   10 
 tools/testing/selftests/kvm/lib/kvm_util.c                     |    5 
 134 files changed, 1173 insertions(+), 722 deletions(-)

Alexey Gladkov (1):
ucounts: Fix rlimit max values check

Andrea Righi (1):
Input: elantech - fix stack out of bound access in elantech_change_report_id()

Andrew Cooper (1):
x86/pkey: Fix undefined behaviour with PKRU_WD_BIT

Andrew Jones (1):
selftests: KVM: Fix non-x86 compiling

Andrey Ryabinin (1):
mm: mempolicy: fix THP allocations escaping mempolicy restrictions

Andy Shevchenko (1):
platform/x86/intel: Remove X86_PLATFORM_DRIVERS_INTEL

AngeloGioacchino Del Regno (1):
drm/mediatek: hdmi: Perform NULL pointer check for mtk_hdmi_conf

Ard Biesheuvel (1):
ARM: 9169/1: entry: fix Thumb2 bug in iWMMXt exception handling

Baokun Li (1):
kfence: fix memory leak when cat kfence objects

Benjamin Tissoires (1):
HID: holtek: fix mouse probing

Borislav Petkov (1):
Revert "x86/boot: Pull up cmdline preparation and early param parsing"

Bradley Scott (2):
ALSA: hda/realtek: Amp init fixup for HP ZBook 15 G6
ALSA: hda/realtek: Add new alc285-hp-amp-init model

Chao Yu (1):
f2fs: fix to do sanity check on last xattr entry in __f2fs_setxattr()

Chuck Lever (1):
NFSD: Fix READDIR buffer overflow

Colin Ian King (1):

      ALSA: drivers: opl3: Fix incorrect use of vp->state

Dan Carpenter (1):
ksmbd: fix error code in ndr_read_int32()

Derek Fang (1):
ASoC: rt5682: fix the wrong jack type detected

Dmitry Osipenko (2):
ASoC: tegra: Add DAPM switches for headphones and mic jack
ASoC: tegra: Restore headphones jack name on Nyan Big

Dongliang Mu (1):
spi: change clk_disable_unprepare to clk_unprepare

Eric Dumazet (4):

      netfilter: nf_tables: fix use-after-free in nft_set_catchall_destroy()
      tcp: move inet->rx_dst_ifindex to sk->sk_rx_dst_ifindex
      ipv6: move inet6_sk(sk)->rx_dst_cookie to sk->sk_rx_dst_cookie
      inet: fully convert sk->sk_rx_dst to RCU rules

Fabien Dessenne (1):
pinctrl: stm32: consider the GPIO offset to expose all the GPIO lines

Fernando Fernandez Mancera (1):
bonding: fix ad_actor_system option setting to default

George Kennedy (1):
tun: avoid double free in tun_free_netdev

Greg Jesionowski (1):
net: usb: lan78xx: add Allied Telesis AT29M2-AF

Greg Kroah-Hartman (1):

      Linux 5.15.12

Guenter Roeck (7):
hwmon: (lm90) Fix usage of CONFIG2 register in detect function
hwmon: (lm90) Prevent integer overflow/underflow in hysteresis calculations
hwmon: (lm90) Introduce flag indicating extended temperature support
hwmon: (lm90) Add basic support for TI TMP461
hwmon: (lm90) Drop critical attribute support for MAX6654
hwmom: (lm90) Fix citical alarm status for MAX6680/MAX6681
hwmon: (lm90) Do not report 'busy' status bit as alarm

Guodong Liu (1):
pinctrl: mediatek: fix global-out-of-bounds issue

Gustavo A. R. Silva (1):
net: bridge: Use array_size() helper in copy_to_user()

Hans de Goede (1):

      Input: goodix - add id->model mapping for the "9111" model

Hayes Wang (2):
r8152: fix the force speed doesn't work for RTL8156
r8152: sync ocp base

Heiner Kallweit (1):
igb: fix deadlock caused by taking RTNL in RPM resume path

Ignacy Gawędzki (1):
netfilter: fix regression in looped (broad|multi)cast's MAC handling

Ismael Luceno (1):
uapi: Fix undefined __always_inline on non-glibc systems

Jaroslav Kysela (1):
ALSA: rawmidi - fix the uninitalized user_pversion

Jeff LaBundy (1):
Input: iqs626a - prohibit inlining of channel parsing functions

Jeffle Xu (1):
netfs: fix parameter of cleanup()

Jens Axboe (1):

      io_uring: zero iocb->ki_pos for stream file types

Jens Wiklander (1):
tee: handle lookup of shm with reference count 0

Jeremy Szu (1):
ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook

Jernej Skrabec (1):
bus: sunxi-rsb: Fix shutdown

Jiacheng Shi (1):
RDMA/hns: Replace kfree() with kvfree()

Jiasheng Jiang (7):
HID: potential dereference of null pointer
qlcnic: potential dereference null pointer of rx_queue->page_ring
fjes: Check for error irq
drivers: net: smc911x: Check for error irq
net: ks8851: Check for error irq
sfc: Check null pointer of rx_queue->page_ring
sfc: falcon: Check null pointer of rx_queue->page_ring

Johan Hovold (1):
platform/x86: intel_pmc_core: fix memleak on registration failure

Johannes Berg (1):
mac80211: fix locking in ieee80211_start_ap error path

John David Anglin (2):
parisc: Correct completer in lws start
parisc: Fix mask used to select futex spinlock

Johnny Chuang (1):
Input: elants_i2c - do not check Remark ID on eKTH3900/eKTH5312

Josh Poimboeuf (1):
compiler.h: Fix annotation macro misplacement with Clang

José Expósito (2):
IB/qib: Fix memory leak in qib_user_sdma_queue_pkts()
Input: atmel_mxt_ts - fix double free in mxt_read_info_block

Kai Vehmanen (2):
ASoC: SOF: Intel: pci-tgl: add new ADL-P variant
ASoC: SOF: Intel: pci-tgl: add ADL-N support

Lin Ma (3):
ax25: NPD bug when detaching AX25 device
hamradio: defer ax25 kfree after unregister_netdev
hamradio: improve the incomplete fix to avoid NPD

Liu Shixin (1):
mm/hwpoison: clear MF_COUNT_INCREASED before retrying get_any_page()

Maciej Fijalkowski (1):
ice: xsk: return xsk buffers back to pool when cleaning the ring

Magnus Karlsson (1):
ice: Use xdp_buf instead of rx_buf for xsk zero-copy

Marc Orr (1):

      KVM: x86: Always set kvm_run->if_flag

Marcos Del Sol Vives (1):
ksmbd: disable SMB2_GLOBAL_CAP_ENCRYPTION for SMB 3.1.1

Mario Limonciello (1):
platform/x86: amd-pmc: only use callbacks for suspend

Martin Blumenstingl (3):
ASoC: meson: aiu: fifo: Add missing dma_coerce_mask_and_coherent()
ASoC: meson: aiu: Move AIU_I2S_MISC hold setting to aiu-fifo-i2s
mmc: meson-mx-sdhc: Set MANUAL_STOP for multi-block SDIO commands

Martin Haaß (1):
ARM: dts: imx6qdl-wandboard: Fix Ethernet support

Martin Povišer (1):
ASoC: tas2770: Fix setting of high sample rates

Mian Yousaf Kaukab (1):

      ipmi: ssif: initialize ssif_info->client early

Mike Rapoport (1):
x86/boot: Move EFI range reservation after cmdline parsing

Namjae Jeon (1):
ksmbd: fix uninitialized symbol 'pntsd_size'

Naoya Horiguchi (1):
mm, hwpoison: fix condition in free hugetlb page path

Nick Desaulniers (1):
arm64: vdso32: require CROSS_COMPILE_COMPAT for gcc+bfd

Nobuhiro Iwamatsu (1):
net: stmmac: dwmac-visconti: Fix value of ETHER_CLK_SEL_FREQ_SEL_2P5M

Noralf Trønnes (1):
gpio: dln2: Fix interrupts when replugging the device

Paolo Abeni (1):
veth: ensure skb entering GRO are not cloned.

Pavel Skripkin (2):
asix: fix uninit-value in asix_mdio_read()
asix: fix wrong return value in asix_check_host_enable()

Phil Elwell (1):
pinctrl: bcm2835: Change init order for gpio hogs

Philipp Rudo (1):
kernel/crash_core: suppress unknown crashkernel parameter warning

Prathamesh Shete (1):
mmc: sdhci-tegra: Fix switch to HS400ES mode

Rafael J. Wysocki (1):
PM: sleep: Fix error handling in dpm_prepare()

Remi Pommarel (1):
net: bridge: fix ioctl old_deviceless bridge argument

Robert Marko (1):
arm64: dts: allwinner: orangepi-zero-plus: fix PHY mode

Rémi Denis-Courmont (1):
phonet/pep: refuse to enable an unbound pipe

Sean Christopherson (5):
KVM: x86/mmu: Don't advance iterator after restart due to yielding
KVM: nVMX: Synthesize TRIPLE_FAULT for L2 if emulation is required
KVM: VMX: Always clear vmx->fail on emulation_required
KVM: VMX: Wake vCPU when delivering posted IRQ even if vCPU == this vCPU
KVM: VMX: Fix stale docs for kvm-intel.emulate_invalid_guest_state

SeongJae Park (1):
mm/damon/dbgfs: protect targets destructions with kdamond_lock

Sumit Garg (1):
tee: optee: Fix incorrect page free bug

Thadeu Lima de Souza Cascardo (2):
ipmi: bail out if init_srcu_struct fails
ipmi: fix initialization when workqueue allocation fails

Ulf Hansson (1):
mmc: core: Disable card detect during shutdown

Ville Syrjälä (1):
ALSA: hda/hdmi: Disable silent stream on GLK

Vincent Whitchurch (1):
gpio: virtio: remove timeout

Vladimir Murzin (1):
ARM: 9160/1: NOMMU: Reload __secondary_data after PROCINFO_INITFUNC

Werner Sembach (1):
ALSA: hda/realtek: Fix quirk for Clevo NJ51CU

Willem de Bruijn (2):
net: accept UFOv6 packages in virtio_net_hdr_to_skb
net: skip virtio_net_hdr_set_proto if protocol already set

Wu Bo (1):
ipmi: Fix UAF when uninstall ipmi_si and ipmi_msghandler module

Xiaoke Wang (1):
ALSA: jack: Check the return value of kstrdup()

Xiaoliang Yang (1):
net: stmmac: ptp: fix potentially overflowing expression

Yangyang Li (1):
RDMA/hns: Fix RNR retransmission issue for HIP08

Yann Gautier (1):
mmc: mmci: stm32: clear DLYB_CR after sending tuning command

Yevhen Orlov (2):
net: marvell: prestera: fix incorrect return of port_find
net: marvell: prestera: fix incorrect structure access

Zhang Yi (3):
ext4: prevent partial update of the extent blocks
ext4: check for out-of-order index extents in ext4_valid_extent_entries()
ext4: check for inconsistent extents between index and leaf block

Zhang Ying-22455 (1):
arm64: dts: lx2160a: fix scl-gpios property name

author maintainer
#1 lore raw
Documentation/admin-guide/kernel-parameters.txt +6 -2
index 1396fd2d9031..a454f438bd62 100644
@@ -2403,8 +2403,12 @@
 			Default is 1 (enabled)
 
 	kvm-intel.emulate_invalid_guest_state=
-			[KVM,Intel] Enable emulation of invalid guest states
-			Default is 0 (disabled)
+			[KVM,Intel] Disable emulation of invalid guest state.
+			Ignored if kvm-intel.enable_unrestricted_guest=1, as
+			guest state is never invalid for unrestricted guests.
+			This param doesn't apply to nested guests (L2), as KVM
+			never emulates invalid L2 guest state.
+			Default is 1 (enabled)
 
 	kvm-intel.flexpriority=
 			[KVM,Intel] Disable FlexPriority feature (TPR shadow).
Documentation/hwmon/lm90.rst +10 -0
index 3da8c6e06a36..05391fb4042d 100644
@@ -265,6 +265,16 @@ Supported chips:
 
 	       https://www.ti.com/litv/pdf/sbos686
 
+  * Texas Instruments TMP461
+
+    Prefix: 'tmp461'
+
+    Addresses scanned: I2C 0x48 through 0x4F
+
+    Datasheet: Publicly available at TI website
+
+	       https://www.ti.com/lit/gpn/tmp461
+
 Author: Jean Delvare <[email protected]>
 
 
Documentation/networking/bonding.rst +6 -5
index 31cfd7d674a6..c0a789b00806 100644
@@ -196,11 +196,12 @@ ad_actor_sys_prio
 ad_actor_system
 
 	In an AD system, this specifies the mac-address for the actor in
-	protocol packet exchanges (LACPDUs). The value cannot be NULL or
-	multicast. It is preferred to have the local-admin bit set for this
-	mac but driver does not enforce it. If the value is not given then
-	system defaults to using the masters' mac address as actors' system
-	address.
+	protocol packet exchanges (LACPDUs). The value cannot be a multicast
+	address. If the all-zeroes MAC is specified, bonding will internally
+	use the MAC of the bond itself. It is preferred to have the
+	local-admin bit set for this mac but driver does not enforce it. If
+	the value is not given then system defaults to using the masters'
+	mac address as actors' system address.
 
 	This parameter has effect only in 802.3ad mode and is available through
 	SysFs interface.
Documentation/sound/hd-audio/models.rst +2 -0
index 0ea967d34583..d25335993e55 100644
@@ -326,6 +326,8 @@ usi-headset
     Headset support on USI machines
 dual-codecs
     Lenovo laptops with dual codecs
+alc285-hp-amp-init
+    HP laptops which require speaker amplifier initialization (ALC285)
 
 ALC680
 ======
Makefile +1 -1
index 37a1144c32df..474b2a2292ca 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 15
-SUBLEVEL = 11
+SUBLEVEL = 12
 EXTRAVERSION =
 NAME = Trick or Treat
 
arch/arm/boot/dts/imx6qdl-wandboard.dtsi +1 -0
index b62a0dbb033f..ec6fba5ee8fd 100644
@@ -309,6 +309,7 @@ mdio {
 
 		ethphy: ethernet-phy@1 {
 			reg = <1>;
+			qca,clk-out-frequency = <125000000>;
 		};
 	};
 };
arch/arm/kernel/entry-armv.S +3 -5
index 241b73d64df7..d8e28abd468c 100644
@@ -597,11 +597,9 @@ call_fpe:
 	tstne	r0, #0x04000000			@ bit 26 set on both ARM and Thumb-2
 	reteq	lr
 	and	r8, r0, #0x00000f00		@ mask out CP number
- THUMB(	lsr	r8, r8, #8		)
 	mov	r7, #1
-	add	r6, r10, #TI_USED_CP
- ARM(	strb	r7, [r6, r8, lsr #8]	)	@ set appropriate used_cp[]
- THUMB(	strb	r7, [r6, r8]		)	@ set appropriate used_cp[]
+	add	r6, r10, r8, lsr #8		@ add used_cp[] array offset first
+	strb	r7, [r6, #TI_USED_CP]		@ set appropriate used_cp[]
 #ifdef CONFIG_IWMMXT
 	@ Test if we need to give access to iWMMXt coprocessors
 	ldr	r5, [r10, #TI_FLAGS]
@@ -610,7 +608,7 @@ call_fpe:
 	bcs	iwmmxt_task_enable
 #endif
  ARM(	add	pc, pc, r8, lsr #6	)
- THUMB(	lsl	r8, r8, #2		)
+ THUMB(	lsr	r8, r8, #6		)
  THUMB(	add	pc, r8			)
 	nop
 
arch/arm/kernel/head-nommu.S +1 -0
index 0fc814bbc34b..8796a69c78e0 100644
@@ -114,6 +114,7 @@ ENTRY(secondary_startup)
 	add	r12, r12, r10
 	ret	r12
 1:	bl	__after_proc_init
+	ldr	r7, __secondary_data		@ reload r7
 	ldr	sp, [r7, #12]			@ set up the stack pointer
 	mov	fp, #0
 	b	secondary_start_kernel
arch/arm64/Kconfig +2 -1
index fee914c716aa..0758ea0717f9 100644
@@ -1264,7 +1264,8 @@ config KUSER_HELPERS
 
 config COMPAT_VDSO
 	bool "Enable vDSO for 32-bit applications"
-	depends on !CPU_BIG_ENDIAN && "$(CROSS_COMPILE_COMPAT)" != ""
+	depends on !CPU_BIG_ENDIAN
+	depends on (CC_IS_CLANG && LD_IS_LLD) || "$(CROSS_COMPILE_COMPAT)" != ""
 	select GENERIC_COMPAT_VDSO
 	default y
 	help
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts +1 -1
index d13980ed7a79..7ec5ac850a0d 100644
@@ -69,7 +69,7 @@ &emac {
 	pinctrl-0 = <&emac_rgmii_pins>;
 	phy-supply = <&reg_gmac_3v3>;
 	phy-handle = <&ext_rgmii_phy>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	status = "okay";
 };
 
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +2 -2
index c4b1a59ba424..51c4f61007cd 100644
@@ -719,7 +719,7 @@ i2c0: i2c@2000000 {
 			clock-names = "i2c";
 			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
 					    QORIQ_CLK_PLL_DIV(16)>;
-			scl-gpio = <&gpio2 15 GPIO_ACTIVE_HIGH>;
+			scl-gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
 			status = "disabled";
 		};
 
@@ -768,7 +768,7 @@ i2c4: i2c@2040000 {
 			clock-names = "i2c";
 			clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
 					    QORIQ_CLK_PLL_DIV(16)>;
-			scl-gpio = <&gpio2 16 GPIO_ACTIVE_HIGH>;
+			scl-gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
 			status = "disabled";
 		};
 
arch/arm64/kernel/vdso32/Makefile +5 -12
index 764d1900d5aa..3514269ac75f 100644
@@ -10,18 +10,15 @@ include $(srctree)/lib/vdso/Makefile
 
 # Same as cc-*option, but using CC_COMPAT instead of CC
 ifeq ($(CONFIG_CC_IS_CLANG), y)
-CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
-
 CC_COMPAT ?= $(CC)
-CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
-
-ifneq ($(LLVM),)
-LD_COMPAT ?= $(LD)
+CC_COMPAT += --target=arm-linux-gnueabi
 else
-LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld
+CC_COMPAT ?= $(CROSS_COMPILE_COMPAT)gcc
 endif
+
+ifeq ($(CONFIG_LD_IS_LLD), y)
+LD_COMPAT ?= $(LD)
 else
-CC_COMPAT ?= $(CROSS_COMPILE_COMPAT)gcc
 LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld
 endif
 
@@ -47,10 +44,6 @@ VDSO_CPPFLAGS += $(LINUXINCLUDE)
 # Common C and assembly flags
 # From top-level Makefile
 VDSO_CAFLAGS := $(VDSO_CPPFLAGS)
-ifneq ($(shell $(CC_COMPAT) --version 2>&1 | head -n 1 | grep clang),)
-VDSO_CAFLAGS += --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
-endif
-
 VDSO_CAFLAGS += $(call cc32-option,-fno-PIE)
 ifdef CONFIG_DEBUG_INFO
 VDSO_CAFLAGS += -g
arch/parisc/include/asm/futex.h +2 -2
index fceb9cf02fb3..71aa0921d6c7 100644
@@ -16,7 +16,7 @@ static inline void
 _futex_spin_lock_irqsave(u32 __user *uaddr, unsigned long int *flags)
 {
 	extern u32 lws_lock_start[];
-	long index = ((long)uaddr & 0x3f8) >> 1;
+	long index = ((long)uaddr & 0x7f8) >> 1;
 	arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index];
 	local_irq_save(*flags);
 	arch_spin_lock(s);
@@ -26,7 +26,7 @@ static inline void
 _futex_spin_unlock_irqrestore(u32 __user *uaddr, unsigned long int *flags)
 {
 	extern u32 lws_lock_start[];
-	long index = ((long)uaddr & 0x3f8) >> 1;
+	long index = ((long)uaddr & 0x7f8) >> 1;
 	arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index];
 	arch_spin_unlock(s);
 	local_irq_restore(*flags);
arch/parisc/kernel/syscall.S +1 -1
index 3f24a0af1e04..9842dcb2041e 100644
@@ -478,7 +478,7 @@ lws_start:
 	extrd,u	%r1,PSW_W_BIT,1,%r1
 	/* sp must be aligned on 4, so deposit the W bit setting into
 	 * the bottom of sp temporarily */
-	or,ev	%r1,%r30,%r30
+	or,od	%r1,%r30,%r30
 
 	/* Clip LWS number to a 32-bit value for 32-bit processes */
 	depdi	0, 31, 32, %r20
arch/x86/include/asm/kvm-x86-ops.h +1 -0
index cefe1d81e2e8..9e50da3ed01a 100644
@@ -47,6 +47,7 @@ KVM_X86_OP(set_dr7)
 KVM_X86_OP(cache_reg)
 KVM_X86_OP(get_rflags)
 KVM_X86_OP(set_rflags)
+KVM_X86_OP(get_if_flag)
 KVM_X86_OP(tlb_flush_all)
 KVM_X86_OP(tlb_flush_current)
 KVM_X86_OP_NULL(tlb_remote_flush)
arch/x86/include/asm/kvm_host.h +1 -0
index a11785ebf628..75e21715ecb4 100644
@@ -1341,6 +1341,7 @@ struct kvm_x86_ops {
 	void (*cache_reg)(struct kvm_vcpu *vcpu, enum kvm_reg reg);
 	unsigned long (*get_rflags)(struct kvm_vcpu *vcpu);
 	void (*set_rflags)(struct kvm_vcpu *vcpu, unsigned long rflags);
+	bool (*get_if_flag)(struct kvm_vcpu *vcpu);
 
 	void (*tlb_flush_all)(struct kvm_vcpu *vcpu);
 	void (*tlb_flush_current)(struct kvm_vcpu *vcpu);
arch/x86/include/asm/pkru.h +2 -2
index ccc539faa5bb..4d8b9448fe8d 100644
@@ -4,8 +4,8 @@
 
 #include <asm/fpu/xstate.h>
 
-#define PKRU_AD_BIT 0x1
-#define PKRU_WD_BIT 0x2
+#define PKRU_AD_BIT 0x1u
+#define PKRU_WD_BIT 0x2u
 #define PKRU_BITS_PER_PKEY 2
 
 #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
arch/x86/kernel/setup.c +30 -42

96 lines not on this page · raw message

arch/x86/kvm/mmu/tdp_iter.c +6 -0
index b3ed302c1a35..caa96c270b95 100644
@@ -26,6 +26,7 @@ static gfn_t round_gfn_for_level(gfn_t gfn, int level)
  */
 void tdp_iter_restart(struct tdp_iter *iter)
 {
+	iter->yielded = false;
 	iter->yielded_gfn = iter->next_last_level_gfn;
 	iter->level = iter->root_level;
 
@@ -160,6 +161,11 @@ static bool try_step_up(struct tdp_iter *iter)
  */
 void tdp_iter_next(struct tdp_iter *iter)
 {
+	if (iter->yielded) {
+		tdp_iter_restart(iter);
+		return;
+	}
+
 	if (try_step_down(iter))
 		return;
 
arch/x86/kvm/mmu/tdp_iter.h +6 -0
index b1748b988d3a..e19cabbcb65c 100644
@@ -45,6 +45,12 @@ struct tdp_iter {
 	 * iterator walks off the end of the paging structure.
 	 */
 	bool valid;
+	/*
+	 * True if KVM dropped mmu_lock and yielded in the middle of a walk, in
+	 * which case tdp_iter_next() needs to restart the walk at the root
+	 * level instead of advancing to the next entry.
+	 */
+	bool yielded;
 };
 
 /*
arch/x86/kvm/mmu/tdp_mmu.c +16 -13
index 0e4227b59d7b..4954cd01c1f0 100644
@@ -501,6 +501,8 @@ static inline bool tdp_mmu_set_spte_atomic_no_dirty_log(struct kvm *kvm,
 							struct tdp_iter *iter,
 							u64 new_spte)
 {
+	WARN_ON_ONCE(iter->yielded);
+
 	lockdep_assert_held_read(&kvm->mmu_lock);
 
 	/*
@@ -611,6 +613,8 @@ static inline void __tdp_mmu_set_spte(struct kvm *kvm, struct tdp_iter *iter,
 				      u64 new_spte, bool record_acc_track,
 				      bool record_dirty_log)
 {
+	WARN_ON_ONCE(iter->yielded);
+
 	lockdep_assert_held_write(&kvm->mmu_lock);
 
 	/*
@@ -676,18 +680,19 @@ static inline void tdp_mmu_set_spte_no_dirty_log(struct kvm *kvm,
  * If this function should yield and flush is set, it will perform a remote
  * TLB flush before yielding.
  *
- * If this function yields, it will also reset the tdp_iter's walk over the
- * paging structure and the calling function should skip to the next
- * iteration to allow the iterator to continue its traversal from the
- * paging structure root.
+ * If this function yields, iter->yielded is set and the caller must skip to
+ * the next iteration, where tdp_iter_next() will reset the tdp_iter's walk
+ * over the paging structures to allow the iterator to continue its traversal
+ * from the paging structure root.
  *
- * Return true if this function yielded and the iterator's traversal was reset.
- * Return false if a yield was not needed.
+ * Returns true if this function yielded.
  */
-static inline bool tdp_mmu_iter_cond_resched(struct kvm *kvm,
-					     struct tdp_iter *iter, bool flush,
-					     bool shared)
+static inline bool __must_check tdp_mmu_iter_cond_resched(struct kvm *kvm,
+							  struct tdp_iter *iter,
+							  bool flush, bool shared)
 {
+	WARN_ON(iter->yielded);
+
 	/* Ensure forward progress has been made before yielding. */
 	if (iter->next_last_level_gfn == iter->yielded_gfn)
 		return false;
@@ -707,12 +712,10 @@ static inline bool tdp_mmu_iter_cond_resched(struct kvm *kvm,
 
 		WARN_ON(iter->gfn > iter->next_last_level_gfn);
 
-		tdp_iter_restart(iter);
-
-		return true;
+		iter->yielded = true;
 	}
 
-	return false;
+	return iter->yielded;
 }
 
 /*
arch/x86/kvm/svm/svm.c +12 -9
index 1fce044beebe..e64f16237b60 100644
@@ -1517,6 +1517,15 @@ static void svm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags)
 	to_svm(vcpu)->vmcb->save.rflags = rflags;
 }
 
+static bool svm_get_if_flag(struct kvm_vcpu *vcpu)
+{
+	struct vmcb *vmcb = to_svm(vcpu)->vmcb;
+
+	return sev_es_guest(vcpu->kvm)
+		? vmcb->control.int_state & SVM_GUEST_INTERRUPT_MASK
+		: kvm_get_rflags(vcpu) & X86_EFLAGS_IF;
+}
+
 static void svm_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg)
 {
 	switch (reg) {
@@ -3485,14 +3494,7 @@ bool svm_interrupt_blocked(struct kvm_vcpu *vcpu)
 	if (!gif_set(svm))
 		return true;
 
-	if (sev_es_guest(vcpu->kvm)) {
-		/*
-		 * SEV-ES guests to not expose RFLAGS. Use the VMCB interrupt mask
-		 * bit to determine the state of the IF flag.
-		 */
-		if (!(vmcb->control.int_state & SVM_GUEST_INTERRUPT_MASK))
-			return true;
-	} else if (is_guest_mode(vcpu)) {
+	if (is_guest_mode(vcpu)) {
 		/* As long as interrupts are being delivered...  */
 		if ((svm->nested.ctl.int_ctl & V_INTR_MASKING_MASK)
 		    ? !(svm->vmcb01.ptr->save.rflags & X86_EFLAGS_IF)
@@ -3503,7 +3505,7 @@ bool svm_interrupt_blocked(struct kvm_vcpu *vcpu)
 		if (nested_exit_on_intr(svm))
 			return false;
 	} else {
-		if (!(kvm_get_rflags(vcpu) & X86_EFLAGS_IF))
+		if (!svm_get_if_flag(vcpu))
 			return true;
 	}
 
@@ -4562,6 +4564,7 @@ static struct kvm_x86_ops svm_x86_ops __initdata = {
 	.cache_reg = svm_cache_reg,
 	.get_rflags = svm_get_rflags,
 	.set_rflags = svm_set_rflags,
+	.get_if_flag = svm_get_if_flag,
 
 	.tlb_flush_all = svm_flush_tlb,
 	.tlb_flush_current = svm_flush_tlb,
arch/x86/kvm/vmx/vmx.c +32 -13

89 lines not on this page · raw message

arch/x86/kvm/x86.c +1 -8
index dea578586fa4..ccb256c377a6 100644
@@ -8880,14 +8880,7 @@ static void post_kvm_run_save(struct kvm_vcpu *vcpu)
 {
 	struct kvm_run *kvm_run = vcpu->run;
 
-	/*
-	 * if_flag is obsolete and useless, so do not bother
-	 * setting it for SEV-ES guests.  Userspace can just
-	 * use kvm_run->ready_for_interrupt_injection.
-	 */
-	kvm_run->if_flag = !vcpu->arch.guest_state_protected
-		&& (kvm_get_rflags(vcpu) & X86_EFLAGS_IF) != 0;
-
+	kvm_run->if_flag = static_call(kvm_x86_get_if_flag)(vcpu);
 	kvm_run->cr8 = kvm_get_cr8(vcpu);
 	kvm_run->apic_base = kvm_get_apic_base(vcpu);
 
drivers/base/power/main.c +1 -1
index a7fdd86fad05..6bce40e2506e 100644
@@ -1906,7 +1906,7 @@ int dpm_prepare(pm_message_t state)
 	device_block_probing();
 
 	mutex_lock(&dpm_list_mtx);
-	while (!list_empty(&dpm_list)) {
+	while (!list_empty(&dpm_list) && !error) {
 		struct device *dev = to_device(dpm_list.next);
 
 		get_device(dev);
drivers/bus/sunxi-rsb.c +4 -4
index 6f225dddc74f..4566e730ef2b 100644
@@ -687,11 +687,11 @@ static int sunxi_rsb_hw_init(struct sunxi_rsb *rsb)
 
 static void sunxi_rsb_hw_exit(struct sunxi_rsb *rsb)
 {
-	/* Keep the clock and PM reference counts consistent. */
-	if (pm_runtime_status_suspended(rsb->dev))
-		pm_runtime_resume(rsb->dev);
 	reset_control_assert(rsb->rstc);
-	clk_disable_unprepare(rsb->clk);
+
+	/* Keep the clock and PM reference counts consistent. */
+	if (!pm_runtime_status_suspended(rsb->dev))
+		clk_disable_unprepare(rsb->clk);
 }
 
 static int __maybe_unused sunxi_rsb_runtime_suspend(struct device *dev)
drivers/char/ipmi/ipmi_msghandler.c +13 -8
index b404cc46cbda..fe91090e04a4 100644
@@ -2932,7 +2932,7 @@ cleanup_bmc_device(struct kref *ref)
 	 * with removing the device attributes while reading a device
 	 * attribute.
 	 */
-	schedule_work(&bmc->remove_work);
+	queue_work(remove_work_wq, &bmc->remove_work);
 }
 
 /*
@@ -5148,22 +5148,27 @@ static int ipmi_init_msghandler(void)
 	if (initialized)
 		goto out;
 
-	init_srcu_struct(&ipmi_interfaces_srcu);
-
-	timer_setup(&ipmi_timer, ipmi_timeout, 0);
-	mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);
-
-	atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
+	rv = init_srcu_struct(&ipmi_interfaces_srcu);
+	if (rv)
+		goto out;
 
 	remove_work_wq = create_singlethread_workqueue("ipmi-msghandler-remove-wq");
 	if (!remove_work_wq) {
 		pr_err("unable to create ipmi-msghandler-remove-wq workqueue");
 		rv = -ENOMEM;
-		goto out;
+		goto out_wq;
 	}
 
+	timer_setup(&ipmi_timer, ipmi_timeout, 0);
+	mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);
+
+	atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
+
 	initialized = true;
 
+out_wq:
+	if (rv)
+		cleanup_srcu_struct(&ipmi_interfaces_srcu);
 out:
 	mutex_unlock(&ipmi_interfaces_mutex);
 	return rv;
drivers/char/ipmi/ipmi_ssif.c +4 -3
index 20d5af92966d..8d7a8898e80b 100644
@@ -1659,6 +1659,9 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		}
 	}
 
+	ssif_info->client = client;
+	i2c_set_clientdata(client, ssif_info);
+
 	rv = ssif_check_and_remove(client, ssif_info);
 	/* If rv is 0 and addr source is not SI_ACPI, continue probing */
 	if (!rv && ssif_info->addr_source == SI_ACPI) {
@@ -1679,9 +1682,6 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		ipmi_addr_src_to_str(ssif_info->addr_source),
 		client->addr, client->adapter->name, slave_addr);
 
-	ssif_info->client = client;
-	i2c_set_clientdata(client, ssif_info);
-
 	/* Now check for system interface capabilities */
 	msg[0] = IPMI_NETFN_APP_REQUEST << 2;
 	msg[1] = IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_CMD;
@@ -1881,6 +1881,7 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
 
 		dev_err(&ssif_info->client->dev,
 			"Unable to start IPMI SSIF: %d\n", rv);
+		i2c_set_clientdata(client, NULL);
 		kfree(ssif_info);
 	}
 	kfree(resp);
drivers/gpio/gpio-dln2.c +9 -10
index 026903e3ef54..08b9e2cf4f2d 100644
@@ -46,6 +46,7 @@
 struct dln2_gpio {
 	struct platform_device *pdev;
 	struct gpio_chip gpio;
+	struct irq_chip irqchip;
 
 	/*
 	 * Cache pin direction to save us one transfer, since the hardware has
@@ -383,15 +384,6 @@ static void dln2_irq_bus_unlock(struct irq_data *irqd)
 	mutex_unlock(&dln2->irq_lock);
 }
 
-static struct irq_chip dln2_gpio_irqchip = {
-	.name = "dln2-irq",
-	.irq_mask = dln2_irq_mask,
-	.irq_unmask = dln2_irq_unmask,
-	.irq_set_type = dln2_irq_set_type,
-	.irq_bus_lock = dln2_irq_bus_lock,
-	.irq_bus_sync_unlock = dln2_irq_bus_unlock,
-};
-
 static void dln2_gpio_event(struct platform_device *pdev, u16 echo,
 			    const void *data, int len)
 {
@@ -473,8 +465,15 @@ static int dln2_gpio_probe(struct platform_device *pdev)
 	dln2->gpio.direction_output = dln2_gpio_direction_output;
 	dln2->gpio.set_config = dln2_gpio_set_config;
 
+	dln2->irqchip.name = "dln2-irq",
+	dln2->irqchip.irq_mask = dln2_irq_mask,
+	dln2->irqchip.irq_unmask = dln2_irq_unmask,
+	dln2->irqchip.irq_set_type = dln2_irq_set_type,
+	dln2->irqchip.irq_bus_lock = dln2_irq_bus_lock,
+	dln2->irqchip.irq_bus_sync_unlock = dln2_irq_bus_unlock,
+
 	girq = &dln2->gpio.irq;
-	girq->chip = &dln2_gpio_irqchip;
+	girq->chip = &dln2->irqchip;
 	/* The event comes from the outside so no parent handler */
 	girq->parent_handler = NULL;
 	girq->num_parents = 0;
drivers/gpio/gpio-virtio.c +1 -5
index d24f1c9264bc..dd3b23c9580b 100644
@@ -81,11 +81,7 @@ static int _virtio_gpio_req(struct virtio_gpio *vgpio, u16 type, u16 gpio,
 	virtqueue_kick(vgpio->request_vq);
 	mutex_unlock(&vgpio->lock);
 
-	if (!wait_for_completion_timeout(&line->completion, HZ)) {
-		dev_err(dev, "GPIO operation timed out\n");
-		ret = -ETIMEDOUT;
-		goto out;
-	}
+	wait_for_completion(&line->completion);
 
 	if (unlikely(res->status != VIRTIO_GPIO_STATUS_OK)) {
 		dev_err(dev, "GPIO request failed: %d\n", gpio);
drivers/gpu/drm/mediatek/mtk_hdmi.c +7 -5
index 5838c44cbf6f..3196189429bc 100644
@@ -1224,12 +1224,14 @@ static int mtk_hdmi_bridge_mode_valid(struct drm_bridge *bridge,
 			return MODE_BAD;
 	}
 
-	if (hdmi->conf->cea_modes_only && !drm_match_cea_mode(mode))
-		return MODE_BAD;
+	if (hdmi->conf) {
+		if (hdmi->conf->cea_modes_only && !drm_match_cea_mode(mode))
+			return MODE_BAD;
 
-	if (hdmi->conf->max_mode_clock &&
-	    mode->clock > hdmi->conf->max_mode_clock)
-		return MODE_CLOCK_HIGH;
+		if (hdmi->conf->max_mode_clock &&
+		    mode->clock > hdmi->conf->max_mode_clock)
+			return MODE_CLOCK_HIGH;
+	}
 
 	if (mode->clock < 27000)
 		return MODE_CLOCK_LOW;
drivers/hid/hid-holtek-mouse.c +15 -0
index b7172c48ef9f..7c907939bfae 100644
@@ -65,8 +65,23 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 static int holtek_mouse_probe(struct hid_device *hdev,
 			      const struct hid_device_id *id)
 {
+	int ret;
+
 	if (!hid_is_usb(hdev))
 		return -EINVAL;
+
+	ret = hid_parse(hdev);
+	if (ret) {
+		hid_err(hdev, "hid parse failed: %d\n", ret);
+		return ret;
+	}
+
+	ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
+	if (ret) {
+		hid_err(hdev, "hw start failed: %d\n", ret);
+		return ret;
+	}
+
 	return 0;
 }
 
drivers/hid/hid-vivaldi.c +3 -0
index cd7ada48b1d9..72957a9f7117 100644
@@ -57,6 +57,9 @@ static int vivaldi_probe(struct hid_device *hdev,
 	int ret;
 
 	drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
+	if (!drvdata)
+		return -ENOMEM;
+
 	hid_set_drvdata(hdev, drvdata);
 
 	ret = hid_parse(hdev);
drivers/hwmon/Kconfig +1 -1
index c4578e8f34bb..ccdaeafed0bb 100644
@@ -1317,7 +1317,7 @@ config SENSORS_LM90
 	  Maxim MAX6646, MAX6647, MAX6648, MAX6649, MAX6654, MAX6657, MAX6658,
 	  MAX6659, MAX6680, MAX6681, MAX6692, MAX6695, MAX6696,
 	  ON Semiconductor NCT1008, Winbond/Nuvoton W83L771W/G/AWG/ASG,
-	  Philips SA56004, GMT G781, and Texas Instruments TMP451
+	  Philips SA56004, GMT G781, Texas Instruments TMP451 and TMP461
 	  sensor chips.
 
 	  This driver can also be built as a module. If so, the module
drivers/hwmon/lm90.c +109 -66

391 lines not on this page · raw message

drivers/infiniband/hw/hns/hns_roce_hw_v2.c +57 -7

111 lines not on this page · raw message

drivers/infiniband/hw/hns/hns_roce_hw_v2.h +8 -0
index 4d904d5e82be..35c61da7ba15 100644
@@ -1444,6 +1444,14 @@ struct hns_roce_dip {
 	struct list_head node;	/* all dips are on a list */
 };
 
+/* only for RNR timeout issue of HIP08 */
+#define HNS_ROCE_CLOCK_ADJUST 1000
+#define HNS_ROCE_MAX_CQ_PERIOD 65
+#define HNS_ROCE_MAX_EQ_PERIOD 65
+#define HNS_ROCE_RNR_TIMER_10NS 1
+#define HNS_ROCE_1US_CFG 999
+#define HNS_ROCE_1NS_CFG 0
+
 #define HNS_ROCE_AEQ_DEFAULT_BURST_NUM	0x0
 #define HNS_ROCE_AEQ_DEFAULT_INTERVAL	0x0
 #define HNS_ROCE_CEQ_DEFAULT_BURST_NUM	0x0
drivers/infiniband/hw/hns/hns_roce_srq.c +1 -1
index 6eee9deadd12..e64ef6903fb4 100644
@@ -259,7 +259,7 @@ static int alloc_srq_wrid(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq)
 
 static void free_srq_wrid(struct hns_roce_srq *srq)
 {
-	kfree(srq->wrid);
+	kvfree(srq->wrid);
 	srq->wrid = NULL;
 }
 
drivers/infiniband/hw/qib/qib_user_sdma.c +1 -1
index ac11943a5ddb..bf2f30d67949 100644
@@ -941,7 +941,7 @@ static int qib_user_sdma_queue_pkts(const struct qib_devdata *dd,
 					       &addrlimit) ||
 			    addrlimit > type_max(typeof(pkt->addrlimit))) {
 				ret = -EINVAL;
-				goto free_pbc;
+				goto free_pkt;
 			}
 			pkt->addrlimit = addrlimit;
 
drivers/input/misc/iqs626a.c +12 -9
index d57e996732cf..23b5dd9552dc 100644
@@ -456,9 +456,10 @@ struct iqs626_private {
 	unsigned int suspend_mode;
 };
 
-static int iqs626_parse_events(struct iqs626_private *iqs626,
-			       const struct fwnode_handle *ch_node,
-			       enum iqs626_ch_id ch_id)
+static noinline_for_stack int
+iqs626_parse_events(struct iqs626_private *iqs626,
+		    const struct fwnode_handle *ch_node,
+		    enum iqs626_ch_id ch_id)
 {
 	struct iqs626_sys_reg *sys_reg = &iqs626->sys_reg;
 	struct i2c_client *client = iqs626->client;
@@ -604,9 +605,10 @@ static int iqs626_parse_events(struct iqs626_private *iqs626,
 	return 0;
 }
 
-static int iqs626_parse_ati_target(struct iqs626_private *iqs626,
-				   const struct fwnode_handle *ch_node,
-				   enum iqs626_ch_id ch_id)
+static noinline_for_stack int
+iqs626_parse_ati_target(struct iqs626_private *iqs626,
+			const struct fwnode_handle *ch_node,
+			enum iqs626_ch_id ch_id)
 {
 	struct iqs626_sys_reg *sys_reg = &iqs626->sys_reg;
 	struct i2c_client *client = iqs626->client;
@@ -885,9 +887,10 @@ static int iqs626_parse_trackpad(struct iqs626_private *iqs626,
 	return 0;
 }
 
-static int iqs626_parse_channel(struct iqs626_private *iqs626,
-				const struct fwnode_handle *ch_node,
-				enum iqs626_ch_id ch_id)
+static noinline_for_stack int
+iqs626_parse_channel(struct iqs626_private *iqs626,
+		     const struct fwnode_handle *ch_node,
+		     enum iqs626_ch_id ch_id)
 {
 	struct iqs626_sys_reg *sys_reg = &iqs626->sys_reg;
 	struct i2c_client *client = iqs626->client;
drivers/input/mouse/elantech.c +7 -1
index 956d9cd34796..ece97f8c6a3e 100644
@@ -1588,7 +1588,13 @@ static const struct dmi_system_id no_hw_res_dmi_table[] = {
  */
 static int elantech_change_report_id(struct psmouse *psmouse)
 {
-	unsigned char param[2] = { 0x10, 0x03 };
+	/*
+	 * NOTE: the code is expecting to receive param[] as an array of 3
+	 * items (see __ps2_command()), even if in this case only 2 are
+	 * actually needed. Make sure the array size is 3 to avoid potential
+	 * stack out-of-bound accesses.
+	 */
+	unsigned char param[3] = { 0x10, 0x03 };
 
 	if (elantech_write_reg_params(psmouse, 0x7, param) ||
 	    elantech_read_reg_params(psmouse, 0x7, param) ||
drivers/input/touchscreen/atmel_mxt_ts.c +1 -1
index 05de92c0293b..eb66cd2689b7 100644
@@ -1882,7 +1882,7 @@ static int mxt_read_info_block(struct mxt_data *data)
 	if (error) {
 		dev_err(&client->dev, "Error %d parsing object table\n", error);
 		mxt_free_object_table(data);
-		goto err_free_mem;
+		return error;
 	}
 
 	data->object_table = (struct mxt_object *)(id_buf + MXT_OBJECT_START);
drivers/input/touchscreen/elants_i2c.c +45 -1

64 lines not on this page · raw message

drivers/input/touchscreen/goodix.c +1 -0
index 4f53d3c57e69..5051a1766aac 100644
@@ -162,6 +162,7 @@ static const struct goodix_chip_id goodix_chip_ids[] = {
 	{ .id = "911", .data = &gt911_chip_data },
 	{ .id = "9271", .data = &gt911_chip_data },
 	{ .id = "9110", .data = &gt911_chip_data },
+	{ .id = "9111", .data = &gt911_chip_data },
 	{ .id = "927", .data = &gt911_chip_data },
 	{ .id = "928", .data = &gt911_chip_data },
 
drivers/mmc/core/core.c +6 -1
index 240c5af793dc..368f10405e13 100644
@@ -2264,7 +2264,7 @@ void mmc_start_host(struct mmc_host *host)
 	_mmc_detect_change(host, 0, false);
 }
 
-void mmc_stop_host(struct mmc_host *host)
+void __mmc_stop_host(struct mmc_host *host)
 {
 	if (host->slot.cd_irq >= 0) {
 		mmc_gpio_set_cd_wake(host, false);
@@ -2273,6 +2273,11 @@ void mmc_stop_host(struct mmc_host *host)
 
 	host->rescan_disable = 1;
 	cancel_delayed_work_sync(&host->detect);
+}
+
+void mmc_stop_host(struct mmc_host *host)
+{
+	__mmc_stop_host(host);
 
 	/* clear pm flags now and let card drivers set them as needed */
 	host->pm_flags = 0;
drivers/mmc/core/core.h +1 -0
index 7931a4f0137d..f5f3f623ea49 100644
@@ -70,6 +70,7 @@ static inline void mmc_delay(unsigned int ms)
 
 void mmc_rescan(struct work_struct *work);
 void mmc_start_host(struct mmc_host *host);
+void __mmc_stop_host(struct mmc_host *host);
 void mmc_stop_host(struct mmc_host *host);
 
 void _mmc_detect_change(struct mmc_host *host, unsigned long delay,
drivers/mmc/core/host.c +9 -0
index d4683b1d263f..cf140f4ec864 100644
@@ -80,9 +80,18 @@ static void mmc_host_classdev_release(struct device *dev)
 	kfree(host);
 }
 
+static int mmc_host_classdev_shutdown(struct device *dev)
+{
+	struct mmc_host *host = cls_dev_to_mmc_host(dev);
+
+	__mmc_stop_host(host);
+	return 0;
+}
+
 static struct class mmc_host_class = {
 	.name		= "mmc_host",
 	.dev_release	= mmc_host_classdev_release,
+	.shutdown_pre	= mmc_host_classdev_shutdown,
 	.pm		= MMC_HOST_CLASS_DEV_PM_OPS,
 };
 
drivers/mmc/host/meson-mx-sdhc-mmc.c +16 -0
index 7cd9c0ec2fcf..8fdd0bbbfa21 100644
@@ -135,6 +135,7 @@ static void meson_mx_sdhc_start_cmd(struct mmc_host *mmc,
 				    struct mmc_command *cmd)
 {
 	struct meson_mx_sdhc_host *host = mmc_priv(mmc);
+	bool manual_stop = false;
 	u32 ictl, send;
 	int pack_len;
 
@@ -172,12 +173,27 @@ static void meson_mx_sdhc_start_cmd(struct mmc_host *mmc,
 		else
 			/* software flush: */
 			ictl |= MESON_SDHC_ICTL_DATA_XFER_OK;
+
+		/*
+		 * Mimic the logic from the vendor driver where (only)
+		 * SD_IO_RW_EXTENDED commands with more than one block set the
+		 * MESON_SDHC_MISC_MANUAL_STOP bit. This fixes the firmware
+		 * download in the brcmfmac driver for a BCM43362/1 card.
+		 * Without this sdio_memcpy_toio() (with a size of 219557
+		 * bytes) times out if MESON_SDHC_MISC_MANUAL_STOP is not set.
+		 */
+		manual_stop = cmd->data->blocks > 1 &&
+			      cmd->opcode == SD_IO_RW_EXTENDED;
 	} else {
 		pack_len = 0;
 
 		ictl |= MESON_SDHC_ICTL_RESP_OK;
 	}
 
+	regmap_update_bits(host->regmap, MESON_SDHC_MISC,
+			   MESON_SDHC_MISC_MANUAL_STOP,
+			   manual_stop ? MESON_SDHC_MISC_MANUAL_STOP : 0);
+
 	if (cmd->opcode == MMC_STOP_TRANSMISSION)
 		send |= MESON_SDHC_SEND_DATA_STOP;
 
drivers/mmc/host/mmci_stm32_sdmmc.c +2 -0
index fdaa11f92fe6..a75d3dd34d18 100644
@@ -441,6 +441,8 @@ static int sdmmc_dlyb_phase_tuning(struct mmci_host *host, u32 opcode)
 		return -EINVAL;
 	}
 
+	writel_relaxed(0, dlyb->base + DLYB_CR);
+
 	phase = end_of_len - max_len / 2;
 	sdmmc_dlyb_set_cfgr(dlyb, dlyb->unit, phase, false);
 
drivers/mmc/host/sdhci-tegra.c +26 -17

55 lines not on this page · raw message

drivers/net/bonding/bond_options.c +1 -1
index a8fde3bc458f..b93337b5a721 100644
@@ -1526,7 +1526,7 @@ static int bond_option_ad_actor_system_set(struct bonding *bond,
 		mac = (u8 *)&newval->value;
 	}
 
-	if (!is_valid_ether_addr(mac))
+	if (is_multicast_ether_addr(mac))
 		goto err;
 
 	netdev_dbg(bond->dev, "Setting ad_actor_system to %pM\n", mac);
drivers/net/ethernet/intel/ice/ice_txrx.h +5 -11
index 1e46e80f3d6f..7c2328529ff8 100644
@@ -164,17 +164,10 @@ struct ice_tx_offload_params {
 };
 
 struct ice_rx_buf {
-	union {
-		struct {
-			dma_addr_t dma;
-			struct page *page;
-			unsigned int page_offset;
-			u16 pagecnt_bias;
-		};
-		struct {
-			struct xdp_buff *xdp;
-		};
-	};
+	dma_addr_t dma;
+	struct page *page;
+	unsigned int page_offset;
+	u16 pagecnt_bias;
 };
 
 struct ice_q_stats {
@@ -270,6 +263,7 @@ struct ice_ring {
 	union {
 		struct ice_tx_buf *tx_buf;
 		struct ice_rx_buf *rx_buf;
+		struct xdp_buff **xdp_buf;
 	};
 	/* CL2 - 2nd cacheline starts here */
 	u16 q_index;			/* Queue number of ring */
drivers/net/ethernet/intel/ice/ice_xsk.c +32 -32

144 lines not on this page · raw message

drivers/net/ethernet/intel/igb/igb_main.c +13 -6
index 533199d81950..82a712f77cb3 100644
@@ -9247,7 +9247,7 @@ static int __maybe_unused igb_suspend(struct device *dev)
 	return __igb_shutdown(to_pci_dev(dev), NULL, 0);
 }
 
-static int __maybe_unused igb_resume(struct device *dev)
+static int __maybe_unused __igb_resume(struct device *dev, bool rpm)
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
 	struct net_device *netdev = pci_get_drvdata(pdev);
@@ -9290,17 +9290,24 @@ static int __maybe_unused igb_resume(struct device *dev)
 
 	wr32(E1000_WUS, ~0);
 
-	rtnl_lock();
+	if (!rpm)
+		rtnl_lock();
 	if (!err && netif_running(netdev))
 		err = __igb_open(netdev, true);
 
 	if (!err)
 		netif_device_attach(netdev);
-	rtnl_unlock();
+	if (!rpm)
+		rtnl_unlock();
 
 	return err;
 }
 
+static int __maybe_unused igb_resume(struct device *dev)
+{
+	return __igb_resume(dev, false);
+}
+
 static int __maybe_unused igb_runtime_idle(struct device *dev)
 {
 	struct net_device *netdev = dev_get_drvdata(dev);
@@ -9319,7 +9326,7 @@ static int __maybe_unused igb_runtime_suspend(struct device *dev)
 
 static int __maybe_unused igb_runtime_resume(struct device *dev)
 {
-	return igb_resume(dev);
+	return __igb_resume(dev, true);
 }
 
 static void igb_shutdown(struct pci_dev *pdev)
@@ -9435,7 +9442,7 @@ static pci_ers_result_t igb_io_error_detected(struct pci_dev *pdev,
  *  @pdev: Pointer to PCI device
  *
  *  Restart the card from scratch, as if from a cold-boot. Implementation
- *  resembles the first-half of the igb_resume routine.
+ *  resembles the first-half of the __igb_resume routine.
  **/
 static pci_ers_result_t igb_io_slot_reset(struct pci_dev *pdev)
 {
@@ -9475,7 +9482,7 @@ static pci_ers_result_t igb_io_slot_reset(struct pci_dev *pdev)
  *
  *  This callback is called when the error recovery driver tells us that
  *  its OK to resume normal operation. Implementation resembles the
- *  second-half of the igb_resume routine.
+ *  second-half of the __igb_resume routine.
  */
 static void igb_io_resume(struct pci_dev *pdev)
 {
drivers/net/ethernet/marvell/prestera/prestera_main.c +22 -13
index 44c670807fb3..aa543b29799e 100644
@@ -54,12 +54,14 @@ int prestera_port_pvid_set(struct prestera_port *port, u16 vid)
 struct prestera_port *prestera_port_find_by_hwid(struct prestera_switch *sw,
 						 u32 dev_id, u32 hw_id)
 {
-	struct prestera_port *port = NULL;
+	struct prestera_port *port = NULL, *tmp;
 
 	read_lock(&sw->port_list_lock);
-	list_for_each_entry(port, &sw->port_list, list) {
-		if (port->dev_id == dev_id && port->hw_id == hw_id)
+	list_for_each_entry(tmp, &sw->port_list, list) {
+		if (tmp->dev_id == dev_id && tmp->hw_id == hw_id) {
+			port = tmp;
 			break;
+		}
 	}
 	read_unlock(&sw->port_list_lock);
 
@@ -68,12 +70,14 @@ struct prestera_port *prestera_port_find_by_hwid(struct prestera_switch *sw,
 
 struct prestera_port *prestera_find_port(struct prestera_switch *sw, u32 id)
 {
-	struct prestera_port *port = NULL;
+	struct prestera_port *port = NULL, *tmp;
 
 	read_lock(&sw->port_list_lock);
-	list_for_each_entry(port, &sw->port_list, list) {
-		if (port->id == id)
+	list_for_each_entry(tmp, &sw->port_list, list) {
+		if (tmp->id == id) {
+			port = tmp;
 			break;
+		}
 	}
 	read_unlock(&sw->port_list_lock);
 
@@ -703,23 +707,27 @@ static int prestera_netdev_port_event(struct net_device *lower,
 				      struct net_device *dev,
 				      unsigned long event, void *ptr)
 {
-	struct netdev_notifier_changeupper_info *info = ptr;
+	struct netdev_notifier_info *info = ptr;
+	struct netdev_notifier_changeupper_info *cu_info;
 	struct prestera_port *port = netdev_priv(dev);
 	struct netlink_ext_ack *extack;
 	struct net_device *upper;
 
-	extack = netdev_notifier_info_to_extack(&info->info);
-	upper = info->upper_dev;
+	extack = netdev_notifier_info_to_extack(info);
+	cu_info = container_of(info,
+			       struct netdev_notifier_changeupper_info,
+			       info);
 
 	switch (event) {
 	case NETDEV_PRECHANGEUPPER:
+		upper = cu_info->upper_dev;
 		if (!netif_is_bridge_master(upper) &&
 		    !netif_is_lag_master(upper)) {
 			NL_SET_ERR_MSG_MOD(extack, "Unknown upper device type");
 			return -EINVAL;
 		}
 
-		if (!info->linking)
+		if (!cu_info->linking)
 			break;
 
 		if (netdev_has_any_upper_dev(upper)) {
@@ -728,7 +736,7 @@ static int prestera_netdev_port_event(struct net_device *lower,
 		}
 
 		if (netif_is_lag_master(upper) &&
-		    !prestera_lag_master_check(upper, info->upper_info, extack))
+		    !prestera_lag_master_check(upper, cu_info->upper_info, extack))
 			return -EOPNOTSUPP;
 		if (netif_is_lag_master(upper) && vlan_uses_dev(dev)) {
 			NL_SET_ERR_MSG_MOD(extack,
@@ -744,14 +752,15 @@ static int prestera_netdev_port_event(struct net_device *lower,
 		break;
 
 	case NETDEV_CHANGEUPPER:
+		upper = cu_info->upper_dev;
 		if (netif_is_bridge_master(upper)) {
-			if (info->linking)
+			if (cu_info->linking)
 				return prestera_bridge_port_join(upper, port,
 								 extack);
 			else
 				prestera_bridge_port_leave(upper, port);
 		} else if (netif_is_lag_master(upper)) {
-			if (info->linking)
+			if (cu_info->linking)
 				return prestera_lag_port_add(port, upper);
 			else
 				prestera_lag_port_del(port);
drivers/net/ethernet/micrel/ks8851_par.c +2 -0
index 2e8fcce50f9d..c6f517c07bb9 100644
@@ -321,6 +321,8 @@ static int ks8851_probe_par(struct platform_device *pdev)
 		return ret;
 
 	netdev->irq = platform_get_irq(pdev, 0);
+	if (netdev->irq < 0)
+		return netdev->irq;
 
 	return ks8851_probe_common(netdev, dev, msg_enable);
 }
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h +1 -1
index 7160b42f51dd..d0111cb3b40e 100644
@@ -201,7 +201,7 @@ int qlcnic_sriov_get_vf_vport_info(struct qlcnic_adapter *,
 				   struct qlcnic_info *, u16);
 int qlcnic_sriov_cfg_vf_guest_vlan(struct qlcnic_adapter *, u16, u8);
 void qlcnic_sriov_free_vlans(struct qlcnic_adapter *);
-void qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *);
+int qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *);
 bool qlcnic_sriov_check_any_vlan(struct qlcnic_vf_info *);
 void qlcnic_sriov_del_vlan_id(struct qlcnic_sriov *,
 			      struct qlcnic_vf_info *, u16);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c +9 -3
index dd03be3fc82a..42a44c97572a 100644
@@ -432,7 +432,7 @@ static int qlcnic_sriov_set_guest_vlan_mode(struct qlcnic_adapter *adapter,
 					    struct qlcnic_cmd_args *cmd)
 {
 	struct qlcnic_sriov *sriov = adapter->ahw->sriov;
-	int i, num_vlans;
+	int i, num_vlans, ret;
 	u16 *vlans;
 
 	if (sriov->allowed_vlans)
@@ -443,7 +443,9 @@ static int qlcnic_sriov_set_guest_vlan_mode(struct qlcnic_adapter *adapter,
 	dev_info(&adapter->pdev->dev, "Number of allowed Guest VLANs = %d\n",
 		 sriov->num_allowed_vlans);
 
-	qlcnic_sriov_alloc_vlans(adapter);
+	ret = qlcnic_sriov_alloc_vlans(adapter);
+	if (ret)
+		return ret;
 
 	if (!sriov->any_vlan)
 		return 0;
@@ -2154,7 +2156,7 @@ static int qlcnic_sriov_vf_resume(struct qlcnic_adapter *adapter)
 	return err;
 }
 
-void qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *adapter)
+int qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *adapter)
 {
 	struct qlcnic_sriov *sriov = adapter->ahw->sriov;
 	struct qlcnic_vf_info *vf;
@@ -2164,7 +2166,11 @@ void qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *adapter)
 		vf = &sriov->vf_info[i];
 		vf->sriov_vlans = kcalloc(sriov->num_allowed_vlans,
 					  sizeof(*vf->sriov_vlans), GFP_KERNEL);
+		if (!vf->sriov_vlans)
+			return -ENOMEM;
 	}
+
+	return 0;
 }
 
 void qlcnic_sriov_free_vlans(struct qlcnic_adapter *adapter)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c +3 -1
index 447720b93e5a..e90fa97c0ae6 100644
@@ -597,7 +597,9 @@ static int __qlcnic_pci_sriov_enable(struct qlcnic_adapter *adapter,
 	if (err)
 		goto del_flr_queue;
 
-	qlcnic_sriov_alloc_vlans(adapter);
+	err = qlcnic_sriov_alloc_vlans(adapter);
+	if (err)
+		goto del_flr_queue;
 
 	return err;
 
drivers/net/ethernet/sfc/falcon/rx.c +4 -1
index 966f13e7475d..11a6aee852e9 100644
@@ -728,7 +728,10 @@ static void ef4_init_rx_recycle_ring(struct ef4_nic *efx,
 					    efx->rx_bufs_per_page);
 	rx_queue->page_ring = kcalloc(page_ring_size,
 				      sizeof(*rx_queue->page_ring), GFP_KERNEL);
-	rx_queue->page_ptr_mask = page_ring_size - 1;
+	if (!rx_queue->page_ring)
+		rx_queue->page_ptr_mask = 0;
+	else
+		rx_queue->page_ptr_mask = page_ring_size - 1;
 }
 
 void ef4_init_rx_queue(struct ef4_rx_queue *rx_queue)
drivers/net/ethernet/sfc/rx_common.c +4 -1
index 68fc7d317693..0983abc0cc5f 100644
@@ -150,7 +150,10 @@ static void efx_init_rx_recycle_ring(struct efx_rx_queue *rx_queue)
 					    efx->rx_bufs_per_page);
 	rx_queue->page_ring = kcalloc(page_ring_size,
 				      sizeof(*rx_queue->page_ring), GFP_KERNEL);
-	rx_queue->page_ptr_mask = page_ring_size - 1;
+	if (!rx_queue->page_ring)
+		rx_queue->page_ptr_mask = 0;
+	else
+		rx_queue->page_ptr_mask = page_ring_size - 1;
 }
 
 static void efx_fini_rx_recycle_ring(struct efx_rx_queue *rx_queue)
drivers/net/ethernet/smsc/smc911x.c +5 -0
index b008b4e8a2a5..0641a1d392b8 100644
@@ -2070,6 +2070,11 @@ static int smc911x_drv_probe(struct platform_device *pdev)
 
 	ndev->dma = (unsigned char)-1;
 	ndev->irq = platform_get_irq(pdev, 0);
+	if (ndev->irq < 0) {
+		ret = ndev->irq;
+		goto release_both;
+	}
+
 	lp = netdev_priv(ndev);
 	lp->netdev = ndev;
 #ifdef SMC_DYNAMIC_BUS_CONFIG
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c +1 -1
index d046e33b8a29..fac788718c04 100644
@@ -26,7 +26,7 @@
 #define ETHER_CLK_SEL_FREQ_SEL_125M	(BIT(9) | BIT(8))
 #define ETHER_CLK_SEL_FREQ_SEL_50M	BIT(9)
 #define ETHER_CLK_SEL_FREQ_SEL_25M	BIT(8)
-#define ETHER_CLK_SEL_FREQ_SEL_2P5M	BIT(0)
+#define ETHER_CLK_SEL_FREQ_SEL_2P5M	0
 #define ETHER_CLK_SEL_TX_CLK_EXT_SEL_IN BIT(0)
 #define ETHER_CLK_SEL_TX_CLK_EXT_SEL_TXC BIT(10)
 #define ETHER_CLK_SEL_TX_CLK_EXT_SEL_DIV BIT(11)
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c +1 -1
index 580cc035536b..be9b58b2abf9 100644
@@ -102,7 +102,7 @@ static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta)
 		time.tv_nsec = priv->plat->est->btr_reserve[0];
 		time.tv_sec = priv->plat->est->btr_reserve[1];
 		basetime = timespec64_to_ktime(time);
-		cycle_time = priv->plat->est->ctr[1] * NSEC_PER_SEC +
+		cycle_time = (u64)priv->plat->est->ctr[1] * NSEC_PER_SEC +
 			     priv->plat->est->ctr[0];
 		time = stmmac_calc_tas_basetime(basetime,
 						current_time_ns,
drivers/net/fjes/fjes_main.c +5 -0
index 185c8a398681..1d1808afd529 100644
@@ -1261,6 +1261,11 @@ static int fjes_probe(struct platform_device *plat_dev)
 	hw->hw_res.start = res->start;
 	hw->hw_res.size = resource_size(res);
 	hw->hw_res.irq = platform_get_irq(plat_dev, 0);
+	if (hw->hw_res.irq < 0) {
+		err = hw->hw_res.irq;
+		goto err_free_control_wq;
+	}
+
 	err = fjes_hw_init(&adapter->hw);
 	if (err)
 		goto err_free_control_wq;
drivers/net/hamradio/mkiss.c +3 -2
index 8666110bec55..35728f1af6a6 100644
@@ -792,13 +792,14 @@ static void mkiss_close(struct tty_struct *tty)
 	 */
 	netif_stop_queue(ax->dev);
 
-	/* Free all AX25 frame buffers. */
+	unregister_netdev(ax->dev);
+
+	/* Free all AX25 frame buffers after unreg. */
 	kfree(ax->rbuff);
 	kfree(ax->xbuff);
 
 	ax->tty = NULL;
 
-	unregister_netdev(ax->dev);
 	free_netdev(ax->dev);
 }
 
drivers/net/tun.c +59 -56

172 lines not on this page · raw message

drivers/net/usb/asix_common.c +5 -3
index 38cda590895c..9aa92076500a 100644
@@ -9,6 +9,8 @@
 
 #include "asix.h"
 
+#define AX_HOST_EN_RETRIES	30
+
 int asix_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
 		  u16 size, void *data, int in_pm)
 {
@@ -68,7 +70,7 @@ static int asix_check_host_enable(struct usbnet *dev, int in_pm)
 	int i, ret;
 	u8 smsr;
 
-	for (i = 0; i < 30; ++i) {
+	for (i = 0; i < AX_HOST_EN_RETRIES; ++i) {
 		ret = asix_set_sw_mii(dev, in_pm);
 		if (ret == -ENODEV || ret == -ETIMEDOUT)
 			break;
@@ -77,13 +79,13 @@ static int asix_check_host_enable(struct usbnet *dev, int in_pm)
 				    0, 0, 1, &smsr, in_pm);
 		if (ret == -ENODEV)
 			break;
-		else if (ret < 0)
+		else if (ret < sizeof(smsr))
 			continue;
 		else if (smsr & AX_HOST_EN)
 			break;
 	}
 
-	return ret;
+	return i >= AX_HOST_EN_RETRIES ? -ETIMEDOUT : ret;
 }
 
 static void reset_asix_rx_fixup_info(struct asix_rx_fixup_info *rx)
drivers/net/usb/lan78xx.c +6 -0
index a0401a9dade5..3e1a83a22fdd 100644
@@ -76,6 +76,8 @@
 #define LAN7801_USB_PRODUCT_ID		(0x7801)
 #define LAN78XX_EEPROM_MAGIC		(0x78A5)
 #define LAN78XX_OTP_MAGIC		(0x78F3)
+#define AT29M2AF_USB_VENDOR_ID		(0x07C9)
+#define AT29M2AF_USB_PRODUCT_ID	(0x0012)
 
 #define	MII_READ			1
 #define	MII_WRITE			0
@@ -4734,6 +4736,10 @@ static const struct usb_device_id products[] = {
 	/* LAN7801 USB Gigabit Ethernet Device */
 	USB_DEVICE(LAN78XX_USB_VENDOR_ID, LAN7801_USB_PRODUCT_ID),
 	},
+	{
+	/* ATM2-AF USB Gigabit Ethernet Device */
+	USB_DEVICE(AT29M2AF_USB_VENDOR_ID, AT29M2AF_USB_PRODUCT_ID),
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(usb, products);
drivers/net/usb/r8152.c +39 -4

133 lines not on this page · raw message

drivers/net/veth.c +6 -2
index 50eb43e5bf45..2acdb8ad6c71 100644
@@ -879,8 +879,12 @@ static int veth_xdp_rcv(struct veth_rq *rq, int budget,
 
 			stats->xdp_bytes += skb->len;
 			skb = veth_xdp_rcv_skb(rq, skb, bq, stats);
-			if (skb)
-				napi_gro_receive(&rq->xdp_napi, skb);
+			if (skb) {
+				if (skb_shared(skb) || skb_unclone(skb, GFP_ATOMIC))
+					netif_receive_skb(skb);
+				else
+					napi_gro_receive(&rq->xdp_napi, skb);
+			}
 		}
 		done++;
 	}
drivers/pinctrl/bcm/pinctrl-bcm2835.c +16 -13
index 6e6fefeb21ea..cc39c0e18b47 100644
@@ -1243,6 +1243,18 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
 		raw_spin_lock_init(&pc->irq_lock[i]);
 	}
 
+	pc->pctl_desc = *pdata->pctl_desc;
+	pc->pctl_dev = devm_pinctrl_register(dev, &pc->pctl_desc, pc);
+	if (IS_ERR(pc->pctl_dev)) {
+		gpiochip_remove(&pc->gpio_chip);
+		return PTR_ERR(pc->pctl_dev);
+	}
+
+	pc->gpio_range = *pdata->gpio_range;
+	pc->gpio_range.base = pc->gpio_chip.base;
+	pc->gpio_range.gc = &pc->gpio_chip;
+	pinctrl_add_gpio_range(pc->pctl_dev, &pc->gpio_range);
+
 	girq = &pc->gpio_chip.irq;
 	girq->chip = &bcm2835_gpio_irq_chip;
 	girq->parent_handler = bcm2835_gpio_irq_handler;
@@ -1250,8 +1262,10 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
 	girq->parents = devm_kcalloc(dev, BCM2835_NUM_IRQS,
 				     sizeof(*girq->parents),
 				     GFP_KERNEL);
-	if (!girq->parents)
+	if (!girq->parents) {
+		pinctrl_remove_gpio_range(pc->pctl_dev, &pc->gpio_range);
 		return -ENOMEM;
+	}
 
 	if (is_7211) {
 		pc->wake_irq = devm_kcalloc(dev, BCM2835_NUM_IRQS,
@@ -1306,21 +1320,10 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
 	err = gpiochip_add_data(&pc->gpio_chip, pc);
 	if (err) {
 		dev_err(dev, "could not add GPIO chip\n");
+		pinctrl_remove_gpio_range(pc->pctl_dev, &pc->gpio_range);
 		return err;
 	}
 
-	pc->pctl_desc = *pdata->pctl_desc;
-	pc->pctl_dev = devm_pinctrl_register(dev, &pc->pctl_desc, pc);
-	if (IS_ERR(pc->pctl_dev)) {
-		gpiochip_remove(&pc->gpio_chip);
-		return PTR_ERR(pc->pctl_dev);
-	}
-
-	pc->gpio_range = *pdata->gpio_range;
-	pc->gpio_range.base = pc->gpio_chip.base;
-	pc->gpio_range.gc = &pc->gpio_chip;
-	pinctrl_add_gpio_range(pc->pctl_dev, &pc->gpio_range);
-
 	return 0;
 }
 
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c +6 -2
index 45ebdeba985a..12163d3c4bcb 100644
@@ -285,8 +285,12 @@ static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n,
 	desc = (const struct mtk_pin_desc *)hw->soc->pins;
 	*gpio_chip = &hw->chip;
 
-	/* Be greedy to guess first gpio_n is equal to eint_n */
-	if (desc[eint_n].eint.eint_n == eint_n)
+	/*
+	 * Be greedy to guess first gpio_n is equal to eint_n.
+	 * Only eint virtual eint number is greater than gpio number.
+	 */
+	if (hw->soc->npins > eint_n &&
+	    desc[eint_n].eint.eint_n == eint_n)
 		*gpio_n = eint_n;
 	else
 		*gpio_n = mtk_xt_find_eint_num(hw, eint_n);
drivers/pinctrl/stm32/pinctrl-stm32.c +4 -4
index dfd8888a222a..8934b4878fa8 100644
@@ -1251,10 +1251,10 @@ static int stm32_gpiolib_register_bank(struct stm32_pinctrl *pctl,
 		bank_nr = args.args[1] / STM32_GPIO_PINS_PER_BANK;
 		bank->gpio_chip.base = args.args[1];
 
-		npins = args.args[2];
-		while (!of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3,
-							 ++i, &args))
-			npins += args.args[2];
+		/* get the last defined gpio line (offset + nb of pins) */
+		npins = args.args[0] + args.args[2];
+		while (!of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, ++i, &args))
+			npins = max(npins, (int)(args.args[0] + args.args[2]));
 	} else {
 		bank_nr = pctl->nbanks;
 		bank->gpio_chip.base = bank_nr * STM32_GPIO_PINS_PER_BANK;
drivers/platform/x86/Makefile +1 -1
index 69690e26bb6d..2734a771d1f0 100644
@@ -67,7 +67,7 @@ obj-$(CONFIG_THINKPAD_ACPI)	+= thinkpad_acpi.o
 obj-$(CONFIG_THINKPAD_LMI)	+= think-lmi.o
 
 # Intel
-obj-$(CONFIG_X86_PLATFORM_DRIVERS_INTEL)		+= intel/
+obj-y				+= intel/
 
 # MSI
 obj-$(CONFIG_MSI_LAPTOP)	+= msi-laptop.o
drivers/platform/x86/amd-pmc.c +2 -1
index 54b88bedecdf..d3efd514614c 100644
@@ -375,7 +375,8 @@ static int __maybe_unused amd_pmc_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops amd_pmc_pm_ops = {
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(amd_pmc_suspend, amd_pmc_resume)
+	.suspend_noirq = amd_pmc_suspend,
+	.resume_noirq = amd_pmc_resume,
 };
 
 static const struct pci_device_id pmc_pci_ids[] = {
drivers/platform/x86/intel/Kconfig +0 -15
index 0b21468e1bd0..02e4481b384e 100644
@@ -3,19 +3,6 @@
 # Intel x86 Platform Specific Drivers
 #
 
-menuconfig X86_PLATFORM_DRIVERS_INTEL
-	bool "Intel x86 Platform Specific Device Drivers"
-	default y
-	help
-	  Say Y here to get to see options for device drivers for
-	  various Intel x86 platforms, including vendor-specific
-	  drivers. This option alone does not add any kernel code.
-
-	  If you say N, all options in this submenu will be skipped
-	  and disabled.
-
-if X86_PLATFORM_DRIVERS_INTEL
-
 source "drivers/platform/x86/intel/atomisp2/Kconfig"
 source "drivers/platform/x86/intel/int1092/Kconfig"
 source "drivers/platform/x86/intel/int33fe/Kconfig"
@@ -167,5 +154,3 @@ config INTEL_UNCORE_FREQ_CONTROL
 
 	  To compile this driver as a module, choose M here: the module
 	  will be called intel-uncore-frequency.
-
-endif # X86_PLATFORM_DRIVERS_INTEL
drivers/platform/x86/intel/pmc/pltdrv.c +1 -1
index 73797680b895..15ca8afdd973 100644
@@ -65,7 +65,7 @@ static int __init pmc_core_platform_init(void)
 
 	retval = platform_device_register(pmc_core_device);
 	if (retval)
-		kfree(pmc_core_device);
+		platform_device_put(pmc_core_device);
 
 	return retval;
 }
drivers/spi/spi-armada-3700.c +1 -1
index 46feafe4e201..d8cc4b270644 100644
@@ -901,7 +901,7 @@ static int a3700_spi_probe(struct platform_device *pdev)
 	return 0;
 
 error_clk:
-	clk_disable_unprepare(spi->clk);
+	clk_unprepare(spi->clk);
 error:
 	spi_master_put(master);
 out:
drivers/tee/optee/shm_pool.c +2 -4
index d167039af519..1aa843f2ecc7 100644
@@ -41,10 +41,8 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
 			goto err;
 		}
 
-		for (i = 0; i < nr_pages; i++) {
-			pages[i] = page;
-			page++;
-		}
+		for (i = 0; i < nr_pages; i++)
+			pages[i] = page + i;
 
 		shm->flags |= TEE_SHM_REGISTER;
 		rc = optee_shm_register(shm->ctx, shm, pages, nr_pages,
drivers/tee/tee_shm.c +66 -105

260 lines not on this page · raw message

fs/ext4/extents.c +64 -31

208 lines not on this page · raw message

fs/f2fs/xattr.c +10 -1
index 1d2d29dcd41c..6a3b3bec7989 100644

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

fs/io_uring.c +7 -3
index e9b06e339c4b..0006fc7479ca 100644

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

fs/ksmbd/ndr.c +1 -1
index 8317f7ca402b..5052be9261d9 100644

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

fs/ksmbd/smb2ops.c +0 -3
index fb6a65d23139..2a6205103df2 100644

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

fs/ksmbd/smb2pdu.c +25 -4
index ad0ea5d36f2e..cb71cbfc5fc9 100644

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

fs/netfs/read_helper.c +3 -3
index 4b54529f8176..242f8bcb34a4 100644

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

fs/nfsd/nfs3proc.c +4 -7
index 17715a6c7a40..a0ccba636bf9 100644

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

fs/nfsd/nfsproc.c +4 -4
index 90fcd6178823..19c568b8a527 100644

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

include/linux/compiler.h +2 -2
index 3d5af56337bd..429dcebe2b99 100644

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

include/linux/instrumentation.h +2 -2
index fa2cd8c63dcc..24359b4a9605 100644

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

include/linux/ipv6.h +0 -1
index ef4a69865737..c383630d3f06 100644

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

include/linux/tee_drv.h +2 -2
index 3ebfea0781f1..feda1dc7f98e 100644

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

include/linux/virtio_net.h +23 -2
index 04e87f4b9417..a960de68ac69 100644

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

include/net/inet_sock.h +1 -2
index 89163ef8cf4b..9e1111f5915b 100644

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

include/net/sock.h +6 -1
index 7ac5075f9c18..dfb92f91d5be 100644

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

include/uapi/linux/byteorder/big_endian.h +1 -0
index 2199adc6a6c2..80aa5c41a763 100644

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

include/uapi/linux/byteorder/little_endian.h +1 -0
index 601c904fd5cd..cd98982e7523 100644

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

kernel/crash_core.c +11 -0
index eb53f5ec62c9..256cf6db573c 100644

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

kernel/ucount.c +9 -6
index eb03f3c68375..16feb710ee63 100644

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

mm/damon/dbgfs.c +2 -0
index f94d19a690df..d3bc110430f9 100644

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

mm/kfence/core.c +1 -0
index 4b69236aea72..84555b8233ef 100644

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

mm/memory-failure.c +5 -9
index bdbbb32211a5..f66977a17196 100644

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

mm/mempolicy.c +1 -2
index d12e0608fced..fa9ed9c98739 100644

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

net/ax25/af_ax25.c +3 -1
index 2631efc6e359..aa7785687e75 100644

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

net/bridge/br_ioctl.c +5 -3
index 793b0db9d9a3..9922497e59f8 100644

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

net/ipv4/af_inet.c +1 -1
index 64062b7ce61d..3a9422a5873e 100644

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

net/ipv4/tcp.c +1 -2
index 844c6e5a8289..f48f1059b31a 100644

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

net/ipv4/tcp_input.c +1 -1
index 141e85e6422b..f3b623967436 100644

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

net/ipv4/tcp_ipv4.c +10 -7
index 5b8ce65dfc06..0fe9461647da 100644

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

net/ipv4/udp.c +3 -3
index 3f6823bdd31e..be07e3d2b77b 100644

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

net/ipv6/tcp_ipv6.c +13 -10
index b03dd02c9f13..8eedf59e9cf2 100644

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

net/ipv6/udp.c +4 -4
index be6dc64ece29..7bee95d8d2df 100644

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

net/mac80211/cfg.c +3 -0
index d3f62fd12f0b..1bf83b8d8402 100644

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

net/netfilter/nf_tables_api.c +2 -2
index c0851fec11d4..c20772822637 100644

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

net/netfilter/nfnetlink_log.c +2 -1
index 691ef4cffdd9..7f83f9697fc1 100644

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

net/netfilter/nfnetlink_queue.c +2 -1
index 4acc4b8e9fe5..959527708e38 100644

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

net/phonet/pep.c +2 -0
index a1525916885a..72018e5e4d8e 100644

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

sound/core/jack.c +4 -0
index 32350c6aba84..537df1e98f8a 100644

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

sound/core/rawmidi.c +1 -0
index 6f30231bdb88..befa9809ff00 100644

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

sound/drivers/opl3/opl3_midi.c +1 -1
index e1b69c65c3c8..e2b7be67f0e3 100644

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

sound/pci/hda/patch_hdmi.c +15 -6
index 415701bd10ac..ffcde7409d2a 100644

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

sound/pci/hda/patch_realtek.c +28 -1
index 3599f4c85ebf..28255e752c4a 100644

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

sound/soc/codecs/rt5682.c +4 -0
index 5ac2b1444694..757d1362b5f4 100644

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

sound/soc/codecs/tas2770.c +2 -2
index 172e79cbe0da..6549e7fef3e3 100644

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

sound/soc/meson/aiu-encoder-i2s.c +0 -33
index 932224552146..67729de41a73 100644

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

sound/soc/meson/aiu-fifo-i2s.c +19 -0
index 2388a2d0b3a6..57e6e7160d2f 100644

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

sound/soc/meson/aiu-fifo.c +6 -0
index 4ad23267cace..d67ff4cdabd5 100644

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

sound/soc/sof/intel/pci-tgl.c +4 -0
index d04ce84fe7cc..beb2fb3cd014 100644

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

sound/soc/tegra/tegra_asoc_machine.c +10 -1
index 78fb423df550..2e549b69061c 100644

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

sound/soc/tegra/tegra_asoc_machine.h +1 -0
index d6a8d1320551..6f795d7dff7c 100644

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

tools/testing/selftests/kvm/include/kvm_util.h +1 -9
index 35314277fb58..1876d148ea0a 100644

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

tools/testing/selftests/kvm/lib/kvm_util.c +5 -0
index c439fb653fde..e9d0ab9567fb 100644

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.