Skip to contentSkip to conversation

5.16.3-rc1 review

PATCH In review Greg Kroah-Hartman 12 participants 1,058 messages Jan 24, 2022 – Feb 3, 2022 Page 1 of 8

Subsystems (9)
lore
Share & tools
lore
author maintainer
#73 lore raw

PATCH 73/1039 dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()

In reply to Greg Kroah-Hartman

From: Thomas Hellström <[email protected]>

commit 95d35838880fb040ccb9fe4a48816bd0c8b62df5 upstream.

If a dma_fence_array is reported signaled by a call to dma_fence_is_signaled(), it may leak the PENDING_ERROR status.

Fix this by clearing the PENDING_ERROR status if we return true in dma_fence_array_signaled().

v2:
- Update Cc list, and add R-b.

Fixes 1f70b8b812f3 ("dma-fence: Propagate errors to dma-fence-array container")
Cc Chris Wilson <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Gustavo Padovan <[email protected]>
Cc Christian König <[email protected]>
Cc "Christian König" <[email protected]>
Cc <[email protected]> # v5.4+
---
 drivers/dma-buf/dma-fence-array.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/dma-buf/dma-fence-array.c +5 -1
@@ -104,7 +104,11 @@ static bool dma_fence_array_signaled(str
 {
 	struct dma_fence_array *array = to_dma_fence_array(fence);
 
-	return atomic_read(&array->num_pending) <= 0;
+	if (atomic_read(&array->num_pending) > 0)
+		return false;
+
+	dma_fence_array_clear_pending_error(array);
+	return true;
 }
 
 static void dma_fence_array_release(struct dma_fence *fence)
author maintainer
#2 lore raw

PATCH 2/1039 KVM: VMX: switch blocked_vcpu_on_cpu_lock to raw spinlock

In reply to Greg Kroah-Hartman

From: Marcelo Tosatti <[email protected]>

commit 5f02ef741a785678930f3ff0a8b6b2b0ef1bb402 upstream.

blocked_vcpu_on_cpu_lock is taken from hard interrupt context (pi_wakeup_handler), therefore it cannot sleep.

Switch it to a raw spinlock.

Fixes:

[41297.066254] BUG: scheduling while atomic: CPU 0/KVM/635218/0x00010001
[41297.066323] Preemption disabled at:
[41297.066324] [<ffffffff902ee47f>] irq_enter_rcu+0xf/0x60
[41297.066339] Call Trace:
[41297.066342]  <IRQ>
[41297.066346]  dump_stack_lvl+0x34/0x44
[41297.066353]  ? irq_enter_rcu+0xf/0x60
[41297.066356]  __schedule_bug.cold+0x7d/0x8b
[41297.066361]  __schedule+0x439/0x5b0
[41297.066365]  ? task_blocks_on_rt_mutex.constprop.0.isra.0+0x1b0/0x440
[41297.066369]  schedule_rtlock+0x1e/0x40
[41297.066371]  rtlock_slowlock_locked+0xf1/0x260
[41297.066374]  rt_spin_lock+0x3b/0x60
[41297.066378]  pi_wakeup_handler+0x31/0x90 [kvm_intel]
[41297.066388]  sysvec_kvm_posted_intr_wakeup_ipi+0x9d/0xd0
[41297.066392]  </IRQ>
[41297.066392]  asm_sysvec_kvm_posted_intr_wakeup_ipi+0x12/0x20

...

---
 arch/x86/kvm/vmx/posted_intr.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
arch/x86/kvm/vmx/posted_intr.c +8 -8
@@ -15,7 +15,7 @@
  * can find which vCPU should be waken up.
  */
 static DEFINE_PER_CPU(struct list_head, blocked_vcpu_on_cpu);
-static DEFINE_PER_CPU(spinlock_t, blocked_vcpu_on_cpu_lock);
+static DEFINE_PER_CPU(raw_spinlock_t, blocked_vcpu_on_cpu_lock);
 
 static inline struct pi_desc *vcpu_to_pi_desc(struct kvm_vcpu *vcpu)
 {
@@ -121,9 +121,9 @@ static void __pi_post_block(struct kvm_v
 			   new.control) != old.control);
 
 	if (!WARN_ON_ONCE(vcpu->pre_pcpu == -1)) {
-		spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
+		raw_spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
 		list_del(&vcpu->blocked_vcpu_list);
-		spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
+		raw_spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
 		vcpu->pre_pcpu = -1;
 	}
 }
@@ -154,11 +154,11 @@ int pi_pre_block(struct kvm_vcpu *vcpu)
 	local_irq_disable();
 	if (!WARN_ON_ONCE(vcpu->pre_pcpu != -1)) {
 		vcpu->pre_pcpu = vcpu->cpu;
-		spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
+		raw_spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
 		list_add_tail(&vcpu->blocked_vcpu_list,
 			      &per_cpu(blocked_vcpu_on_cpu,
 				       vcpu->pre_pcpu));
-		spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
+		raw_spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
 	}
 
 	do {
@@ -215,7 +215,7 @@ void pi_wakeup_handler(void)
 	struct kvm_vcpu *vcpu;
 	int cpu = smp_processor_id();
 
-	spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
+	raw_spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
 	list_for_each_entry(vcpu, &per_cpu(blocked_vcpu_on_cpu, cpu),
 			blocked_vcpu_list) {
 		struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
@@ -223,13 +223,13 @@ void pi_wakeup_handler(void)
 		if (pi_test_on(pi_desc) == 1)
 			kvm_vcpu_kick(vcpu);
 	}
-	spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
+	raw_spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
 }
 
 void __init pi_init_cpu(int cpu)
 {
 	INIT_LIST_HEAD(&per_cpu(blocked_vcpu_on_cpu, cpu));
-	spin_lock_init(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
+	raw_spin_lock_init(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
 }
 
 bool pi_has_pending_interrupt(struct kvm_vcpu *vcpu)

Greg Kroah-Hartman

author maintainer
#0 lore raw

cover 5.16.3-rc1 review

This is the start of the stable review cycle for the 5.16.3 release. There are 1039 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Wed, 26 Jan 2022 18:39:11 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.16.3-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.16.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>

    Linux 5.16.3-rc1

Ranjani Sridharan <[email protected]>
ASoC: SOF: handle paused streams during system suspend

Pierre-Louis Bossart <[email protected]>
ASoC: SOF: sof-audio: setup sched widgets during pipeline complete step

Ranjani Sridharan <[email protected]>
ASoC: SOF: free widgets in sof_tear_down_pipelines() for static pipelines

Ranjani Sridharan <[email protected]>
ASoC: SOF: topology: remove sof_load_pipeline_ipc()

Vitaly Kuznetsov <[email protected]>
KVM: selftests: Test KVM_SET_CPUID2 after KVM_RUN

Vitaly Kuznetsov <[email protected]>
KVM: selftests: Rename 'get_cpuid_test' to 'cpuid_test'

Vitaly Kuznetsov <[email protected]>
KVM: x86: Partially allow KVM_SET_CPUID{,2} after KVM_RUN

Vitaly Kuznetsov <[email protected]>

    KVM: x86: Do runtime CPUID update before updating vcpu->arch.cpuid_entries

Andrey Konovalov <[email protected]>
lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test

Moshe Tal <[email protected]>
bonding: Fix extraction of ports from the packet headers

Alistair Popple <[email protected]>
mm/hmm.c: allow VM_MIXEDMAP to work with hmm_range_fault

Miaoqian Lin <[email protected]>

    lib82596: Fix IRQ check in sni_82596_probe

Matthias Schiffer <[email protected]>
scripts/dtc: dtx_diff: remove broken example from help text

Laibin Qiu <[email protected]>
blk-mq: fix tag_get wait task can't be awakened

Maxim Mikityanskiy <[email protected]>
sch_api: Don't skip qdisc attach on ingress

Sam Protsenko <[email protected]>
dt-bindings: watchdog: Require samsung,syscon-phandle for Exynos7

Alexander Stein <[email protected]>
dt-bindings: display: meson-vpu: Add missing amlogic,canvas property

Alexander Stein <[email protected]>
dt-bindings: display: meson-dw-hdmi: add missing sound-name-prefix property

Tom Rix <[email protected]>
net: mscc: ocelot: fix using match before it is set

Claudiu Beznea <[email protected]>
net: phy: micrel: use kszphy_suspend()/kszphy_resume for irq aware devices

Ard Biesheuvel <[email protected]>
net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account

Russell King (Oracle) <[email protected]>
net: sfp: fix high power modules without diagnostic monitoring

Horatiu Vultur <[email protected]>
net: ocelot: Fix the call to switchdev_bridge_port_offload

Tom Rix <[email protected]>
net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config()

Slark Xiao <[email protected]>
net: wwan: Fix MRU mismatch issue which may lead to data connection lost

Vladimir Oltean <[email protected]>
net: mscc: ocelot: don't dereference NULL pointers with shared tc filters

Sergey Shtylyov <[email protected]>
bcmgenet: add WOL IRQ check

Vladimir Oltean <[email protected]>
net: mscc: ocelot: don't let phylink re-enable TX PAUSE on the NPI port

Kevin Bracey <[email protected]>
net_sched: restore "mpu xxx" handling

Alex Elder <[email protected]>
net: ipa: fix atomic update in ipa_endpoint_replenish()

Jie Wang <[email protected]>
net: bonding: fix bond_xmit_broadcast return value error bug

Miroslav Lichvar <[email protected]>
net: fix sock_timestamping_bind_phc() to release device

David Heidelberg <[email protected]>
arm64: dts: qcom: msm8996: drop not documented adreno properties

Leon Romanovsky <[email protected]>
devlink: Remove misleading internal_flags from health reporter dump

Ian Rogers <[email protected]>
perf metric: Fix metric_leader

Zechuan Chen <[email protected]>
perf probe: Fix ppc64 'perf probe add events failed' case

Ian Rogers <[email protected]>
perf test: Enable system wide for metricgroups test

José Expósito <[email protected]>
perf metricgroup: Fix use after free in metric__new()

Uwe Kleine-König <[email protected]>
perf tools: Drop requirement for libstdc++.so for libopencsd check

Thomas Richter <[email protected]>
perf cputopo: Fix CPU topology reading on s/390

Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Fix at_xdmac_lld struct definition

Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Fix lld view setting

Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Fix concurrency over xfers_list

Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Print debug message after realeasing the lock

Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Start transfer for cyclic channels in issue_pending

Tudor Ambarus <[email protected]>
dmaengine: at_xdmac: Don't start transactions at tx_submit level

Adrian Hunter <[email protected]>
perf script: Fix hex dump character output

Guillaume Nault <[email protected]>
libcxgb: Don't accidentally set RTO_ONLINK in cxgb_find_route()

Guillaume Nault <[email protected]>
gre: Don't accidentally set RTO_ONLINK in gre_fill_metadata_dst()

Eli Cohen <[email protected]>
vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps()

Eli Cohen <[email protected]>
vdpa/mlx5: Fix config_attr_mask assignment

Guillaume Nault <[email protected]>
xfrm: Don't accidentally set RTO_ONLINK in decode_session4()

Johannes Berg <[email protected]>
iwlwifi: fix Bz NMI behaviour

Eric Dumazet <[email protected]>
netns: add schedule point in ops_exit_list()

Eric Dumazet <[email protected]>

    inet: frags: annotate races around fqdir->dead and fqdir->high_thresh

Eric W. Biederman <[email protected]>

    taskstats: Cleanup the use of task->exit_code

Michael S. Tsirkin <[email protected]>
virtio_ring: mark ring unused on error

Eli Cohen <[email protected]>
vdpa/mlx5: Fix wrong configuration of virtio_version_1_0

Laurence de Bruxelles <[email protected]>
rtc: pxa: fix null pointer dereference

Kees Cook <[email protected]>
rtc: Move variable into switch case statement

Matt Johnston <[email protected]>
mctp: test: zero out sockaddr

Dmitry Torokhov <[email protected]>
HID: vivaldi: fix handling devices not using numbered reports

Johannes Berg <[email protected]>
um: gitignore: Add kernel/capflags.c

Yury Norov <[email protected]>
bitops: protect find_first_{,zero}_bit properly

Robert Hancock <[email protected]>
net: axienet: increase default TX ring size to 128

Robert Hancock <[email protected]>
net: axienet: fix for TX busy handling

Robert Hancock <[email protected]>
net: axienet: fix number of TX ring slots for available check

Robert Hancock <[email protected]>
net: axienet: Fix TX ring slot available check

Robert Hancock <[email protected]>
net: axienet: limit minimum TX ring size

Robert Hancock <[email protected]>
net: axienet: add missing memory barriers

Robert Hancock <[email protected]>
net: axienet: reset core on initialization prior to MDIO access

Robert Hancock <[email protected]>
net: axienet: Wait for PhyRstCmplt after core reset

Robert Hancock <[email protected]>
net: axienet: increase reset timeout

Wen Gu <[email protected]>
net/smc: Fix hung_task when removing SMC-R devices

Miaoqian Lin <[email protected]>
gpio: idt3243x: Fix IRQ check in idt_gpio_probe

Miaoqian Lin <[email protected]>
gpio: mpc8xxx: Fix IRQ check in mpc8xxx_probe

John Keeping <[email protected]>
pinctrl/rockchip: fix gpio device creation

Robert Hancock <[email protected]>
clk: si5341: Fix clock HW provider cleanup

Stephen Boyd <[email protected]>
clk: Emit a stern warning with writable debugfs enabled

Eric Dumazet <[email protected]>
af_unix: annote lockless accesses to unix_tot_inflight & gc_in_progress

Dan Carpenter <[email protected]>
crypto: octeontx2 - uninitialized variable in kvf_limits_store()

Chao Yu <[email protected]>
f2fs: fix to check available space of CP area correctly in update_ckpt_flags()

Chao Yu <[email protected]>
f2fs: fix to reserve space for IO align feature

Hyeong-Jun Kim <[email protected]>
f2fs: compress: fix potential deadlock of compress file

Chao Yu <[email protected]>
f2fs: fix to avoid panic in is_alive() if metadata is inconsistent

Fengnan Chang <[email protected]>
f2fs: fix remove page failed in invalidate compress pages

Zack Rusin <[email protected]>
drm/vmwgfx: Remove unused compile options

Zack Rusin <[email protected]>
drm/vmwgfx: Remove explicit transparent hugepages support

Geert Uytterhoeven <[email protected]>
riscv: dts: microchip: mpfs: Drop empty chosen node

Palmer Dabbelt <[email protected]>
RISC-V: defconfigs: Set CONFIG_FB=y, for FB console

Miaoqian Lin <[email protected]>
parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries

Tobias Waldekranz <[email protected]>
net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module

Tobias Waldekranz <[email protected]>
net/fsl: xgmac_mdio: Add workaround for erratum A-009885

Guillaume Nault <[email protected]>
mlx5: Don't accidentally set RTO_ONLINK before mlx5e_route_lookup_ipv4_get()

Eric Dumazet <[email protected]>
ipv4: avoid quadratic behavior in netns dismantle

Eric Dumazet <[email protected]>
ipv4: update fib_info_cnt under spinlock protection

German Gomez <[email protected]>

    perf evsel: Override attr->sample_period for non-libpfm4 events

Daniel Borkmann <[email protected]>
bpf: Mark PTR_TO_FUNC register initially with zero offset

Yafang Shao <[email protected]>
bpf: Fix mount source show for bpffs

Toke Høiland-Jørgensen <[email protected]>
xdp: check prog type before updating BPF link

Quentin Monnet <[email protected]>
bpftool: Fix indent in option lists in the documentation

Quentin Monnet <[email protected]>
bpftool: Remove inclusion of utilities.mak from Makefiles

Russell King <[email protected]>
arm64/bpf: Remove 128MB limit for BPF JIT programs

Andrii Nakryiko <[email protected]>
libbpf: Remove deprecation attribute from struct bpf_prog_prep_result

Maxime Ripard <[email protected]>
drm/vc4: crtc: Copy assigned channel to the CRTC

Maxime Ripard <[email protected]>
drm/vc4: Fix non-blocking commit getting stuck forever

Maxime Ripard <[email protected]>
drm/vc4: crtc: Drop feed_txp from state

Ye Bin <[email protected]>
block: Fix fsync always failed if once failed

Jens Axboe <[email protected]>
block: fix async_depth sysfs interface for mq-deadline

Tobias Waldekranz <[email protected]>
powerpc/fsl/dts: Enable WA for erratum A-009885 on fman3l MDIO buses

Anders Roxell <[email protected]>
powerpc/cell: Fix clang -Wimplicit-fallthrough warning

Moshe Shemesh <[email protected]>
Revert "net/mlx5: Add retry mechanism to the command entry index allocation"

Amelie Delaunay <[email protected]>
dmaengine: stm32-mdma: fix STM32_MDMA_CTBR_TSEL_MASK

Chengguang Xu <[email protected]>
RDMA/rxe: Fix a typo in opcode name

Yixing Liu <[email protected]>
RDMA/hns: Modify the mapping attribute of doorbell to device

Dave Jiang <[email protected]>
dmaengine: idxd: fix wq settings post wq disable

Kunihiko Hayashi <[email protected]>
dmaengine: uniphier-xdmac: Fix type of address variables

Miaoqian Lin <[email protected]>
scsi: ufs: ufs-mediatek: Fix error checking in ufs_mtk_init_va09_pwr_ctrl()

Baruch Siach <[email protected]>
of: base: Improve argument length mismatch error

Bart Van Assche <[email protected]>
scsi: core: Show SCMD_LAST in text form

Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_sync: Fix not setting adv set duration

Markus Reichl <[email protected]>
net: usb: Correct reset handling of smsc95xx

Mark Chen <[email protected]>
Bluetooth: btusb: Return error code when getting patch status failed

Randy Dunlap <[email protected]>
Documentation: fix firewire.rst ABI file path error

Lukas Bulwahn <[email protected]>
Documentation: refer to config RANDOMIZE_BASE for kernel address-space randomization

Alexandre Ghiti <[email protected]>
Documentation, arch: Remove leftovers from CIFS_WEAK_PW_HASH

Alexandre Ghiti <[email protected]>
Documentation, arch: Remove leftovers from raw device

Sakari Ailus <[email protected]>
Documentation: ACPI: Fix data node reference documentation

Daniel Thompson <[email protected]>
Documentation: dmaengine: Correctly describe dmatest with channel unset

Mike Leach <[email protected]>
Documentation: coresight: Fix documentation issue

Randy Dunlap <[email protected]>
media: correct MEDIA_TEST_SUPPORT help text

Maxime Ripard <[email protected]>
drm/vc4: hdmi: Make sure the device is powered with CEC

Suresh Udipi <[email protected]>
media: rcar-csi2: Optimize the selection PHTW register

Marc Kleine-Budde <[email protected]>
can: mcp251xfd: mcp251xfd_tef_obj_read(): fix typo in error message

Ben Hutchings <[email protected]>
firmware: Update Kconfig help text for Google firmware

Nicholas Kazlauskas <[email protected]>
drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled

Christian König <[email protected]>
drm/radeon: fix error handling in radeon_driver_open_kms

Rajneesh Bhardwaj <[email protected]>
Revert "drm/amdgpu: Don't inherit GEM object VMAs in child process"

Theodore Ts'o <[email protected]>
ext4: don't use the orphan list when migrating an inode

Zhang Yi <[email protected]>
ext4: fix an use-after-free issue about data=journal writeback mode

Ye Bin <[email protected]>
ext4: fix null-ptr-deref in '__ext4_journal_ensure_credits'

Sebastian Andrzej Siewior <[email protected]>
ext4: destroy ext4_fc_dentry_cachep kmemcache on module removal

Xin Yin <[email protected]>
ext4: fast commit may miss tracking unwritten range during ftruncate

Xin Yin <[email protected]>
ext4: use ext4_ext_remove_space() for fast commit replay delete range

Ye Bin <[email protected]>
ext4: Fix BUG_ON in ext4_bread when write quota data

Luís Henriques <[email protected]>
ext4: set csum seed in tmp inode while migrating to extents

Xin Yin <[email protected]>
ext4: fix fast commit may miss tracking range for FALLOC_FL_ZERO_RANGE

Harshad Shirwadkar <[email protected]>
ext4: initialize err_blk before calling __ext4_get_inode_loc

Chunguang Xu <[email protected]>
ext4: fix a possible ABBA deadlock due to busy PA

Jan Kara <[email protected]>
ext4: make sure quota gets properly shutdown on error

Jan Kara <[email protected]>
ext4: make sure to reset inode lockdep class when quota enabling fails

Filipe Manana <[email protected]>
btrfs: respect the max size in the header when activating swap file

Naohiro Aota <[email protected]>
btrfs: zoned: fix chunk allocation condition for zoned allocator

Naohiro Aota <[email protected]>
btrfs: zoned: unset dedicated block group on allocation failure

Naohiro Aota <[email protected]>
btrfs: add extent allocator hook to decide to allocate chunk or not

Josef Bacik <[email protected]>
btrfs: check the root node for uptodate before returning it

Naohiro Aota <[email protected]>
btrfs: zoned: cache reported zone during mount

Filipe Manana <[email protected]>
btrfs: fix deadlock between quota enable and other quota operations

Nicolas Dichtel <[email protected]>
xfrm: fix dflt policy check when there is no policy configured

Ghalem Boudour <[email protected]>
xfrm: fix policy lookup for ipv6 gre packets

Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Set PCI_STATUS_CAP_LIST for PCIe device

Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Correctly set PCIe capabilities

Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Fix definitions of reserved bits

Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Properly mark reserved PCIe bits in PCI config space

Pali Rohár <[email protected]>
PCI: pci-bridge-emul: Make expansion ROM Base Address register read-only

Lukas Wunner <[email protected]>
PCI: pciehp: Fix infinite loop in IRQ handler upon power fault

Hans de Goede <[email protected]>
PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors

Rob Herring <[email protected]>
PCI: xgene: Fix IB window setup

José Roberto de Souza <[email protected]>
drm/i915/display/ehl: Update voltage swing table

Mario Limonciello <[email protected]>
drm/amd/display: Revert W/A for hard hangs on DCN20/DCN21

Alex Deucher <[email protected]>
drm/amdgpu: don't do resets on APUs which don't support it

Lukas Fink <[email protected]>
drm/amdgpu: Fix rejecting Tahiti GPUs

Harry Wentland <[email protected]>
drm/amdgpu: Use correct VIEWPORT_DIMENSION for DCN2

James Smart <[email protected]>
scsi: lpfc: Fix lpfc_force_rscn ndlp kref imbalance

Nicholas Piggin <[email protected]>
powerpc/64s/radix: Fix huge vmap false positive

John David Anglin <[email protected]>
parisc: Fix lpa and lpa_user defines

Brian Norris <[email protected]>
drm/bridge: analogix_dp: Make PSR-exit block less

Ilia Mirkin <[email protected]>
drm/nouveau/kms/nv04: use vzalloc for nv04_display

Yizhuo Zhai <[email protected]>
drm/amd/display: Fix the uninitialized variable in enable_stream_features()

Lucas Stach <[email protected]>
drm/etnaviv: limit submit sizes

Dmitry Osipenko <[email protected]>
drm/tegra: submit: Add missing pm_runtime_mark_last_busy()

Sakari Ailus <[email protected]>
device property: Fix fwnode_graph_devcon_match() fwnode leak

Alexander Gordeev <[email protected]>
s390/mm: fix 2KB pgtable release race

Ilan Peer <[email protected]>
iwlwifi: mvm: Increase the scan timeout guard to 30 seconds

Christophe JAILLET <[email protected]>
remoteproc: imx_rproc: Fix a resource leak in the remove function

Steven Rostedt <[email protected]>
tracing: Have syscall trace events use trace_event_buffer_lock_reserve()

Xiangyang Zhang <[email protected]>
tracing/kprobes: 'nmissed' not showed correctly for kretprobe

Nikita Yushchenko <[email protected]>
tracing/osnoise: Properly unhook events if start_per_cpu_kthreads() fails

Andrey Ryabinin <[email protected]>
sched/cpuacct: Fix user/system in shown cpuacct.usage*

Andrey Ryabinin <[email protected]>
cputime, cpuacct: Include guest time in user time in cpuacct.stat

Lukas Wunner <[email protected]>
serial: Fix incorrect rs485 polarity on uart open

Xie Yongji <[email protected]>
fuse: Pass correct lend value to filemap_write_and_wait_range()

Borislav Petkov <[email protected]>
x86/mce: Check regs before accessing it

Christophe JAILLET <[email protected]>
HID: magicmouse: Fix an error handling path in magicmouse_probe()

Xiao Ni <[email protected]>
md: Move alloc/free acct bioset in to personality

Oleksandr Andrushchenko <[email protected]>
xen/gntdev: fix unmap notification order

Kunihiko Hayashi <[email protected]>
spi: uniphier: Fix a bug that doesn't point to private data correctly

Dmitry Osipenko <[email protected]>
mfd: tps65910: Set PWR_OFF bit during driver probe

Patrick Williams <[email protected]>
tpm: fix NPE on probe for missing device

Lino Sanfilippo <[email protected]>
tpm: fix potential NULL pointer access in tpm_del_char_device

Petr Cvachoucek <[email protected]>
ubifs: Error path in ubifs_remount_rw() seems to wrongly free write buffers

Meng Li <[email protected]>
crypto: caam - replace this_cpu_ptr with raw_cpu_ptr

Marek Vasut <[email protected]>
crypto: stm32/crc32 - Fix kernel BUG triggered in probe()

Heiner Kallweit <[email protected]>
crypto: omap-aes - Fix broken pm_runtime_and_get() usage

Zhu Lingshan <[email protected]>
ifcvf/vDPA: fix misuse virtio-net device config size for blk dev

Arnaud Pouliquen <[email protected]>
rpmsg: core: Clean up resources on announce_create failure.

Sean Christopherson <[email protected]>
hugetlbfs: fix off-by-one error in hugetlb_vmdelete_list()

Chen Wandun <[email protected]>
mm/page_isolation: unset migratetype directly for non Buddy page

Waiman Long <[email protected]>
selftests/vm: make charge_reserved_hugetlb.sh work with existing cgroup setting

Andrey Konovalov <[email protected]>
kasan: fix quarantine conflicting with init_on_free

Kefeng Wang <[email protected]>
mm: defer kmemleak object creation of module_alloc()

Xiaoke Wang <[email protected]>
tracing/probes: check the return value of kstrndup() for pbuf

Xiaoke Wang <[email protected]>

    tracing/uprobes: Check the return value of kstrdup() for tu->filename

Weizhao Ouyang <[email protected]>
dma-buf: cma_heap: Fix mutex locking section

Tom Rix <[email protected]>
i3c: master: dw: check return of dw_i3c_master_get_free_pos()

Sergio Paracuellos <[email protected]>
PCI: mt7621: Add missing MODULE_LICENSE()

Guchun Chen <[email protected]>
drm/amdgpu: use spin_lock_irqsave to avoid deadlock by local interrupt

Jiasheng Jiang <[email protected]>
drm/amdkfd: Check for null pointer after calling kmemdup

José Expósito <[email protected]>
drm/amd/display: invalid parameter check in dmub_hpd_callback

Wesley Sheng <[email protected]>
ntb_hw_switchtec: Fix bug with more than 32 partitions

Jeremy Pallotta <[email protected]>
ntb_hw_switchtec: Fix pff ioread to read into mmio_part_cfg_all

Liu Ying <[email protected]>

    drm/atomic: Check new_crtc_state->active to determine if CRTC needs disable in self refresh mode

Miaoqian Lin <[email protected]>
drm/sun4i: dw-hdmi: Fix missing put_device() call in sun8i_hdmi_phy_get

Chuck Lever <[email protected]>
SUNRPC: Fix sockaddr handling in svcsock_accept_class trace points

Chuck Lever <[email protected]>
SUNRPC: Fix sockaddr handling in the svc_xprt_create_error trace point

Matthew Auld <[email protected]>
drm/i915: don't call free_mmap_offset when purging

Juston Li <[email protected]>
drm/i915/pxp: Hold RPM wakelock during PXP unbind

Vitaly Kuznetsov <[email protected]>
x86/hyperv: Properly deal with empty cpumasks in hyperv_flush_tlb_multi()

J. Bruce Fields <[email protected]>
nfsd: fix crash on COPY_NOTIFY with special stateid

Chuck Lever <[email protected]>
Revert "nfsd: skip some unnecessary stats in the v4 case"

Chuck Lever <[email protected]>
NFSD: Fix verifier returned in stable WRITEs

Vincent Chen <[email protected]>
KVM: RISC-V: Avoid spurious virtual interrupts after clearing hideleg CSR

Pali Rohár <[email protected]>
PCI: mvebu: Fix support for DEVCAP2, DEVCTL2 and LNKCTL2 registers on emulated bridge

Pali Rohár <[email protected]>
PCI: mvebu: Fix support for PCI_EXP_RTSTA on emulated bridge

Pali Rohár <[email protected]>
PCI: mvebu: Fix support for PCI_EXP_DEVCTL on emulated bridge

Pali Rohár <[email protected]>
PCI: mvebu: Fix support for PCI_BRIDGE_CTL_BUS_RESET on emulated bridge

Pali Rohár <[email protected]>
PCI: mvebu: Setup PCIe controller to Root Complex mode

Pali Rohár <[email protected]>
PCI: mvebu: Fix configuring secondary bus of PCIe Root Port via emulated bridge

Pali Rohár <[email protected]>
PCI: mvebu: Fix support for bus mastering and PCI_COMMAND on emulated bridge

Pali Rohár <[email protected]>
PCI: mvebu: Do not modify PCI IO type bits in conf_write

Pali Rohár <[email protected]>
PCI: mvebu: Check for errors from pci_bridge_emul_init() call

Dario Binacchi <[email protected]>
Input: ti_am335x_tsc - fix STEPCONFIG setup for Z2

Dario Binacchi <[email protected]>
Input: ti_am335x_tsc - set ADCREFM for X configuration

Beau Belgrave <[email protected]>
tracing: Do not let synth_events block other dyn_event systems during create

Christophe JAILLET <[email protected]>
i3c/master/mipi-i3c-hci: Fix a potentially infinite loop in 'hci_dat_v1_get_index()'

Jamie Iles <[email protected]>
i3c: fix incorrect address slot lookup on 64-bit

Hou Wenlong <[email protected]>
KVM: x86: Exit to userspace if emulation prepared a completion callback

Sean Christopherson <[email protected]>
KVM: x86: Handle 32-bit wrap of EIP for EMULTYPE_SKIP with flat code seg

Lai Jiangshan <[email protected]>
KVM: X86: Ensure that dirty PDPTRs are loaded

Sean Christopherson <[email protected]>
KVM: VMX: Read Posted Interrupt "control" exactly once per loop iteration

Sean Christopherson <[email protected]>
KVM: s390: Ensure kvm_arch_no_poll() is read once when blocking vCPU

Paolo Bonzini <[email protected]>
KVM: VMX: Don't unblock vCPU w/ Posted IRQ if IRQs are disabled in guest

Hector Martin <[email protected]>
PCI: apple: Fix REFCLK1 enable/poll logic

Pali Rohár <[email protected]>
PCI: aardvark: Fix checking for MEM resource type

Tim Harvey <[email protected]>
PCI: dwc: Do not remap invalid res

Marek Vasut <[email protected]>
PCI: rcar: Check if device is runtime suspended instead of __clk_is_enabled()

Christophe JAILLET <[email protected]>
PCI: qcom: Fix an error handling path in 'qcom_pcie_probe()'

Jianjun Wang <[email protected]>
PCI: mediatek-gen3: Disable DVFSRC voltage request

Eric W. Biederman <[email protected]>
signal: In get_signal test for signal_group_exit every time through the loop

Conor Dooley <[email protected]>
mailbox: change mailbox-mpfs compatible string

Miaoqian Lin <[email protected]>
phy: mediatek: Fix missing check in mtk_mipi_tx_probe

Ohad Sharabi <[email protected]>
habanalabs: skip read fw errors if dynamic descriptor invalid

Dani Liberman <[email protected]>
habanalabs: change wait for interrupt timeout to 64 bit

Tzung-Bi Shih <[email protected]>
ASoC: mediatek: mt8183: fix device_node leak

Tzung-Bi Shih <[email protected]>
ASoC: mediatek: mt8173: fix device_node leak

Chunfeng Yun <[email protected]>
phy: phy-mtk-tphy: add support efuse setting

Tzung-Bi Shih <[email protected]>

    ASoC: mediatek: mt8192-mt6359: fix device_node leak

Sreekanth Reddy <[email protected]>
scsi: mpi3mr: Fixes around reply request queues

Christoph Hellwig <[email protected]>
scsi: sr: Don't use GFP_DMA

Tianjia Zhang <[email protected]>
MIPS: Octeon: Fix build errors using clang

Michael Ellerman <[email protected]>
selftests/powerpc: Add a test of sigreturning to the kernel

Ajit Kumar Pandey <[email protected]>

    ASoC: SOF: ipc: Add null pointer check for substream->runtime

Qi Liu <[email protected]>
scsi: hisi_sas: Prevent parallel FLR and controller reset

Lakshmi Sowjanya D <[email protected]>
i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters

Marc Zyngier <[email protected]>
irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time

Ye Guojin <[email protected]>
MIPS: OCTEON: add put_device() after of_find_device_by_node()

Jan Kara <[email protected]>
udf: Fix error handling in udf_new_inode()

Pierre-Louis Bossart <[email protected]>
ASoC: SOF: Intel: hda: add quirks for HDAudio DMA position information

Hari Bathini <[email protected]>
powerpc/fadump: Fix inaccurate CPU state info in vmcore generated with panic

Hari Bathini <[email protected]>
powerpc: handle kdump appropriately with crash_kexec_post_notifiers option

Thadeu Lima de Souza Cascardo <[email protected]>
selftests/powerpc/spectre_v2: Return skip code when miss_percent is high

Christophe Leroy <[email protected]>

    powerpc/40x: Map 32Mbytes of memory at startup

Nathan Chancellor <[email protected]>
MIPS: Loongson64: Use three arguments for slti

Takashi Iwai <[email protected]>
ALSA: seq: Set upper limit of processed events

James Smart <[email protected]>
scsi: lpfc: Trigger SLI4 firmware dump before doing driver cleanup

James Smart <[email protected]>
scsi: lpfc: Fix leaked lpfc_dmabuf mbox allocations with NPIV

Bart Van Assche <[email protected]>
scsi: ufs: Fix a kernel crash during shutdown

Stephan Gerhold <[email protected]>
interconnect: qcom: rpm: Prevent integer overflow in rate

Ameer Hamza <[email protected]>
ASoC: test-component: fix null pointer dereference.

Christoph Hellwig <[email protected]>
dm: make the DAX support depend on CONFIG_FS_DAX

Christoph Hellwig <[email protected]>
dm: fix alloc_dax error handling in alloc_dev

Srinivas Kandagatla <[email protected]>
nvmem: core: set size for sysfs bin file

Christophe Leroy <[email protected]>
w1: Misuse of get_user()/put_user() reported by sparse

Alexey Kardashevskiy <[email protected]>
KVM: PPC: Book3S: Suppress failed alloc warning in H_COPY_TOFROM_GUEST

Alexey Kardashevskiy <[email protected]>
KVM: PPC: Book3S: Suppress warnings when allocating too big memory slots

Christophe Leroy <[email protected]>
powerpc/powermac: Add missing lockdep_register_key()

Martin Blumenstingl <[email protected]>
clk: meson: gxbb: Fix the SDM_EN bit for MPLL0 on GXBB

Joakim Tjernlund <[email protected]>
i2c: mpc: Correct I2C reset procedure

Michael Ellerman <[email protected]>
powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING

Heiner Kallweit <[email protected]>
i2c: i801: Don't silently correct invalid transfer size

Ye Guojin <[email protected]>
ASoC: imx-hdmi: add put_device() after of_find_device_by_node()

Nicholas Piggin <[email protected]>
powerpc/watchdog: Fix missed watchdog reset due to memory ordering race

Julia Lawall <[email protected]>
powerpc/btext: add missing of_node_put

Julia Lawall <[email protected]>
powerpc/cell: add missing of_node_put

Julia Lawall <[email protected]>
powerpc/powernv: add missing of_node_put

Julia Lawall <[email protected]>
powerpc/6xx: add missing of_node_put

Sam Protsenko <[email protected]>
clk: samsung: exynos850: Register clocks early

Ingo Molnar <[email protected]>
x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs

Marc Kleine-Budde <[email protected]>
can: flexcan: add more quirks to describe RX path capabilities

Marc Kleine-Budde <[email protected]>
can: flexcan: rename RX modes

Dario Binacchi <[email protected]>
can: flexcan: allow to change quirks at runtime

Mauro Carvalho Chehab <[email protected]>
scripts: sphinx-pre-install: Fix ctex support on Debian

John David Anglin <[email protected]>
parisc: Avoid calling faulthandler_disabled() twice

Maor Dickman <[email protected]>
net/mlx5e: Unblock setting vid 0 for VF in case PF isn't eswitch manager

Maher Sanalla <[email protected]>
net/mlx5: Update log_max_qp value to FW max capability

Jason A. Donenfeld <[email protected]>
random: do not throw away excess input to crng_fast_load

Lukas Wunner <[email protected]>
serial: core: Keep mctrl register state and cached copy in sync

Lukas Wunner <[email protected]>
serial: pl011: Drop CR register reset on set_termios

Lukas Wunner <[email protected]>
serial: pl010: Drop CR register reset on set_termios

Konrad Dybcio <[email protected]>
regulator: qcom_smd: Align probe function with rpmh-regulator

Russell King (Oracle) <[email protected]>
net: gemini: allow any RGMII interface mode

Russell King (Oracle) <[email protected]>
net: phy: marvell: configure RGMII delays for 88E1118

Danielle Ratson <[email protected]>
mlxsw: pci: Avoid flow control for EMAD packets

Jiri Olsa <[email protected]>
bpf/selftests: Fix namespace mount setup in tc_redirect

Vincent Mailhol <[email protected]>
can: do not increase rx statistics when generating a CAN rx error message frame

Joe Thornber <[email protected]>
dm space map common: add bounds check to sm_ll_lookup_bitmap()

Joe Thornber <[email protected]>
dm btree: add a defensive bounds check to insert_at()

Ping-Ke Shih <[email protected]>

    mac80211: allow non-standard VHT MCS-10/11

Florian Fainelli <[email protected]>
net: mdio: Demote probed message to debug print

Josef Bacik <[email protected]>
btrfs: remove BUG_ON(!eie) in find_parent_nodes

Josef Bacik <[email protected]>
btrfs: remove BUG_ON() in find_parent_nodes()

Yevgeny Kliteynik <[email protected]>
net/mlx5: DR, Fix error flow in creating matcher

Mario Limonciello <[email protected]>
ACPI: CPPC: Check present CPUs for determining _CPC is valid

Thomas Weißschuh <[email protected]>
ACPI: battery: Add the ThinkPad "Not Charging" quirk

Marina Nikolic <[email protected]>
amdgpu/pm: Make sysfs pm attributes as read-only for VFs

Hans de Goede <[email protected]>
mfd: intel_soc_pmic: Use CPU-id check instead of _HRV check to differentiate variants

Zongmin Zhou <[email protected]>
drm/amdgpu: fixup bad vram size on gmc v8

Rajneesh Bhardwaj <[email protected]>
drm/amdgpu: Don't inherit GEM object VMAs in child process

AngeloGioacchino Del Regno <[email protected]>
mmc: mtk-sd: Use readl_poll_timeout instead of open-coded polling

Kirill A. Shutemov <[email protected]>
ACPICA: Hardware: Do not flush CPU cache when entering S4 and S5

Sudeep Holla <[email protected]>
ACPICA: Fix wrong interpretation of PCC address

Rafael J. Wysocki <[email protected]>
ACPICA: Executer: Fix the REFCLASS_REFOF case in acpi_ex_opcode_1A_0T_1R()

Rafael J. Wysocki <[email protected]>
ACPICA: Utilities: Avoid deleting the same object twice in a row

Mark Langsdorf <[email protected]>
ACPICA: actypes.h: Expand the ACPI_ACCESS_ definitions

Kyeong Yoo <[email protected]>
jffs2: GC deadlock reading a page that is used in jffs2_write_begin()

Lucas Stach <[email protected]>
drm/etnaviv: consider completed fence seqno in hang check

Antony Antony <[email protected]>
xfrm: rate limit SA mapping change message to user space

Luiz Augusto von Dentz <[email protected]>
Bluetooth: vhci: Set HCI_QUIRK_VALID_LE_STATES

Rafael J. Wysocki <[email protected]>
cpufreq: intel_pstate: Update cpuinfo.max_freq on HWP_CAP changes

Tedd Ho-Jeong An <[email protected]>
Bluetooth: btintel: Add missing quirks and msft ext for legacy bootloader

Ben Greear <[email protected]>
ath11k: Fix napi related hang

Randy Dunlap <[email protected]>
um: registers: Rename function names to avoid conflicts and build problems

Tetsuo Handa <[email protected]>
block: check minor range in device_add_disk()

Hector Martin <[email protected]>
mmc: sdhci-pci-gli: GL9755: Support for CD/WP inversion on OF platforms

Luca Coelho <[email protected]>
iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ

Avraham Stern <[email protected]>
iwlwifi: mvm: fix AUX ROC removal

Ilan Peer <[email protected]>
iwlwifi: mvm: Fix calculation of frame length

Johannes Berg <[email protected]>
iwlwifi: remove module loading failure message

Johannes Berg <[email protected]>
iwlwifi: fix leaks/bad data after failed firmware load

Luca Coelho <[email protected]>
iwlwifi: recognize missing PNVM data and then log filename

Changcheng Deng <[email protected]>
PM: AVS: qcom-cpr: Use div64_ul instead of do_div

Po-Hao Huang <[email protected]>
rtw88: 8822c: update rx settings to prevent potential hw deadlock

Zekun Shen <[email protected]>
ath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream

Tetsuo Handa <[email protected]>
ath9k_htc: fix NULL pointer dereference at ath9k_htc_tx_get_packet()

Tetsuo Handa <[email protected]>
ath9k_htc: fix NULL pointer dereference at ath9k_htc_rxep()

Deren Wu <[email protected]>
mt76: mt7921: fix network buffer leak by txs missing

Felix Fietkau <[email protected]>
mt76: mt7615: improve wmm index allocation

Xing Song <[email protected]>
mt76: do not pass the received frame with decryption error

Lorenzo Bianconi <[email protected]>
mt76: connac: fix a theoretical NULL pointer dereference in mt76_connac_get_phy_mode

Ryder Lee <[email protected]>
mt76: mt7915: fix SMPS operation fail

Peter Chiu <[email protected]>

    mt76: mt7615: fix possible deadlock while mt7615_register_ext_phy()

Kai-Heng Feng <[email protected]>
usb: hub: Add delay for SuperSpeed hub resume to let links transit to U0

Rafael J. Wysocki <[email protected]>
cpufreq: Fix initialization of min and max frequency QoS requests

Rafael J. Wysocki <[email protected]>
PM: runtime: Add safety net to supplier device release

Yang Shen <[email protected]>
crypto: hisilicon/qm - fix deadlock for remove driver

Weili Qian <[email protected]>
crypto: hisilicon/hpre - fix memory leak in hpre_curve25519_src_init()

Peter Gonda <[email protected]>
crypto: ccp - Move SEV_INIT retry for corrupted data

Thierry Reding <[email protected]>
arm64: tegra: Adjust length of CCPLEX cluster MMIO region

Biwen Li <[email protected]>
arm64: dts: ls1028a-qds: move rtc node to the correct i2c bus

Paul Moore <[email protected]>
audit: ensure userspace is penalized the same as the kernel when under pressure

Jingwen Chen <[email protected]>
drm/amd/amdgpu: fix gmc bo pin count leak in SRIOV

Jingwen Chen <[email protected]>
drm/amd/amdgpu: fix psp tmr bo pin count leak in SRIOV

H. Nikolaus Schaller <[email protected]>
mmc: omap_hsmmc: Revert special init for wl1251

Ulf Hansson <[email protected]>
mmc: core: Fixup storing of OCR for MMC_QUIRK_NONSTD_SDIO

Biju Das <[email protected]>
mmc: tmio: reinit card irqs in reset routine

Zhou Qingyang <[email protected]>
media: saa7146: hexium_gemini: Fix a NULL pointer dereference in hexium_attach()

Mikhail Rudenko <[email protected]>
media: rockchip: rkisp1: use device name for debugfs subdir name

Sean Young <[email protected]>
media: igorplugusb: receiver overflow should be reported

Alistair Francis <[email protected]>
HID: i2c-hid-of: Expose the touchscreen-inverted properties

Alistair Francis <[email protected]>
HID: quirks: Allow inverting the absolute X/Y values

Isabella Basso <[email protected]>
drm/amdgpu: fix amdgpu_ras_mca_query_error_status scope

Felix Kuehling <[email protected]>
drm/amdkfd: Fix error handling in svm_range_add

Paolo Abeni <[email protected]>
bpf: Do not WARN in bpf_warn_invalid_xdp_action()

David Gow <[email protected]>
kunit: Don't crash if no parameters are generated

Suresh Kumar <[email protected]>
net: bonding: debug: avoid printing debug logs when bond is not notifying peers

Borislav Petkov <[email protected]>
x86/mce: Mark mce_read_aux() noinstr

Borislav Petkov <[email protected]>
x86/mce: Mark mce_end() noinstr

Borislav Petkov <[email protected]>
x86/mce: Mark mce_panic() noinstr

Borislav Petkov <[email protected]>
x86/mce: Prevent severity computation from being instrumented

Borislav Petkov <[email protected]>
x86/mce: Allow instrumentation during task work queueing

Alex Elder <[email protected]>
ARM: dts: qcom: sdx55: fix IPA interconnect definitions

Baochen Qiang <[email protected]>
ath11k: Avoid false DEADLOCK warning reported by lockdep

Jagan Teki <[email protected]>
arm64: dts: rockchip: Fix Bluetooth on ROCK Pi 4 boards

Heiko Carstens <[email protected]>
selftests/ftrace: make kprobe profile testcase description unique

Iwona Winiarska <[email protected]>
gpio: aspeed-sgpio: Convert aspeed_sgpio.lock to raw_spinlock

Iwona Winiarska <[email protected]>
gpio: aspeed: Convert aspeed_gpio.lock to raw_spinlock

Russell King (Oracle) <[email protected]>
net: phy: prefer 1000baseT over 1000baseKX

Wen Gong <[email protected]>
ath10k: drop beacon and probe response which leak from other channel

Antoine Tenart <[email protected]>
net-sysfs: update the queue counts in the unregistration path

Ping-Ke Shih <[email protected]>
rtw89: don't kick off TX DMA if failed to write skb

Sebastian Gottschall <[email protected]>
ath10k: Fix tx hanging

Wen Gong <[email protected]>
ath11k: avoid deadlock by change ieee80211_queue_work for regd_update_work

Wander Lairson Costa <[email protected]>
rcutorture: Avoid soft lockup during cpu stall

Miri Korenblit <[email protected]>
iwlwifi: acpi: fix wgds rev 3 size

Shaul Triebitz <[email protected]>
iwlwifi: mvm: avoid clearing a just saved session protection id

Johannes Berg <[email protected]>
iwlwifi: mvm: synchronize with FW after multicast commands

Kieran Bingham <[email protected]>
arm64: dts: renesas: Fix thermal bindings

Mika Westerberg <[email protected]>
thunderbolt: Runtime PM activate both ends of the device link

Mauro Carvalho Chehab <[email protected]>

    media: m920x: don't use stack on USB reads

Tsuchiya Yuto <[email protected]>
media: atomisp: fix "variable dereferenced before check 'asd'"

Zhou Qingyang <[email protected]>
media: saa7146: hexium_orion: Fix a NULL pointer dereference in hexium_attach()

Niklas Söderlund <[email protected]>
media: rcar-vin: Update format alignment constraints

James Hilliard <[email protected]>
media: uvcvideo: Increase UVC_CTRL_CONTROL_TIMEOUT to 5 seconds.

Laurent Pinchart <[email protected]>
drm: rcar-du: Fix CRTC timings when CMM is used

Joerg Roedel <[email protected]>
x86/mm: Flush global TLB when switching to trampoline page-table

Xiongwei Song <[email protected]>
floppy: Add max size check for user space request

Neal Liu <[email protected]>
usb: uhci: add aspeed ast2600 uhci support

Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: j721e-main: Fix 'dtbs_check' in serdes_ln_ctrl node

Kishon Vijay Abraham I <[email protected]>
arm64: dts: ti: j7200-main: Fix 'dtbs_check' serdes_ln_ctrl node

Vlad Zahorodnii <[email protected]>
drm/amd/display: Use oriented source size when checking cursor scaling

Thomas Zimmermann <[email protected]>
drm: Return error codes from struct drm_driver.gem_create_object

Hans de Goede <[email protected]>
ACPI / x86: Add not-present quirk for the PCI0.SDHB.BRC1 device on the GPD win

Hans de Goede <[email protected]>
ACPI / x86: Allow specifying acpi_device_override_status() quirks by path

Hans de Goede <[email protected]>
ACPI: Change acpi_device_always_present() into acpi_device_override_status()

Hans de Goede <[email protected]>
ACPI / x86: Drop PWM2 device on Lenovo Yoga Book from always present table

Zack Rusin <[email protected]>
drm/vmwgfx: Introduce a new placement for MOB page tables

Zack Rusin <[email protected]>
drm/vmwgfx: Release ttm memory if probe fails

Adam Ward <[email protected]>
regulator: da9121: Prevent current limit change when enabled

Mansur Alisha Shaik <[email protected]>
media: venus: avoid calling core_clk_setrate() concurrently during concurrent video sessions

Sriram R <[email protected]>
ath11k: Avoid NULL ptr access during mgmt tx cleanup

Zekun Shen <[email protected]>
rsi: Fix out-of-bounds read in rsi_read_pkt()

Zekun Shen <[email protected]>
rsi: Fix use-after-free in rsi_rx_done_handler()

Zekun Shen <[email protected]>
mwifiex: Fix skb_over_panic in mwifiex_usb_recv()

Ping-Ke Shih <[email protected]>
rtw89: fix potentially access out of range of RF register array

Stephan Müller <[email protected]>
crypto: jitter - consider 32 LSB for APT

Chengfeng Ye <[email protected]>
HSI: core: Fix return freed object in hsi_new_client

Hans de Goede <[email protected]>
gpiolib: acpi: Do not set the IRQ type if the IRQ is already in use

Fugang Duan <[email protected]>
tty: serial: imx: disable UCR4_OREN in .stop_rx() instead of .shutdown()

Emil Renner Berthing <[email protected]>

    serial: 8250_dw: Add StarFive JH7100 quirk

Jiri Slaby <[email protected]>
mxser: increase buf_overrun if tty_insert_flip_char() fails

Jiri Slaby <[email protected]>
mxser: don't throttle manually

Jiri Slaby <[email protected]>
mxser: keep only !tty test in ISR

Martyn Welch <[email protected]>
drm/bridge: megachips: Ensure both bridges are probed before registration

Martin Leung <[email protected]>
drm/amd/display: add else to avoid double destroy clk_mgr

Danielle Ratson <[email protected]>
mlxsw: pci: Add shutdown method in PCI driver

Jan Kiszka <[email protected]>
soc: ti: pruss: fix referenced node in error message

Alex Deucher <[email protected]>
drm/amdgpu/display: set vblank_disable_immediate for DC

Yang Li <[email protected]>
drm/amd/display: check top_pipe_to_program pointer

Anilkumar Kolli <[email protected]>
ath11k: Fix mon status ring rx tlv processing

Lukas Bulwahn <[email protected]>
ARM: imx: rename DEBUG_IMX21_IMX27_UART to DEBUG_IMX27_UART

Marek Vasut <[email protected]>
soc: imx: gpcv2: Synchronously suspend MIX domains

Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8350: Shorten camera-thermal-bottom name

Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm[68]350: Use interrupts-extended with pdc interrupts

Dinh Nguyen <[email protected]>
EDAC/synopsys: Use the quirk for version instead of ddr version

Yang Li <[email protected]>
ethernet: renesas: Use div64_ul instead of do_div

Andrii Nakryiko <[email protected]>
libbpf: Accommodate DWARF/compiler bug with duplicated structs

Zheyu Ma <[email protected]>
media: b2c2: Add missing check in flexcop_pci_isr:

José Expósito <[email protected]>
HID: apple: Do not reset quirks when the Fn key is not found

José Expósito <[email protected]>
HID: magicmouse: Report battery level over USB

Hans de Goede <[email protected]>
drm: panel-orientation-quirks: Add quirk for the Lenovo Yoga Book X91F/L

Brian Chen <[email protected]>
psi: Fix PSI_MEM_FULL state when tasks are in memstall and doing reclaim

Pavankumar Kondeti <[email protected]>
usb: gadget: f_fs: Use stream_open() for endpoint files

Haimin Zhang <[email protected]>
USB: ehci_brcm_hub_control: Improve port index sanitizing

Amjad Ouled-Ameur <[email protected]>
usb: dwc3: meson-g12a: fix shared reset control use

Baochen Qiang <[email protected]>
ath11k: Fix crash caused by uninitialized TX ring

Mauro Carvalho Chehab <[email protected]>
media: atomisp: handle errors at sh_css_create_isp_params()

Tiezhu Yang <[email protected]>
bpf: Change value of MAX_TAIL_CALL_CNT from 32 to 33

Linus Lüssing <[email protected]>
batman-adv: allow netlink usage in unprivileged containers

Wen Gong <[email protected]>
ath11k: enable IEEE80211_VHT_EXT_NSS_BW_CAPABLE if NSS ratio enabled

Wan Jiabing <[email protected]>
ARM: shmobile: rcar-gen2: Add missing of_node_put()

Mauro Carvalho Chehab <[email protected]>
media: atomisp: check before deference asd variable

Hans de Goede <[email protected]>
media: atomisp-ov2680: Fix ov2680_set_fmt() clobbering the exposure

Mauro Carvalho Chehab <[email protected]>
media: atomisp: set per-device's default mode

Mauro Carvalho Chehab <[email protected]>
media: atomisp: fix try_fmt logic

Ben Skeggs <[email protected]>
drm/nouveau/pmu/gm200-: avoid touching PMU outside of DEVINIT/PREOS/ACR

Neil Armstrong <[email protected]>
drm/bridge: dw-hdmi: handle ELD when DRM_BRIDGE_ATTACH_NO_CONNECTOR

Zekun Shen <[email protected]>
ar5523: Fix null-ptr-deref with unexpected WDCMSG_TARGET_START reply

Andrii Nakryiko <[email protected]>
selftests/bpf: Fix bpf_object leak in skb_ctx selftest

Andrii Nakryiko <[email protected]>
selftests/bpf: Destroy XDP link correctly

Andrii Nakryiko <[email protected]>
selftests/bpf: Fix memory leaks in btf_type_c_dump() helper

Qiang Yu <[email protected]>
drm/lima: fix warning when CONFIG_DEBUG_SG=y & CONFIG_DMA_API_DEBUG=y

Andrii Nakryiko <[email protected]>
libbpf: Validate that .BTF and .BTF.ext sections contain data

Andrii Nakryiko <[email protected]>
libbpf: Improve sanity checking during BTF fix up

Andrii Nakryiko <[email protected]>
libbpf: Detect corrupted ELF symbols section

Alexander Aring <[email protected]>
fs: dlm: filter user dlm messages for kernel locks

Andrey Grodzovsky <[email protected]>
drm/sched: Avoid lockdep spalt on killing a processes

Archie Pusaka <[email protected]>
Bluetooth: Fix removing adv when processing cmd complete

Brian Norris <[email protected]>
drm/panel: Delete panel on mipi_dsi_attach() failure

Wei Yongjun <[email protected]>
Bluetooth: Fix memory leak of hci device

Wei Yongjun <[email protected]>
Bluetooth: Fix debugfs entry leak in hci_register_dev()

Nguyen Dinh Phi <[email protected]>
Bluetooth: hci_sock: purge socket queues in the destruct() callback

Merlijn Wajer <[email protected]>
leds: lp55xx: initialise output direction from dts

Sicelo A. Mhlongo <[email protected]>
ARM: dts: omap3-n900: Fix lp5523 for multi color

Sudeep Holla <[email protected]>
mailbox: pcc: Handle all PCC subtypes correctly in pcc_mbox_irq

Sudeep Holla <[email protected]>
mailbox: pcc: Avoid using the uninitialized variable 'dev'

Dan Carpenter <[email protected]>
mailbox: imx: Fix an IS_ERR() vs NULL bug

jason-jh.lin <[email protected]>
mailbox: fix gce_num of mt8192 driver data

Paul Cercueil <[email protected]>
MIPS: compressed: Fix build with ZSTD compression

Stephen Boyd <[email protected]>
of/fdt: Don't worry about non-memory region overlap for no-map

Baruch Siach <[email protected]>
of: base: Fix phandle argument length mismatch error message

Conor Dooley <[email protected]>
clk: bm1880: remove kfrees on static allocations

Shengjiu Wang <[email protected]>
ASoC: fsl_asrc: refine the check of available clock divider

Shengjiu Wang <[email protected]>
ASoC: imx-card: improve the sound quality for low rate

Shengjiu Wang <[email protected]>
ASoC: imx-card: Fix mclk calculation issue for akcodec

Shengjiu Wang <[email protected]>
ASoC: imx-card: Need special setting for ak4497 on i.MX8MQ

Taniya Das <[email protected]>
clk: qcom: gcc-sc7280: Mark gcc_cfg_noc_lpass_clk always enabled

Kamal Heib <[email protected]>
RDMA/cxgb4: Set queue pair state when being queried

Huang Pei <[email protected]>
MIPS: fix local_{add,sub}_return on MIPS64

Nathan Chancellor <[email protected]>
cxl/core: Remove cxld_const_init in cxl_decoder_alloc()

Christian A. Ehrhardt <[email protected]>
ALSA: hda/cs8409: Fix Jack detection after resume

Christian A. Ehrhardt <[email protected]>
ALSA: hda/cs8409: Increase delay during jack detection

Alyssa Ross <[email protected]>
ASoC: fsl_mqs: fix MODULE_ALIAS

Ammar Faizi <[email protected]>
powerpc/xive: Add missing null check after calling kmalloc

Randy Dunlap <[email protected]>
mips: bcm63xx: add support for clk_set_parent()

Randy Dunlap <[email protected]>
mips: lantiq: add support for clk_set_parent()

Sameer Pujar <[email protected]>
arm64: tegra: Remove non existent Tegra194 reset

Trevor Wu <[email protected]>
ASoC: mediatek: mt8195: correct pcmif BE dai control flow

Wei Yongjun <[email protected]>
misc: lattice-ecp3-config: Fix task hung when firmware load failed

Jiasheng Jiang <[email protected]>
ASoC: samsung: idma: Check of ioremap return value

Tom Rix <[email protected]>
iio: chemical: sunrise_co2: set val parameter only on success

Swapnil Jakhade <[email protected]>
phy: cadence: Sierra: Fix to get correct parent for mux clocks

Michael Ellerman <[email protected]>
powerpc/64s: Use EMIT_WARN_ENTRY for SRR debug warnings

Michael Ellerman <[email protected]>
powerpc/64s: Mask NIP before checking against SRR0

Jiasheng Jiang <[email protected]>
ASoC: mediatek: Check for error clk pointer

Ryuta NAKANISHI <[email protected]>
phy: uniphier-usb3ss: fix unintended writing zeros to PHY register

Alan Stern <[email protected]>
scsi: block: pm: Always set request queue runtime active in blk_post_runtime_resume()

Pingfan Liu <[email protected]>
efi: apply memblock cap after memblock_add()

Zhen Lei <[email protected]>
of: fdt: Aggregate the processing of "linux,usable-memory-range"

William Breathitt Gray <[email protected]>
counter: 104-quad-8: Fix persistent enabled events bug

Trevor Wu <[email protected]>
ASoC: mediatek: mt8195: correct default value

Xiongfeng Wang <[email protected]>
iommu/iova: Fix race between FQ timeout and teardown

Cezary Rojewski <[email protected]>
ASoC: Intel: catpt: Test dmaengine_submit() result before moving on

Maxim Levitsky <[email protected]>
iommu/amd: Remove useless irq affinity notifier

Maxim Levitsky <[email protected]>
iommu/amd: X2apic mode: mask/unmask interrupts on suspend/resume

Maxim Levitsky <[email protected]>
iommu/amd: X2apic mode: setup the INTX registers on mask/unmask

Maxim Levitsky <[email protected]>
iommu/amd: X2apic mode: re-enable after resume

Maxim Levitsky <[email protected]>
iommu/amd: Restore GA log/tail pointer on host resume

Arnd Bergmann <[email protected]>

    dmaengine: pxa/mmp: stop referencing config->slave_id

Lukas Bulwahn <[email protected]>
mips: fix Kconfig reference to PHYS_ADDR_T_64BIT

Lukas Bulwahn <[email protected]>
mips: add SYS_HAS_CPU_MIPS64_R5 config for MIPS Release 5 support

Dillon Min <[email protected]>
clk: stm32: Fix ltdc's clock turn off by clk_disable_unused() after system enter shell

Frank Rowand <[email protected]>
of: unittest: 64 bit dma address test requires arch support

Jim Quinlan <[email protected]>
of: unittest: fix warning on PowerPC frame size warning

Jiasheng Jiang <[email protected]>
ASoC: rt5663: Handle device_property_read_u32_array error codes

Avihai Horon <[email protected]>
RDMA/cma: Let cma_resolve_ib_dev() continue search even after empty entry

Avihai Horon <[email protected]>
RDMA/core: Let ib_find_gid() continue search even after empty entry

Rob Clark <[email protected]>
iommu/arm-smmu-qcom: Fix TTBR0 read

Christophe Leroy <[email protected]>
powerpc/powermac: Add additional missing lockdep_register_key()

Thomas Gleixner <[email protected]>
PCI/MSI: Fix pci_irq_vector()/pci_irq_get_affinity()

Kamal Heib <[email protected]>
RDMA/qedr: Fix reporting max_{send/recv}_wr attrs

Bart Van Assche <[email protected]>
scsi: ufs: Fix race conditions related to driver data

Bart Van Assche <[email protected]>
scsi: core: Fix scsi_device_max_queue_depth()

Kai Vehmanen <[email protected]>
ASoC: SOF: Intel: fix build issue related to CODEC_PROBE_ENTRIES

Hector Martin <[email protected]>
iommu/io-pgtable-arm: Fix table descriptor paddr formatting

Lu Baolu <[email protected]>
iommu: Extend mutex lock scope in iommu_probe_device()

Jiasheng Jiang <[email protected]>
uio: uio_dmem_genirq: Catch the Exception

Stafford Horne <[email protected]>
openrisc: Add clone3 ABI wrapper

Todd Kjos <[email protected]>
binder: avoid potential data leakage when copying txn

Todd Kjos <[email protected]>
binder: fix handling of error during copy

Kees Cook <[email protected]>
char/mwave: Adjust io port register size

Andy Shevchenko <[email protected]>
misc: at25: Make driver OF independent again

Lucas Tanure <[email protected]>
ASoC: amd: Fix dependency for SPI master

Takashi Iwai <[email protected]>
ALSA: usb-audio: Drop superfluous '0' in Presonus Studio 1810c's ID

Bixuan Cui <[email protected]>
ALSA: oss: fix compile error when OSS_DEBUG is enabled

Waiman Long <[email protected]>
clocksource: Avoid accidental unstable marking of clocksources

Christophe Leroy <[email protected]>
powerpc/32s: Fix shift-out-of-bounds in KASAN init

Christophe Leroy <[email protected]>
powerpc/modules: Don't WARN on first module allocation attempt

Athira Rajeev <[email protected]>
powerpc/perf: Fix PMU callbacks to clear pending PMI before resetting an overflown PMC

Niklas Söderlund <[email protected]>
dt-bindings: thermal: Fix definition of cooling-maps contribution property

Thomas Gleixner <[email protected]>
ALSA: hda: Make proper use of timecounter

Jack Wang <[email protected]>
RDMA/rtrs-clt: Fix the initial value of min_latency

Lukas Bulwahn <[email protected]>
ASoC: codecs: wcd938x: add SND_SOC_WCD938_SDW to codec list instead

Lukas Bulwahn <[email protected]>
ASoC: uniphier: drop selecting non-existing SND_SOC_UNIPHIER_AIO_DMA

Peiwei Hu <[email protected]>
powerpc/prom_init: Fix improper check of prom_getprop()

Richard Fitzgerald <[email protected]>
ASoC: cs42l42: Report initial jack state

Adam Ford <[email protected]>
clk: imx8mn: Fix imx8mn_clko1_sels

Lad Prabhakar <[email protected]>
clk: renesas: rzg2l: propagate return value of_genpd_add_provider_simple()

Lad Prabhakar <[email protected]>
clk: renesas: rzg2l: Check return value of pm_genpd_init()

Igor Pylypiv <[email protected]>

    scsi: pm80xx: Update WARN_ON check in pm8001_mpi_build_cmd()

Kamal Heib <[email protected]>
RDMA/hns: Validate the pkey index

Christophe JAILLET <[email protected]>
RDMA/bnxt_re: Scan the whole bitmap when checking if "disabling RCFW with pending cmd-bit"

Takashi Iwai <[email protected]>
ALSA: hda: Fix potential deadlock at codec unbinding

Takashi Iwai <[email protected]>
ALSA: hda: Add missing rwsem around snd_ctl_remove() calls

Takashi Iwai <[email protected]>
ALSA: PCM: Add missing rwsem around snd_ctl_remove() calls

Takashi Iwai <[email protected]>
ALSA: jack: Add missing rwsem around snd_ctl_remove() calls

Pierre-Louis Bossart <[email protected]>
ASoC: Intel: sof_sdw: fix jack detection on HP Spectre x360 convertible

Jan Kara <[email protected]>
ext4: avoid trim error on fs with small groups

Taehee Yoo <[email protected]>
amt: fix wrong return type of amt_send_membership_update()

Pavel Skripkin <[email protected]>
net: mcs7830: handle usb read errors properly

Edwin Peer <[email protected]>
bnxt_en: use firmware provided max timeout for messages

Nathan Chancellor <[email protected]>
iwlwifi: mvm: Use div_s64 instead of do_div in iwl_mvm_ftm_rtt_smoothing()

Paul Blakey <[email protected]>
net: openvswitch: Fix ct_state nat flags for conns arriving from tc

Florian Westphal <[email protected]>
netfilter: egress: avoid a lockdep splat

Dominik Brodowski <[email protected]>
pcmcia: fix setting of kthread task states

Lad Prabhakar <[email protected]>
can: rcar_canfd: rcar_canfd_channel_probe(): make sure we free CAN network device

Jiasheng Jiang <[email protected]>
can: xilinx_can: xcan_probe(): check for error irq

Marc Kleine-Budde <[email protected]>
can: softing: softing_startstop(): fix set but not used variable warning

Christophe Jaillet <[email protected]>
tpm_tis: Fix an error handling path in 'tpm_tis_core_init()'

Chen Jun <[email protected]>
tpm: add request_locality before write TPM_INT_ENABLE

Marc Kleine-Budde <[email protected]>
can: mcp251xfd: add missing newline to printed strings

Sunil Goutham <[email protected]>
octeontx2-af: Fix interrupt name strings

Vladimir Oltean <[email protected]>
net: mscc: ocelot: fix incorrect balancing with down LAG ports

Fabio Estevam <[email protected]>
regmap: Call regmap_debugfs_exit() prior to _init()

Dan Carpenter <[email protected]>
netrom: fix api breakage in nr_setsockopt()

Dan Carpenter <[email protected]>
ax25: uninitialized variable in ax25_setsockopt()

Rakesh Babu Saladi <[email protected]>
octeontx2-nicvf: Free VF PTP resources.

Subbaraya Sundeep <[email protected]>
octeontx2-af: Increment ptp refcount before use

Miaoqian Lin <[email protected]>
spi: spi-meson-spifc: Add missing pm_runtime_disable() in meson_spifc_probe

Mat Martineau <[email protected]>
mptcp: Check reclaim amount before reducing allocation

Geliang Tang <[email protected]>
mptcp: fix a DSS option writing error

Matthieu Baerts <[email protected]>
mptcp: fix opt size when sending DSS + MP_FAIL

Paolo Abeni <[email protected]>
mptcp: fix per socket endpoint accounting

Dan Carpenter <[email protected]>
Bluetooth: hci_sock: fix endian bug in hci_sock_setsockopt()

Dan Carpenter <[email protected]>
Bluetooth: L2CAP: uninitialized variables in l2cap_sock_setsockopt()

Zizhuang Deng <[email protected]>
lib/mpi: Add the return value check of kcalloc()

Moshe Shemesh <[email protected]>
net/mlx5: Set command entry semaphore up once got index free

Maor Dickman <[email protected]>
net/mlx5e: Sync VXLAN udp ports during uplink representor profile change

Shay Drory <[email protected]>
net/mlx5: Fix access to sf_dev_table on allocation failure

Paul Blakey <[email protected]>
net/mlx5e: Fix matching on modified inner ip_ecn bits

Aya Levin <[email protected]>
Revert "net/mlx5e: Block offload of outer header csum for GRE tunnel"

Aya Levin <[email protected]>
Revert "net/mlx5e: Block offload of outer header csum for UDP tunnels"

Maor Dickman <[email protected]>
net/mlx5e: Don't block routes with nexthop objects in SW

Maor Dickman <[email protected]>
net/mlx5e: Fix wrong usage of fib_info_nh when routes with nexthop objects are used

Dima Chumak <[email protected]>
net/mlx5e: Fix nullptr on deleting mirroring rule

Aya Levin <[email protected]>
net/mlx5e: Fix page DMA map/unmap attributes

Huang Rui <[email protected]>
x86, sched: Fix undefined reference to init_freq_invariance_cppc() build error

Vinod Koul <[email protected]>
spi: qcom: geni: handle timeout for gpi mode

Vinod Koul <[email protected]>
spi: qcom: geni: set the error code for gpi transfer

Valentin Caron <[email protected]>
serial: stm32: move tx dma terminate DMA to shutdown

Alyssa Ross <[email protected]>
serial: liteuart: fix MODULE_ALIAS

Miaoqian Lin <[email protected]>
drivers/firmware: Add missing platform_device_put() in sysfb_create_simplefb

Michal Suchanek <[email protected]>
debugfs: lockdown: Allow reading debugfs files that are not world readable

José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_frame_init_v1_buttonpad

José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_huion_init

José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_get_str_desc

José Expósito <[email protected]>
HID: hid-uclogic-params: Invalid parameter check in uclogic_params_init

Pavel Hofman <[email protected]>
usb: gadget: u_audio: Subdevice 0 for capture ctls

John Keeping <[email protected]>
usb: gadget: u_audio: fix calculations for small bInterval

John Keeping <[email protected]>
usb: dwc2: gadget: initialize max_speed from params

Dinh Nguyen <[email protected]>
usb: dwc2: do not gate off the hardware if it does not support clock gating

Miaoqian Lin <[email protected]>
usb: dwc3: qcom: Fix NULL vs IS_ERR checking in dwc3_qcom_probe

Wen Gu <[email protected]>

    net/smc: Reset conn->lgr when link group registration fails

Miaoqian Lin <[email protected]>
Bluetooth: hci_qca: Fix NULL vs IS_ERR_OR_NULL check in qca_serdev_probe

Jiasheng Jiang <[email protected]>
Bluetooth: hci_bcm: Check for error irq

Jiasheng Jiang <[email protected]>
fsl/fman: Check for null pointer after calling devm_ioremap

Jiasheng Jiang <[email protected]>
staging: greybus: audio: Check null pointer

Dan Carpenter <[email protected]>
rocker: fix a sleeping in atomic bug

Eric Dumazet <[email protected]>
ppp: ensure minimum packet size in ppp_write()

Miroslav Lichvar <[email protected]>
net: fix SOF_TIMESTAMPING_BIND_PHC to work with multiple sockets

Florian Westphal <[email protected]>
netfilter: nft_set_pipapo: allocate pcpu scratch maps on clone

Pablo Neira Ayuso <[email protected]>
netfilter: nft_payload: do not update layer 4 checksum when mangling fragments

Qiang Wang <[email protected]>
libbpf: Use probe_name for legacy kprobe

Kuniyuki Iwashima <[email protected]>
bpf: Fix SO_RCVBUF/SO_SNDBUF handling in _bpf_setsockopt().

Kris Van Hees <[email protected]>
bpf: Fix verifier support for validation of async callbacks

Daniel Borkmann <[email protected]>
bpf: Don't promote bogus looking registers after null check.

John Fastabend <[email protected]>
bpf, sockmap: Fix double bpf_prog_put on error case in map_link

John Fastabend <[email protected]>
bpf, sockmap: Fix return codes from tcp_bpf_recvmsg_parser()

Hou Tao <[email protected]>
bpf, arm64: Use emit_addr_mov_i64() for BPF_PSEUDO_FUNC

Xin Xiong <[email protected]>
netfilter: ipt_CLUSTERIP: fix refcount leak in clusterip_tg_check()

Vladimir Oltean <[email protected]>
net: dsa: fix incorrect function pointer check for MRP ring roles

Daniel Golle <[email protected]>
net: ethernet: mtk_eth_soc: fix return values and refactor MDIO ops

Raed Salem <[email protected]>
net/xfrm: IPsec tunnel mode fix inner_ipproto setting in sec_path

Jiasheng Jiang <[email protected]>
power: reset: mt6397: Check for null res pointer

Zhou Qingyang <[email protected]>
pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in nonstatic_find_mem_region()

Zhou Qingyang <[email protected]>
pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in __nonstatic_find_io_region()

Hans de Goede <[email protected]>
ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes

José Expósito <[email protected]>
drm/amd/display: fix dereference before NULL check

Lad Prabhakar <[email protected]>
serial: 8250_bcm7271: Propagate error codes from brcmuart_probe()

Haimin Zhang <[email protected]>
bpf: Add missing map_get_next_key method to bloom filter map.

Pavel Begunkov <[email protected]>
io_uring: remove double poll on poll update

Zhang Zixun <[email protected]>
x86/mce/inject: Avoid out-of-bounds write when setting flags

Arseny Demidov <[email protected]>
hwmon: (mr75203) fix wrong power-up delay value

Marijn Suijten <[email protected]>
regulator: qcom-labibb: OCP interrupts are not a failure while disabled

Ming Lei <[email protected]>

    block: null_blk: only set set->nr_maps as 3 if active poll_queues is > 0

Dan Carpenter <[email protected]>
crypto: octeontx2 - prevent underflow in get_cores_bmap()

Nathan Chancellor <[email protected]>
x86/boot/compressed: Move CLANG_FLAGS to beginning of KBUILD_CFLAGS

Panicker Harish <[email protected]>
Bluetooth: hci_qca: Stop IBS timer during BT OFF

Lorenzo Bianconi <[email protected]>
mt76: mt7921: fix a possible race enabling/disabling runtime-pm

Baochen Qiang <[email protected]>
ath11k: Fix unexpected return buffer manager error for QCA6390

Clément Léger <[email protected]>
software node: fix wrong node passed to find nargs_prop

Marijn Suijten <[email protected]>
backlight: qcom-wled: Respect enabled-strings in set_brightness

Marijn Suijten <[email protected]>
backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion

Marijn Suijten <[email protected]>
backlight: qcom-wled: Override default length with qcom,enabled-strings

Marijn Suijten <[email protected]>
backlight: qcom-wled: Fix off-by-one maximum with default num_strings

Marijn Suijten <[email protected]>
backlight: qcom-wled: Pass number of elements to read to read_u32_array

Marijn Suijten <[email protected]>
backlight: qcom-wled: Validate enabled string indices in DT

Paul Chaignon <[email protected]>
bpftool: Enable line buffering for stdout

Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix using wrong mode

Johannes Berg <[email protected]>
um: virtio_uml: Fix time-travel external time propagation

Johannes Berg <[email protected]>
lib/logic_iomem: Fix operation on 32-bit

Johannes Berg <[email protected]>
lib/logic_iomem: Fix 32-bit build

Johannes Berg <[email protected]>
um: virt-pci: Fix 32-bit compile

Johannes Berg <[email protected]>
um: rename set_signals() to um_set_signals()

Johannes Berg <[email protected]>
um: fix ndelay/udelay defines

Bernard Zhao <[email protected]>
selinux: fix potential memleak in selinux_add_opt()

Christoph Hellwig <[email protected]>
block: fix error unwinding in device_add_disk

Sergey Shtylyov <[email protected]>
mmc: meson-mx-sdio: add IRQ check

Sergey Shtylyov <[email protected]>
mmc: meson-mx-sdhc: add IRQ check

Avraham Stern <[email protected]>
iwlwifi: mvm: set protected flag only for NDP ranging

Avraham Stern <[email protected]>
iwlwifi: mvm: perform 6GHz passive scan after suspend

Nathan Errera <[email protected]>
iwlwifi: mvm: test roc running status bits before removing the sta

Luca Coelho <[email protected]>
iwlwifi: don't pass actual WGDS revision number in table_revision

Johannes Berg <[email protected]>
iwlwifi: mvm: fix 32-bit build in FTM

Kai-Heng Feng <[email protected]>
rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE

Ping-Ke Shih <[email protected]>
rtw88: add quirk to disable pci caps on HP 250 G7 Notebook PC

Dan Carpenter <[email protected]>
wilc1000: fix double free error in probe()

Sean Wang <[email protected]>
mt76: mt7921s: fix suspend error with enlarging mcu timeout value

Lorenzo Bianconi <[email protected]>
mt76: connac: introduce MCU_UNI_CMD macro

Lorenzo Bianconi <[email protected]>
mt76: connac: remove MCU_FW_PREFIX bit

Lorenzo Bianconi <[email protected]>
mt76: connac: align MCU_EXT definitions with 7915 driver

Lorenzo Bianconi <[email protected]>
mt76: connac: introduce MCU_EXT macros

Sean Wang <[email protected]>
mt76: mt7921: fix possible resume failure

Lorenzo Bianconi <[email protected]>
mt76: connac: fix last_chan configuration in mt76_connac_mcu_rate_txpower_band

Sean Wang <[email protected]>
mt76: mt7921s: fix possible kernel crash due to invalid Rx count

Shayne Chen <[email protected]>
mt76: mt7921: use correct iftype data on 6GHz cap init

Sean Wang <[email protected]>
mt76: mt7921s: fix the device cannot sleep deeply in suspend

Sean Wang <[email protected]>
mt76: mt7921: move mt76_connac_mcu_set_hif_suspend to bus-related files

Lorenzo Bianconi <[email protected]>
mt76: mt7921: fix possible NULL pointer dereference in mt7921_mac_write_txwi

Lorenzo Bianconi <[email protected]>
mt76: fix possible OOB issue in mt76_calculate_default_rate

Lorenzo Bianconi <[email protected]>
mt76: debugfs: fix queue reporting for mt76-usb

Sean Wang <[email protected]>

    mt76: mt7921: fix MT7921E reset failure

Sean Wang <[email protected]>
mt76: mt7921: drop offload_flags overwritten

Marek Behún <[email protected]>
ARM: dts: armada-38x: Add generic compatible to UART nodes

Robert Marko <[email protected]>
arm64: dts: marvell: cn9130: enable CP0 GPIO controllers

Robert Marko <[email protected]>
arm64: dts: marvell: cn9130: add GPIO and SPI aliases

Wei Yongjun <[email protected]>
usb: ftdi-elan: fix memory leak on device disconnect

Andre Przywara <[email protected]>
ARM: 9159/1: decompressor: Avoid UNPREDICTABLE NOP encoding

Antony Antony <[email protected]>
xfrm: state and policy should fail if XFRMA_IF_ID 0

Antony Antony <[email protected]>
xfrm: interface with if_id 0 should return error

Jernej Skrabec <[email protected]>
media: hantro: Fix probe func error path

Robin Murphy <[email protected]>
drm/tegra: vic: Fix DMA API misuse

Thierry Reding <[email protected]>
drm/tegra: gr2d: Explicitly control module reset

Arnd Bergmann <[email protected]>
gpu: host1x: select CONFIG_DMA_SHARED_BUFFER

Stephen Boyd <[email protected]>
drm/bridge: ti-sn65dsi86: Set max register for regmap

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: fix safe status debugfs file

Baruch Siach <[email protected]>
arm64: dts: qcom: ipq6018: Fix gpio-ranges property

Srinivas Kandagatla <[email protected]>
arm64: dts: qcom: c630: Fix soundcard setup

Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Add missing PTP via UDP rules

Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Allow PTP P2P measurements on blocked ports

Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Add STP forwarding rule

Kurt Kanzenbach <[email protected]>
net: dsa: hellcreek: Fix insertion of static FDB entries

Zhou Qingyang <[email protected]>
ath11k: Fix a NULL pointer dereference in ath11k_mac_op_hw_scan()

Jiasheng Jiang <[email protected]>
media: coda/imx-vdoa: Handle dma_set_coherent_mask error codes

Wang Hai <[email protected]>
media: msi001: fix possible null-ptr-deref in msi001_probe()

Anton Vasilyev <[email protected]>
media: dw2102: Fix use after free

Robin Murphy <[email protected]>
perf/arm-cmn: Fix CPU hotplug unregistration

Christian Lamparter <[email protected]>
ARM: dts: gemini: NAS4220-B: fis-index-block with 128 KiB sectors

Daniel Latypov <[email protected]>
kunit: tool: fix --json output for skipped tests

Hector Martin <[email protected]>
spi: Fix incorrect cs_setup delay handling

Rameshkumar Sundaram <[email protected]>
ath11k: Fix deleting uninitialized kernel timer during fragment cache flush

Alexei Starovoitov <[email protected]>
libbpf: Fix gen_loader assumption on number of programs.

Weili Qian <[email protected]>
crypto: hisilicon/qm - fix incorrect return value of hisi_qm_resume()

Herbert Xu <[email protected]>
crypto: stm32 - Revert broken pm_runtime_resume_and_get changes

Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix bugs and crash in tests

Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix lrw chaining mode

Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix double pm exit

Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - check early input data

Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix xts and race condition in crypto_engine requests

Nicolas Toromanoff <[email protected]>
crypto: stm32/cryp - fix CTR counter carry

Jakub Kicinski <[email protected]>
selftests: harness: avoid false negatives if test has no ASSERTs

Anders Roxell <[email protected]>
selftests: clone3: clone3: add case CLONE3_ARGS_NO_TEST

Shuyi Cheng <[email protected]>
libbpf: Add "bool skipped" to struct bpf_map

Kees Cook <[email protected]>
x86/uaccess: Move variable into switch case statement

Eric Dumazet <[email protected]>
xfrm: fix a small bug in xfrm_sa_len()

Brian Norris <[email protected]>
mwifiex: Fix possible ABBA deadlock

Dmitry Baryshkov <[email protected]>
drm/msm/dsi: fix initialization in the bonded DSI case

Loic Poulain <[email protected]>
wcn36xx: Fix max channels retrieval

Frederic Weisbecker <[email protected]>
rcu/exp: Mark current CPU as exp-QS in IPI loop second pass

Jackie Liu <[email protected]>
drm/msm/dp: displayPort driver need algorithm rational

Rob Clark <[email protected]>
drm/msm/gpu: Don't allow zero fence_id

Nicholas Kazlauskas <[email protected]>
drm/amd/display: Fix out of bounds access on DNC31 stream encoder regs

Wayne Lin <[email protected]>
drm/amd/display: Fix bug in debugfs crc_win_update entry

Mark Chen <[email protected]>
Bluetooth: btusb: Handle download_firmware failure cases

Luiz Augusto von Dentz <[email protected]>
Bluetooth: MGMT: Use hci_dev_test_and_{set,clear}_flag

Seevalamuthu Mariappan <[email protected]>
ath11k: Fix QMI file type enum value

Fabio Estevam <[email protected]>
ath10k: Fix the MTU size on QCA9377 SDIO

Tudor Ambarus <[email protected]>
mtd: spi-nor: Fix mtd size for s3an flashes

Tudor Ambarus <[email protected]>

    mtd: spi-nor: Get rid of nor->page_size

Li Hua <[email protected]>
sched/rt: Try to restart rt period timer when rt runtime exceeded

Lv Yunlong <[email protected]>
wireless: iwlwifi: Fix a double free in iwl_txq_dyn_alloc_dma

Robert Schlabbach <[email protected]>
media: si2157: Fix "warm" tuner state detection

Zhou Qingyang <[email protected]>
media: saa7146: mxb: Fix a NULL pointer dereference in mxb_attach()

Zhou Qingyang <[email protected]>

    media: dib8000: Fix a memleak in dib8000_init()

Ricardo Ribalda <[email protected]>
media: uvcvideo: Avoid returning invalid controls

Ricardo Ribalda <[email protected]>
media: uvcvideo: Avoid invalid memory access

Colin Ian King <[email protected]>
media: uvcvideo: Fix memory leak of object map on error exit path

Alexander Lobakin <[email protected]>
samples: bpf: Fix 'unknown warning group' build warning on Clang

Alexander Lobakin <[email protected]>
samples: bpf: Fix xdp_sample_user.o linking with Clang

Andrii Nakryiko <[email protected]>
samples/bpf: Clean up samples/bpf build failes

Hans de Goede <[email protected]>

    platform/x86: wmi: Fix driver->notify() vs ->probe() race

Hans de Goede <[email protected]>
platform/x86: wmi: Replace read_takes_no_args with a flags field

Reiji Watanabe <[email protected]>

    arm64: mte: DC {GVA,GZVA} shouldn't be used when DCZID_EL0.DZP == 1

Reiji Watanabe <[email protected]>

    arm64: clear_page() shouldn't use DC ZVA when DCZID_EL0.DZP == 1

Kieran Bingham <[email protected]>
drm: rcar-du: crtc: Support external DSI dot clock

Kieran Bingham <[email protected]>
drm: rcar-du: Add DSI support to rcar_du_output_name

Kajol Jain <[email protected]>
bpf: Remove config check to enable bpf support for branch records

Hou Tao <[email protected]>
bpf: Disallow BPF_LOG_KERNEL log level for bpf(BPF_BTF_LOAD)

Alexei Starovoitov <[email protected]>
bpf: Adjust BTF log size limit.

Vincent Donnefort <[email protected]>
sched/fair: Fix per-CPU kthread and wakee stacking for asym CPU capacity

Vincent Donnefort <[email protected]>
sched/fair: Fix detection of per-CPU kthreads waking a task

Maxim Mikityanskiy <[email protected]>
bpf: Fix the test_task_vma selftest to support output shorter than 1 kB

Sean Wang <[email protected]>
Bluetooth: btmtksdio: fix resume failure

Yang Yingliang <[email protected]>
staging: rtl8192e: rtllib_module: fix error handle case in alloc_rtllib()

Yang Yingliang <[email protected]>
staging: rtl8192e: return error code from rtllib_softmac_init()

Tasos Sahanidis <[email protected]>
floppy: Fix hang in watchdog when disk is ejected

Michael Walle <[email protected]>
mtd: core: provide unique name for nvmem device

Lino Sanfilippo <[email protected]>
serial: amba-pl011: do not request memory region twice

Lizhi Hou <[email protected]>
tty: serial: uartlite: allow 64 bit address

Nishanth Menon <[email protected]>

    arm64: dts: ti: k3-j7200: Correct the d-cache-sets info

Nishanth Menon <[email protected]>

    arm64: dts: ti: k3-j721e: Fix the L2 cache sets

Nishanth Menon <[email protected]>

    arm64: dts: ti: k3-j7200: Fix the L2 cache sets

Nishanth Menon <[email protected]>

    arm64: dts: ti: k3-am642: Fix the L2 cache sets

Gaurav Jain <[email protected]>
crypto: caam - save caam memory to support crypto engine retry mechanism.

Ming Lei <[email protected]>
null_blk: allow zero poll queues

Alexei Starovoitov <[email protected]>
libbpf: Clean gen_loader's attach kind.

Zhou Qingyang <[email protected]>
drm/radeon/radeon_kms: Fix a NULL pointer dereference in radeon_driver_open_kms()

Zhou Qingyang <[email protected]>
drm/amdgpu: Fix a NULL pointer dereference in amdgpu_connector_lcd_native_mode()

Paul Gerber <[email protected]>
thermal/drivers/imx8mm: Enable ADC when enabling monitor

Dan Carpenter <[email protected]>
pinctrl: mediatek: add a check for error in mtk_pinconf_bias_get_rsel()

Dan Carpenter <[email protected]>
pinctrl: mediatek: uninitialized variable in mtk_pctrl_show_one_pin()

Rafael J. Wysocki <[email protected]>
ACPI: EC: Rework flushing of EC work while suspended to idle

William Kucharski <[email protected]>
cgroup: Trace event cgroup id fields should be u64

Zack Rusin <[email protected]>
drm/vmwgfx: Fail to initialize on broken configs

Zack Rusin <[email protected]>
drm/vmwgfx: Remove the deprecated lower mem limit

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8916: fix MMC controller aliases

Jun Miao <[email protected]>
rcu: Avoid alloc_pages() when recording stack

Mark Rutland <[email protected]>
powerpc: Avoid discarding flags in system_call_exception()

Florian Westphal <[email protected]>
netfilter: bridge: add support for pppoe filtering

Jesper Dangaard Brouer <[email protected]>
igc: AF_XDP zero-copy metadata adjust breaks SKBs on XDP_PASS

Oleksij Rempel <[email protected]>
thermal/drivers/imx: Implement runtime PM support

Yang Yingliang <[email protected]>
net: lantiq: fix missing free_netdev() on error in ltq_etop_probe()

Bhupesh Sharma <[email protected]>
net: stmmac: Add platform level debug register dump feature

Christophe JAILLET <[email protected]>
media: venus: core: Fix a resource leak in the error handling path of 'venus_probe()'

Christophe JAILLET <[email protected]>
media: venus: core: Fix a potential NULL pointer dereference in an error handling path

Mansur Alisha Shaik <[email protected]>
media: venus: correct low power frequency calculation for encoder

Philipp Zabel <[email protected]>
media: coda: fix CODA960 JPEG encoder buffer overflow

Chen-Yu Tsai <[email protected]>
media: hantro: Hook up RK3399 JPEG encoder output

Dafna Hirschfeld <[email protected]>
media: mtk-vcodec: call v4l2_m2m_ctx_release first when file is released

Christophe JAILLET <[email protected]>
media: mtk-vcodec: Fix an error handling path in 'mtk_vcodec_probe()'

Yang Yingliang <[email protected]>

    media: si470x-i2c: fix possible memory leak in si470x_i2c_probe()

Fabio Estevam <[email protected]>
media: imx-pxp: Initialize the spinlock prior to using it

Suresh Udipi <[email protected]>
media: rcar-csi2: Correct the selection of hsfreqrange

Hans de Goede <[email protected]>
media: i2c: ov8865: Fix lockdep error

Daniel Scally <[email protected]>
media: i2c: Re-order runtime pm initialisation

Eugen Hristev <[email protected]>
media: i2c: imx274: fix s_frame_interval runtime resume not requested

Alan Maguire <[email protected]>
libbpf: Silence uninitialized warning/error in btf_dump_dump_type_data

Jan Kara <[email protected]>
bfq: Do not let waker requests skip proper accounting

Claudiu Beznea <[email protected]>
mfd: atmel-flexcom: Use .resume_noirq

Claudiu Beznea <[email protected]>
mfd: atmel-flexcom: Remove #ifdef CONFIG_PM_SLEEP

Alvin Šipraga <[email protected]>
net: dsa: rtl8365mb: set RGMII RX delay in steps of 0.3 ns

Joey Gouly <[email protected]>
pinctrl: apple: return an error if pinmux is missing in the DT

Tudor Ambarus <[email protected]>
tty: serial: atmel: Call dma_async_issue_pending()

Tudor Ambarus <[email protected]>
tty: serial: atmel: Check return code of dmaengine_submit()

Peng Fan <[email protected]>
arm64: dts: ti: k3-j721e: correct cache-sets info

Anilkumar Kolli <[email protected]>
ath11k: Use host CE parameters for CE interrupts configuration

Giovanni Cabiddu <[email protected]>
crypto: qat - fix undetected PFVF timeout in ACK loop

Andrii Nakryiko <[email protected]>
libbpf: Fix using invalidated memory in bpf_linker

Andrii Nakryiko <[email protected]>
libbpf: Fix glob_syms memory leak in bpf_linker

Andrii Nakryiko <[email protected]>
libbpf: Fix potential misaligned memory access in btf_ext__new()

Andrii Nakryiko <[email protected]>
tools/resolve_btf_ids: Close ELF file on error

Andrii Nakryiko <[email protected]>
libbpf: Load global data maps lazily on legacy kernels

Dillon Min <[email protected]>
ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding on stm32f429 disco

Vladimir Zapolskiy <[email protected]>
cpufreq: qcom-hw: Fix probable nested interrupt handling

Adam Ford <[email protected]>
soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active

Lukasz Luba <[email protected]>
cpufreq: qcom-cpufreq-hw: Update offline CPUs per-cpu thermal pressure

George G. Davis <[email protected]>
mtd: hyperbus: rpc-if: fix bug in rpcif_hb_remove

Prasad Malisetty <[email protected]>
arm64: dts: qcom: sc7280: Fix 'interrupt-map' parent address cells

Prasad Malisetty <[email protected]>
arm64: dts: qcom: sc7280: Fix incorrect clock name

Chengfeng Ye <[email protected]>
crypto: qce - fix uaf on qce_skcipher_register_one

Chengfeng Ye <[email protected]>
crypto: qce - fix uaf on qce_ahash_register_one

Chengfeng Ye <[email protected]>
crypto: qce - fix uaf on qce_aead_register_one

Wei Yongjun <[email protected]>
crypto: keembay-ocs-ecc - Fix error return code in kmb_ocs_ecc_probe()

Tudor Ambarus <[email protected]>
crypto: atmel-aes - Reestablish the correct tfm context at dequeue

Wang Hai <[email protected]>
media: dmxdev: fix UAF when dvb_register_device() fails

Biju Das <[email protected]>
arm64: dts: renesas: cat875: Add rx/tx delays

Seevalamuthu Mariappan <[email protected]>
ath11k: add hw_param for wakeup_mhi

P Praneesh <[email protected]>
ath11k: allocate dst ring descriptors from cacheable memory

Wen Gong <[email protected]>
ath11k: set correct NL80211_FEATURE_DYNAMIC_SMPS for WCN6855

Dan Carpenter <[email protected]>
drm/vboxvideo: fix a NULL vs IS_ERR() check

Jeremy Kerr <[email protected]>
mctp/test: Update refcount checking in route fragment tests

Tirthendu Sarkar <[email protected]>
selftests/bpf: Fix xdpxceiver failures for no hugepages

Lyude Paul <[email protected]>
drm/dp: Don't read back backlight mode in drm_edp_backlight_enable()

Alexander Aring <[email protected]>
fs: dlm: fix build with CONFIG_IPV6 disabled

Sebastian Andrzej Siewior <[email protected]>
kernel/locking: Use a pointer in ww_mutex_trylock().

Jens Wiklander <[email protected]>
tee: fix put order in teedev_close_context()

oujiefeng <[email protected]>
spi: hisi-kunpeng: Fix the debugfs directory name incorrect

Karthikeyan Kathirvel <[email protected]>
ath11k: reset RSN/WPA present state for open BSS

Karthikeyan Kathirvel <[email protected]>
ath11k: clear the keys properly via DISABLE_KEY

Sven Eckelmann <[email protected]>
ath11k: Fix ETSI regd with weather radar overlap

Jackie Liu <[email protected]>
Bluetooth: fix uninitialized variables notify_evt

Pavel Skripkin <[email protected]>
Bluetooth: stop proccessing malicious adv data

Lad Prabhakar <[email protected]>
memory: renesas-rpc-if: Return error in case devm_ioremap_resource() fails

Alexander Aring <[email protected]>
fs: dlm: don't call kernel_getpeername() in error_report()

Christian Hewitt <[email protected]>
arm64: dts: meson-gxbb-wetek: fix missing GPIO binding

Christian Hewitt <[email protected]>
arm64: dts: meson-gxbb-wetek: fix HDMI in early boot

Alexander Stein <[email protected]>
arm64: dts: amlogic: Fix SPI NOR flash node name for ODROID N2/N2+

Alexander Stein <[email protected]>
arm64: dts: amlogic: meson-g12: Fix GPU operating point table node name

Jammy Huang <[email protected]>
media: aspeed: Update signal status immediately to ensure sane hw state

Dongliang Mu <[email protected]>
media: em28xx: fix memory leak in em28xx_init_dev

Jammy Huang <[email protected]>
media: aspeed: fix mode-detect always time out at 2nd run

Dan Carpenter <[email protected]>
media: atomisp: fix uninitialized bug in gmin_get_pmic_id_and_addr()

Mauro Carvalho Chehab <[email protected]>
media: atomisp: fix enum formats logic

Tsuchiya Yuto <[email protected]>
media: atomisp: add NULL check for asd obtained from atomisp_video_pipe

Tsuchiya Yuto <[email protected]>
media: atomisp: fix ifdefs in sh_css.c

Tsuchiya Yuto <[email protected]>
media: atomisp: fix inverted error check for ia_css_mipi_is_source_port_valid()

Tsuchiya Yuto <[email protected]>
media: atomisp: do not use err var when checking port validity for ISP2400

Tsuchiya Yuto <[email protected]>
media: atomisp: fix inverted logic in buffers_needed()

Tsuchiya Yuto <[email protected]>
media: atomisp: fix punit_ddr_dvfs_enable() argument for mrfld_power up case

Tsuchiya Yuto <[email protected]>
media: atomisp: add missing media_device_cleanup() in atomisp_unregister_entities()

Dan Carpenter <[email protected]>
media: ipu3-cio2: fix error code in cio2_bridge_connect_sensor()

Dillon Min <[email protected]>
media: videobuf2: Fix the size printk format

Lad Prabhakar <[email protected]>
mtd: hyperbus: rpc-if: Check return value of rpcif_sw_init()

Quentin Monnet <[email protected]>
bpftool: Fix memory leak in prog_dump()

Rameshkumar Sundaram <[email protected]>
ath11k: Send PPDU_STATS_CFG with proper pdev mask to firmware

Benjamin Li <[email protected]>
wcn36xx: fix RX BD rate mapping for 5GHz legacy rates

Benjamin Li <[email protected]>
wcn36xx: populate band before determining rate on RX

Bryan O'Donoghue <[email protected]>
wcn36xx: Put DXE block into reset before freeing memory

Bryan O'Donoghue <[email protected]>
wcn36xx: Release DMA channel descriptor allocations

Bryan O'Donoghue <[email protected]>
wcn36xx: Fix DMA channel enable/disable cycle

Andrii Nakryiko <[email protected]>
libbpf: Free up resources used by inner map definition

Andrii Nakryiko <[email protected]>
libbpf: Fix non-C89 loop variable declaration in gen_loader.c

Maxime Ripard <[email protected]>
drm/vc4: hdmi: Enable the scrambler on reconnection

Andrii Nakryiko <[email protected]>
libbpf: Fix section counting logic

Bryan O'Donoghue <[email protected]>
wcn36xx: Indicate beacon not connection loss on MISSED_BEACON_IND

Benjamin Li <[email protected]>
wcn36xx: ensure pairing of init_scan/finish_scan and start_scan/end_scan

Colin Ian King <[email protected]>
drm/virtio: fix another potential integer overflow on shift of a int

Colin Ian King <[email protected]>
drm/virtio: fix potential integer overflow on shift of a int

Maxime Ripard <[email protected]>
drm/bridge: sn65dsi83: Fix bridge removal

Maxime Ripard <[email protected]>
drm/vc4: crtc: Make sure the HDMI controller is powered when disabling

Maxime Ripard <[email protected]>
drm/vc4: hdmi: Rework the pre_crtc_configure error handling

Maxime Ripard <[email protected]>
drm/vc4: hdmi: Make sure the controller is powered up during bind

Maxime Ripard <[email protected]>
drm/vc4: hdmi: Make sure the controller is powered in detect

Maxime Ripard <[email protected]>
drm/vc4: hdmi: Move the HSM clock enable to runtime_pm

Maxime Ripard <[email protected]>
drm/vc4: hdmi: Set a default HSM rate

Maxime Ripard <[email protected]>
clk: bcm-2835: Remove rounding up the dividers

Maxime Ripard <[email protected]>
clk: bcm-2835: Pick the closest clock rate

Wang Hai <[email protected]>
Bluetooth: cmtp: fix possible panic when cmtp_init_sockets() fails

Soenke Huster <[email protected]>
Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()

Brian Norris <[email protected]>
drm/rockchip: dsi: Disable PLL clock on bind error

Brian Norris <[email protected]>
drm/rockchip: dsi: Fix unbalanced clock on probe error

Brian Norris <[email protected]>
drm/panel: innolux-p079zca: Delete panel on attach() failure

Brian Norris <[email protected]>
drm/panel: kingdisplay-kd097d04: Delete panel on attach() failure

Wang Hai <[email protected]>
drm: fix null-ptr-deref in drm_dev_init_release()

Dan Carpenter <[email protected]>
drm/bridge: display-connector: fix an uninitialized pointer in probe()

Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix not initializing sk_peer_pid

Tedd Ho-Jeong An <[email protected]>
Bluetooth: mgmt: Fix Experimental Feature Changed event

Tedd Ho-Jeong An <[email protected]>
Bluetooth: hci_vhci: Fix to set the force_wakeup value

xinhui pan <[email protected]>
drm/ttm: Put BO in its memory manager's lru list

Brian Norris <[email protected]>
drm/rockchip: dsi: Reconfigure hardware on resume()

Brian Norris <[email protected]>
drm/rockchip: dsi: Hold pm-runtime across bind/unbind

Gang Li <[email protected]>
shmem: fix a race between shmem_unused_huge_shrink and shmem_evict_inode

Wen Gong <[email protected]>
ath11k: add string type to search board data in board-2.bin for WCN6855

Baoquan He <[email protected]>
mm/page_alloc.c: do not warn allocation failure on zone DMA if no managed pages

Baoquan He <[email protected]>
dma/pool: create dma atomic pool only if dma zone has managed pages

Baoquan He <[email protected]>
mm_zone: add function to check if managed dma zone exists

Yifeng Li <[email protected]>
PCI: Add function 1 DMA alias quirk for Marvell 88SE9125 SATA controller

Thomas Hellström <[email protected]>
dma_fence_array: Fix PENDING_ERROR leak in dma_fence_array_signaled()

Peng Hao <[email protected]>
virtio/virtio_mem: handle a possible NULL as a memcpy parameter

Hao Xu <[email protected]>

    io_uring: fix no lock protection for ctx->cq_extra

Dmitry Osipenko <[email protected]>
drm/tegra: Add back arm_iommu_detach_device()

Dmitry Osipenko <[email protected]>
gpu: host1x: Add back arm_iommu_detach_device()

Yunfei Wang <[email protected]>
iommu/io-pgtable-arm-v7s: Add error handle for page table allocation failure

Hari Prasath <[email protected]>
ARM: dts: at91: update alternate function of signal PD20

D Scott Phillips <[email protected]>
arm64: errata: Fix exec handling in erratum 1418040 workaround

Sumeet Pawnikar <[email protected]>

    thermal/drivers/int340x: Fix RFIM mailbox write commands

Dan Williams <[email protected]>
cxl/pmem: Fix module reload vs workqueue state

Dan Williams <[email protected]>
cxl/pmem: Fix reference counting for delayed work

Manivannan Sadhasivam <[email protected]>
bus: mhi: core: Fix race while handling SYS_ERR at power up

Bhaumik Bhatt <[email protected]>
bus: mhi: core: Fix reading wake_capable channel configuration

Loic Poulain <[email protected]>
bus: mhi: pci_generic: Graceful shutdown on freeze

Christophe Leroy <[email protected]>
lkdtm: Fix content of section containing lkdtm_rodata_do_nothing()

Jonathan Cameron <[email protected]>
iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046

Jonathan Cameron <[email protected]>
iio: adc: ti-adc081c: Partial revert of removal of ACPI IDs

Alexander Usyskin <[email protected]>
mei: hbm: fix client dma reply status

Johan Hovold <[email protected]>
can: softing_cs: softingcs_probe(): fix memleak on registration failure

Hans Verkuil <[email protected]>
media: cec-pin: fix interrupt en/disable handling

Johan Hovold <[email protected]>
media: stk1160: fix control-message timeouts

Johan Hovold <[email protected]>
media: pvrusb2: fix control-message timeouts

Johan Hovold <[email protected]>
media: redrat3: fix control-message timeouts

Michael Kuron <[email protected]>
media: dib0700: fix undefined behavior in tuner shutdown

Johan Hovold <[email protected]>
media: s2255: fix control-message timeouts

Johan Hovold <[email protected]>
media: cpia2: fix control-message timeouts

Johan Hovold <[email protected]>
media: em28xx: fix control-message timeouts

Johan Hovold <[email protected]>
media: mceusb: fix control-message timeouts

Johan Hovold <[email protected]>
media: flexcop-usb: fix control-message timeouts

Hans Verkuil <[email protected]>
media: v4l2-ioctl.c: readbuffers depends on V4L2_CAP_READWRITE

Sakari Ailus <[email protected]>
media: ov8865: Disable only enabled regulators on error path

Hans Verkuil <[email protected]>
media: cec: fix a deadlock situation

Namjae Jeon <[email protected]>
ksmbd: add reserved room in ipc request/response

Namjae Jeon <[email protected]>
ksmbd: limits exceeding the maximum allowable outstanding requests

Namjae Jeon <[email protected]>
ksmbd: move credit charge deduction under processing request

Namjae Jeon <[email protected]>
ksmbd: add support for smb2 max credit parameter

Namjae Jeon <[email protected]>
ksmbd: fix guest connection failure with nautilus

Dan Carpenter <[email protected]>
ksmbd: uninitialized variable in create_socket()

Mohammad Athari Bin Ismail <[email protected]>
net: phy: marvell: add Marvell specific PHY loopback

Mateusz Jończyk <[email protected]>
rtc: cmos: take rtc_lock while reading from CMOS

Willy Tarreau <[email protected]>
tools/nolibc: fix incorrect truncation of exit code

Willy Tarreau <[email protected]>
tools/nolibc: i386: fix initial stack alignment

Jakub Kicinski <[email protected]>
crypto: x86/aesni - don't require alignment of data

Ammar Faizi <[email protected]>
tools/nolibc: x86-64: Fix startup code bug

Lucas De Marchi <[email protected]>
x86/gpu: Reserve stolen memory for first integrated Intel GPU

Jisheng Zhang <[email protected]>
riscv: mm: fix wrong phys_ram_base value for RV64

Nick Kossifidis <[email protected]>
riscv: use hart id instead of cpu id on machine_kexec

Nick Kossifidis <[email protected]>
riscv: Don't use va_pa_offset on kdump

Nick Kossifidis <[email protected]>
riscv: try to allocate crashkern region from 32bit addressible memory

Sean Christopherson <[email protected]>
RISC-V: Use common riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n

Alexandre Ghiti <[email protected]>
riscv: Get rid of MAXPHYSMEM configs

Paul Cercueil <[email protected]>
mtd: rawnand: ingenic: JZ4740 needs 'oob_first' read page function

Paul Cercueil <[email protected]>
mtd: rawnand: Export nand_read_page_hwecc_oob_first()

Paul Cercueil <[email protected]>
mtd: rawnand: davinci: Rewrite function description

Paul Cercueil <[email protected]>
mtd: rawnand: davinci: Avoid duplicated page read

Paul Cercueil <[email protected]>
mtd: rawnand: davinci: Don't calculate ECC when reading page

Andreas Oetken <[email protected]>
mtd: Fixed breaking list in __mtd_del_partition.

Stefan Riedmueller <[email protected]>
mtd: rawnand: gpmi: Remove explicit default gpmi clock setting for i.MX6

Christian Eggers <[email protected]>
mtd: rawnand: gpmi: Add ERR007117 protection for nfc_apply_timings

Krzysztof Kozlowski <[email protected]>
nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind()

Jaegeuk Kim <[email protected]>
f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file

Chao Yu <[email protected]>
f2fs: fix to do sanity check on last xattr entry in __f2fs_setxattr()

Chao Yu <[email protected]>
f2fs: fix to do sanity check in is_alive()

Chao Yu <[email protected]>
f2fs: fix to do sanity check on inode type during garbage collection

Shyam Prasad N <[email protected]>
cifs: free ntlmsspblob allocated in negotiate

Takashi Iwai <[email protected]>
ALSA: core: Fix SSID quirk lookup for subvendor=0

Jason Gerecke <[email protected]>
HID: wacom: Avoid using stale array indicies to read contact count

Jason Gerecke <[email protected]>
HID: wacom: Ignore the confidence flag when a touch is removed

Jason Gerecke <[email protected]>
HID: wacom: Reset expected and received contact counts at the same time

Jann Horn <[email protected]>
HID: uhid: Fix worker destroying device without any protection

Karl Kurbjun <[email protected]>
HID: Ignore battery for Elan touchscreen on HP Envy X360 15t-dr100

Marcelo Tosatti <[email protected]>
KVM: VMX: switch blocked_vcpu_on_cpu_lock to raw spinlock

David Matlack <[email protected]>
KVM: x86/mmu: Fix write-protection of PTs mapped by the TDP MMU

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

Diffstat:

 Documentation/admin-guide/cifs/usage.rst           |   7 +-
 Documentation/admin-guide/devices.txt              |   8 +-
 Documentation/admin-guide/hw-vuln/spectre.rst      |   2 +-
 .../bindings/display/amlogic,meson-dw-hdmi.yaml    |   5 +
 .../bindings/display/amlogic,meson-vpu.yaml        |   6 +
 .../devicetree/bindings/input/hid-over-i2c.txt     |   2 +
 .../devicetree/bindings/thermal/thermal-zones.yaml |   9 +-
 .../devicetree/bindings/watchdog/samsung-wdt.yaml  |   5 +-
 Documentation/driver-api/dmaengine/dmatest.rst     |   7 +-
 Documentation/driver-api/firewire.rst              |   4 +-
 .../acpi/dsd/data-node-references.rst              |  10 +-
 Documentation/trace/coresight/coresight-config.rst |  16 +-
 Makefile                                           |   4 +-
 arch/arm/Kconfig.debug                             |  14 +-
 arch/arm/boot/compressed/efi-header.S              |  22 +-
 arch/arm/boot/compressed/head.S                    |   3 +-
 arch/arm/boot/dts/armada-38x.dtsi                  |   4 +-
 arch/arm/boot/dts/gemini-nas4220b.dts              |   2 +-
 arch/arm/boot/dts/omap3-n900.dts                   |  50 +-
 arch/arm/boot/dts/qcom-sdx55.dtsi                  |   6 +-
 arch/arm/boot/dts/sama7g5-pinfunc.h                |   2 +-
 arch/arm/boot/dts/stm32f429-disco.dts              |   2 +-
 arch/arm/configs/cm_x300_defconfig                 |   1 -
 arch/arm/configs/ezx_defconfig                     |   1 -
 arch/arm/configs/imote2_defconfig                  |   1 -
 arch/arm/configs/nhk8815_defconfig                 |   1 -
 arch/arm/configs/pxa_defconfig                     |   1 -
 arch/arm/configs/spear13xx_defconfig               |   1 -
 arch/arm/configs/spear3xx_defconfig                |   1 -
 arch/arm/configs/spear6xx_defconfig                |   1 -
 arch/arm/include/debug/imx-uart.h                  |  18 +-
 arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c |   5 +-
 arch/arm/net/bpf_jit_32.c                          |   5 +-
 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi  |   2 +-
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi     |   2 +-
 arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi  |   3 +
 arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts  |  14 +-
 arch/arm64/boot/dts/marvell/cn9130.dtsi            |  15 +
 arch/arm64/boot/dts/nvidia/tegra186.dtsi           |   2 +-
 arch/arm64/boot/dts/nvidia/tegra194.dtsi           |   5 +-
 arch/arm64/boot/dts/qcom/ipq6018.dtsi              |   2 +-
 arch/arm64/boot/dts/qcom/msm8916.dtsi              |   4 +-
 arch/arm64/boot/dts/qcom/msm8996.dtsi              |   3 -
 arch/arm64/boot/dts/qcom/sc7280.dtsi               |  10 +-
 .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts      |  27 +
 arch/arm64/boot/dts/qcom/sm6350.dtsi               |   4 +-
 arch/arm64/boot/dts/qcom/sm8350.dtsi               |   6 +-
 arch/arm64/boot/dts/renesas/cat875.dtsi            |   1 +
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi          |   6 +-
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi          |   6 +-
 arch/arm64/boot/dts/renesas/r8a774e1.dtsi          |   6 +-
 arch/arm64/boot/dts/renesas/r8a77951.dtsi          |   6 +-
 arch/arm64/boot/dts/renesas/r8a77960.dtsi          |   6 +-
 arch/arm64/boot/dts/renesas/r8a77961.dtsi          |   6 +-
 arch/arm64/boot/dts/renesas/r8a77965.dtsi          |   6 +-
 arch/arm64/boot/dts/renesas/r8a77980.dtsi          |   4 +-
 arch/arm64/boot/dts/renesas/r8a779a0.dtsi          |  10 +-
 .../boot/dts/rockchip/rk3399-rock-pi-4b-plus.dts   |   7 +-
 arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts |   7 +-
 arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts |   7 +-
 arch/arm64/boot/dts/ti/k3-am642.dtsi               |   2 +-
 arch/arm64/boot/dts/ti/k3-j7200-main.dtsi          |   2 +-
 arch/arm64/boot/dts/ti/k3-j7200.dtsi               |   6 +-
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi          |   2 +-
 arch/arm64/boot/dts/ti/k3-j721e.dtsi               |   6 +-
 arch/arm64/include/asm/extable.h                   |   9 -
 arch/arm64/include/asm/memory.h                    |   5 +-
 arch/arm64/include/asm/mte-kasan.h                 |   8 +-
 arch/arm64/kernel/module.c                         |   4 +-
 arch/arm64/kernel/process.c                        |  39 +-
 arch/arm64/kernel/traps.c                          |   2 +-
 arch/arm64/lib/clear_page.S                        |  10 +
 arch/arm64/lib/mte.S                               |   8 +-
 arch/arm64/mm/ptdump.c                             |   2 -
 arch/arm64/net/bpf_jit_comp.c                      |  17 +-
 arch/mips/Kconfig                                  |   6 +-
 arch/mips/bcm63xx/clk.c                            |   6 +
 arch/mips/boot/compressed/Makefile                 |   2 +-
 arch/mips/boot/compressed/clz_ctz.c                |   2 +
 arch/mips/cavium-octeon/octeon-platform.c          |   2 +
 arch/mips/cavium-octeon/octeon-usb.c               |   1 +
 arch/mips/configs/fuloong2e_defconfig              |   1 -
 arch/mips/configs/malta_qemu_32r6_defconfig        |   1 -
 arch/mips/configs/maltaaprp_defconfig              |   1 -
 arch/mips/configs/maltasmvp_defconfig              |   1 -
 arch/mips/configs/maltasmvp_eva_defconfig          |   1 -
 arch/mips/configs/maltaup_defconfig                |   1 -
 arch/mips/include/asm/local.h                      |   9 +-
 .../asm/mach-loongson64/kernel-entry-init.h        |   4 +-
 arch/mips/include/asm/octeon/cvmx-bootinfo.h       |   4 +-
 arch/mips/lantiq/clk.c                             |   6 +
 arch/mips/net/bpf_jit_comp32.c                     |   3 +-
 arch/mips/net/bpf_jit_comp64.c                     |   2 +-
 arch/openrisc/include/asm/syscalls.h               |   2 +
 arch/openrisc/kernel/entry.S                       |   5 +
 arch/parisc/include/asm/special_insns.h            |  44 +-
 arch/parisc/kernel/traps.c                         |   2 +-
 arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi      |   2 +
 arch/powerpc/configs/ppc6xx_defconfig              |   1 -
 arch/powerpc/configs/pseries_defconfig             |   1 -
 arch/powerpc/include/asm/hw_irq.h                  |  40 +
 arch/powerpc/kernel/btext.c                        |   4 +-
 arch/powerpc/kernel/fadump.c                       |   8 +
 arch/powerpc/kernel/head_40x.S                     |   9 +-
 arch/powerpc/kernel/interrupt.c                    |   2 +-
 arch/powerpc/kernel/interrupt_64.S                 |  10 +-
 arch/powerpc/kernel/module.c                       |  11 +-
 arch/powerpc/kernel/prom_init.c                    |   2 +-
 arch/powerpc/kernel/smp.c                          |  42 +
 arch/powerpc/kernel/watchdog.c                     |  41 +-
 arch/powerpc/kvm/book3s_hv.c                       |   8 +-
 arch/powerpc/kvm/book3s_hv_nested.c                |   2 +-
 arch/powerpc/mm/book3s64/radix_pgtable.c           |   4 +-
 arch/powerpc/mm/kasan/book3s_32.c                  |   3 +-
 arch/powerpc/mm/pgtable_64.c                       |  14 +-
 arch/powerpc/net/bpf_jit_comp32.c                  |   4 +-
 arch/powerpc/net/bpf_jit_comp64.c                  |   4 +-
 arch/powerpc/perf/core-book3s.c                    |  58 +-
 arch/powerpc/platforms/cell/iommu.c                |   1 +
 arch/powerpc/platforms/cell/pervasive.c            |   1 +
 arch/powerpc/platforms/embedded6xx/hlwd-pic.c      |   1 +
 arch/powerpc/platforms/powermac/low_i2c.c          |   3 +
 arch/powerpc/platforms/powernv/opal-lpc.c          |   1 +
 arch/powerpc/sysdev/xive/spapr.c                   |   3 +
 arch/riscv/Kconfig                                 |  23 +-
 arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi  |   3 -
 arch/riscv/configs/defconfig                       |   1 +
 arch/riscv/configs/nommu_k210_defconfig            |   2 -
 arch/riscv/configs/nommu_k210_sdcard_defconfig     |   2 -
 arch/riscv/configs/nommu_virt_defconfig            |   1 -
 arch/riscv/configs/rv32_defconfig                  |   1 +
 arch/riscv/include/asm/smp.h                       |  10 +-
 arch/riscv/kernel/kexec_relocate.S                 |  20 +-
 arch/riscv/kernel/machine_kexec.c                  |   3 +-
 arch/riscv/kernel/setup.c                          |  10 +
 arch/riscv/kernel/smp.c                            |  10 -
 arch/riscv/kvm/main.c                              |   8 +
 arch/riscv/mm/init.c                               |  19 +-
 arch/riscv/net/bpf_jit_comp32.c                    |   6 +-
 arch/riscv/net/bpf_jit_comp64.c                    |   7 +-
 arch/s390/kernel/module.c                          |   5 +-
 arch/s390/kvm/kvm-s390.c                           |   2 +-
 arch/s390/mm/pgalloc.c                             |   4 +-
 arch/s390/net/bpf_jit_comp.c                       |   6 +-
 arch/sh/configs/titan_defconfig                    |   1 -
 arch/sparc/net/bpf_jit_comp_64.c                   |   2 +-
 arch/um/.gitignore                                 |   1 +
 arch/um/drivers/virt-pci.c                         |   8 +-
 arch/um/drivers/virtio_uml.c                       |   4 +
 arch/um/include/asm/delay.h                        |   4 +-
 arch/um/include/asm/irqflags.h                     |   4 +-
 arch/um/include/shared/longjmp.h                   |   2 +-
 arch/um/include/shared/os.h                        |   4 +-
 arch/um/include/shared/registers.h                 |   4 +-
 arch/um/kernel/ksyms.c                             |   2 +-
 arch/um/os-Linux/registers.c                       |   4 +-
 arch/um/os-Linux/sigio.c                           |   6 +-
 arch/um/os-Linux/signal.c                          |   8 +-
 arch/um/os-Linux/start_up.c                        |   2 +-
 arch/x86/boot/compressed/Makefile                  |   7 +-
 arch/x86/configs/i386_defconfig                    |   1 +
 arch/x86/configs/x86_64_defconfig                  |   1 +
 arch/x86/crypto/aesni-intel_glue.c                 |   4 +-
 arch/x86/hyperv/mmu.c                              |  19 +-
 arch/x86/include/asm/realmode.h                    |   1 +
 arch/x86/include/asm/topology.h                    |   2 +-
 arch/x86/include/asm/uaccess.h                     |   5 +-
 arch/x86/kernel/cpu/mce/core.c                     |  42 +-
 arch/x86/kernel/cpu/mce/inject.c                   |   2 +-
 arch/x86/kernel/cpu/mce/severity.c                 |  33 +-
 arch/x86/kernel/early-quirks.c                     |  10 +-
 arch/x86/kernel/module.c                           |   7 +-
 arch/x86/kernel/reboot.c                           |  12 +-
 arch/x86/kvm/cpuid.c                               |  90 +-
 arch/x86/kvm/mmu/tdp_mmu.c                         |   6 +-
 arch/x86/kvm/vmx/posted_intr.c                     |  25 +-
 arch/x86/kvm/x86.c                                 |  30 +-
 arch/x86/net/bpf_jit_comp.c                        |  10 +-
 arch/x86/net/bpf_jit_comp32.c                      |   4 +-
 arch/x86/realmode/init.c                           |  26 +
 arch/x86/um/syscalls_64.c                          |   3 +-
 block/bfq-iosched.c                                |  44 +-
 block/blk-flush.c                                  |   4 +-
 block/blk-mq-tag.c                                 |  40 +-
 block/blk-pm.c                                     |  22 +-
 block/genhd.c                                      |  15 +-
 block/mq-deadline.c                                |   4 +-
 crypto/jitterentropy.c                             |   3 +-
 drivers/acpi/acpica/exfield.c                      |   7 +-
 drivers/acpi/acpica/exoparg1.c                     |   3 +-
 drivers/acpi/acpica/hwesleep.c                     |   4 +-
 drivers/acpi/acpica/hwsleep.c                      |   4 +-
 drivers/acpi/acpica/hwxfsleep.c                    |   2 -
 drivers/acpi/acpica/utdelete.c                     |   1 +
 drivers/acpi/battery.c                             |  22 +
 drivers/acpi/bus.c                                 |   4 +-
 drivers/acpi/cppc_acpi.c                           |   2 +-
 drivers/acpi/ec.c                                  |  57 +-
 drivers/acpi/internal.h                            |   2 +
 drivers/acpi/scan.c                                |  13 +-
 drivers/acpi/x86/utils.c                           | 116 ++-
 drivers/android/binder.c                           |  98 ++-
 drivers/base/core.c                                |   3 +-
 drivers/base/power/runtime.c                       |  41 +-
 drivers/base/property.c                            |   4 +-
 drivers/base/regmap/regmap.c                       |   1 +
 drivers/base/swnode.c                              |   2 +-
 drivers/block/floppy.c                             |   6 +-
 drivers/block/null_blk/main.c                      |   8 +-
 drivers/bluetooth/btintel.c                        |  26 +-
 drivers/bluetooth/btmtksdio.c                      |   2 +
 drivers/bluetooth/btusb.c                          |   5 +
 drivers/bluetooth/hci_bcm.c                        |   7 +-
 drivers/bluetooth/hci_qca.c                        |   9 +-
 drivers/bluetooth/hci_vhci.c                       |   4 +
 drivers/bluetooth/virtio_bt.c                      |   3 +
 drivers/bus/mhi/core/init.c                        |   1 +
 drivers/bus/mhi/core/pm.c                          |  35 +-
 drivers/bus/mhi/pci_generic.c                      |   2 +-
 drivers/char/mwave/3780i.h                         |   2 +-
 drivers/char/random.c                              |  19 +-
 drivers/char/tpm/tpm-chip.c                        |  18 +-
 drivers/char/tpm/tpm_tis_core.c                    |  14 +-
 drivers/clk/bcm/clk-bcm2835.c                      |  13 +-
 drivers/clk/clk-bm1880.c                           |  20 +-
 drivers/clk/clk-si5341.c                           |   2 +-
 drivers/clk/clk-stm32f4.c                          |   4 -
 drivers/clk/clk.c                                  |  18 +
 drivers/clk/imx/clk-imx8mn.c                       |   6 +-
 drivers/clk/meson/gxbb.c                           |  44 +-
 drivers/clk/qcom/gcc-sc7280.c                      |   2 +-
 drivers/clk/renesas/rzg2l-cpg.c                    |  17 +-
 drivers/clk/samsung/clk-exynos850.c                |  70 +-
 drivers/counter/104-quad-8.c                       |  82 +-
 drivers/cpufreq/cpufreq.c                          |   4 +-
 drivers/cpufreq/intel_pstate.c                     |  24 +-
 drivers/cpufreq/qcom-cpufreq-hw.c                  |   7 +-
 drivers/crypto/atmel-aes.c                         |   6 +-
 drivers/crypto/caam/caamalg.c                      |   6 +
 drivers/crypto/caam/caamalg_qi2.c                  |   2 +-
 drivers/crypto/caam/caamhash.c                     |   3 +
 drivers/crypto/caam/caampkc.c                      |   3 +
 drivers/crypto/ccp/sev-dev.c                       |  30 +-
 drivers/crypto/hisilicon/hpre/hpre_crypto.c        |   2 +-
 drivers/crypto/hisilicon/qm.c                      |   5 +-
 drivers/crypto/keembay/keembay-ocs-ecc.c           |   1 +
 drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c |   9 +-
 .../crypto/marvell/octeontx2/otx2_cptpf_ucode.c    |   3 +-
 drivers/crypto/omap-aes.c                          |   2 +-
 drivers/crypto/qat/qat_common/adf_pf2vf_msg.c      |  12 +-
 drivers/crypto/qce/aead.c                          |   2 +-
 drivers/crypto/qce/sha.c                           |   2 +-
 drivers/crypto/qce/skcipher.c                      |   2 +-
 drivers/crypto/stm32/stm32-crc32.c                 |   4 +-
 drivers/crypto/stm32/stm32-cryp.c                  | 938 ++++++++-------------
 drivers/crypto/stm32/stm32-hash.c                  |   6 +-
 drivers/cxl/core/bus.c                             |   6 +-
 drivers/cxl/core/pmem.c                            |   8 +-
 drivers/cxl/cxl.h                                  |  10 +-
 drivers/cxl/pmem.c                                 |  46 +-
 drivers/dax/super.c                                |   6 +-
 drivers/dma-buf/dma-fence-array.c                  |   6 +-
 drivers/dma-buf/heaps/cma_heap.c                   |   6 +-
 drivers/dma/at_xdmac.c                             |  57 +-
 drivers/dma/idxd/device.c                          |  12 +-
 drivers/dma/mmp_pdma.c                             |   6 -
 drivers/dma/pxa_dma.c                              |   7 -
 drivers/dma/stm32-mdma.c                           |   2 +-
 drivers/dma/uniphier-xdmac.c                       |   5 +-
 drivers/edac/synopsys_edac.c                       |   3 +-
 drivers/firmware/efi/efi-init.c                    |   5 +
 drivers/firmware/google/Kconfig                    |   6 +-
 drivers/firmware/sysfb_simplefb.c                  |   8 +-
 drivers/gpio/gpio-aspeed-sgpio.c                   |  32 +-
 drivers/gpio/gpio-aspeed.c                         |  52 +-
 drivers/gpio/gpio-idt3243x.c                       |   4 +-
 drivers/gpio/gpio-mpc8xxx.c                        |   4 +-
 drivers/gpio/gpiolib-acpi.c                        |  15 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c     |   6 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c            |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c            |   1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c            |   4 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c            |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c           |   5 +-
 drivers/gpu/drm/amd/amdgpu/cik.c                   |   4 +
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c             |   4 +
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c              |  13 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c              |  18 +-
 drivers/gpu/drm/amd/amdgpu/vi.c                    |   4 +
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c              |   3 +
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c               | 138 ++-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |  46 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c  |   5 +-
 drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c   |   3 +-
 .../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c   |  11 +-
 .../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c  |  11 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c           |   3 +-
 drivers/gpu/drm/amd/display/dc/core/dc_link.c      |   2 +
 .../gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c   |   3 +-
 .../gpu/drm/amd/display/dc/dcn31/dcn31_resource.c  |   3 +-
 .../amd/display/dc/irq/dcn20/irq_service_dcn20.c   |  25 -
 .../amd/display/dc/irq/dcn20/irq_service_dcn20.h   |   2 -
 .../amd/display/dc/irq/dcn21/irq_service_dcn21.c   |  25 -
 .../amd/display/dc/irq/dcn21/irq_service_dcn21.h   |   2 -
 drivers/gpu/drm/amd/display/dc/irq/irq_service.c   |   2 +-
 drivers/gpu/drm/amd/display/dc/irq/irq_service.h   |   4 -
 drivers/gpu/drm/amd/pm/amdgpu_pm.c                 |   6 +
 drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c  |  14 +-
 drivers/gpu/drm/bridge/display-connector.c         |   2 +-
 .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c   |  40 +-
 .../gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c    |  10 +-
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h    |   4 +-
 .../gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c    |   9 +-
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c          |  12 +-
 drivers/gpu/drm/bridge/ti-sn65dsi83.c              |   2 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c              |   1 +
 drivers/gpu/drm/drm_atomic_helper.c                |   2 +-
 drivers/gpu/drm/drm_dp_helper.c                    |  40 +-
 drivers/gpu/drm/drm_drv.c                          |   9 +-
 drivers/gpu/drm/drm_gem_cma_helper.c               |  17 +-
 drivers/gpu/drm/drm_gem_shmem_helper.c             |  17 +-
 drivers/gpu/drm/drm_gem_vram_helper.c              |   4 +-
 drivers/gpu/drm/drm_panel_orientation_quirks.c     |   6 +
 drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c       |   6 +
 drivers/gpu/drm/etnaviv/etnaviv_gpu.h              |   1 +
 drivers/gpu/drm/etnaviv/etnaviv_sched.c            |   4 +-
 drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c |  10 +-
 drivers/gpu/drm/i915/gem/i915_gem_pages.c          |   1 -
 drivers/gpu/drm/i915/pxp/intel_pxp_tee.c           |   5 +-
 drivers/gpu/drm/lima/lima_device.c                 |   1 +
 drivers/gpu/drm/lima/lima_gem.c                    |   2 +-
 drivers/gpu/drm/msm/Kconfig                        |   1 +
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |   4 +-
 drivers/gpu/drm/msm/dsi/dsi.c                      |  10 +-
 drivers/gpu/drm/msm/dsi/dsi.h                      |   1 -
 drivers/gpu/drm/msm/dsi/dsi_manager.c              |  17 -
 drivers/gpu/drm/msm/msm_gem_submit.c               |   2 +-
 drivers/gpu/drm/nouveau/dispnv04/disp.c            |   4 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c     |  37 +-
 .../gpu/drm/panel/panel-feiyang-fy07024di26a30d.c  |   8 +-
 drivers/gpu/drm/panel/panel-innolux-p079zca.c      |  10 +-
 drivers/gpu/drm/panel/panel-jdi-lt070me05000.c     |   8 +-
 drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c |   8 +-
 drivers/gpu/drm/panel/panel-novatek-nt36672a.c     |   8 +-
 .../gpu/drm/panel/panel-panasonic-vvx10f034n00.c   |   8 +-
 drivers/gpu/drm/panel/panel-ronbo-rb070d30.c       |   8 +-
 .../drm/panel/panel-samsung-s6e88a0-ams452ef01.c   |   1 +
 drivers/gpu/drm/panel/panel-samsung-sofef00.c      |   1 +
 drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c    |   8 +-
 drivers/gpu/drm/panfrost/panfrost_gem.c            |   2 +-
 drivers/gpu/drm/radeon/radeon_kms.c                |  42 +-
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c             |  31 +-
 drivers/gpu/drm/rcar-du/rcar_du_drv.c              |   6 +-
 drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c    |  82 +-
 drivers/gpu/drm/scheduler/sched_entity.c           |  15 +-
 drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c             |   4 +-
 drivers/gpu/drm/tegra/drm.c                        |  15 +
 drivers/gpu/drm/tegra/gr2d.c                       |  33 +-
 drivers/gpu/drm/tegra/submit.c                     |   4 +-
 drivers/gpu/drm/tegra/vic.c                        |   7 +-
 drivers/gpu/drm/ttm/ttm_bo.c                       |   2 +
 drivers/gpu/drm/v3d/v3d_bo.c                       |   4 +-
 drivers/gpu/drm/vboxvideo/vbox_main.c              |   4 +-
 drivers/gpu/drm/vc4/vc4_crtc.c                     |  31 +-
 drivers/gpu/drm/vc4/vc4_drv.h                      |  29 +-
 drivers/gpu/drm/vc4/vc4_hdmi.c                     | 136 ++-
 drivers/gpu/drm/vc4/vc4_hvs.c                      |  26 +-
 drivers/gpu/drm/vc4/vc4_kms.c                      |   3 +-
 drivers/gpu/drm/vc4/vc4_txp.c                      |   4 +-
 drivers/gpu/drm/vgem/vgem_drv.c                    |   2 +-
 drivers/gpu/drm/virtio/virtgpu_ioctl.c             |   4 +-
 drivers/gpu/drm/virtio/virtgpu_object.c            |   2 +-
 drivers/gpu/drm/vmwgfx/Makefile                    |   3 +-
 drivers/gpu/drm/vmwgfx/ttm_memory.c                |  99 +--
 drivers/gpu/drm/vmwgfx/ttm_memory.h                |   6 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c                |   7 +
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c                |  48 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h                |  20 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_mob.c                |  12 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c               |   4 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_system_manager.c     |  90 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_thp.c                | 184 ----
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c         |  58 +-
 drivers/gpu/host1x/Kconfig                         |   1 +
 drivers/gpu/host1x/dev.c                           |  15 +
 drivers/hid/hid-apple.c                            |   2 +-
 drivers/hid/hid-ids.h                              |   1 +
 drivers/hid/hid-input.c                            |   8 +
 drivers/hid/hid-magicmouse.c                       |  95 ++-
 drivers/hid/hid-uclogic-params.c                   |  31 +-
 drivers/hid/hid-vivaldi.c                          |  34 +-
 drivers/hid/i2c-hid/i2c-hid-acpi.c                 |   2 +-
 drivers/hid/i2c-hid/i2c-hid-core.c                 |   4 +-
 drivers/hid/i2c-hid/i2c-hid-of-goodix.c            |   2 +-
 drivers/hid/i2c-hid/i2c-hid-of.c                   |  10 +-
 drivers/hid/i2c-hid/i2c-hid.h                      |   2 +-
 drivers/hid/uhid.c                                 |  29 +-
 drivers/hid/wacom_wac.c                            |  39 +-
 drivers/hsi/hsi_core.c                             |   1 +
 drivers/hwmon/mr75203.c                            |   2 +-
 drivers/i2c/busses/i2c-designware-pcidrv.c         |   8 +-
 drivers/i2c/busses/i2c-i801.c                      |  15 +-
 drivers/i2c/busses/i2c-mpc.c                       |  23 +-
 drivers/i3c/master.c                               |   3 +-
 drivers/i3c/master/dw-i3c-master.c                 |   4 +
 drivers/i3c/master/mipi-i3c-hci/dat_v1.c           |   4 +-
 drivers/iio/adc/ti-adc081c.c                       |  22 +-
 drivers/iio/chemical/sunrise_co2.c                 |   4 +-
 drivers/iio/industrialio-trigger.c                 |  36 +-
 drivers/infiniband/core/cma.c                      |  12 +-
 drivers/infiniband/core/device.c                   |   3 +-
 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c         |   6 +-
 drivers/infiniband/hw/bnxt_re/qplib_rcfw.h         |   1 -
 drivers/infiniband/hw/cxgb4/qp.c                   |   1 +
 drivers/infiniband/hw/hns/hns_roce_main.c          |   5 +-
 drivers/infiniband/hw/qedr/verbs.c                 |   2 +
 drivers/infiniband/sw/rxe/rxe_opcode.c             |   2 +-
 drivers/infiniband/ulp/rtrs/rtrs-clt.c             |   2 +-
 drivers/input/touchscreen/ti_am335x_tsc.c          |   8 +-
 drivers/interconnect/qcom/icc-rpm.c                |   1 +
 drivers/iommu/amd/amd_iommu_types.h                |   2 -
 drivers/iommu/amd/init.c                           | 107 +--
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c         |   2 +-
 drivers/iommu/io-pgtable-arm-v7s.c                 |   6 +-
 drivers/iommu/io-pgtable-arm.c                     |   9 +-
 drivers/iommu/iommu.c                              |   3 +-
 drivers/iommu/iova.c                               |   3 +-
 drivers/irqchip/irq-gic-v3.c                       |  16 +
 drivers/leds/leds-lp55xx-common.c                  |   4 +-
 drivers/mailbox/imx-mailbox.c                      |   4 +-
 drivers/mailbox/mailbox-mpfs.c                     |   2 +-
 drivers/mailbox/mtk-cmdq-mailbox.c                 |   2 +-
 drivers/mailbox/pcc.c                              |  10 +-
 drivers/md/dm-linear.c                             |   2 +-
 drivers/md/dm-log-writes.c                         |   2 +-
 drivers/md/dm-stripe.c                             |   2 +-
 drivers/md/dm-writecache.c                         |   2 +-
 drivers/md/dm.c                                    |   6 +-
 drivers/md/md.c                                    |  27 +-
 drivers/md/md.h                                    |   2 +
 drivers/md/persistent-data/dm-btree.c              |   8 +-
 drivers/md/persistent-data/dm-space-map-common.c   |   5 +
 drivers/md/raid0.c                                 |  38 +-
 drivers/md/raid5.c                                 |  41 +-
 drivers/media/Kconfig                              |   8 +-
 drivers/media/cec/core/cec-adap.c                  |  38 +-
 drivers/media/cec/core/cec-api.c                   |   6 +
 drivers/media/cec/core/cec-core.c                  |   3 +
 drivers/media/cec/core/cec-pin.c                   |  31 +-
 drivers/media/common/saa7146/saa7146_fops.c        |   2 +-
 .../media/common/videobuf2/videobuf2-dma-contig.c  |   8 +-
 drivers/media/dvb-core/dmxdev.c                    |  18 +-
 drivers/media/dvb-frontends/dib8000.c              |   4 +-
 drivers/media/i2c/imx274.c                         |   5 +
 drivers/media/i2c/ov8865.c                         |  16 +-
 drivers/media/pci/b2c2/flexcop-pci.c               |   3 +
 drivers/media/pci/intel/ipu3/cio2-bridge.c         |   4 +-
 drivers/media/pci/saa7146/hexium_gemini.c          |   7 +-
 drivers/media/pci/saa7146/hexium_orion.c           |   8 +-
 drivers/media/pci/saa7146/mxb.c                    |   8 +-
 drivers/media/platform/aspeed-video.c              |  14 +-
 drivers/media/platform/coda/coda-common.c          |   8 +-
 drivers/media/platform/coda/coda-jpeg.c            |  21 +-
 drivers/media/platform/coda/imx-vdoa.c             |   6 +-
 drivers/media/platform/imx-pxp.c                   |   4 +-
 .../media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c |   2 +
 .../media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c |   2 +-
 drivers/media/platform/qcom/venus/core.c           |  11 +-
 drivers/media/platform/qcom/venus/pm_helpers.c     |  32 +-
 drivers/media/platform/rcar-vin/rcar-csi2.c        |  18 +-
 drivers/media/platform/rcar-vin/rcar-v4l2.c        |  15 +-
 .../media/platform/rockchip/rkisp1/rkisp1-dev.c    |   2 +-
 drivers/media/radio/si470x/radio-si470x-i2c.c      |   3 +-
 drivers/media/rc/igorplugusb.c                     |   4 +-
 drivers/media/rc/mceusb.c                          |   8 +-
 drivers/media/rc/redrat3.c                         |  22 +-
 drivers/media/tuners/msi001.c                      |   7 +
 drivers/media/tuners/si2157.c                      |   2 +-
 drivers/media/usb/b2c2/flexcop-usb.c               |  10 +-
 drivers/media/usb/b2c2/flexcop-usb.h               |  12 +-
 drivers/media/usb/cpia2/cpia2_usb.c                |   4 +-
 drivers/media/usb/dvb-usb/dib0700_core.c           |   2 -
 drivers/media/usb/dvb-usb/dw2102.c                 | 338 +++++---
 drivers/media/usb/dvb-usb/m920x.c                  |  12 +-
 drivers/media/usb/em28xx/em28xx-cards.c            |  18 +-
 drivers/media/usb/em28xx/em28xx-core.c             |   4 +-
 drivers/media/usb/pvrusb2/pvrusb2-hdw.c            |   8 +-
 drivers/media/usb/s2255/s2255drv.c                 |   4 +-
 drivers/media/usb/stk1160/stk1160-core.c           |   4 +-
 drivers/media/usb/uvc/uvc_ctrl.c                   |   4 +-
 drivers/media/usb/uvc/uvc_v4l2.c                   |   6 +-
 drivers/media/usb/uvc/uvcvideo.h                   |   2 +-
 drivers/media/v4l2-core/v4l2-ioctl.c               |   4 +-
 drivers/memory/renesas-rpc-if.c                    |   2 +-
 drivers/mfd/atmel-flexcom.c                        |  11 +-
 drivers/mfd/intel_soc_pmic_core.c                  |  28 +-
 drivers/mfd/tps65910.c                             |  22 +-
 drivers/misc/eeprom/at25.c                         |  13 +-
 .../misc/habanalabs/common/command_submission.c    |  22 +-
 drivers/misc/habanalabs/common/firmware_if.c       |  17 +-
 drivers/misc/habanalabs/common/habanalabs.h        |   2 +
 drivers/misc/lattice-ecp3-config.c                 |  12 +-
 drivers/misc/lkdtm/Makefile                        |   2 +-
 drivers/misc/mei/hbm.c                             |  20 +-
 drivers/mmc/core/sdio.c                            |   4 +-
 drivers/mmc/host/meson-mx-sdhc-mmc.c               |   5 +
 drivers/mmc/host/meson-mx-sdio.c                   |   5 +
 drivers/mmc/host/mtk-sd.c                          |  64 +-
 drivers/mmc/host/omap_hsmmc.c                      |  36 -
 drivers/mmc/host/sdhci-pci-gli.c                   |  11 +
 drivers/mmc/host/tmio_mmc_core.c                   |  15 +-
 drivers/mtd/hyperbus/rpc-if.c                      |   8 +-
 drivers/mtd/mtdcore.c                              |   4 +-
 drivers/mtd/mtdpart.c                              |   2 +-
 drivers/mtd/nand/raw/davinci_nand.c                |  73 +-
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c         |  37 +-
 drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c    |   5 +
 drivers/mtd/nand/raw/nand_base.c                   |  67 ++
 drivers/mtd/spi-nor/core.c                         |  19 +-
 drivers/mtd/spi-nor/xilinx.c                       |  18 +-
 drivers/net/amt.c                                  |   2 +-
 drivers/net/bonding/bond_main.c                    |  40 +-
 drivers/net/can/at91_can.c                         |   6 -
 drivers/net/can/c_can/c_can_main.c                 |   5 -
 drivers/net/can/cc770/cc770.c                      |   3 -
 drivers/net/can/dev/dev.c                          |   4 -
 drivers/net/can/dev/rx-offload.c                   |   6 +-
 drivers/net/can/flexcan.c                          | 150 ++--
 drivers/net/can/ifi_canfd/ifi_canfd.c              |   5 -
 drivers/net/can/kvaser_pciefd.c                    |   5 -
 drivers/net/can/m_can/m_can.c                      |   7 -
 drivers/net/can/mscan/mscan.c                      |   9 +-
 drivers/net/can/pch_can.c                          |   3 -
 drivers/net/can/peak_canfd/peak_canfd.c            |   4 -
 drivers/net/can/rcar/rcar_can.c                    |   6 +-
 drivers/net/can/rcar/rcar_canfd.c                  |   9 +-
 drivers/net/can/sja1000/sja1000.c                  |   2 -
 drivers/net/can/softing/softing_cs.c               |   2 +-
 drivers/net/can/softing/softing_fw.c               |  11 +-
 drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c     |   6 +-
 drivers/net/can/sun4i_can.c                        |   7 +-
 drivers/net/can/usb/ems_usb.c                      |   2 -
 drivers/net/can/usb/esd_usb2.c                     |   2 -
 drivers/net/can/usb/etas_es58x/es58x_core.c        |   7 -
 drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c   |   2 -
 drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c  |   8 -
 drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c   |   4 -
 drivers/net/can/usb/peak_usb/pcan_usb.c            |   2 -
 drivers/net/can/usb/peak_usb/pcan_usb_fd.c         |   3 -
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c        |   2 -
 drivers/net/can/usb/ucan.c                         |   6 +-
 drivers/net/can/usb/usb_8dev.c                     |   2 -
 drivers/net/can/xilinx_can.c                       |  16 +-
 drivers/net/dsa/hirschmann/hellcreek.c             |  87 +-
 drivers/net/dsa/rtl8365mb.c                        |  15 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.c          |   6 +
 drivers/net/ethernet/broadcom/bnxt/bnxt.h          |   3 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_coredump.c |   4 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c  |   9 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c     |   2 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.h     |   3 +-
 drivers/net/ethernet/broadcom/genet/bcmgenet.c     |  10 +-
 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c  |   3 +-
 drivers/net/ethernet/cortina/gemini.c              |   9 +-
 drivers/net/ethernet/freescale/fman/mac.c          |  21 +-
 drivers/net/ethernet/freescale/xgmac_mdio.c        |  28 +-
 drivers/net/ethernet/i825xx/sni_82596.c            |   3 +-
 drivers/net/ethernet/intel/igc/igc_main.c          |   4 +-
 drivers/net/ethernet/lantiq_etop.c                 |   4 +-
 drivers/net/ethernet/marvell/octeontx2/af/ptp.c    |   2 +
 .../net/ethernet/marvell/octeontx2/af/rvu_cpt.c    |   5 +-
 .../ethernet/marvell/octeontx2/af/rvu_devlink.c    |   2 +-
 .../net/ethernet/marvell/octeontx2/nic/otx2_vf.c   |   5 +-
 drivers/net/ethernet/mediatek/mtk_eth_soc.c        |  55 +-
 drivers/net/ethernet/mediatek/mtk_eth_soc.h        |  16 +-
 drivers/net/ethernet/mellanox/mlx5/core/cmd.c      |  36 +-
 .../net/ethernet/mellanox/mlx5/core/en/tc_tun.c    |   5 +-
 .../ethernet/mellanox/mlx5/core/en/tc_tun_encap.c  |   2 +
 .../net/ethernet/mellanox/mlx5/core/en/xsk/pool.c  |   4 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |  19 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c   |   3 +
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c    |   7 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c    | 120 ++-
 .../net/ethernet/mellanox/mlx5/core/esw/legacy.c   |   2 +-
 .../ethernet/mellanox/mlx5/core/eswitch_offloads.c |  28 +-
 drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c   |   6 +-
 drivers/net/ethernet/mellanox/mlx5/core/main.c     |   8 +-
 .../net/ethernet/mellanox/mlx5/core/sf/dev/dev.c   |   5 +-
 .../mellanox/mlx5/core/steering/dr_matcher.c       |  53 +-
 drivers/net/ethernet/mellanox/mlxsw/cmd.h          |  12 +
 drivers/net/ethernet/mellanox/mlxsw/pci.c          |   7 +-
 drivers/net/ethernet/mscc/ocelot.c                 |  31 +-
 drivers/net/ethernet/mscc/ocelot_flower.c          |  44 +-
 drivers/net/ethernet/mscc/ocelot_net.c             |   6 +-
 drivers/net/ethernet/renesas/ravb_main.c           |   6 +-
 drivers/net/ethernet/rocker/rocker_ofdpa.c         |   3 +-
 .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c    |   7 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |   3 +
 drivers/net/ethernet/ti/cpsw.c                     |   6 +-
 drivers/net/ethernet/ti/cpsw_new.c                 |   6 +-
 drivers/net/ethernet/ti/cpsw_priv.c                |   2 +-
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c  | 135 +--
 drivers/net/ipa/ipa_endpoint.c                     |   7 +-
 drivers/net/phy/marvell.c                          |  62 +-
 drivers/net/phy/mdio_bus.c                         |   2 +-
 drivers/net/phy/micrel.c                           |  36 +-
 drivers/net/phy/phy-core.c                         |   2 +-
 drivers/net/phy/sfp.c                              |  25 +-
 drivers/net/ppp/ppp_generic.c                      |   7 +-
 drivers/net/usb/mcs7830.c                          |  12 +-
 drivers/net/usb/smsc95xx.c                         |   3 +-
 drivers/net/wireless/ath/ar5523/ar5523.c           |   4 +
 drivers/net/wireless/ath/ath10k/core.c             |  19 +-
 drivers/net/wireless/ath/ath10k/htt_tx.c           |   3 +
 drivers/net/wireless/ath/ath10k/hw.h               |   3 +
 drivers/net/wireless/ath/ath10k/txrx.c             |   2 -
 drivers/net/wireless/ath/ath10k/wmi.c              |  27 +-
 drivers/net/wireless/ath/ath11k/ahb.c              |  28 +-
 drivers/net/wireless/ath/ath11k/core.c             |  42 +-
 drivers/net/wireless/ath/ath11k/core.h             |  15 +-
 drivers/net/wireless/ath/ath11k/dp.c               |  38 +-
 drivers/net/wireless/ath/ath11k/dp.h               |   4 +-
 drivers/net/wireless/ath/ath11k/dp_rx.c            |  16 +-
 drivers/net/wireless/ath/ath11k/dp_tx.c            |   2 +-
 drivers/net/wireless/ath/ath11k/hal.c              |  50 +-
 drivers/net/wireless/ath/ath11k/hal.h              |   3 +
 drivers/net/wireless/ath/ath11k/hal_rx.c           |   2 +-
 drivers/net/wireless/ath/ath11k/hw.c               |   2 -
 drivers/net/wireless/ath/ath11k/hw.h               |   3 +
 drivers/net/wireless/ath/ath11k/mac.c              |  59 +-
 drivers/net/wireless/ath/ath11k/pci.c              |  34 +-
 drivers/net/wireless/ath/ath11k/qmi.h              |   2 +-
 drivers/net/wireless/ath/ath11k/reg.c              | 103 +--
 drivers/net/wireless/ath/ath11k/wmi.c              |   5 +-
 drivers/net/wireless/ath/ath9k/hif_usb.c           |   7 +
 drivers/net/wireless/ath/ath9k/htc.h               |   2 +
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |  13 +
 drivers/net/wireless/ath/ath9k/wmi.c               |   4 +
 drivers/net/wireless/ath/wcn36xx/dxe.c             |  49 +-
 drivers/net/wireless/ath/wcn36xx/main.c            |  34 +-
 drivers/net/wireless/ath/wcn36xx/smd.c             |  10 +-
 drivers/net/wireless/ath/wcn36xx/txrx.c            |  41 +-
 drivers/net/wireless/ath/wcn36xx/wcn36xx.h         |   1 +
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c       |   2 +-
 drivers/net/wireless/intel/iwlwifi/fw/api/power.h  |   8 +-
 drivers/net/wireless/intel/iwlwifi/fw/dump.c       |   9 +
 drivers/net/wireless/intel/iwlwifi/fw/img.c        |   6 +-
 drivers/net/wireless/intel/iwlwifi/fw/img.h        |   4 +
 drivers/net/wireless/intel/iwlwifi/iwl-csr.h       |   5 +-
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c       |  17 +-
 drivers/net/wireless/intel/iwlwifi/iwl-io.c        |   2 +-
 .../net/wireless/intel/iwlwifi/mvm/ftm-initiator.c |   4 +-
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c        |  18 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |  17 +
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c      |  27 +
 drivers/net/wireless/intel/iwlwifi/mvm/scan.c      |  23 +-
 .../net/wireless/intel/iwlwifi/mvm/time-event.c    |  36 +-
 drivers/net/wireless/intel/iwlwifi/pcie/rx.c       |   7 +-
 drivers/net/wireless/intel/iwlwifi/queue/tx.c      |   1 +
 drivers/net/wireless/marvell/mwifiex/sta_event.c   |   8 +-
 drivers/net/wireless/marvell/mwifiex/usb.c         |   3 +-
 drivers/net/wireless/mediatek/mt76/debugfs.c       |   2 +-
 drivers/net/wireless/mediatek/mt76/mac80211.c      |   7 +-
 drivers/net/wireless/mediatek/mt76/mt7603/mac.c    |   4 +
 drivers/net/wireless/mediatek/mt76/mt7615/mac.c    |   9 +-
 drivers/net/wireless/mediatek/mt76/mt7615/main.c   |  12 +-
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c    | 174 ++--
 .../net/wireless/mediatek/mt76/mt7615/pci_init.c   |   8 +-
 .../net/wireless/mediatek/mt76/mt7615/testmode.c   |   4 +-
 .../net/wireless/mediatek/mt76/mt76_connac_mac.c   |   3 -
 .../net/wireless/mediatek/mt76/mt76_connac_mcu.c   |  64 +-
 .../net/wireless/mediatek/mt76/mt76_connac_mcu.h   |  77 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mac.c    |   9 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c    |  81 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.h    |   8 +
 .../net/wireless/mediatek/mt76/mt7921/debugfs.c    |  12 +-
 drivers/net/wireless/mediatek/mt76/mt7921/mac.c    |  13 +-
 drivers/net/wireless/mediatek/mt76/mt7921/main.c   |  30 +-
 drivers/net/wireless/mediatek/mt76/mt7921/mcu.c    | 116 ++-
 drivers/net/wireless/mediatek/mt76/mt7921/mcu.h    |  27 +
 drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h |   2 +
 drivers/net/wireless/mediatek/mt76/mt7921/pci.c    |  21 +-
 .../net/wireless/mediatek/mt76/mt7921/pci_mac.c    |   4 +
 .../net/wireless/mediatek/mt76/mt7921/pci_mcu.c    |   2 +-
 drivers/net/wireless/mediatek/mt76/mt7921/sdio.c   |  48 +-
 drivers/net/wireless/mediatek/mt76/sdio.c          |   3 +-
 drivers/net/wireless/mediatek/mt76/sdio_txrx.c     |   3 +-
 drivers/net/wireless/microchip/wilc1000/netdev.c   |   1 -
 drivers/net/wireless/microchip/wilc1000/sdio.c     |   2 +
 drivers/net/wireless/microchip/wilc1000/spi.c      |   2 +
 drivers/net/wireless/realtek/rtw88/main.c          |   2 +-
 drivers/net/wireless/realtek/rtw88/pci.c           |  61 +-
 drivers/net/wireless/realtek/rtw88/pci.h           |   2 +
 drivers/net/wireless/realtek/rtw88/rtw8821c.h      |   2 +-
 drivers/net/wireless/realtek/rtw88/rtw8822b.c      |   2 +-
 drivers/net/wireless/realtek/rtw88/rtw8822c.c      |   2 +-
 drivers/net/wireless/realtek/rtw89/mac80211.c      |   1 +
 drivers/net/wireless/realtek/rtw89/phy.c           |  33 +-
 drivers/net/wireless/rsi/rsi_91x_main.c            |   4 +
 drivers/net/wireless/rsi/rsi_91x_usb.c             |   9 +-
 drivers/net/wireless/rsi/rsi_usb.h                 |   2 +
 drivers/net/wwan/mhi_wwan_mbim.c                   |   4 +-
 drivers/ntb/hw/mscc/ntb_hw_switchtec.c             |  16 +-
 drivers/nvmem/core.c                               |   2 +
 drivers/of/base.c                                  |  11 +-
 drivers/of/fdt.c                                   |  25 +-
 drivers/of/unittest.c                              |  21 +-
 drivers/parisc/pdc_stable.c                        |   4 +-
 drivers/pci/controller/dwc/pcie-designware.c       |   7 +-
 drivers/pci/controller/dwc/pcie-qcom.c             |  12 +-
 drivers/pci/controller/pci-aardvark.c              |  10 +-
 drivers/pci/controller/pci-mvebu.c                 | 260 +++++-
 drivers/pci/controller/pci-xgene.c                 |   2 +-
 drivers/pci/controller/pcie-apple.c                |   7 +-
 drivers/pci/controller/pcie-mediatek-gen3.c        |   8 +
 drivers/pci/controller/pcie-mt7621.c               |   2 +
 drivers/pci/controller/pcie-rcar-host.c            |  10 +-
 drivers/pci/hotplug/pciehp.h                       |   3 +
 drivers/pci/hotplug/pciehp_core.c                  |   2 +-
 drivers/pci/hotplug/pciehp_hpc.c                   |  28 +-
 drivers/pci/msi.c                                  |  26 +-
 drivers/pci/pci-bridge-emul.c                      |  70 +-
 drivers/pci/quirks.c                               |   3 +
 drivers/pcmcia/cs.c                                |   8 +-
 drivers/pcmcia/rsrc_nonstatic.c                    |   6 +
 drivers/perf/arm-cmn.c                             |   5 +-
 drivers/phy/cadence/phy-cadence-sierra.c           |  31 +-
 drivers/phy/mediatek/phy-mtk-mipi-dsi.c            |   2 +
 drivers/phy/mediatek/phy-mtk-tphy.c                | 162 ++++
 drivers/phy/socionext/phy-uniphier-usb3ss.c        |  10 +-
 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c   |   2 +
 drivers/pinctrl/mediatek/pinctrl-paris.c           |   2 +-
 drivers/pinctrl/pinctrl-apple-gpio.c               |   2 +-
 drivers/pinctrl/pinctrl-rockchip.c                 |   2 +-
 drivers/platform/x86/wmi.c                         |  17 +-
 drivers/power/reset/mt6323-poweroff.c              |   3 +
 drivers/ptp/ptp_vclock.c                           |  10 +-
 drivers/regulator/da9121-regulator.c               |   5 +
 drivers/regulator/qcom-labibb-regulator.c          |   2 +-
 drivers/regulator/qcom_smd-regulator.c             | 100 ++-
 drivers/remoteproc/imx_rproc.c                     |   1 +
 drivers/rpmsg/rpmsg_core.c                         |  20 +-
 drivers/rtc/dev.c                                  |   6 +-
 drivers/rtc/rtc-cmos.c                             |   3 +
 drivers/rtc/rtc-pxa.c                              |   4 +
 drivers/scsi/hisi_sas/hisi_sas_main.c              |   8 +-
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c             |   1 +
 drivers/scsi/lpfc/lpfc.h                           |   2 +-
 drivers/scsi/lpfc/lpfc_attr.c                      |  62 +-
 drivers/scsi/lpfc/lpfc_els.c                       |  11 +-
 drivers/scsi/lpfc/lpfc_hbadisc.c                   |   8 +-
 drivers/scsi/lpfc/lpfc_init.c                      |   8 +-
 drivers/scsi/lpfc/lpfc_nportdisc.c                 |   6 +
 drivers/scsi/lpfc/lpfc_sli.c                       |   6 -
 drivers/scsi/mpi3mr/mpi3mr.h                       |   3 +-
 drivers/scsi/mpi3mr/mpi3mr_fw.c                    |   4 +-
 drivers/scsi/pm8001/pm8001_hwi.c                   |   4 +-
 drivers/scsi/scsi.c                                |   4 +-
 drivers/scsi/scsi_debugfs.c                        |   1 +
 drivers/scsi/scsi_pm.c                             |   2 +-
 drivers/scsi/sr.c                                  |   2 +-
 drivers/scsi/sr_vendor.c                           |   4 +-
 drivers/scsi/ufs/tc-dwc-g210-pci.c                 |   1 -
 drivers/scsi/ufs/ufs-mediatek.c                    |   2 +-
 drivers/scsi/ufs/ufshcd-pci.c                      |   2 -
 drivers/scsi/ufs/ufshcd-pltfrm.c                   |   2 -
 drivers/scsi/ufs/ufshcd.c                          |  22 +-
 drivers/soc/imx/gpcv2.c                            |   3 +-
 drivers/soc/mediatek/mtk-scpsys.c                  |  15 +-
 drivers/soc/qcom/cpr.c                             |   2 +-
 drivers/soc/ti/pruss.c                             |   2 +-
 drivers/spi/spi-geni-qcom.c                        |  32 +-
 drivers/spi/spi-hisi-kunpeng.c                     |  15 +-
 drivers/spi/spi-meson-spifc.c                      |   1 +
 drivers/spi/spi-uniphier.c                         |  11 +-
 drivers/spi/spi.c                                  |  13 +-
 drivers/staging/greybus/audio_topology.c           |  15 +
 drivers/staging/media/atomisp/i2c/ov2680.h         |  24 -
 drivers/staging/media/atomisp/pci/atomisp_cmd.c    |  82 +-
 drivers/staging/media/atomisp/pci/atomisp_fops.c   |  11 +
 .../media/atomisp/pci/atomisp_gmin_platform.c      |   2 +-
 drivers/staging/media/atomisp/pci/atomisp_ioctl.c  | 188 ++++-
 drivers/staging/media/atomisp/pci/atomisp_subdev.c |  15 +-
 drivers/staging/media/atomisp/pci/atomisp_subdev.h |   3 +
 drivers/staging/media/atomisp/pci/atomisp_v4l2.c   |  13 +-
 drivers/staging/media/atomisp/pci/atomisp_v4l2.h   |   3 +-
 drivers/staging/media/atomisp/pci/sh_css.c         |  27 +-
 drivers/staging/media/atomisp/pci/sh_css_mipi.c    |  41 +-
 drivers/staging/media/atomisp/pci/sh_css_params.c  |   8 +-
 drivers/staging/media/hantro/hantro_drv.c          |   3 +-
 drivers/staging/media/hantro/hantro_h1_jpeg_enc.c  |   2 +-
 drivers/staging/media/hantro/hantro_hw.h           |   3 +-
 .../media/hantro/rockchip_vpu2_hw_jpeg_enc.c       |  17 +
 drivers/staging/media/hantro/rockchip_vpu_hw.c     |   5 +-
 drivers/staging/rtl8192e/rtllib.h                  |   2 +-
 drivers/staging/rtl8192e/rtllib_module.c           |  16 +-
 drivers/staging/rtl8192e/rtllib_softmac.c          |   6 +-
 drivers/tee/tee_core.c                             |   4 +-
 drivers/thermal/imx8mm_thermal.c                   |   3 +
 drivers/thermal/imx_thermal.c                      | 145 ++--
 .../int340x_thermal/processor_thermal_device.h     |   3 +-
 .../intel/int340x_thermal/processor_thermal_mbox.c | 100 ++-
 .../intel/int340x_thermal/processor_thermal_rfim.c |  23 +-
 drivers/thunderbolt/acpi.c                         |  13 +
 drivers/tty/mxser.c                                |  44 +-
 drivers/tty/serial/8250/8250_bcm7271.c             |  11 +-
 drivers/tty/serial/8250/8250_dw.c                  |   3 +
 drivers/tty/serial/amba-pl010.c                    |   3 -
 drivers/tty/serial/amba-pl011.c                    |  29 +-
 drivers/tty/serial/atmel_serial.c                  |  14 +
 drivers/tty/serial/imx.c                           |   7 +-
 drivers/tty/serial/liteuart.c                      |   2 +-
 drivers/tty/serial/serial_core.c                   |   7 +-
 drivers/tty/serial/stm32-usart.c                   |   6 +-
 drivers/tty/serial/uartlite.c                      |   2 +-
 drivers/uio/uio_dmem_genirq.c                      |   6 +-
 drivers/usb/core/hub.c                             |   5 +-
 drivers/usb/dwc2/gadget.c                          |  13 +-
 drivers/usb/dwc2/hcd.c                             |   7 +-
 drivers/usb/dwc3/dwc3-meson-g12a.c                 |  17 +-
 drivers/usb/dwc3/dwc3-qcom.c                       |   7 +-
 drivers/usb/gadget/function/f_fs.c                 |   4 +-
 drivers/usb/gadget/function/u_audio.c              |  28 +-
 drivers/usb/host/ehci-brcm.c                       |   6 +-
 drivers/usb/host/uhci-platform.c                   |   3 +-
 drivers/usb/misc/ftdi-elan.c                       |   1 +
 drivers/vdpa/ifcvf/ifcvf_base.c                    |  41 +-
 drivers/vdpa/ifcvf/ifcvf_base.h                    |   9 +-
 drivers/vdpa/ifcvf/ifcvf_main.c                    |  24 +-
 drivers/vdpa/mlx5/net/mlx5_vnet.c                  |   8 +-
 drivers/video/backlight/qcom-wled.c                | 122 +--
 drivers/virtio/virtio_mem.c                        |   2 +-
 drivers/virtio/virtio_ring.c                       |   4 +-
 drivers/w1/slaves/w1_ds28e04.c                     |  26 +-
 drivers/xen/gntdev.c                               |   6 +-
 fs/btrfs/backref.c                                 |  21 +-
 fs/btrfs/ctree.c                                   |  19 +-
 fs/btrfs/dev-replace.c                             |   2 +-
 fs/btrfs/disk-io.c                                 |   2 +
 fs/btrfs/extent-tree.c                             |  58 +-
 fs/btrfs/inode.c                                   |  11 +
 fs/btrfs/qgroup.c                                  |  19 +
 fs/btrfs/volumes.c                                 |   2 +-
 fs/btrfs/zoned.c                                   |  91 +-
 fs/btrfs/zoned.h                                   |  13 +-
 fs/cifs/sess.c                                     |  13 +-
 fs/debugfs/file.c                                  |   2 +-
 fs/dlm/lock.c                                      |   9 +
 fs/dlm/lowcomms.c                                  |  44 +-
 fs/ext4/ext4.h                                     |   1 +
 fs/ext4/ext4_jbd2.c                                |   2 +
 fs/ext4/extents.c                                  |   2 -
 fs/ext4/fast_commit.c                              |  18 +-
 fs/ext4/inode.c                                    |  51 +-
 fs/ext4/ioctl.c                                    |   2 -
 fs/ext4/mballoc.c                                  |  48 +-
 fs/ext4/migrate.c                                  |  23 +-
 fs/ext4/super.c                                    |  27 +-
 fs/f2fs/checkpoint.c                               |   4 +-
 fs/f2fs/compress.c                                 |  50 +-
 fs/f2fs/data.c                                     |   7 +-
 fs/f2fs/f2fs.h                                     |  11 +
 fs/f2fs/file.c                                     |  10 +-
 fs/f2fs/gc.c                                       |   8 +-
 fs/f2fs/inode.c                                    |   5 +
 fs/f2fs/segment.h                                  |   3 +-
 fs/f2fs/super.c                                    |  44 +
 fs/f2fs/sysfs.c                                    |   4 +-
 fs/f2fs/xattr.c                                    |  11 +-
 fs/fuse/file.c                                     |   2 +-
 fs/hugetlbfs/inode.c                               |   7 +-
 fs/io_uring.c                                      |   4 +
 fs/jffs2/file.c                                    |  40 +-
 fs/ksmbd/connection.c                              |   1 +
 fs/ksmbd/connection.h                              |   4 +-
 fs/ksmbd/ksmbd_netlink.h                           |  12 +-
 fs/ksmbd/smb2misc.c                                |  18 +-
 fs/ksmbd/smb2ops.c                                 |  16 +-
 fs/ksmbd/smb2pdu.c                                 |  87 +-
 fs/ksmbd/smb2pdu.h                                 |   1 +
 fs/ksmbd/smb_common.h                              |   1 +
 fs/ksmbd/transport_ipc.c                           |   2 +
 fs/ksmbd/transport_tcp.c                           |   3 +-
 fs/nfsd/nfs3xdr.c                                  |  44 +-
 fs/nfsd/nfs4state.c                                |   6 +-
 fs/nfsd/vfs.c                                      |   4 +
 fs/ubifs/super.c                                   |   1 -
 fs/udf/ialloc.c                                    |   2 +
 include/acpi/acpi_bus.h                            |   5 +-
 include/acpi/actypes.h                             |  10 +-
 include/asm-generic/bitops/find.h                  |   5 +
 include/drm/drm_drv.h                              |   5 +-
 include/drm/gpu_scheduler.h                        |  12 +-
 include/linux/blk-pm.h                             |   2 +-
 include/linux/bpf.h                                |   2 +-
 include/linux/bpf_verifier.h                       |   7 +
 include/linux/hid.h                                |   2 +
 include/linux/iio/trigger.h                        |   2 +
 include/linux/kasan.h                              |   4 +-
 include/linux/mmzone.h                             |   9 +
 include/linux/mtd/rawnand.h                        |   2 +
 include/linux/mtd/spi-nor.h                        |   2 -
 include/linux/netfilter_netdev.h                   |   2 +-
 include/linux/of_fdt.h                             |   2 +
 include/linux/pm_runtime.h                         |   3 +
 include/linux/psi_types.h                          |  13 +-
 include/linux/ptp_clock_kernel.h                   |  12 +-
 include/linux/sbitmap.h                            |  11 +
 include/linux/skbuff.h                             |   4 +-
 include/linux/stmmac.h                             |   1 +
 include/linux/vmalloc.h                            |   7 +
 include/media/cec.h                                |  11 +-
 include/net/inet_frag.h                            |  11 +-
 include/net/ipv6_frag.h                            |   3 +-
 include/net/pkt_sched.h                            |   4 +-
 include/net/sch_generic.h                          |   5 +
 include/net/xfrm.h                                 |   7 +-
 include/sound/hda_codec.h                          |   8 +-
 include/trace/events/cgroup.h                      |  12 +-
 include/trace/events/sunrpc.h                      |  13 +-
 include/uapi/linux/bpf.h                           |   2 +-
 include/uapi/linux/xfrm.h                          |   1 +
 include/uapi/misc/habanalabs.h                     |  18 +-
 kernel/audit.c                                     |  18 +-
 kernel/bpf/bloom_filter.c                          |   6 +
 kernel/bpf/btf.c                                   |   3 +-
 kernel/bpf/core.c                                  |   3 +-
 kernel/bpf/inode.c                                 |  14 +-
 kernel/bpf/verifier.c                              |  28 +-
 kernel/dma/pool.c                                  |   4 +-
 kernel/locking/ww_rt_mutex.c                       |   2 +-
 kernel/rcu/rcutorture.c                            |   5 +
 kernel/rcu/tree.c                                  |   4 +-
 kernel/rcu/tree_exp.h                              |   1 +
 kernel/sched/cpuacct.c                             |  79 +-
 kernel/sched/cputime.c                             |   4 +-
 kernel/sched/fair.c                                |   4 +-
 kernel/sched/psi.c                                 |  45 +-
 kernel/sched/rt.c                                  |  23 +-
 kernel/sched/stats.h                               |   5 +-
 kernel/signal.c                                    |  20 +-
 kernel/time/clocksource.c                          |  50 +-
 kernel/trace/bpf_trace.c                           |   6 +-
 kernel/trace/trace_events_synth.c                  |  13 +-
 kernel/trace/trace_kprobe.c                        |   5 +-
 kernel/trace/trace_osnoise.c                       |  20 +-
 kernel/trace/trace_probe.c                         |   2 +
 kernel/trace/trace_syscalls.c                      |   6 +-
 kernel/trace/trace_uprobe.c                        |   5 +
 kernel/tsacct.c                                    |   7 +-
 lib/kunit/test.c                                   |  18 +-
 lib/logic_iomem.c                                  |  19 +-
 lib/mpi/mpi-mod.c                                  |   2 +
 lib/sbitmap.c                                      |  25 +-
 lib/test_bpf.c                                     |   4 +-
 lib/test_hmm.c                                     |  24 +
 lib/test_meminit.c                                 |   1 +
 mm/hmm.c                                           |   5 +-
 mm/kasan/quarantine.c                              |  11 +
 mm/kasan/shadow.c                                  |   9 +-
 mm/page_alloc.c                                    |  19 +-
 mm/page_isolation.c                                |   2 +-
 mm/shmem.c                                         |  37 +-
 mm/vmalloc.c                                       |   3 +-
 net/ax25/af_ax25.c                                 |  10 +-
 net/batman-adv/netlink.c                           |  30 +-
 net/bluetooth/cmtp/core.c                          |   4 +-
 net/bluetooth/hci_core.c                           |   1 +
 net/bluetooth/hci_event.c                          |  37 +-
 net/bluetooth/hci_request.c                        |   2 +-
 net/bluetooth/hci_sock.c                           |  16 +-
 net/bluetooth/hci_sysfs.c                          |   2 +
 net/bluetooth/l2cap_sock.c                         |  45 +-
 net/bluetooth/mgmt.c                               |  29 +-
 net/bridge/br_netfilter_hooks.c                    |   7 +-
 net/core/dev.c                                     |   6 +
 net/core/devlink.c                                 |   2 -
 net/core/filter.c                                  |   8 +-
 net/core/net-sysfs.c                               |   3 +
 net/core/net_namespace.c                           |   4 +-
 net/core/sock.c                                    |   2 +
 net/core/sock_map.c                                |  21 +-
 net/dsa/switch.c                                   |   4 +-
 net/ipv4/fib_semantics.c                           |  47 +-
 net/ipv4/inet_fragment.c                           |   8 +-
 net/ipv4/ip_fragment.c                             |   3 +-
 net/ipv4/ip_gre.c                                  |   5 +-
 net/ipv4/netfilter/ipt_CLUSTERIP.c                 |   5 +-
 net/ipv4/tcp_bpf.c                                 |  27 +
 net/ipv6/ip6_gre.c                                 |   5 +-
 net/mac80211/rx.c                                  |   2 +-
 net/mctp/test/route-test.c                         |   7 +-
 net/mptcp/options.c                                |  10 +-
 net/mptcp/pm_netlink.c                             |  18 +-
 net/mptcp/protocol.c                               |   4 +-
 net/netfilter/nft_payload.c                        |   3 +
 net/netfilter/nft_set_pipapo.c                     |   8 +
 net/netrom/af_netrom.c                             |  12 +-
 net/nfc/llcp_sock.c                                |   5 +
 net/openvswitch/flow.c                             |  16 +-
 net/sched/act_ct.c                                 |   6 +
 net/sched/cls_api.c                                |   2 +
 net/sched/sch_api.c                                |   2 +-
 net/sched/sch_generic.c                            |   1 +
 net/smc/af_smc.c                                   |   8 +-
 net/smc/smc_core.c                                 |  29 +-
 net/smc/smc_core.h                                 |   2 +-
 net/socket.c                                       |   9 +-
 net/sunrpc/svc_xprt.c                              |   2 +-
 net/unix/garbage.c                                 |  14 +-
 net/unix/scm.c                                     |   6 +-
 net/xfrm/xfrm_compat.c                             |   6 +-
 net/xfrm/xfrm_interface.c                          |  14 +-
 net/xfrm/xfrm_output.c                             |  30 +-
 net/xfrm/xfrm_policy.c                             |  24 +-
 net/xfrm/xfrm_state.c                              |  23 +-
 net/xfrm/xfrm_user.c                               |  41 +-
 samples/bpf/Makefile                               |  18 +-
 samples/bpf/Makefile.target                        |  11 -
 samples/bpf/lwt_len_hist_kern.c                    |   7 -
 samples/bpf/xdp_sample_user.h                      |   2 +
 scripts/dtc/dtx_diff                               |   8 +-
 scripts/sphinx-pre-install                         |   3 +
 security/selinux/hooks.c                           |  12 +-
 sound/core/jack.c                                  |   3 +
 sound/core/misc.c                                  |   2 +-
 sound/core/oss/pcm_oss.c                           |   2 +-
 sound/core/pcm.c                                   |   6 +-
 sound/core/seq/seq_queue.c                         |  14 +-
 sound/hda/hdac_stream.c                            |  14 +-
 sound/pci/hda/hda_bind.c                           |   5 +
 sound/pci/hda/hda_codec.c                          |  45 +-
 sound/pci/hda/hda_controller.c                     |   1 -
 sound/pci/hda/hda_local.h                          |   1 +
 sound/pci/hda/patch_cs8409-tables.c                |   3 +
 sound/pci/hda/patch_cs8409.c                       |   9 +-
 sound/pci/hda/patch_cs8409.h                       |   1 +
 sound/soc/amd/Kconfig                              |   2 +-
 sound/soc/codecs/Kconfig                           |   3 +-
 sound/soc/codecs/cs42l42.c                         |  22 +
 sound/soc/codecs/cs42l42.h                         |   2 +
 sound/soc/codecs/rt5663.c                          |  12 +-
 sound/soc/fsl/fsl_asrc.c                           |  69 +-
 sound/soc/fsl/fsl_mqs.c                            |   2 +-
 sound/soc/fsl/imx-card.c                           |  32 +-
 sound/soc/fsl/imx-hdmi.c                           |   2 +
 sound/soc/generic/test-component.c                 |   5 +-
 sound/soc/intel/boards/sof_sdw.c                   |   2 +-
 sound/soc/intel/catpt/dsp.c                        |  14 +-
 sound/soc/intel/skylake/skl-pcm.c                  |   1 -
 sound/soc/mediatek/mt8173/mt8173-max98090.c        |   3 +
 sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c   |   2 +
 sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c   |   2 +
 sound/soc/mediatek/mt8173/mt8173-rt5650.c          |   2 +
 sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c |   6 +-
 .../mt8183/mt8183-mt6358-ts3a227-max98357.c        |   7 +-
 .../mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c  |   6 +-
 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c         |   2 +-
 sound/soc/mediatek/mt8195/mt8195-dai-pcm.c         |  73 +-
 sound/soc/mediatek/mt8195/mt8195-reg.h             |   1 +
 sound/soc/samsung/idma.c                           |   2 +
 sound/soc/sof/intel/hda-codec.c                    |   3 +-
 sound/soc/sof/intel/hda-pcm.c                      |  86 +-
 sound/soc/sof/intel/hda.c                          |   9 +-
 sound/soc/sof/intel/hda.h                          |   6 +
 sound/soc/sof/ipc.c                                |   3 +-
 sound/soc/sof/pcm.c                                |   5 +-
 sound/soc/sof/sof-audio.c                          | 109 ++-
 sound/soc/sof/sof-audio.h                          |   6 +-
 sound/soc/sof/topology.c                           |  17 -
 sound/soc/uniphier/Kconfig                         |   2 -
 sound/usb/format.c                                 |   2 +-
 sound/usb/mixer_quirks.c                           |   2 +-
 sound/usb/quirks.c                                 |   2 +-
 tools/bpf/bpftool/Documentation/Makefile           |   1 -
 tools/bpf/bpftool/Documentation/bpftool-btf.rst    |   2 +-
 tools/bpf/bpftool/Documentation/bpftool-cgroup.rst |   2 +-
 tools/bpf/bpftool/Documentation/bpftool-gen.rst    |   2 +-
 tools/bpf/bpftool/Documentation/bpftool-link.rst   |   2 +-
 tools/bpf/bpftool/Documentation/bpftool-map.rst    |   6 +-
 tools/bpf/bpftool/Documentation/bpftool-prog.rst   |   8 +-
 tools/bpf/bpftool/Documentation/bpftool.rst        |   6 +-
 tools/bpf/bpftool/Makefile                         |   1 -
 tools/bpf/bpftool/main.c                           |   2 +
 tools/bpf/bpftool/prog.c                           |  15 +-
 tools/bpf/resolve_btfids/main.c                    |   5 +-
 tools/include/nolibc/nolibc.h                      |  33 +-
 tools/include/uapi/linux/bpf.h                     |   2 +-
 tools/lib/bpf/btf.c                                |  55 +-
 tools/lib/bpf/btf.h                                |   2 +-
 tools/lib/bpf/btf_dump.c                           |   2 +-
 tools/lib/bpf/gen_loader.c                         |  12 +-
 tools/lib/bpf/libbpf.c                             |  65 +-
 tools/lib/bpf/libbpf.h                             |   1 -
 tools/lib/bpf/linker.c                             |   6 +-
 tools/perf/Makefile.config                         |   5 +-
 tools/perf/tests/shell/stat_all_metricgroups.sh    |   2 +-
 tools/perf/util/cputopo.c                          |   3 +-
 tools/perf/util/debug.c                            |   2 +-
 tools/perf/util/evsel.c                            |  25 +-
 tools/perf/util/metricgroup.c                      |   4 +-
 tools/perf/util/probe-event.c                      |   3 +
 tools/testing/kunit/kunit_json.py                  |   2 +
 tools/testing/kunit/kunit_tool_test.py             |   6 +
 tools/testing/selftests/bpf/btf_helpers.c          |   9 +-
 tools/testing/selftests/bpf/prog_tests/bpf_iter.c  |   5 +-
 .../selftests/bpf/prog_tests/migrate_reuseport.c   |   4 +-
 tools/testing/selftests/bpf/prog_tests/skb_ctx.c   |   2 +
 .../testing/selftests/bpf/prog_tests/tc_redirect.c |   7 +
 tools/testing/selftests/bpf/xdpxceiver.c           |   6 +-
 tools/testing/selftests/clone3/clone3.c            |   6 +
 .../selftests/ftrace/test.d/kprobe/profile.tc      |   2 +-
 tools/testing/selftests/kselftest_harness.h        |   2 +-
 tools/testing/selftests/kvm/.gitignore             |   2 +-
 tools/testing/selftests/kvm/Makefile               |   4 +-
 .../selftests/kvm/include/x86_64/processor.h       |   7 +
 tools/testing/selftests/kvm/lib/x86_64/processor.c |  33 +-
 .../kvm/x86_64/{get_cpuid_test.c => cpuid_test.c}  |  30 +
 .../selftests/powerpc/security/spectre_v2.c        |   2 +-
 tools/testing/selftests/powerpc/signal/.gitignore  |   1 +
 tools/testing/selftests/powerpc/signal/Makefile    |   1 +
 .../selftests/powerpc/signal/sigreturn_kernel.c    | 132 +++
 .../selftests/vm/charge_reserved_hugetlb.sh        |  34 +-
 tools/testing/selftests/vm/hmm-tests.c             |  42 +
 .../selftests/vm/hugetlb_reparenting_test.sh       |  21 +-
 tools/testing/selftests/vm/write_hugetlb_memory.sh |   2 +-
 virt/kvm/kvm_main.c                                |   5 +-
 1127 files changed, 10720 insertions(+), 6000 deletions(-)
author maintainer
#6 lore raw

PATCH 6/1039 HID: wacom: Ignore the confidence flag when a touch is removed

From: Jason Gerecke <[email protected]>

commit df03e9bd6d4806619b4cdc91a3d7695818a8e2b7 upstream.

AES hardware may internally re-classify a contact that it thought was intentional as a palm. Intentional contacts are reported as "down" with the confidence bit set. When this re-classification occurs, however, the state transitions to "up" with the confidence bit cleared. This kind of transition appears to be legal according to Microsoft docs, but we do not handle it correctly. Because the confidence bit is clear, we don't call wacom_wac_finger_slot and update userspace. This causes hung touches that confuse userspace and interfere with pen arbitration.

This commit adds a special case to ignore the confidence flag if a contact is reported as removed. This ensures we do not leave a hung touch if one of these re-classification events occured. Ideally we'd have some way to also let userspace know that the touch has been re-classified as a palm and needs to be canceled, but that's not possible right now :)

Fixes 7fb0413baa7f (HID: wacom: Use "Confidence" flag to prevent reporting invalid contacts)
---
 drivers/hid/wacom_wac.c |   29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)
drivers/hid/wacom_wac.c +26 -3
@@ -2588,6 +2588,24 @@ static void wacom_wac_finger_slot(struct
 	}
 }
 
+static bool wacom_wac_slot_is_active(struct input_dev *dev, int key)
+{
+	struct input_mt *mt = dev->mt;
+	struct input_mt_slot *s;
+
+	if (!mt)
+		return false;
+
+	for (s = mt->slots; s != mt->slots + mt->num_slots; s++) {
+		if (s->key == key &&
+			input_mt_get_value(s, ABS_MT_TRACKING_ID) >= 0) {
+			return true;
+		}
+	}
+
+	return false;
+}
+
 static void wacom_wac_finger_event(struct hid_device *hdev,
 		struct hid_field *field, struct hid_usage *usage, __s32 value)
 {
@@ -2638,9 +2656,14 @@ static void wacom_wac_finger_event(struc
 	}
 
 	if (usage->usage_index + 1 == field->report_count) {
-		if (equivalent_usage == wacom_wac->hid_data.last_slot_field &&
-		    wacom_wac->hid_data.confidence)
-			wacom_wac_finger_slot(wacom_wac, wacom_wac->touch_input);
+		if (equivalent_usage == wacom_wac->hid_data.last_slot_field) {
+			bool touch_removed = wacom_wac_slot_is_active(wacom_wac->touch_input,
+				wacom_wac->hid_data.id) && !wacom_wac->hid_data.tipswitch;
+
+			if (wacom_wac->hid_data.confidence || touch_removed) {
+				wacom_wac_finger_slot(wacom_wac, wacom_wac->touch_input);
+			}
+		}
 	}
 }
 
author maintainer
#9 lore raw

PATCH 9/1039 cifs: free ntlmsspblob allocated in negotiate

In reply to Greg Kroah-Hartman

From: Shyam Prasad N <[email protected]>

commit e3548aaf41a200c2af359462be23bcdd76efd795 upstream.

One of my previous fixes:
cifs: send workstation name during ntlmssp session setup ...changed the prototype of build_ntlmssp_negotiate_blob from being allocated by the caller to being allocated within the function. The caller needs to free this object too. While SMB2 version of the caller did it, I forgot to free for the SMB1 version. Fixing that here.

Fixes 49bd49f983b5 ("cifs: send workstation name during ntlmssp session setup")
---
 fs/cifs/sess.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
fs/cifs/sess.c +8 -5
@@ -1354,7 +1354,7 @@ sess_auth_rawntlmssp_negotiate(struct se
 				     &blob_len, ses,
 				     sess_data->nls_cp);
 	if (rc)
-		goto out;
+		goto out_free_ntlmsspblob;
 
 	sess_data->iov[1].iov_len = blob_len;
 	sess_data->iov[1].iov_base = ntlmsspblob;
@@ -1362,7 +1362,7 @@ sess_auth_rawntlmssp_negotiate(struct se
 
 	rc = _sess_auth_rawntlmssp_assemble_req(sess_data);
 	if (rc)
-		goto out;
+		goto out_free_ntlmsspblob;
 
 	rc = sess_sendreceive(sess_data);
 
@@ -1376,14 +1376,14 @@ sess_auth_rawntlmssp_negotiate(struct se
 		rc = 0;
 
 	if (rc)
-		goto out;
+		goto out_free_ntlmsspblob;
 
 	cifs_dbg(FYI, "rawntlmssp session setup challenge phase\n");
 
 	if (smb_buf->WordCount != 4) {
 		rc = -EIO;
 		cifs_dbg(VFS, "bad word count %d\n", smb_buf->WordCount);
-		goto out;
+		goto out_free_ntlmsspblob;
 	}
 
 	ses->Suid = smb_buf->Uid;   /* UID left in wire format (le) */
@@ -1397,10 +1397,13 @@ sess_auth_rawntlmssp_negotiate(struct se
 		cifs_dbg(VFS, "bad security blob length %d\n",
 				blob_len);
 		rc = -EINVAL;
-		goto out;
+		goto out_free_ntlmsspblob;
 	}
 
 	rc = decode_ntlmssp_challenge(bcc_ptr, blob_len, ses);
+
+out_free_ntlmsspblob:
+	kfree(ntlmsspblob);
 out:
 	sess_free_buffer(sess_data);
 
author maintainer
#22 lore raw

PATCH 22/1039 mtd: rawnand: ingenic: JZ4740 needs oob_first read page function

In reply to Greg Kroah-Hartman

From: Paul Cercueil <[email protected]>

commit 0171480007d64f663aae9226303f1b1e4621229e upstream.

The ECC engine on the JZ4740 SoC requires the ECC data to be read before the page; using the default page reading function does not work. Indeed, the old JZ4740 NAND driver (removed in 5.4) did use the 'OOB first' flag that existed back then.

Use the newly created nand_read_page_hwecc_oob_first() to address this issue.

This issue was not found when the new ingenic-nand driver was developed, most likely because the Device Tree used had the nand-ecc-mode set to "hw_oob_first", which seems to not be supported anymore.

Cc <[email protected]> # v5.2
Fixes a0ac778eb82c ("mtd: rawnand: ingenic: Add support for the JZ4740")
---
 drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c +5 -0
@@ -32,6 +32,7 @@ struct jz_soc_info {
 	unsigned long addr_offset;
 	unsigned long cmd_offset;
 	const struct mtd_ooblayout_ops *oob_layout;
+	bool oob_first;
 };
 
 struct ingenic_nand_cs {
@@ -240,6 +241,9 @@ static int ingenic_nand_attach_chip(stru
 	if (chip->bbt_options & NAND_BBT_USE_FLASH)
 		chip->bbt_options |= NAND_BBT_NO_OOB;
 
+	if (nfc->soc_info->oob_first)
+		chip->ecc.read_page = nand_read_page_hwecc_oob_first;
+
 	/* For legacy reasons we use a different layout on the qi,lb60 board. */
 	if (of_machine_is_compatible("qi,lb60"))
 		mtd_set_ooblayout(mtd, &qi_lb60_ooblayout_ops);
@@ -534,6 +538,7 @@ static const struct jz_soc_info jz4740_s
 	.data_offset = 0x00000000,
 	.cmd_offset = 0x00008000,
 	.addr_offset = 0x00010000,
+	.oob_first = true,
 };
 
 static const struct jz_soc_info jz4725b_soc_info = {
author maintainer
#25 lore raw

PATCH 25/1039 riscv: try to allocate crashkern region from 32bit addressible memory

In reply to Greg Kroah-Hartman

From: Nick Kossifidis <[email protected]>

commit decf89f86ecd3c3c3de81c562010d5797bea3de1 upstream.

When allocating crash kernel region without explicitly specifying its base address/size, memblock_phys_alloc_range will attempt to allocate memory top to bottom (memblock.bottom_up is false), so the crash kernel region will end up in highmem on 64bit systems. This way swiotlb can't work on the crash kernel, since there won't be any 32bit addressible memory available for the bounce buffers.

Try to allocate 32bit addressible memory if available, for the crash kernel by restricting the top search address to be less than SZ_4G. If that fails fallback to the previous behavior.

I tested this on HiFive Unmatched where the pci-e controller needs swiotlb to work, with this patch it's possible to access the pci-e controller on crash kernel and mount the rootfs from the nvme.

Fixes e53d28180d4d ("RISC-V: Add kdump support")
---
 arch/riscv/mm/init.c |   17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
arch/riscv/mm/init.c +13 -4
@@ -812,13 +812,22 @@ static void __init reserve_crashkernel(v
 	/*
 	 * Current riscv boot protocol requires 2MB alignment for
 	 * RV64 and 4MB alignment for RV32 (hugepage size)
+	 *
+	 * Try to alloc from 32bit addressible physical memory so that
+	 * swiotlb can work on the crash kernel.
 	 */
 	crash_base = memblock_phys_alloc_range(crash_size, PMD_SIZE,
-					       search_start, search_end);
+					       search_start,
+					       min(search_end, (unsigned long) SZ_4G));
 	if (crash_base == 0) {
-		pr_warn("crashkernel: couldn't allocate %lldKB\n",
-			crash_size >> 10);
-		return;
+		/* Try again without restricting region to 32bit addressible memory */
+		crash_base = memblock_phys_alloc_range(crash_size, PMD_SIZE,
+						search_start, search_end);
+		if (crash_base == 0) {
+			pr_warn("crashkernel: couldn't allocate %lldKB\n",
+				crash_size >> 10);
+			return;
+		}
 	}
 
 	pr_info("crashkernel: reserved 0x%016llx - 0x%016llx (%lld MB)\n",
author maintainer
#13 lore raw

PATCH 13/1039 f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file

In reply to Greg Kroah-Hartman

From: Jaegeuk Kim <[email protected]>

commit 19bdba5265624ba6b9d9dd936a0c6ccc167cfe80 upstream.

Android OTA failed due to SBI_NEED_FSCK flag when pinning the file. Let's avoid it since we can do in-place-updates.

---
 fs/f2fs/data.c |    7 +++++--
 fs/f2fs/file.c |   10 +++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)
fs/f2fs/data.c +5 -2
@@ -2617,6 +2617,11 @@ bool f2fs_should_update_outplace(struct
 {
 	struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
 
+	/* The below cases were checked when setting it. */
+	if (f2fs_is_pinned_file(inode))
+		return false;
+	if (fio && is_sbi_flag_set(sbi, SBI_NEED_FSCK))
+		return true;
 	if (f2fs_lfs_mode(sbi))
 		return true;
 	if (S_ISDIR(inode->i_mode))
@@ -2625,8 +2630,6 @@ bool f2fs_should_update_outplace(struct
 		return true;
 	if (f2fs_is_atomic_file(inode))
 		return true;
-	if (is_sbi_flag_set(sbi, SBI_NEED_FSCK))
-		return true;
 
 	/* swap file is migrating in aligned write mode */
 	if (is_inode_flag_set(inode, FI_ALIGNED_WRITE))
fs/f2fs/file.c +5 -5
@@ -3143,17 +3143,17 @@ static int f2fs_ioc_set_pin_file(struct
 
 	inode_lock(inode);
 
-	if (f2fs_should_update_outplace(inode, NULL)) {
-		ret = -EINVAL;
-		goto out;
-	}
-
 	if (!pin) {
 		clear_inode_flag(inode, FI_PIN_FILE);
 		f2fs_i_gc_failures_write(inode, 0);
 		goto done;
 	}
 
+	if (f2fs_should_update_outplace(inode, NULL)) {
+		ret = -EINVAL;
+		goto out;
+	}
+
 	if (f2fs_pin_file_control(inode, false)) {
 		ret = -EAGAIN;
 		goto out;
author maintainer
#14 lore raw

PATCH 14/1039 nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind()

In reply to Greg Kroah-Hartman

From: Krzysztof Kozlowski <[email protected]>

commit dded08927ca3c31a5c37f8e7f95fe98770475dd4 upstream.

Syzbot detected a NULL pointer dereference of nfc_llcp_sock->dev pointer (which is a 'struct nfc_dev *') with calls to llcp_sock_sendmsg() after a failed llcp_sock_bind(). The message being sent is a SOCK_DGRAM.

KASAN report:

  BUG: KASAN: null-ptr-deref in nfc_alloc_send_skb+0x2d/0xc0
  Read of size 4 at addr 00000000000005c8 by task llcp_sock_nfc_a/899

  CPU: 5 PID: 899 Comm: llcp_sock_nfc_a Not tainted 5.16.0-rc6-next-20211224-00001-gc6437fbf18b0 #125
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
  Call Trace:
   <TASK>
   dump_stack_lvl+0x45/0x59
   ? nfc_alloc_send_skb+0x2d/0xc0
   __kasan_report.cold+0x117/0x11c
   ? mark_lock+0x480/0x4f0
   ? nfc_alloc_send_skb+0x2d/0xc0
   kasan_report+0x38/0x50
   nfc_alloc_send_skb+0x2d/0xc0
   nfc_llcp_send_ui_frame+0x18c/0x2a0
   ? nfc_llcp_send_i_frame+0x230/0x230
   ? __local_bh_enable_ip+0x86/0xe0
   ? llcp_sock_connect+0x470/0x470
   ? llcp_sock_connect+0x470/0x470
   sock_sendmsg+0x8e/0xa0
   ____sys_sendmsg+0x253/0x3f0
   ...

The issue was visible only with multiple simultaneous calls to bind() and sendmsg(), which resulted in most of the bind() calls to fail. The bind() was failing on checking if there is available WKS/SDP/SAP (respective bit in 'struct nfc_llcp_local' fields). When there was no available WKS/SDP/SAP, the bind returned error but the sendmsg() to such socket was able to trigger mentioned NULL pointer dereference of nfc_llcp_sock->dev.

The code looks simply racy and currently it protects several paths against race with checks for (!nfc_llcp_sock->local) which is NULL-ified in error paths of bind(). The llcp_sock_sendmsg() did not have such check but called function nfc_llcp_send_ui_frame() had, although not protected with lock_sock().

Therefore the race could look like (same socket is used all the time):
CPU0 CPU1
==== ====
llcp_sock_bind()
- lock_sock()
- success
- release_sock()
- return 0
llcp_sock_sendmsg()
- lock_sock()
- release_sock()
llcp_sock_bind(), same socket
- lock_sock()
- error
- nfc_llcp_send_ui_frame()
- if (!llcp_sock->local)
- llcp_sock->local = NULL
- nfc_put_device(dev)
- dereference llcp_sock->dev
- release_sock()
- return -ERRNO

The nfc_llcp_send_ui_frame() checked llcp_sock->local outside of the lock, which is racy and ineffective check. Instead, its caller llcp_sock_sendmsg(), should perform the check inside lock_sock().

Reported-and-tested-by [email protected]
Fixes b874dec21d1c ("NFC: Implement LLCP connection less Tx path")
---
 net/nfc/llcp_sock.c |    5 +++++
 1 file changed, 5 insertions(+)
net/nfc/llcp_sock.c +5 -0
@@ -789,6 +789,11 @@ static int llcp_sock_sendmsg(struct sock
 
 	lock_sock(sk);
 
+	if (!llcp_sock->local) {
+		release_sock(sk);
+		return -ENODEV;
+	}
+
 	if (sk->sk_type == SOCK_DGRAM) {
 		DECLARE_SOCKADDR(struct sockaddr_nfc_llcp *, addr,
 				 msg->msg_name);
author maintainer
#34 lore raw

PATCH 34/1039 rtc: cmos: take rtc_lock while reading from CMOS

In reply to Greg Kroah-Hartman

From: Mateusz Jończyk <[email protected]>

commit 454f47ff464325223129b9b5b8d0b61946ec704d upstream.

Reading from the CMOS involves writing to the index register and then reading from the data register. Therefore access to the CMOS has to be serialized with rtc_lock. This invocation of CMOS_READ was not serialized, which could cause trouble when other code is accessing CMOS at the same time.

Use spin_lock_irq() like the rest of the function.

Nothing in kernel modifies the RTC_DM_BINARY bit, so there could be a separate pair of spin_lock_irq() / spin_unlock_irq() before doing the math.

---
 drivers/rtc/rtc-cmos.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/rtc/rtc-cmos.c +3 -0
@@ -457,7 +457,10 @@ static int cmos_set_alarm(struct device
 	min = t->time.tm_min;
 	sec = t->time.tm_sec;
 
+	spin_lock_irq(&rtc_lock);
 	rtc_control = CMOS_READ(RTC_CONTROL);
+	spin_unlock_irq(&rtc_lock);
+
 	if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
 		/* Writing 0xff means "don't care" or "match all".  */
 		mon = (mon <= 12) ? bin2bcd(mon) : 0xff;
author maintainer
#33 lore raw

PATCH 33/1039 tools/nolibc: fix incorrect truncation of exit code

In reply to Greg Kroah-Hartman

From: Willy Tarreau <[email protected]>

commit de0244ae40ae91145faaf164a4252347607c3711 upstream.

Ammar Faizi reported that our exit code handling is wrong. We truncate it to the lowest 8 bits but the syscall itself is expected to take a regular 32-bit signed integer, not an unsigned char. It's the kernel that later truncates it to the lowest 8 bits. The difference is visible in strace, where the program below used to show exit(255) instead of exit(-1):

  int main(void)
  {
        return -1;
  }

This patch applies the fix to all archs. x86_64, i386, arm64, armv7 and mips were all tested and confirmed to work fine now. Risc-v was not tested but the change is trivial and exactly the same as for other archs.

---
 tools/include/nolibc/nolibc.h |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
tools/include/nolibc/nolibc.h +5 -8
@@ -414,7 +414,7 @@ asm(".section .text\n"
     "xor %ebp, %ebp\n"          // zero the stack frame
     "and $-16, %rsp\n"          // x86 ABI : esp must be 16-byte aligned before call
     "call main\n"               // main() returns the status code, we'll exit with it.
-    "movzb %al, %rdi\n"         // retrieve exit code from 8 lower bits
+    "mov %eax, %edi\n"          // retrieve exit code (32 bit)
     "mov $60, %rax\n"           // NR_exit == 60
     "syscall\n"                 // really exit
     "hlt\n"                     // ensure it does not return
@@ -602,9 +602,9 @@ asm(".section .text\n"
     "push %ebx\n"               // support both regparm and plain stack modes
     "push %eax\n"
     "call main\n"               // main() returns the status code in %eax
-    "movzbl %al, %ebx\n"        // retrieve exit code from lower 8 bits
-    "movl   $1, %eax\n"         // NR_exit == 1
-    "int    $0x80\n"            // exit now
+    "mov %eax, %ebx\n"          // retrieve exit code (32-bit int)
+    "movl $1, %eax\n"           // NR_exit == 1
+    "int $0x80\n"               // exit now
     "hlt\n"                     // ensure it does not
     "");
 
@@ -788,7 +788,6 @@ asm(".section .text\n"
     "and %r3, %r1, $-8\n"         // AAPCS : sp must be 8-byte aligned in the
     "mov %sp, %r3\n"              //         callee, an bl doesn't push (lr=pc)
     "bl main\n"                   // main() returns the status code, we'll exit with it.
-    "and %r0, %r0, $0xff\n"       // limit exit code to 8 bits
     "movs r7, $1\n"               // NR_exit == 1
     "svc $0x00\n"
     "");
@@ -985,7 +984,6 @@ asm(".section .text\n"
     "add x2, x2, x1\n"            //           + argv
     "and sp, x1, -16\n"           // sp must be 16-byte aligned in the callee
     "bl main\n"                   // main() returns the status code, we'll exit with it.
-    "and x0, x0, 0xff\n"          // limit exit code to 8 bits
     "mov x8, 93\n"                // NR_exit == 93
     "svc #0\n"
     "");
@@ -1190,7 +1188,7 @@ asm(".section .text\n"
     "addiu $sp,$sp,-16\n"         // the callee expects to save a0..a3 there!
     "jal main\n"                  // main() returns the status code, we'll exit with it.
     "nop\n"                       // delayed slot
-    "and $a0, $v0, 0xff\n"        // limit exit code to 8 bits
+    "move $a0, $v0\n"             // retrieve 32-bit exit code from v0
     "li $v0, 4001\n"              // NR_exit == 4001
     "syscall\n"
     ".end __start\n"
@@ -1388,7 +1386,6 @@ asm(".section .text\n"
     "add   a2,a2,a1\n"           //             + argv
     "andi  sp,a1,-16\n"          // sp must be 16-byte aligned
     "call  main\n"               // main() returns the status code, we'll exit with it.
-    "andi  a0, a0, 0xff\n"       // limit exit code to 8 bits
     "li a7, 93\n"                // NR_exit == 93
     "ecall\n"
     "");
author maintainer
#37 lore raw

PATCH 37/1039 ksmbd: fix guest connection failure with nautilus

In reply to Greg Kroah-Hartman

From: Namjae Jeon <[email protected]>

commit ac090d9c90b087d6fb714e54b2a6dd1e6c373ed6 upstream.

MS-SMB2 describe session sign like the following. Session.SigningRequired MUST be set to TRUE under the following conditions:
- If the SMB2_NEGOTIATE_SIGNING_REQUIRED bit is set in the SecurityMode field of the client request.
- If the SMB2_SESSION_FLAG_IS_GUEST bit is not set in the SessionFlags field and Session.IsAnonymous is FALSE and either Connection.ShouldSign or global RequireMessageSigning is TRUE.

When trying guest account connection using nautilus, The login failure happened on session setup. ksmbd does not allow this connection when the user is a guest and the connection sign is set. Just do not set session sign instead of error response as described in the specification. And this change improves the guest connection in Nautilus.

Fixes e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Cc [email protected] # v5.15+
---
 fs/ksmbd/smb2pdu.c |   64 ++++++++++++++++++++++++-----------------------------
 1 file changed, 30 insertions(+), 34 deletions(-)
fs/ksmbd/smb2pdu.c +30 -34
@@ -1455,11 +1455,6 @@ static int ntlm_authenticate(struct ksmb
 
 	sess->user = user;
 	if (user_guest(sess->user)) {
-		if (conn->sign) {
-			ksmbd_debug(SMB, "Guest login not allowed when signing enabled\n");
-			return -EPERM;
-		}
-
 		rsp->SessionFlags = SMB2_SESSION_FLAG_IS_GUEST_LE;
 	} else {
 		struct authenticate_message *authblob;
@@ -1472,38 +1467,39 @@ static int ntlm_authenticate(struct ksmb
 			ksmbd_debug(SMB, "authentication failed\n");
 			return -EPERM;
 		}
+	}
 
-		/*
-		 * If session state is SMB2_SESSION_VALID, We can assume
-		 * that it is reauthentication. And the user/password
-		 * has been verified, so return it here.
-		 */
-		if (sess->state == SMB2_SESSION_VALID) {
-			if (conn->binding)
-				goto binding_session;
-			return 0;
-		}
+	/*
+	 * If session state is SMB2_SESSION_VALID, We can assume
+	 * that it is reauthentication. And the user/password
+	 * has been verified, so return it here.
+	 */
+	if (sess->state == SMB2_SESSION_VALID) {
+		if (conn->binding)
+			goto binding_session;
+		return 0;
+	}
 
-		if ((conn->sign || server_conf.enforced_signing) ||
-		    (req->SecurityMode & SMB2_NEGOTIATE_SIGNING_REQUIRED))
-			sess->sign = true;
-
-		if (smb3_encryption_negotiated(conn) &&
-		    !(req->Flags & SMB2_SESSION_REQ_FLAG_BINDING)) {
-			rc = conn->ops->generate_encryptionkey(sess);
-			if (rc) {
-				ksmbd_debug(SMB,
-					    "SMB3 encryption key generation failed\n");
-				return -EINVAL;
-			}
-			sess->enc = true;
-			rsp->SessionFlags = SMB2_SESSION_FLAG_ENCRYPT_DATA_LE;
-			/*
-			 * signing is disable if encryption is enable
-			 * on this session
-			 */
-			sess->sign = false;
+	if ((rsp->SessionFlags != SMB2_SESSION_FLAG_IS_GUEST_LE &&
+	     (conn->sign || server_conf.enforced_signing)) ||
+	    (req->SecurityMode & SMB2_NEGOTIATE_SIGNING_REQUIRED))
+		sess->sign = true;
+
+	if (smb3_encryption_negotiated(conn) &&
+			!(req->Flags & SMB2_SESSION_REQ_FLAG_BINDING)) {
+		rc = conn->ops->generate_encryptionkey(sess);
+		if (rc) {
+			ksmbd_debug(SMB,
+					"SMB3 encryption key generation failed\n");
+			return -EINVAL;
 		}
+		sess->enc = true;
+		rsp->SessionFlags = SMB2_SESSION_FLAG_ENCRYPT_DATA_LE;
+		/*
+		 * signing is disable if encryption is enable
+		 * on this session
+		 */
+		sess->sign = false;
 	}
 
 binding_session:
author maintainer
#39 lore raw

PATCH 39/1039 ksmbd: move credit charge deduction under processing request

In reply to Greg Kroah-Hartman

From: Namjae Jeon <[email protected]>

commit 914d7e5709ac59ded70bea7956d408fe2acd7c3c upstream.

Moves the credit charge deduction from total_credits under the processing a request. When repeating smb2 lock request and other command request, there will be a problem that ->total_credits does not decrease.

---
 fs/ksmbd/smb2misc.c |    7 ++-----
 fs/ksmbd/smb2pdu.c  |   16 ++++++++++------
 2 files changed, 12 insertions(+), 11 deletions(-)
fs/ksmbd/smb2misc.c +2 -5
@@ -289,7 +289,7 @@ static int smb2_validate_credit_charge(s
 	unsigned int req_len = 0, expect_resp_len = 0, calc_credit_num, max_len;
 	unsigned short credit_charge = le16_to_cpu(hdr->CreditCharge);
 	void *__hdr = hdr;
-	int ret;
+	int ret = 0;
 
 	switch (hdr->Command) {
 	case SMB2_QUERY_INFO:
@@ -332,10 +332,7 @@ static int smb2_validate_credit_charge(s
 	}
 
 	spin_lock(&conn->credits_lock);
-	if (credit_charge <= conn->total_credits) {
-		conn->total_credits -= credit_charge;
-		ret = 0;
-	} else {
+	if (credit_charge > conn->total_credits) {
 		ksmbd_debug(SMB, "Insufficient credits granted, given: %u, granted: %u\n",
 			    credit_charge, conn->total_credits);
 		ret = 1;
fs/ksmbd/smb2pdu.c +10 -6
@@ -299,9 +299,8 @@ int smb2_set_rsp_credits(struct ksmbd_wo
 	struct smb2_hdr *req_hdr = ksmbd_req_buf_next(work);
 	struct smb2_hdr *hdr = ksmbd_resp_buf_next(work);
 	struct ksmbd_conn *conn = work->conn;
-	unsigned short credits_requested;
+	unsigned short credits_requested, aux_max;
 	unsigned short credit_charge, credits_granted = 0;
-	unsigned short aux_max, aux_credits;
 
 	if (work->send_no_response)
 		return 0;
@@ -316,6 +315,13 @@ int smb2_set_rsp_credits(struct ksmbd_wo
 
 	credit_charge = max_t(unsigned short,
 			      le16_to_cpu(req_hdr->CreditCharge), 1);
+	if (credit_charge > conn->total_credits) {
+		ksmbd_debug(SMB, "Insufficient credits granted, given: %u, granted: %u\n",
+			    credit_charge, conn->total_credits);
+		return -EINVAL;
+	}
+
+	conn->total_credits -= credit_charge;
 	credits_requested = max_t(unsigned short,
 				  le16_to_cpu(req_hdr->CreditRequest), 1);
 
@@ -325,13 +331,11 @@ int smb2_set_rsp_credits(struct ksmbd_wo
 	 * TODO: Need to adjuct CreditRequest value according to
 	 * current cpu load
 	 */
-	aux_credits = credits_requested - 1;
 	if (hdr->Command == SMB2_NEGOTIATE)
-		aux_max = 0;
+		aux_max = 1;
 	else
 		aux_max = conn->vals->max_credits - credit_charge;
-	aux_credits = min_t(unsigned short, aux_credits, aux_max);
-	credits_granted = credit_charge + aux_credits;
+	credits_granted = min_t(unsigned short, credits_requested, aux_max);
 
 	if (conn->vals->max_credits - conn->total_credits < credits_granted)
 		credits_granted = conn->vals->max_credits -
author maintainer
#15 lore raw

PATCH 15/1039 mtd: rawnand: gpmi: Add ERR007117 protection for nfc_apply_timings

In reply to Greg Kroah-Hartman

From: Christian Eggers <[email protected]>

commit f53d4c109a666bf1a4883b45d546fba079258717 upstream.

gpmi_io clock needs to be gated off when changing the parent/dividers of enfc_clk_root (i.MX6Q/i.MX6UL) respectively qspi2_clk_root (i.MX6SX). Otherwise this rate change can lead to an unresponsive GPMI core which results in DMA timeouts and failed driver probe:

[    4.072318] gpmi-nand 112000.gpmi-nand: DMA timeout, last DMA
...
[    4.370355] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -110
...
[    4.375988] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -22
[    4.381524] gpmi-nand 112000.gpmi-nand: Error in ECC-based read: -22
[    4.387988] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -22
[    4.393535] gpmi-nand 112000.gpmi-nand: Chip: 0, Error -22

...

Other than stated in i.MX 6 erratum ERR007117, it should be sufficient to gate only gpmi_io because all other bch/nand clocks are derived from different clock roots.

The i.MX6 reference manuals state that changing clock muxers can cause glitches but are silent about changing dividers. But tests showed that these glitches can definitely happen on i.MX6ULL. For i.MX7D/8MM in turn, the manual guarantees that no glitches can happen when changing dividers.

---
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c |   28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +25 -3
@@ -713,14 +713,32 @@ static void gpmi_nfc_compute_timings(str
 			      (use_half_period ? BM_GPMI_CTRL1_HALF_PERIOD : 0);
 }
 
-static void gpmi_nfc_apply_timings(struct gpmi_nand_data *this)
+static int gpmi_nfc_apply_timings(struct gpmi_nand_data *this)
 {
 	struct gpmi_nfc_hardware_timing *hw = &this->hw;
 	struct resources *r = &this->resources;
 	void __iomem *gpmi_regs = r->gpmi_regs;
 	unsigned int dll_wait_time_us;
+	int ret;
+
+	/* Clock dividers do NOT guarantee a clean clock signal on its output
+	 * during the change of the divide factor on i.MX6Q/UL/SX. On i.MX7/8,
+	 * all clock dividers provide these guarantee.
+	 */
+	if (GPMI_IS_MX6Q(this) || GPMI_IS_MX6SX(this))
+		clk_disable_unprepare(r->clock[0]);
+
+	ret = clk_set_rate(r->clock[0], hw->clk_rate);
+	if (ret) {
+		dev_err(this->dev, "cannot set clock rate to %lu Hz: %d\n", hw->clk_rate, ret);
+		return ret;
+	}
 
-	clk_set_rate(r->clock[0], hw->clk_rate);
+	if (GPMI_IS_MX6Q(this) || GPMI_IS_MX6SX(this)) {
+		ret = clk_prepare_enable(r->clock[0]);
+		if (ret)
+			return ret;
+	}
 
 	writel(hw->timing0, gpmi_regs + HW_GPMI_TIMING0);
 	writel(hw->timing1, gpmi_regs + HW_GPMI_TIMING1);
@@ -739,6 +757,8 @@ static void gpmi_nfc_apply_timings(struc
 
 	/* Wait for the DLL to settle. */
 	udelay(dll_wait_time_us);
+
+	return 0;
 }
 
 static int gpmi_setup_interface(struct nand_chip *chip, int chipnr,
@@ -2278,7 +2298,9 @@ static int gpmi_nfc_exec_op(struct nand_
 	 */
 	if (this->hw.must_apply_timings) {
 		this->hw.must_apply_timings = false;
-		gpmi_nfc_apply_timings(this);
+		ret = gpmi_nfc_apply_timings(this);
+		if (ret)
+			return ret;
 	}
 
 	dev_dbg(this->dev, "%s: %d instructions\n", __func__, op->ninstrs);
author maintainer
#3 lore raw

PATCH 3/1039 HID: Ignore battery for Elan touchscreen on HP Envy X360 15t-dr100

In reply to Greg Kroah-Hartman

From: Karl Kurbjun <[email protected]>

commit f3193ea1b6779023334faa72b214ece457e02656 upstream.

Battery status on Elan tablet driver is reported for the HP ENVY x360 15t-dr100. There is no separate battery for the Elan controller resulting in a battery level report of 0% or 1% depending on whether a stylus has interacted with the screen. These low battery level reports causes a variety of bad behavior in desktop environments. This patch adds the appropriate quirk to indicate that the batery status is unused for this target.

---
 drivers/hid/hid-ids.h   |    1 +
 drivers/hid/hid-input.c |    2 ++
 2 files changed, 3 insertions(+)
drivers/hid/hid-ids.h +1 -0
@@ -398,6 +398,7 @@
 #define USB_DEVICE_ID_HP_X2		0x074d
 #define USB_DEVICE_ID_HP_X2_10_COVER	0x0755
 #define I2C_DEVICE_ID_HP_ENVY_X360_15	0x2d05
+#define I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100	0x29CF
 #define I2C_DEVICE_ID_HP_SPECTRE_X360_15	0x2817
 #define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN	0x2544
 #define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN	0x2706
drivers/hid/hid-input.c +2 -0
@@ -329,6 +329,8 @@ static const struct hid_device_id hid_ba
 	  HID_BATTERY_QUIRK_IGNORE },
 	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15),
 	  HID_BATTERY_QUIRK_IGNORE },
+	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100),
+	  HID_BATTERY_QUIRK_IGNORE },
 	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_15),
 	  HID_BATTERY_QUIRK_IGNORE },
 	{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN),
author maintainer
#17 lore raw

PATCH 17/1039 mtd: Fixed breaking list in __mtd_del_partition.

In reply to Greg Kroah-Hartman

From: Andreas Oetken <[email protected]>

commit 2966daf7d253d9904b337b040dd7a43472858b8a upstream.

Not the child partition should be removed from the partition list but the partition itself. Otherwise the partition list gets broken and any subsequent remove operations leads to a kernel panic.

---
 drivers/mtd/mtdpart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdpart.c +1 -1
@@ -312,7 +312,7 @@ static int __mtd_del_partition(struct mt
 	if (err)
 		return err;
 
-	list_del(&child->part.node);
+	list_del(&mtd->part.node);
 	free_partition(mtd);
 
 	return 0;
author maintainer
#46 lore raw

PATCH 46/1039 media: mceusb: fix control-message timeouts

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit 16394e998cbb050730536bdf7e89f5a70efbd974 upstream.

USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.

Fixes 66e89522aff7 ("V4L/DVB: IR: add mceusb IR receiver driver")
Cc [email protected] # 2.6.36
---
 drivers/media/rc/mceusb.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/media/rc/mceusb.c +4 -4
@@ -1430,7 +1430,7 @@ static void mceusb_gen1_init(struct mceu
 	 */
 	ret = usb_control_msg(ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0),
 			      USB_REQ_SET_ADDRESS, USB_TYPE_VENDOR, 0, 0,
-			      data, USB_CTRL_MSG_SZ, HZ * 3);
+			      data, USB_CTRL_MSG_SZ, 3000);
 	dev_dbg(dev, "set address - ret = %d", ret);
 	dev_dbg(dev, "set address - data[0] = %d, data[1] = %d",
 						data[0], data[1]);
@@ -1438,20 +1438,20 @@ static void mceusb_gen1_init(struct mceu
 	/* set feature: bit rate 38400 bps */
 	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
 			      USB_REQ_SET_FEATURE, USB_TYPE_VENDOR,
-			      0xc04e, 0x0000, NULL, 0, HZ * 3);
+			      0xc04e, 0x0000, NULL, 0, 3000);
 
 	dev_dbg(dev, "set feature - ret = %d", ret);
 
 	/* bRequest 4: set char length to 8 bits */
 	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
 			      4, USB_TYPE_VENDOR,
-			      0x0808, 0x0000, NULL, 0, HZ * 3);
+			      0x0808, 0x0000, NULL, 0, 3000);
 	dev_dbg(dev, "set char length - retB = %d", ret);
 
 	/* bRequest 2: set handshaking to use DTR/DSR */
 	ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0),
 			      2, USB_TYPE_VENDOR,
-			      0x0000, 0x0100, NULL, 0, HZ * 3);
+			      0x0000, 0x0100, NULL, 0, 3000);
 	dev_dbg(dev, "set handshake  - retC = %d", ret);
 
 	/* device resume */
author maintainer
#20 lore raw

PATCH 20/1039 mtd: rawnand: davinci: Rewrite function description

In reply to Greg Kroah-Hartman

From: Paul Cercueil <[email protected]>

commit 0697f8441faad552fbeb02d74454b5e7bcc956a2 upstream.

The original comment that describes the function nand_davinci_read_page_hwecc_oob_first() is very obscure and it is hard to understand what it is for.

Cc <[email protected]> # v5.2
Fixes a0ac778eb82c ("mtd: rawnand: ingenic: Add support for the JZ4740")
---
 drivers/mtd/nand/raw/davinci_nand.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/mtd/nand/raw/davinci_nand.c +4 -6
@@ -372,17 +372,15 @@ correct:
 }
 
 /**
- * nand_read_page_hwecc_oob_first - hw ecc, read oob first
+ * nand_davinci_read_page_hwecc_oob_first - Hardware ECC page read with ECC
+ *                                          data read from OOB area
  * @chip: nand chip info structure
  * @buf: buffer to store read data
  * @oob_required: caller requires OOB data read to chip->oob_poi
  * @page: page number to read
  *
- * Hardware ECC for large page chips, require OOB to be read first. For this
- * ECC mode, the write_page method is re-used from ECC_HW. These methods
- * read/write ECC from the OOB area, unlike the ECC_HW_SYNDROME support with
- * multiple ECC steps, follows the "infix ECC" scheme and reads/writes ECC from
- * the data area, by overwriting the NAND manufacturer bad block markings.
+ * Hardware ECC for large page chips, which requires the ECC data to be
+ * extracted from the OOB before the actual data is read.
  */
 static int nand_davinci_read_page_hwecc_oob_first(struct nand_chip *chip,
 						  uint8_t *buf,
author maintainer
#58 lore raw

PATCH 58/1039 iio: trigger: Fix a scheduling whilst atomic issue seen on tsc2046

In reply to Greg Kroah-Hartman

From: Jonathan Cameron <[email protected]>

commit 9020ef659885f2622cfb386cc229b6d618362895 upstream.

IIO triggers are software IRQ chips that split an incoming IRQ into separate IRQs routed to all devices using the trigger. When all consumers are done then a trigger callback reenable() is called. There are a few circumstances under which this can happen in atomic context.

1) A single user of the trigger that calls the iio_trigger_done() function from interrupt context.
2) A race between disconnecting the last device from a trigger and the trigger itself sucessfully being disabled.

To avoid a resulting scheduling whilst atomic, close this second corner by using schedule_work() to ensure the reenable is not done in atomic context.

Note that drivers must be careful to manage the interaction of set_state() and reenable() callbacks to ensure appropriate reference counting if they are relying on the same hardware controls.

Deliberately taking this the slow path rather than via a fixes tree because the error has hard to hit and I would like it to soak for a while before hitting a release kernel.

---
 drivers/iio/industrialio-trigger.c |   36 +++++++++++++++++++++++++++++++++++-
 include/linux/iio/trigger.h        |    2 ++
 2 files changed, 37 insertions(+), 1 deletion(-)
drivers/iio/industrialio-trigger.c +35 -1
@@ -162,6 +162,39 @@ static struct iio_trigger *iio_trigger_a
 	return trig;
 }
 
+static void iio_reenable_work_fn(struct work_struct *work)
+{
+	struct iio_trigger *trig = container_of(work, struct iio_trigger,
+						reenable_work);
+
+	/*
+	 * This 'might' occur after the trigger state is set to disabled -
+	 * in that case the driver should skip reenabling.
+	 */
+	trig->ops->reenable(trig);
+}
+
+/*
+ * In general, reenable callbacks may need to sleep and this path is
+ * not performance sensitive, so just queue up a work item
+ * to reneable the trigger for us.
+ *
+ * Races that can cause this.
+ * 1) A handler occurs entirely in interrupt context so the counter
+ *    the final decrement is still in this interrupt.
+ * 2) The trigger has been removed, but one last interrupt gets through.
+ *
+ * For (1) we must call reenable, but not in atomic context.
+ * For (2) it should be safe to call reenanble, if drivers never blindly
+ * reenable after state is off.
+ */
+static void iio_trigger_notify_done_atomic(struct iio_trigger *trig)
+{
+	if (atomic_dec_and_test(&trig->use_count) && trig->ops &&
+	    trig->ops->reenable)
+		schedule_work(&trig->reenable_work);
+}
+
 void iio_trigger_poll(struct iio_trigger *trig)
 {
 	int i;
@@ -173,7 +206,7 @@ void iio_trigger_poll(struct iio_trigger
 			if (trig->subirqs[i].enabled)
 				generic_handle_irq(trig->subirq_base + i);
 			else
-				iio_trigger_notify_done(trig);
+				iio_trigger_notify_done_atomic(trig);
 		}
 	}
 }
@@ -535,6 +568,7 @@ struct iio_trigger *viio_trigger_alloc(s
 	trig->dev.type = &iio_trig_type;
 	trig->dev.bus = &iio_bus_type;
 	device_initialize(&trig->dev);
+	INIT_WORK(&trig->reenable_work, iio_reenable_work_fn);
 
 	mutex_init(&trig->pool_lock);
 	trig->subirq_base = irq_alloc_descs(-1, 0,
include/linux/iio/trigger.h +2 -0
@@ -55,6 +55,7 @@ struct iio_trigger_ops {
  * @attached_own_device:[INTERN] if we are using our own device as trigger,
  *			i.e. if we registered a poll function to the same
  *			device as the one providing the trigger.
+ * @reenable_work:	[INTERN] work item used to ensure reenable can sleep.
  **/
 struct iio_trigger {
 	const struct iio_trigger_ops	*ops;
@@ -74,6 +75,7 @@ struct iio_trigger {
 	unsigned long pool[BITS_TO_LONGS(CONFIG_IIO_CONSUMERS_PER_TRIGGER)];
 	struct mutex			pool_lock;
 	bool				attached_own_device;
+	struct work_struct		reenable_work;
 };
 
 
author maintainer
#8 lore raw

PATCH 8/1039 ALSA: core: Fix SSID quirk lookup for subvendor=0

In reply to Greg Kroah-Hartman

From: Takashi Iwai <[email protected]>

commit 5576c4f24c56722a2d9fb9c447d896e5b312078b upstream.

Some weird devices set the codec SSID vendor ID 0, and snd_pci_quirk_lookup_id() loop aborts at the point although it should still try matching with the SSID device ID. This resulted in a missing quirk for some old Macs.

Fix the loop termination condition to check both subvendor and subdevice.

---
 sound/core/misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/misc.c +1 -1
@@ -112,7 +112,7 @@ snd_pci_quirk_lookup_id(u16 vendor, u16
 {
 	const struct snd_pci_quirk *q;
 
-	for (q = list; q->subvendor; q++) {
+	for (q = list; q->subvendor || q->subdevice; q++) {
 		if (q->subvendor != vendor)
 			continue;
 		if (!q->subdevice ||
author maintainer
#7 lore raw

PATCH 7/1039 HID: wacom: Avoid using stale array indicies to read contact count

In reply to Greg Kroah-Hartman

From: Jason Gerecke <[email protected]>

commit 20f3cf5f860f9f267a6a6e5642d3d0525edb1814 upstream.

If we ever see a touch report with contact count data we initialize several variables used to read the contact count in the pre-report phase. These variables are never reset if we process a report which doesn't contain a contact count, however. This can cause the pre- report function to trigger a read of arbitrary memory (e.g. NULL if we're lucky) and potentially crash the driver.

This commit restores resetting of the variables back to default "none" values that were used prior to the commit mentioned below.

Fixes 003f50ab673c (HID: wacom: Update last_slot_field during pre_report phase)
---
 drivers/hid/wacom_wac.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/hid/wacom_wac.c +4 -0
@@ -2682,6 +2682,10 @@ static void wacom_wac_finger_pre_report(
 
 	hid_data->confidence = true;
 
+	hid_data->cc_report = 0;
+	hid_data->cc_index = -1;
+	hid_data->cc_value_index = -1;
+
 	for (i = 0; i < report->maxfield; i++) {
 		struct hid_field *field = report->field[i];
 		int j;
author maintainer
#29 lore raw

PATCH 29/1039 x86/gpu: Reserve stolen memory for first integrated Intel GPU

In reply to Greg Kroah-Hartman

From: Lucas De Marchi <[email protected]>

commit 9c494ca4d3a535f9ca11ad6af1813983c1c6cbdd upstream.

"Stolen memory" is memory set aside for use by an Intel integrated GPU. The intel_graphics_quirks() early quirk reserves this memory when it is called for a GPU that appears in the intel_early_ids[] table of integrated GPUs.

Previously intel_graphics_quirks() was marked as QFLAG_APPLY_ONCE, so it was called only for the first Intel GPU found. If a discrete GPU happened to be enumerated first, intel_graphics_quirks() was called for it but not for any integrated GPU found later. Therefore, stolen memory for such an integrated GPU was never reserved.

For example, this problem occurs in this Alderlake-P (integrated) + DG2 (discrete) topology where the DG2 is found first, but stolen memory is associated with the integrated GPU:

- 00:01.0 Bridge

    `- 03:00.0 DG2 discrete GPU

- 00:02.0 Integrated GPU (with stolen memory)

Remove the QFLAG_APPLY_ONCE flag and call intel_graphics_quirks() for every Intel GPU. Reserve stolen memory for the first GPU that appears in intel_early_ids[].

[bhelgaas: commit log, add code comment, squash in
https://lore.kernel.org/r/20220118190558.2ququ4vdfjuahicm@ldmartin-desk2]

---
 arch/x86/kernel/early-quirks.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
arch/x86/kernel/early-quirks.c +9 -1
@@ -515,6 +515,7 @@ static const struct intel_early_ops gen1
 	.stolen_size = gen9_stolen_size,
 };
 
+/* Intel integrated GPUs for which we need to reserve "stolen memory" */
 static const struct pci_device_id intel_early_ids[] __initconst = {
 	INTEL_I830_IDS(&i830_early_ops),
 	INTEL_I845G_IDS(&i845_early_ops),
@@ -591,6 +592,13 @@ static void __init intel_graphics_quirks
 	u16 device;
 	int i;
 
+	/*
+	 * Reserve "stolen memory" for an integrated GPU.  If we've already
+	 * found one, there's nothing to do for other (discrete) GPUs.
+	 */
+	if (resource_size(&intel_graphics_stolen_res))
+		return;
+
 	device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
 
 	for (i = 0; i < ARRAY_SIZE(intel_early_ids); i++) {
@@ -703,7 +711,7 @@ static struct chipset early_qrk[] __init
 	{ PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST,
 	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
 	{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA, PCI_ANY_ID,
-	  QFLAG_APPLY_ONCE, intel_graphics_quirks },
+	  0, intel_graphics_quirks },
 	/*
 	 * HPET on the current version of the Baytrail platform has accuracy
 	 * problems: it will halt in deep idle state - so we disable it.
author maintainer
#4 lore raw

PATCH 4/1039 HID: uhid: Fix worker destroying device without any protection

In reply to Greg Kroah-Hartman

From: Jann Horn <[email protected]>

commit 4ea5763fb79ed89b3bdad455ebf3f33416a81624 upstream.

uhid has to run hid_add_device() from workqueue context while allowing parallel use of the userspace API (which is protected with ->devlock). But hid_add_device() can fail. Currently, that is handled by immediately destroying the associated HID device, without using ->devlock - but if there are concurrent requests from userspace, that's wrong and leads to NULL dereferences and/or memory corruption (via use-after-free).

Fix it by leaving the HID device as-is in the worker. We can clean it up later, either in the UHID_DESTROY command handler or in the ->release() handler.

Fixes 67f8ecc550b5 ("HID: uhid: fix timeout when probe races with IO")
---
 drivers/hid/uhid.c |   29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)
drivers/hid/uhid.c +25 -4
@@ -28,11 +28,22 @@
 
 struct uhid_device {
 	struct mutex devlock;
+
+	/* This flag tracks whether the HID device is usable for commands from
+	 * userspace. The flag is already set before hid_add_device(), which
+	 * runs in workqueue context, to allow hid_add_device() to communicate
+	 * with userspace.
+	 * However, if hid_add_device() fails, the flag is cleared without
+	 * holding devlock.
+	 * We guarantee that if @running changes from true to false while you're
+	 * holding @devlock, it's still fine to access @hid.
+	 */
 	bool running;
 
 	__u8 *rd_data;
 	uint rd_size;
 
+	/* When this is NULL, userspace may use UHID_CREATE/UHID_CREATE2. */
 	struct hid_device *hid;
 	struct uhid_event input_buf;
 
@@ -63,9 +74,18 @@ static void uhid_device_add_worker(struc
 	if (ret) {
 		hid_err(uhid->hid, "Cannot register HID device: error %d\n", ret);
 
-		hid_destroy_device(uhid->hid);
-		uhid->hid = NULL;
+		/* We used to call hid_destroy_device() here, but that's really
+		 * messy to get right because we have to coordinate with
+		 * concurrent writes from userspace that might be in the middle
+		 * of using uhid->hid.
+		 * Just leave uhid->hid as-is for now, and clean it up when
+		 * userspace tries to close or reinitialize the uhid instance.
+		 *
+		 * However, we do have to clear the ->running flag and do a
+		 * wakeup to make sure userspace knows that the device is gone.
+		 */
 		uhid->running = false;
+		wake_up_interruptible(&uhid->report_wait);
 	}
 }
 
@@ -474,7 +494,7 @@ static int uhid_dev_create2(struct uhid_
 	void *rd_data;
 	int ret;
 
-	if (uhid->running)
+	if (uhid->hid)
 		return -EALREADY;
 
 	rd_size = ev->u.create2.rd_size;
@@ -556,7 +576,7 @@ static int uhid_dev_create(struct uhid_d
 
 static int uhid_dev_destroy(struct uhid_device *uhid)
 {
-	if (!uhid->running)
+	if (!uhid->hid)
 		return -EINVAL;
 
 	uhid->running = false;
@@ -565,6 +585,7 @@ static int uhid_dev_destroy(struct uhid_
 	cancel_work_sync(&uhid->worker);
 
 	hid_destroy_device(uhid->hid);
+	uhid->hid = NULL;
 	kfree(uhid->rd_data);
 
 	return 0;
author maintainer
#40 lore raw

PATCH 40/1039 ksmbd: limits exceeding the maximum allowable outstanding requests

In reply to Greg Kroah-Hartman

From: Namjae Jeon <[email protected]>

commit b589f5db6d4af8f14d70e31e1276b4c017668a26 upstream.

If the client ignores the CreditResponse received from the server and continues to send the request, ksmbd limits the requests if it exceeds smb2 max credits.

---
 fs/ksmbd/connection.c |    1 +
 fs/ksmbd/connection.h |    3 ++-
 fs/ksmbd/smb2misc.c   |    9 +++++++++
 fs/ksmbd/smb2pdu.c    |    1 +
 4 files changed, 13 insertions(+), 1 deletion(-)
fs/ksmbd/connection.c +1 -0
@@ -62,6 +62,7 @@ struct ksmbd_conn *ksmbd_conn_alloc(void
 	atomic_set(&conn->req_running, 0);
 	atomic_set(&conn->r_count, 0);
 	conn->total_credits = 1;
+	conn->outstanding_credits = 1;
 
 	init_waitqueue_head(&conn->req_running_q);
 	INIT_LIST_HEAD(&conn->conns_list);
fs/ksmbd/connection.h +2 -1
@@ -61,7 +61,8 @@ struct ksmbd_conn {
 	atomic_t			req_running;
 	/* References which are made for this Server object*/
 	atomic_t			r_count;
-	unsigned short			total_credits;
+	unsigned int			total_credits;
+	unsigned int			outstanding_credits;
 	spinlock_t			credits_lock;
 	wait_queue_head_t		req_running_q;
 	/* Lock to protect requests list*/
fs/ksmbd/smb2misc.c +9 -0
@@ -337,7 +337,16 @@ static int smb2_validate_credit_charge(s
 			    credit_charge, conn->total_credits);
 		ret = 1;
 	}
+
+	if ((u64)conn->outstanding_credits + credit_charge > conn->vals->max_credits) {
+		ksmbd_debug(SMB, "Limits exceeding the maximum allowable outstanding requests, given : %u, pending : %u\n",
+			    credit_charge, conn->outstanding_credits);
+		ret = 1;
+	} else
+		conn->outstanding_credits += credit_charge;
+
 	spin_unlock(&conn->credits_lock);
+
 	return ret;
 }
 
fs/ksmbd/smb2pdu.c +1 -0
@@ -322,6 +322,7 @@ int smb2_set_rsp_credits(struct ksmbd_wo
 	}
 
 	conn->total_credits -= credit_charge;
+	conn->outstanding_credits -= credit_charge;
 	credits_requested = max_t(unsigned short,
 				  le16_to_cpu(req_hdr->CreditRequest), 1);
 
author maintainer
#45 lore raw

PATCH 45/1039 media: flexcop-usb: fix control-message timeouts

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit cd1798a387825cc4a51282f5a611ad05bb1ad75f upstream.

USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.

Note that the driver was multiplying some of the timeout values with HZ twice resulting in 3000-second timeouts with HZ=1000.

Also note that two of the timeout defines are currently unused.

Fixes 2154be651b90 ("[media] redrat3: new rc-core IR transceiver device driver")
---
 drivers/media/usb/b2c2/flexcop-usb.c |   10 +++++-----
 drivers/media/usb/b2c2/flexcop-usb.h |   12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)
drivers/media/usb/b2c2/flexcop-usb.c +5 -5
@@ -87,7 +87,7 @@ static int flexcop_usb_readwrite_dw(stru
 			0,
 			fc_usb->data,
 			sizeof(u32),
-			B2C2_WAIT_FOR_OPERATION_RDW * HZ);
+			B2C2_WAIT_FOR_OPERATION_RDW);
 
 	if (ret != sizeof(u32)) {
 		err("error while %s dword from %d (%d).", read ? "reading" :
@@ -155,7 +155,7 @@ static int flexcop_usb_v8_memory_req(str
 			wIndex,
 			fc_usb->data,
 			buflen,
-			nWaitTime * HZ);
+			nWaitTime);
 	if (ret != buflen)
 		ret = -EIO;
 
@@ -248,13 +248,13 @@ static int flexcop_usb_i2c_req(struct fl
 		/* DKT 020208 - add this to support special case of DiSEqC */
 	case USB_FUNC_I2C_CHECKWRITE:
 		pipe = B2C2_USB_CTRL_PIPE_OUT;
-		nWaitTime = 2;
+		nWaitTime = 2000;
 		request_type |= USB_DIR_OUT;
 		break;
 	case USB_FUNC_I2C_READ:
 	case USB_FUNC_I2C_REPEATREAD:
 		pipe = B2C2_USB_CTRL_PIPE_IN;
-		nWaitTime = 2;
+		nWaitTime = 2000;
 		request_type |= USB_DIR_IN;
 		break;
 	default:
@@ -281,7 +281,7 @@ static int flexcop_usb_i2c_req(struct fl
 			wIndex,
 			fc_usb->data,
 			buflen,
-			nWaitTime * HZ);
+			nWaitTime);
 
 	if (ret != buflen)
 		ret = -EIO;
drivers/media/usb/b2c2/flexcop-usb.h +6 -6
@@ -91,13 +91,13 @@ typedef enum {
 	UTILITY_SRAM_TESTVERIFY     = 0x16,
 } flexcop_usb_utility_function_t;
 
-#define B2C2_WAIT_FOR_OPERATION_RW (1*HZ)
-#define B2C2_WAIT_FOR_OPERATION_RDW (3*HZ)
-#define B2C2_WAIT_FOR_OPERATION_WDW (1*HZ)
+#define B2C2_WAIT_FOR_OPERATION_RW 1000
+#define B2C2_WAIT_FOR_OPERATION_RDW 3000
+#define B2C2_WAIT_FOR_OPERATION_WDW 1000
 
-#define B2C2_WAIT_FOR_OPERATION_V8READ (3*HZ)
-#define B2C2_WAIT_FOR_OPERATION_V8WRITE (3*HZ)
-#define B2C2_WAIT_FOR_OPERATION_V8FLASH (3*HZ)
+#define B2C2_WAIT_FOR_OPERATION_V8READ 3000
+#define B2C2_WAIT_FOR_OPERATION_V8WRITE 3000
+#define B2C2_WAIT_FOR_OPERATION_V8FLASH 3000
 
 typedef enum {
 	V8_MEMORY_PAGE_DVB_CI = 0x20,
author maintainer
#67 lore raw

PATCH 67/1039 ARM: dts: at91: update alternate function of signal PD20

In reply to Greg Kroah-Hartman

From: Hari Prasath <[email protected]>

commit 12f332d2dd3187472f595b678246adb10d886bd0 upstream.

The alternate function of PD20 is 4 as per the datasheet of sama7g5 and not 5 as defined earlier.

Fixes 7540629e2fc7 ("ARM: dts: at91: add sama7g5 SoC DT and sama7g5-ek")
Cc <[email protected]> # v5.15+
---
 arch/arm/boot/dts/sama7g5-pinfunc.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sama7g5-pinfunc.h +1 -1
@@ -765,7 +765,7 @@
 #define PIN_PD20__PCK0			PINMUX_PIN(PIN_PD20, 1, 3)
 #define PIN_PD20__FLEXCOM2_IO3		PINMUX_PIN(PIN_PD20, 2, 2)
 #define PIN_PD20__PWMH3			PINMUX_PIN(PIN_PD20, 3, 4)
-#define PIN_PD20__CANTX4		PINMUX_PIN(PIN_PD20, 5, 2)
+#define PIN_PD20__CANTX4		PINMUX_PIN(PIN_PD20, 4, 2)
 #define PIN_PD20__FLEXCOM5_IO0		PINMUX_PIN(PIN_PD20, 6, 5)
 #define PIN_PD21			117
 #define PIN_PD21__GPIO			PINMUX_PIN(PIN_PD21, 0, 0)
author maintainer
#50 lore raw

PATCH 50/1039 media: dib0700: fix undefined behavior in tuner shutdown

In reply to Greg Kroah-Hartman

From: Michael Kuron <[email protected]>

commit f7b77ebe6d2f49c7747b2d619586d1aa33f9ea91 upstream.

This fixes a problem where closing the tuner would leave it in a state where it would not tune to any channel when reopened. This problem was discovered as part of https://github.com/hselasky/webcamd/issues/16.

Since adap->id is 0 or 1, this bit-shift overflows, which is undefined behavior. The driver still worked in practice as the overflow would in most environments result in 0, which rendered the line a no-op. When running the driver as part of webcamd however, the overflow could lead to 0xff due to optimizations by the compiler, which would, in the end, improperly shut down the tuner.

The bug is a regression introduced in the commit referenced below. The present patch causes identical behavior to before that commit for adap->id equal to 0 or 1. The driver does not contain support for dib0700 devices with more adapters, assuming such even exist.

Tests have been performed with the Xbox One Digital TV Tuner on amd64. Not all dib0700 devices are expected to be affected by the regression; this code path is only taken by those with incorrect endpoint numbers.

Fixes 7757ddda6f4f ("[media] DiB0700: add function to change I2C-speed")
---
 drivers/media/usb/dvb-usb/dib0700_core.c |    2 --
 1 file changed, 2 deletions(-)
drivers/media/usb/dvb-usb/dib0700_core.c +0 -2
@@ -618,8 +618,6 @@ int dib0700_streaming_ctrl(struct dvb_us
 		deb_info("the endpoint number (%i) is not correct, use the adapter id instead", adap->fe_adap[0].stream.props.endpoint);
 		if (onoff)
 			st->channel_state |=	1 << (adap->id);
-		else
-			st->channel_state |=	1 << ~(adap->id);
 	} else {
 		if (onoff)
 			st->channel_state |=	1 << (adap->fe_adap[0].stream.props.endpoint-2);
author maintainer
#64 lore raw

PATCH 64/1039 cxl/pmem: Fix module reload vs workqueue state

In reply to Greg Kroah-Hartman

From: Dan Williams <[email protected]>

commit 53989fad1286e652ea3655ae3367ba698da8d2ff upstream.

A test of the form:

while true; do modprobe -r cxl_pmem; modprobe cxl_pmem; done

May lead to a crash signature of the form:

    BUG: unable to handle page fault for address: ffffffffc0660030
    #PF: supervisor instruction fetch in kernel mode
    #PF: error_code(0x0010) - not-present page
    [..]
    Workqueue: cxl_pmem 0xffffffffc0660030
    RIP: 0010:0xffffffffc0660030
    Code: Unable to access opcode bytes at RIP 0xffffffffc0660006.
    [..]
    Call Trace:
     ? process_one_work+0x4ec/0x9c0
     ? pwq_dec_nr_in_flight+0x100/0x100
     ? rwlock_bug.part.0+0x60/0x60
     ? worker_thread+0x2eb/0x700

In that report the 0xffffffffc0660030 address corresponds to the former function address of cxl_nvb_update_state() from a previous load of the module, not the current address. Fix that by arranging for ->state_work in the 'struct cxl_nvdimm_bridge' object to be reinitialized on cxl_pmem module reload.

Details:

Recall that CXL subsystem wants to link a CXL memory expander device to an NVDIMM sub-hierarchy when both a persistent memory range has been registered by the CXL platform driver (cxl_acpi) *and* when that CXL memory expander has published persistent memory capacity (Get Partition Info). To this end the cxl_nvdimm_bridge driver arranges to rescan the CXL bus when either of those conditions change. The helper bus_rescan_devices() can not be called underneath the device_lock() for any device on that bus, so the cxl_nvdimm_bridge driver uses a workqueue for the rescan.

Typically a driver allocates driver data to hold a 'struct work_struct' for a driven device, but for a workqueue that may run after ->remove() returns, driver data will have been freed. The 'struct cxl_nvdimm_bridge' object holds the state and work_struct directly. Unfortunately it was only arranging for that infrastructure to be initialized once per device creation rather than the necessary once per workqueue (cxl_pmem_wq) creation.

Introduce is_cxl_nvdimm_bridge() and cxl_nvdimm_bridge_reset() in support of invalidating stale references to a recently destroyed cxl_pmem_wq.

---
 drivers/cxl/core/pmem.c |    8 +++++++-
 drivers/cxl/cxl.h       |    8 ++++++++
 drivers/cxl/pmem.c      |   29 +++++++++++++++++++++++++++--
 3 files changed, 42 insertions(+), 3 deletions(-)
drivers/cxl/core/pmem.c +7 -1
@@ -51,10 +51,16 @@ struct cxl_nvdimm_bridge *to_cxl_nvdimm_
 }
 EXPORT_SYMBOL_GPL(to_cxl_nvdimm_bridge);
 
-__mock int match_nvdimm_bridge(struct device *dev, const void *data)
+bool is_cxl_nvdimm_bridge(struct device *dev)
 {
 	return dev->type == &cxl_nvdimm_bridge_type;
 }
+EXPORT_SYMBOL_NS_GPL(is_cxl_nvdimm_bridge, CXL);
+
+__mock int match_nvdimm_bridge(struct device *dev, const void *data)
+{
+	return is_cxl_nvdimm_bridge(dev);
+}
 
 struct cxl_nvdimm_bridge *cxl_find_nvdimm_bridge(struct cxl_nvdimm *cxl_nvd)
 {
drivers/cxl/cxl.h +8 -0
@@ -196,6 +196,13 @@ struct cxl_decoder {
 };
 
 
+/**
+ * enum cxl_nvdimm_brige_state - state machine for managing bus rescans
+ * @CXL_NVB_NEW: Set at bridge create and after cxl_pmem_wq is destroyed
+ * @CXL_NVB_DEAD: Set at brige unregistration to preclude async probing
+ * @CXL_NVB_ONLINE: Target state after successful ->probe()
+ * @CXL_NVB_OFFLINE: Target state after ->remove() or failed ->probe()
+ */
 enum cxl_nvdimm_brige_state {
 	CXL_NVB_NEW,
 	CXL_NVB_DEAD,
@@ -308,6 +315,7 @@ struct cxl_nvdimm_bridge *devm_cxl_add_n
 						     struct cxl_port *port);
 struct cxl_nvdimm *to_cxl_nvdimm(struct device *dev);
 bool is_cxl_nvdimm(struct device *dev);
+bool is_cxl_nvdimm_bridge(struct device *dev);
 int devm_cxl_add_nvdimm(struct device *host, struct cxl_memdev *cxlmd);
 struct cxl_nvdimm_bridge *cxl_find_nvdimm_bridge(struct cxl_nvdimm *cxl_nvd);
 
drivers/cxl/pmem.c +27 -2
@@ -316,6 +316,31 @@ static struct cxl_driver cxl_nvdimm_brid
 	.id = CXL_DEVICE_NVDIMM_BRIDGE,
 };
 
+/*
+ * Return all bridges to the CXL_NVB_NEW state to invalidate any
+ * ->state_work referring to the now destroyed cxl_pmem_wq.
+ */
+static int cxl_nvdimm_bridge_reset(struct device *dev, void *data)
+{
+	struct cxl_nvdimm_bridge *cxl_nvb;
+
+	if (!is_cxl_nvdimm_bridge(dev))
+		return 0;
+
+	cxl_nvb = to_cxl_nvdimm_bridge(dev);
+	device_lock(dev);
+	cxl_nvb->state = CXL_NVB_NEW;
+	device_unlock(dev);
+
+	return 0;
+}
+
+static void destroy_cxl_pmem_wq(void)
+{
+	destroy_workqueue(cxl_pmem_wq);
+	bus_for_each_dev(&cxl_bus_type, NULL, NULL, cxl_nvdimm_bridge_reset);
+}
+
 static __init int cxl_pmem_init(void)
 {
 	int rc;
@@ -341,7 +366,7 @@ static __init int cxl_pmem_init(void)
 err_nvdimm:
 	cxl_driver_unregister(&cxl_nvdimm_bridge_driver);
 err_bridge:
-	destroy_workqueue(cxl_pmem_wq);
+	destroy_cxl_pmem_wq();
 	return rc;
 }
 
@@ -349,7 +374,7 @@ static __exit void cxl_pmem_exit(void)
 {
 	cxl_driver_unregister(&cxl_nvdimm_driver);
 	cxl_driver_unregister(&cxl_nvdimm_bridge_driver);
-	destroy_workqueue(cxl_pmem_wq);
+	destroy_cxl_pmem_wq();
 }
 
 MODULE_LICENSE("GPL v2");
author maintainer
#70 lore raw

PATCH 70/1039 drm/tegra: Add back arm_iommu_detach_device()

In reply to Greg Kroah-Hartman

From: Dmitry Osipenko <[email protected]>

commit d210919dbdc8a82c676cc3e3c370b1802be63124 upstream.

DMA buffers of 2D/3D engines aren't mapped properly when CONFIG_ARM_DMA_USE_IOMMU=y. The memory management code of Tegra DRM driver has a longstanding overhaul overdue and it's not obvious where the problem is in this case. Hence let's add back the old workaround which we already had sometime before. It explicitly detaches DRM devices from the offending implicit IOMMU domain. This fixes a completely broken 2d/3d drivers in case of ARM32 multiplatform kernel config.

Fixes fa6661b7aa0b ("drm/tegra: Optionally attach clients to the IOMMU")
---
 drivers/gpu/drm/tegra/drm.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/gpu/drm/tegra/drm.c +15 -0
@@ -21,6 +21,10 @@
 #include <drm/drm_prime.h>
 #include <drm/drm_vblank.h>
 
+#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
+#include <asm/dma-iommu.h>
+#endif
+
 #include "dc.h"
 #include "drm.h"
 #include "gem.h"
@@ -936,6 +940,17 @@ int host1x_client_iommu_attach(struct ho
 	struct iommu_group *group = NULL;
 	int err;
 
+#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
+	if (client->dev->archdata.mapping) {
+		struct dma_iommu_mapping *mapping =
+				to_dma_iommu_mapping(client->dev);
+		arm_iommu_detach_device(client->dev);
+		arm_iommu_release_mapping(mapping);
+
+		domain = iommu_get_domain_for_dev(client->dev);
+	}
+#endif
+
 	/*
 	 * If the host1x client is already attached to an IOMMU domain that is
 	 * not the shared IOMMU domain, don't try to attach it to a different
author maintainer
#75 lore raw

PATCH 75/1039 mm_zone: add function to check if managed dma zone exists

In reply to Greg Kroah-Hartman

From: Baoquan He <[email protected]>

commit 62b3107073646e0946bd97ff926832bafb846d17 upstream.

Patch series "Handle warning of allocation failure on DMA zone w/o managed pages", v4.

**Problem observed:
On x86_64, when crash is triggered and entering into kdump kernel, page allocation failure can always be seen.

---------------------------------
DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
swapper/0: page allocation failure: order:5, mode:0xcc1(GFP_KERNEL|GFP_DMA), nodemask=(null),cpuset=/,mems_allowed=0

 CPU: 0 PID: 1 Comm: swapper/0
 Call Trace:
  dump_stack+0x7f/0xa1
  warn_alloc.cold+0x72/0xd6
  ......
  __alloc_pages+0x24d/0x2c0
  ......
  dma_atomic_pool_init+0xdb/0x176
  do_one_initcall+0x67/0x320
  ? rcu_read_lock_sched_held+0x3f/0x80
  kernel_init_freeable+0x290/0x2dc
  ? rest_init+0x24f/0x24f
  kernel_init+0xa/0x111
  ret_from_fork+0x22/0x30
 Mem-Info:
 ------------------------------------

***Root cause:
In the current kernel, it assumes that DMA zone must have managed pages and try to request pages if CONFIG_ZONE_DMA is enabled. While this is not always true. E.g in kdump kernel of x86_64, only low 1M is presented and locked down at very early stage of boot, so that this low 1M won't be added into buddy allocator to become managed pages of DMA zone. This exception will always cause page allocation failure if page is requested from DMA zone.

***Investigation:
This failure happens since below commit merged into linus's tree.
1a6a9044b967 x86/setup: Remove CONFIG_X86_RESERVE_LOW and reservelow= options 23721c8e92f7 x86/crash: Remove crash_reserve_low_1M()
f1d4d47c5851 x86/setup: Always reserve the first 1M of RAM
7c321eb2b843 x86/kdump: Remove the backup region handling
6f599d84231f x86/kdump: Always reserve the low 1M when the crashkernel option is specified

Before them, on x86_64, the low 640K area will be reused by kdump kernel. So in kdump kernel, the content of low 640K area is copied into a backup region for dumping before jumping into kdump. Then except of those firmware reserved region in [0, 640K], the left area will be added into buddy allocator to become available managed pages of DMA zone.

However, after above commits applied, in kdump kernel of x86_64, the low 1M is reserved by memblock, but not released to buddy allocator. So any later page allocation requested from DMA zone will fail.

At the beginning, if crashkernel is reserved, the low 1M need be locked down because AMD SME encrypts memory making the old backup region mechanims impossible when switching into kdump kernel.

Later, it was also observed that there are BIOSes corrupting memory under 1M. To solve this, in commit f1d4d47c5851, the entire region of low 1M is always reserved after the real mode trampoline is allocated.

Besides, recently, Intel engineer mentioned their TDX (Trusted domain extensions) which is under development in kernel also needs to lock down the low 1M. So we can't simply revert above commits to fix the page allocation failure from DMA zone as someone suggested.

***Solution:
Currently, only DMA atomic pool and dma-kmalloc will initialize and request page allocation with GFP_DMA during bootup.

So only initializ DMA atomic pool when DMA zone has available managed pages, otherwise just skip the initialization.

For dma-kmalloc(), for the time being, let's mute the warning of allocation failure if requesting pages from DMA zone while no manged pages. Meanwhile, change code to use dma_alloc_xx/dma_map_xx API to replace kmalloc(GFP_DMA), or do not use GFP_DMA when calling kmalloc() if not necessary. Christoph is posting patches to fix those under drivers/scsi/. Finally, we can remove the need of dma-kmalloc() as people suggested.

This patch (of 3):

In some places of the current kernel, it assumes that dma zone must have managed pages if CONFIG_ZONE_DMA is enabled. While this is not always true. E.g in kdump kernel of x86_64, only low 1M is presented and locked down at very early stage of boot, so that there's no managed pages at all in DMA zone. This exception will always cause page allocation failure if page is requested from DMA zone.

Here add function has_managed_dma() and the relevant helper functions to check if there's DMA zone with managed pages. It will be used in later patches.

Fixes 6f599d84231f ("x86/kdump: Always reserve the low 1M when the crashkernel option is specified")
Cc Christoph Hellwig <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Hyeonggon Yoo <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc David Rientjes <[email protected]>
Cc Joonsoo Kim <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc David Laight <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc Robin Murphy <[email protected]>
---
 include/linux/mmzone.h |    9 +++++++++
 mm/page_alloc.c        |   15 +++++++++++++++
 2 files changed, 24 insertions(+)
include/linux/mmzone.h +9 -0
@@ -1047,6 +1047,15 @@ static inline int is_highmem_idx(enum zo
 #endif
 }
 
+#ifdef CONFIG_ZONE_DMA
+bool has_managed_dma(void);
+#else
+static inline bool has_managed_dma(void)
+{
+	return false;
+}
+#endif
+
 /**
  * is_highmem - helper function to quickly check if a struct zone is a
  *              highmem zone or not.  This is an attempt to keep references
mm/page_alloc.c +15 -0
@@ -9460,3 +9460,18 @@ bool take_page_off_buddy(struct page *pa
 	return ret;
 }
 #endif
+
+#ifdef CONFIG_ZONE_DMA
+bool has_managed_dma(void)
+{
+	struct pglist_data *pgdat;
+
+	for_each_online_pgdat(pgdat) {
+		struct zone *zone = &pgdat->node_zones[ZONE_DMA];
+
+		if (managed_zone(zone))
+			return true;
+	}
+	return false;
+}
+#endif /* CONFIG_ZONE_DMA */
author maintainer
#72 lore raw

PATCH 72/1039 virtio/virtio_mem: handle a possible NULL as a memcpy parameter

In reply to Greg Kroah-Hartman

From: Peng Hao <[email protected]>

commit cf4a4493ff70874f8af26d75d4346c591c298e89 upstream.

There is a check for vm->sbm.sb_states before, and it should check it here as well.

Fixes 5f1f79bbc9e2 ("virtio-mem: Paravirtualized memory hotplug")
---
 drivers/virtio/virtio_mem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/virtio_mem.c +1 -1
@@ -592,7 +592,7 @@ static int virtio_mem_sbm_sb_states_prep
 		return -ENOMEM;
 
 	mutex_lock(&vm->hotplug_mutex);
-	if (new_bitmap)
+	if (vm->sbm.sb_states)
 		memcpy(new_bitmap, vm->sbm.sb_states, old_pages * PAGE_SIZE);
 
 	old_bitmap = vm->sbm.sb_states;
author maintainer
#63 lore raw

PATCH 63/1039 cxl/pmem: Fix reference counting for delayed work

In reply to Greg Kroah-Hartman

From: Dan Williams <[email protected]>

commit 08b9e0ab8af48895337192e683de44ab1e1b7427 upstream.

There is a potential race between queue_work() returning and the queued-work running that could result in put_device() running before get_device(). Introduce the cxl_nvdimm_bridge_state_work() helper that takes the reference unconditionally, but drops it if no new work was queued, to keep the references balanced.

---
 drivers/cxl/pmem.c |   17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
drivers/cxl/pmem.c +13 -4
@@ -266,14 +266,24 @@ static void cxl_nvb_update_state(struct
 	put_device(&cxl_nvb->dev);
 }
 
+static void cxl_nvdimm_bridge_state_work(struct cxl_nvdimm_bridge *cxl_nvb)
+{
+	/*
+	 * Take a reference that the workqueue will drop if new work
+	 * gets queued.
+	 */
+	get_device(&cxl_nvb->dev);
+	if (!queue_work(cxl_pmem_wq, &cxl_nvb->state_work))
+		put_device(&cxl_nvb->dev);
+}
+
 static void cxl_nvdimm_bridge_remove(struct device *dev)
 {
 	struct cxl_nvdimm_bridge *cxl_nvb = to_cxl_nvdimm_bridge(dev);
 
 	if (cxl_nvb->state == CXL_NVB_ONLINE)
 		cxl_nvb->state = CXL_NVB_OFFLINE;
-	if (queue_work(cxl_pmem_wq, &cxl_nvb->state_work))
-		get_device(&cxl_nvb->dev);
+	cxl_nvdimm_bridge_state_work(cxl_nvb);
 }
 
 static int cxl_nvdimm_bridge_probe(struct device *dev)
@@ -294,8 +304,7 @@ static int cxl_nvdimm_bridge_probe(struc
 	}
 
 	cxl_nvb->state = CXL_NVB_ONLINE;
-	if (queue_work(cxl_pmem_wq, &cxl_nvb->state_work))
-		get_device(&cxl_nvb->dev);
+	cxl_nvdimm_bridge_state_work(cxl_nvb);
 
 	return 0;
 }
author maintainer
#62 lore raw

PATCH 62/1039 bus: mhi: core: Fix race while handling SYS_ERR at power up

In reply to Greg Kroah-Hartman

From: Manivannan Sadhasivam <[email protected]>

commit d651ce8e917fa1bf6cfab8dca74c512edffc35d3 upstream.

During SYS_ERR condition, as a response to the MHI_RESET from host, some devices tend to issue BHI interrupt without clearing the SYS_ERR state in the device. This creates a race condition and causes a failure in booting up the device.

The issue is seen on the Sierra Wireless EM9191 modem during SYS_ERR handling in mhi_async_power_up(). Once the host detects that the device is in SYS_ERR state, it issues MHI_RESET and waits for the device to process the reset request. During this time, the device triggers the BHI interrupt to the host without clearing SYS_ERR condition. So the host starts handling the SYS_ERR condition again.

To fix this issue, let's register the IRQ handler only after handling the SYS_ERR check to avoid getting spurious IRQs from the device.

---
 drivers/bus/mhi/core/pm.c |   35 ++++++++++++-----------------------
 1 file changed, 12 insertions(+), 23 deletions(-)
drivers/bus/mhi/core/pm.c +12 -23
@@ -1053,7 +1053,7 @@ int mhi_async_power_up(struct mhi_contro
 	enum mhi_ee_type current_ee;
 	enum dev_st_transition next_state;
 	struct device *dev = &mhi_cntrl->mhi_dev->dev;
-	u32 val;
+	u32 interval_us = 25000; /* poll register field every 25 milliseconds */
 	int ret;
 
 	dev_info(dev, "Requested to power ON\n");
@@ -1070,10 +1070,6 @@ int mhi_async_power_up(struct mhi_contro
 	mutex_lock(&mhi_cntrl->pm_mutex);
 	mhi_cntrl->pm_state = MHI_PM_DISABLE;
 
-	ret = mhi_init_irq_setup(mhi_cntrl);
-	if (ret)
-		goto error_setup_irq;
-
 	/* Setup BHI INTVEC */
 	write_lock_irq(&mhi_cntrl->pm_lock);
 	mhi_write_reg(mhi_cntrl, mhi_cntrl->bhi, BHI_INTVEC, 0);
@@ -1087,7 +1083,7 @@ int mhi_async_power_up(struct mhi_contro
 		dev_err(dev, "%s is not a valid EE for power on\n",
 			TO_MHI_EXEC_STR(current_ee));
 		ret = -EIO;
-		goto error_async_power_up;
+		goto error_exit;
 	}
 
 	state = mhi_get_mhi_state(mhi_cntrl);
@@ -1096,20 +1092,12 @@ int mhi_async_power_up(struct mhi_contro
 
 	if (state == MHI_STATE_SYS_ERR) {
 		mhi_set_mhi_state(mhi_cntrl, MHI_STATE_RESET);
-		ret = wait_event_timeout(mhi_cntrl->state_event,
-				MHI_PM_IN_FATAL_STATE(mhi_cntrl->pm_state) ||
-					mhi_read_reg_field(mhi_cntrl,
-							   mhi_cntrl->regs,
-							   MHICTRL,
-							   MHICTRL_RESET_MASK,
-							   MHICTRL_RESET_SHIFT,
-							   &val) ||
-					!val,
-				msecs_to_jiffies(mhi_cntrl->timeout_ms));
-		if (!ret) {
-			ret = -EIO;
+		ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
+				 MHICTRL_RESET_MASK, MHICTRL_RESET_SHIFT, 0,
+				 interval_us);
+		if (ret) {
 			dev_info(dev, "Failed to reset MHI due to syserr state\n");
-			goto error_async_power_up;
+			goto error_exit;
 		}
 
 		/*
@@ -1119,6 +1107,10 @@ int mhi_async_power_up(struct mhi_contro
 		mhi_write_reg(mhi_cntrl, mhi_cntrl->bhi, BHI_INTVEC, 0);
 	}
 
+	ret = mhi_init_irq_setup(mhi_cntrl);
+	if (ret)
+		goto error_exit;
+
 	/* Transition to next state */
 	next_state = MHI_IN_PBL(current_ee) ?
 		DEV_ST_TRANSITION_PBL : DEV_ST_TRANSITION_READY;
@@ -1131,10 +1123,7 @@ int mhi_async_power_up(struct mhi_contro
 
 	return 0;
 
-error_async_power_up:
-	mhi_deinit_free_irq(mhi_cntrl);
-
-error_setup_irq:
+error_exit:
 	mhi_cntrl->pm_state = MHI_PM_DISABLE;
 	mutex_unlock(&mhi_cntrl->pm_mutex);
 
author maintainer
#61 lore raw

PATCH 61/1039 bus: mhi: core: Fix reading wake_capable channel configuration

In reply to Greg Kroah-Hartman

From: Bhaumik Bhatt <[email protected]>

commit 42c4668f7efe1485dfc382517b412c0c6ab102b8 upstream.

The 'wake-capable' entry in channel configuration is not set when parsing the configuration specified by the controller driver. Add the missing entry to ensure channel is correctly specified as a 'wake-capable' channel.

---
 drivers/bus/mhi/core/init.c |    1 +
 1 file changed, 1 insertion(+)
drivers/bus/mhi/core/init.c +1 -0
@@ -788,6 +788,7 @@ static int parse_ch_cfg(struct mhi_contr
 		mhi_chan->offload_ch = ch_cfg->offload_channel;
 		mhi_chan->db_cfg.reset_req = ch_cfg->doorbell_mode_switch;
 		mhi_chan->pre_alloc = ch_cfg->auto_queue;
+		mhi_chan->wake_capable = ch_cfg->wake_capable;
 
 		/*
 		 * If MHI host allocates buffers, then the channel direction
author maintainer
#51 lore raw

PATCH 51/1039 media: redrat3: fix control-message timeouts

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit 2adc965c8bfa224e11ecccf9c92fd458c4236428 upstream.

USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.

Fixes 2154be651b90 ("[media] redrat3: new rc-core IR transceiver device driver")
---
 drivers/media/rc/redrat3.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/media/rc/redrat3.c +11 -11
@@ -404,7 +404,7 @@ static int redrat3_send_cmd(int cmd, str
 	udev = rr3->udev;
 	res = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), cmd,
 			      USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
-			      0x0000, 0x0000, data, sizeof(u8), HZ * 10);
+			      0x0000, 0x0000, data, sizeof(u8), 10000);
 
 	if (res < 0) {
 		dev_err(rr3->dev, "%s: Error sending rr3 cmd res %d, data %d",
@@ -480,7 +480,7 @@ static u32 redrat3_get_timeout(struct re
 	pipe = usb_rcvctrlpipe(rr3->udev, 0);
 	ret = usb_control_msg(rr3->udev, pipe, RR3_GET_IR_PARAM,
 			      USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
-			      RR3_IR_IO_SIG_TIMEOUT, 0, tmp, len, HZ * 5);
+			      RR3_IR_IO_SIG_TIMEOUT, 0, tmp, len, 5000);
 	if (ret != len)
 		dev_warn(rr3->dev, "Failed to read timeout from hardware\n");
 	else {
@@ -510,7 +510,7 @@ static int redrat3_set_timeout(struct rc
 	ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), RR3_SET_IR_PARAM,
 		     USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
 		     RR3_IR_IO_SIG_TIMEOUT, 0, timeout, sizeof(*timeout),
-		     HZ * 25);
+		     25000);
 	dev_dbg(dev, "set ir parm timeout %d ret 0x%02x\n",
 						be32_to_cpu(*timeout), ret);
 
@@ -542,32 +542,32 @@ static void redrat3_reset(struct redrat3
 	*val = 0x01;
 	rc = usb_control_msg(udev, rxpipe, RR3_RESET,
 			     USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
-			     RR3_CPUCS_REG_ADDR, 0, val, len, HZ * 25);
+			     RR3_CPUCS_REG_ADDR, 0, val, len, 25000);
 	dev_dbg(dev, "reset returned 0x%02x\n", rc);
 
 	*val = length_fuzz;
 	rc = usb_control_msg(udev, txpipe, RR3_SET_IR_PARAM,
 			     USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
-			     RR3_IR_IO_LENGTH_FUZZ, 0, val, len, HZ * 25);
+			     RR3_IR_IO_LENGTH_FUZZ, 0, val, len, 25000);
 	dev_dbg(dev, "set ir parm len fuzz %d rc 0x%02x\n", *val, rc);
 
 	*val = (65536 - (minimum_pause * 2000)) / 256;
 	rc = usb_control_msg(udev, txpipe, RR3_SET_IR_PARAM,
 			     USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
-			     RR3_IR_IO_MIN_PAUSE, 0, val, len, HZ * 25);
+			     RR3_IR_IO_MIN_PAUSE, 0, val, len, 25000);
 	dev_dbg(dev, "set ir parm min pause %d rc 0x%02x\n", *val, rc);
 
 	*val = periods_measure_carrier;
 	rc = usb_control_msg(udev, txpipe, RR3_SET_IR_PARAM,
 			     USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
-			     RR3_IR_IO_PERIODS_MF, 0, val, len, HZ * 25);
+			     RR3_IR_IO_PERIODS_MF, 0, val, len, 25000);
 	dev_dbg(dev, "set ir parm periods measure carrier %d rc 0x%02x", *val,
 									rc);
 
 	*val = RR3_DRIVER_MAXLENS;
 	rc = usb_control_msg(udev, txpipe, RR3_SET_IR_PARAM,
 			     USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
-			     RR3_IR_IO_MAX_LENGTHS, 0, val, len, HZ * 25);
+			     RR3_IR_IO_MAX_LENGTHS, 0, val, len, 25000);
 	dev_dbg(dev, "set ir parm max lens %d rc 0x%02x\n", *val, rc);
 
 	kfree(val);
@@ -585,7 +585,7 @@ static void redrat3_get_firmware_rev(str
 	rc = usb_control_msg(rr3->udev, usb_rcvctrlpipe(rr3->udev, 0),
 			     RR3_FW_VERSION,
 			     USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
-			     0, 0, buffer, RR3_FW_VERSION_LEN, HZ * 5);
+			     0, 0, buffer, RR3_FW_VERSION_LEN, 5000);
 
 	if (rc >= 0)
 		dev_info(rr3->dev, "Firmware rev: %s", buffer);
@@ -825,14 +825,14 @@ static int redrat3_transmit_ir(struct rc
 
 	pipe = usb_sndbulkpipe(rr3->udev, rr3->ep_out->bEndpointAddress);
 	ret = usb_bulk_msg(rr3->udev, pipe, irdata,
-			    sendbuf_len, &ret_len, 10 * HZ);
+			    sendbuf_len, &ret_len, 10000);
 	dev_dbg(dev, "sent %d bytes, (ret %d)\n", ret_len, ret);
 
 	/* now tell the hardware to transmit what we sent it */
 	pipe = usb_rcvctrlpipe(rr3->udev, 0);
 	ret = usb_control_msg(rr3->udev, pipe, RR3_TX_SEND_SIGNAL,
 			      USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
-			      0, 0, irdata, 2, HZ * 10);
+			      0, 0, irdata, 2, 10000);
 
 	if (ret < 0)
 		dev_err(dev, "Error: control msg send failed, rc %d\n", ret);
author maintainer
#76 lore raw

PATCH 76/1039 dma/pool: create dma atomic pool only if dma zone has managed pages

In reply to Greg Kroah-Hartman

From: Baoquan He <[email protected]>

commit a674e48c5443d12a8a43c3ac42367aa39505d506 upstream.

Currently three dma atomic pools are initialized as long as the relevant kernel codes are built in. While in kdump kernel of x86_64, this is not right when trying to create atomic_pool_dma, because there's no managed pages in DMA zone. In the case, DMA zone only has low 1M memory presented and locked down by memblock allocator. So no pages are added into buddy of DMA zone. Please check commit f1d4d47c5851 ("x86/setup:
Always reserve the first 1M of RAM").

Then in kdump kernel of x86_64, it always prints below failure message:

DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
swapper/0: page allocation failure: order:5, mode:0xcc1(GFP_KERNEL|GFP_DMA), nodemask=(null),cpuset=/,mems_allowed=0

 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0-0.rc5.20210611git929d931f2b40.42.fc35.x86_64 #1
 Hardware name: Dell Inc. PowerEdge R910/0P658H, BIOS 2.12.0 06/04/2018
 Call Trace:
  dump_stack+0x7f/0xa1
  warn_alloc.cold+0x72/0xd6
  __alloc_pages_slowpath.constprop.0+0xf29/0xf50
  __alloc_pages+0x24d/0x2c0
  alloc_page_interleave+0x13/0xb0
  atomic_pool_expand+0x118/0x210
  __dma_atomic_pool_init+0x45/0x93
  dma_atomic_pool_init+0xdb/0x176
  do_one_initcall+0x67/0x320
  kernel_init_freeable+0x290/0x2dc
  kernel_init+0xa/0x111
  ret_from_fork+0x22/0x30
 Mem-Info:
 ......
 DMA: failed to allocate 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocation
 DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations

Here, let's check if DMA zone has managed pages, then create atomic_pool_dma if yes. Otherwise just skip it.

Fixes 6f599d84231f ("x86/kdump: Always reserve the low 1M when the crashkernel option is specified")
Cc Marek Szyprowski <[email protected]>
Cc Robin Murphy <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc David Laight <[email protected]>
Cc David Rientjes <[email protected]>
Cc Hyeonggon Yoo <[email protected]>
Cc Joonsoo Kim <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc Vlastimil Babka <[email protected]>
---
 kernel/dma/pool.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/dma/pool.c +2 -2
@@ -203,7 +203,7 @@ static int __init dma_atomic_pool_init(v
 						    GFP_KERNEL);
 	if (!atomic_pool_kernel)
 		ret = -ENOMEM;
-	if (IS_ENABLED(CONFIG_ZONE_DMA)) {
+	if (has_managed_dma()) {
 		atomic_pool_dma = __dma_atomic_pool_init(atomic_pool_size,
 						GFP_KERNEL | GFP_DMA);
 		if (!atomic_pool_dma)
@@ -226,7 +226,7 @@ static inline struct gen_pool *dma_guess
 	if (prev == NULL) {
 		if (IS_ENABLED(CONFIG_ZONE_DMA32) && (gfp & GFP_DMA32))
 			return atomic_pool_dma32;
-		if (IS_ENABLED(CONFIG_ZONE_DMA) && (gfp & GFP_DMA))
+		if (atomic_pool_dma && (gfp & GFP_DMA))
 			return atomic_pool_dma;
 		return atomic_pool_kernel;
 	}
author maintainer
#77 lore raw

PATCH 77/1039 mm/page_alloc.c: do not warn allocation failure on zone DMA if no managed pages

In reply to Greg Kroah-Hartman

From: Baoquan He <[email protected]>

commit c4dc63f0032c77464fbd4e7a6afc22fa6913c4a7 upstream.

In kdump kernel of x86_64, page allocation failure is observed:

kworker/u2:2: page allocation failure: order:0, mode:0xcc1(GFP_KERNEL|GFP_DMA), nodemask=(null),cpuset=/,mems_allowed=0

 CPU: 0 PID: 55 Comm: kworker/u2:2 Not tainted 5.16.0-rc4+ #5
 Hardware name: AMD Dinar/Dinar, BIOS RDN1505B 06/05/2013
 Workqueue: events_unbound async_run_entry_fn
 Call Trace:
  <TASK>
  dump_stack_lvl+0x48/0x5e
  warn_alloc.cold+0x72/0xd6
  __alloc_pages_slowpath.constprop.0+0xc69/0xcd0
  __alloc_pages+0x1df/0x210
  new_slab+0x389/0x4d0
  ___slab_alloc+0x58f/0x770
  __slab_alloc.constprop.0+0x4a/0x80
  kmem_cache_alloc_trace+0x24b/0x2c0
  sr_probe+0x1db/0x620
  ......
  device_add+0x405/0x920
  ......
  __scsi_add_device+0xe5/0x100
  ata_scsi_scan_host+0x97/0x1d0
  async_run_entry_fn+0x30/0x130
  process_one_work+0x1e8/0x3c0
  worker_thread+0x50/0x3b0
  ? rescuer_thread+0x350/0x350
  kthread+0x16b/0x190
  ? set_kthread_struct+0x40/0x40
  ret_from_fork+0x22/0x30
  </TASK>
 Mem-Info:
 ......

The above failure happened when calling kmalloc() to allocate buffer with GFP_DMA. It requests to allocate slab page from DMA zone while no managed pages at all in there.

sr_probe()
--> get_capabilities()

     --> buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);

Because in the current kernel, dma-kmalloc will be created as long as CONFIG_ZONE_DMA is enabled. However, kdump kernel of x86_64 doesn't have managed pages on DMA zone since commit 6f599d84231f ("x86/kdump: Always reserve the low 1M when the crashkernel option is specified"). The failure can be always reproduced.

For now, let's mute the warning of allocation failure if requesting pages from DMA zone while no managed pages.

[[email protected]: fix warning]

Fixes 6f599d84231f ("x86/kdump: Always reserve the low 1M when the crashkernel option is specified")
Cc Christoph Lameter <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc David Rientjes <[email protected]>
Cc Joonsoo Kim <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc David Laight <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc Robin Murphy <[email protected]>
---
 mm/page_alloc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
mm/page_alloc.c +3 -1
@@ -4204,7 +4204,9 @@ void warn_alloc(gfp_t gfp_mask, nodemask
 	va_list args;
 	static DEFINE_RATELIMIT_STATE(nopage_rs, 10*HZ, 1);
 
-	if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs))
+	if ((gfp_mask & __GFP_NOWARN) ||
+	     !__ratelimit(&nopage_rs) ||
+	     ((gfp_mask & __GFP_DMA) && !has_managed_dma()))
 		return;
 
 	va_start(args, fmt);
author maintainer
#81 lore raw

PATCH 81/1039 drm/rockchip: dsi: Reconfigure hardware on resume()

In reply to Greg Kroah-Hartman

From: Brian Norris <[email protected]>

commit e584cdc1549932f87a2707b56bc588cfac5d89e0 upstream.

Since commit 43c2de1002d2 ("drm/rockchip: dsi: move all lane config except LCDC mux to bind()"), we perform most HW configuration in the bind() function. This configuration may be lost on suspend/resume, so we need to call it again. That may lead to errors like this after system suspend/resume:

dw-mipi-dsi-rockchip ff968000.mipi: failed to write command FIFO panel-kingdisplay-kd097d04 ff960000.mipi.0: failed write init cmds: -110

Tested on Acer Chromebook Tab 10 (RK3399 Gru-Scarlet).

Note that early mailing list versions of this driver borrowed Rockchip's downstream/BSP solution, to do HW configuration in mode_set() (which *is* called at the appropriate pre-enable() times), but that was discarded along the way. I've avoided that still, because mode_set() documentation doesn't suggest this kind of purpose as far as I can tell.

---
 drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c |   37 ++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +37 -0
@@ -267,6 +267,8 @@ struct dw_mipi_dsi_rockchip {
 	struct dw_mipi_dsi *dmd;
 	const struct rockchip_dw_dsi_chip_data *cdata;
 	struct dw_mipi_dsi_plat_data pdata;
+
+	bool dsi_bound;
 };
 
 struct dphy_pll_parameter_map {
@@ -963,6 +965,8 @@ static int dw_mipi_dsi_rockchip_bind(str
 		goto out_pm_runtime;
 	}
 
+	dsi->dsi_bound = true;
+
 	return 0;
 
 out_pm_runtime:
@@ -982,6 +986,8 @@ static void dw_mipi_dsi_rockchip_unbind(
 	if (dsi->is_slave)
 		return;
 
+	dsi->dsi_bound = false;
+
 	dw_mipi_dsi_unbind(dsi->dmd);
 
 	clk_disable_unprepare(dsi->pllref_clk);
@@ -1276,6 +1282,36 @@ static const struct phy_ops dw_mipi_dsi_
 	.exit		= dw_mipi_dsi_dphy_exit,
 };
 
+static int __maybe_unused dw_mipi_dsi_rockchip_resume(struct device *dev)
+{
+	struct dw_mipi_dsi_rockchip *dsi = dev_get_drvdata(dev);
+	int ret;
+
+	/*
+	 * Re-configure DSI state, if we were previously initialized. We need
+	 * to do this before rockchip_drm_drv tries to re-enable() any panels.
+	 */
+	if (dsi->dsi_bound) {
+		ret = clk_prepare_enable(dsi->grf_clk);
+		if (ret) {
+			DRM_DEV_ERROR(dsi->dev, "Failed to enable grf_clk: %d\n", ret);
+			return ret;
+		}
+
+		dw_mipi_dsi_rockchip_config(dsi);
+		if (dsi->slave)
+			dw_mipi_dsi_rockchip_config(dsi->slave);
+
+		clk_disable_unprepare(dsi->grf_clk);
+	}
+
+	return 0;
+}
+
+static const struct dev_pm_ops dw_mipi_dsi_rockchip_pm_ops = {
+	SET_LATE_SYSTEM_SLEEP_PM_OPS(NULL, dw_mipi_dsi_rockchip_resume)
+};
+
 static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -1593,6 +1629,7 @@ struct platform_driver dw_mipi_dsi_rockc
 	.remove		= dw_mipi_dsi_rockchip_remove,
 	.driver		= {
 		.of_match_table = dw_mipi_dsi_rockchip_dt_ids,
+		.pm	= &dw_mipi_dsi_rockchip_pm_ops,
 		.name	= "dw-mipi-dsi-rockchip",
 	},
 };
author maintainer
#52 lore raw

PATCH 52/1039 media: pvrusb2: fix control-message timeouts

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit b82bf9b9dc305d7d3d93eab106d70dbf2171b43e upstream.

USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ.

Fixes d855497edbfb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18")
Cc [email protected] # 2.6.18
---
 drivers/media/usb/pvrusb2/pvrusb2-hdw.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/media/usb/pvrusb2/pvrusb2-hdw.c +4 -4
@@ -1467,7 +1467,7 @@ static int pvr2_upload_firmware1(struct
 	for (address = 0; address < fwsize; address += 0x800) {
 		memcpy(fw_ptr, fw_entry->data + address, 0x800);
 		ret += usb_control_msg(hdw->usb_dev, pipe, 0xa0, 0x40, address,
-				       0, fw_ptr, 0x800, HZ);
+				       0, fw_ptr, 0x800, 1000);
 	}
 
 	trace_firmware("Upload done, releasing device's CPU");
@@ -1605,7 +1605,7 @@ int pvr2_upload_firmware2(struct pvr2_hd
 			((u32 *)fw_ptr)[icnt] = swab32(((u32 *)fw_ptr)[icnt]);
 
 		ret |= usb_bulk_msg(hdw->usb_dev, pipe, fw_ptr,bcnt,
-				    &actual_length, HZ);
+				    &actual_length, 1000);
 		ret |= (actual_length != bcnt);
 		if (ret) break;
 		fw_done += bcnt;
@@ -3438,7 +3438,7 @@ void pvr2_hdw_cpufw_set_enabled(struct p
 						      0xa0,0xc0,
 						      address,0,
 						      hdw->fw_buffer+address,
-						      0x800,HZ);
+						      0x800,1000);
 				if (ret < 0) break;
 			}
 
@@ -3977,7 +3977,7 @@ void pvr2_hdw_cpureset_assert(struct pvr
 	/* Write the CPUCS register on the 8051.  The lsb of the register
 	   is the reset bit; a 1 asserts reset while a 0 clears it. */
 	pipe = usb_sndctrlpipe(hdw->usb_dev, 0);
-	ret = usb_control_msg(hdw->usb_dev,pipe,0xa0,0x40,0xe600,0,da,1,HZ);
+	ret = usb_control_msg(hdw->usb_dev,pipe,0xa0,0x40,0xe600,0,da,1,1000);
 	if (ret < 0) {
 		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
 			   "cpureset_assert(%d) error=%d",val,ret);
author maintainer
#55 lore raw

PATCH 55/1039 can: softing_cs: softingcs_probe(): fix memleak on registration failure

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit ced4913efb0acc844ed65cc01d091a85d83a2082 upstream.

In case device registration fails during probe, the driver state and the embedded platform device structure needs to be freed using platform_device_put() to properly free all resources (e.g. the device name).

---
 drivers/net/can/softing/softing_cs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/softing/softing_cs.c +1 -1
@@ -293,7 +293,7 @@ static int softingcs_probe(struct pcmcia
 	return 0;
 
 platform_failed:
-	kfree(dev);
+	platform_device_put(pdev);
 mem_failed:
 pcmcia_bad:
 pcmcia_failed:
author maintainer
#56 lore raw

PATCH 56/1039 mei: hbm: fix client dma reply status

In reply to Greg Kroah-Hartman

From: Alexander Usyskin <[email protected]>

commit 6b0b80ac103b2a40c72a47c301745fd1f4ef4697 upstream.

Don't blindly copy status value received from the firmware into internal client status field,
It may be positive and ERR_PTR(ret) will translate it into an invalid address and the caller will crash.

Put the error code into the client status on failure.

---
 drivers/misc/mei/hbm.c |   20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/misc/mei/hbm.c +14 -6
@@ -672,10 +672,14 @@ static void mei_hbm_cl_dma_map_res(struc
 	if (!cl)
 		return;
 
-	dev_dbg(dev->dev, "cl dma map result = %d\n", res->status);
-	cl->status = res->status;
-	if (!cl->status)
+	if (res->status) {
+		dev_err(dev->dev, "cl dma map failed %d\n", res->status);
+		cl->status = -EFAULT;
+	} else {
+		dev_dbg(dev->dev, "cl dma map succeeded\n");
 		cl->dma_mapped = 1;
+		cl->status = 0;
+	}
 	wake_up(&cl->wait);
 }
 
@@ -698,10 +702,14 @@ static void mei_hbm_cl_dma_unmap_res(str
 	if (!cl)
 		return;
 
-	dev_dbg(dev->dev, "cl dma unmap result = %d\n", res->status);
-	cl->status = res->status;
-	if (!cl->status)
+	if (res->status) {
+		dev_err(dev->dev, "cl dma unmap failed %d\n", res->status);
+		cl->status = -EFAULT;
+	} else {
+		dev_dbg(dev->dev, "cl dma unmap succeeded\n");
 		cl->dma_mapped = 0;
+		cl->status = 0;
+	}
 	wake_up(&cl->wait);
 }
 
author maintainer
#54 lore raw

PATCH 54/1039 media: cec-pin: fix interrupt en/disable handling

In reply to Greg Kroah-Hartman

From: Hans Verkuil <[email protected]>

commit 713bdfa10b5957053811470d298def9537d9ff13 upstream.

The en/disable_irq() functions keep track of the 'depth': i.e. if interrupts are disabled twice, then it needs to enable_irq() calls to enable them again. The cec-pin framework didn't take this into accound and could disable irqs multiple times, and it expected that a single enable_irq() would enable them again.

Move all calls to en/disable_irq() to the kthread where it is easy to keep track of the current irq state and ensure that multiple en/disable_irq calls never happen.

If interrupts where disabled twice, then they would never turn on again, leaving the CEC adapter in a dead state.

Fixes 865463fc03ed (media: cec-pin: add error injection support)
---
 drivers/media/cec/core/cec-pin.c |   31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)
drivers/media/cec/core/cec-pin.c +18 -13
@@ -1033,6 +1033,7 @@ static int cec_pin_thread_func(void *_ad
 {
 	struct cec_adapter *adap = _adap;
 	struct cec_pin *pin = adap->pin;
+	bool irq_enabled = false;
 
 	for (;;) {
 		wait_event_interruptible(pin->kthread_waitq,
@@ -1060,6 +1061,7 @@ static int cec_pin_thread_func(void *_ad
 				ns_to_ktime(pin->work_rx_msg.rx_ts));
 			msg->len = 0;
 		}
+
 		if (pin->work_tx_status) {
 			unsigned int tx_status = pin->work_tx_status;
 
@@ -1083,27 +1085,39 @@ static int cec_pin_thread_func(void *_ad
 		switch (atomic_xchg(&pin->work_irq_change,
 				    CEC_PIN_IRQ_UNCHANGED)) {
 		case CEC_PIN_IRQ_DISABLE:
-			pin->ops->disable_irq(adap);
+			if (irq_enabled) {
+				pin->ops->disable_irq(adap);
+				irq_enabled = false;
+			}
 			cec_pin_high(pin);
 			cec_pin_to_idle(pin);
 			hrtimer_start(&pin->timer, ns_to_ktime(0),
 				      HRTIMER_MODE_REL);
 			break;
 		case CEC_PIN_IRQ_ENABLE:
+			if (irq_enabled)
+				break;
 			pin->enable_irq_failed = !pin->ops->enable_irq(adap);
 			if (pin->enable_irq_failed) {
 				cec_pin_to_idle(pin);
 				hrtimer_start(&pin->timer, ns_to_ktime(0),
 					      HRTIMER_MODE_REL);
+			} else {
+				irq_enabled = true;
 			}
 			break;
 		default:
 			break;
 		}
-
 		if (kthread_should_stop())
 			break;
 	}
+	if (pin->ops->disable_irq && irq_enabled)
+		pin->ops->disable_irq(adap);
+	hrtimer_cancel(&pin->timer);
+	cec_pin_read(pin);
+	cec_pin_to_idle(pin);
+	pin->state = CEC_ST_OFF;
 	return 0;
 }
 
@@ -1130,13 +1144,7 @@ static int cec_pin_adap_enable(struct ce
 		hrtimer_start(&pin->timer, ns_to_ktime(0),
 			      HRTIMER_MODE_REL);
 	} else {
-		if (pin->ops->disable_irq)
-			pin->ops->disable_irq(adap);
-		hrtimer_cancel(&pin->timer);
 		kthread_stop(pin->kthread);
-		cec_pin_read(pin);
-		cec_pin_to_idle(pin);
-		pin->state = CEC_ST_OFF;
 	}
 	return 0;
 }
@@ -1157,11 +1165,8 @@ void cec_pin_start_timer(struct cec_pin
 	if (pin->state != CEC_ST_RX_IRQ)
 		return;
 
-	atomic_set(&pin->work_irq_change, CEC_PIN_IRQ_UNCHANGED);
-	pin->ops->disable_irq(pin->adap);
-	cec_pin_high(pin);
-	cec_pin_to_idle(pin);
-	hrtimer_start(&pin->timer, ns_to_ktime(0), HRTIMER_MODE_REL);
+	atomic_set(&pin->work_irq_change, CEC_PIN_IRQ_DISABLE);
+	wake_up_interruptible(&pin->kthread_waitq);
 }
 
 static int cec_pin_adap_transmit(struct cec_adapter *adap, u8 attempts,
author maintainer
#57 lore raw

PATCH 57/1039 iio: adc: ti-adc081c: Partial revert of removal of ACPI IDs

In reply to Greg Kroah-Hartman

From: Jonathan Cameron <[email protected]>

commit c9791a94384af07592d29504004d2255dbaf8663 upstream.

Unfortuanately a non standards compliant ACPI ID is known to be in the wild on some AAEON boards.

Partly revert the removal of these IDs so that ADC081C will again work + add a comment to that affect for future reference.

Whilst here use generic firmware properties rather than the ACPI specific handling previously found in this driver.

Fixes c458b7ca3fd0 ("iio:adc:ti-adc081c: Drop ACPI ids that seem very unlikely to be official.")
Cc Andy Shevchenko <[email protected]>
---
 drivers/iio/adc/ti-adc081c.c |   22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
drivers/iio/adc/ti-adc081c.c +17 -5
@@ -19,6 +19,7 @@
 #include <linux/i2c.h>
 #include <linux/module.h>
 #include <linux/mod_devicetable.h>
+#include <linux/property.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/buffer.h>
@@ -156,13 +157,16 @@ static int adc081c_probe(struct i2c_clie
 {
 	struct iio_dev *iio;
 	struct adc081c *adc;
-	struct adcxx1c_model *model;
+	const struct adcxx1c_model *model;
 	int err;
 
 	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WORD_DATA))
 		return -EOPNOTSUPP;
 
-	model = &adcxx1c_models[id->driver_data];
+	if (dev_fwnode(&client->dev))
+		model = device_get_match_data(&client->dev);
+	else
+		model = &adcxx1c_models[id->driver_data];
 
 	iio = devm_iio_device_alloc(&client->dev, sizeof(*adc));
 	if (!iio)
@@ -210,10 +214,17 @@ static const struct i2c_device_id adc081
 };
 MODULE_DEVICE_TABLE(i2c, adc081c_id);
 
+static const struct acpi_device_id adc081c_acpi_match[] = {
+	/* Used on some AAEON boards */
+	{ "ADC081C", (kernel_ulong_t)&adcxx1c_models[ADC081C] },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, adc081c_acpi_match);
+
 static const struct of_device_id adc081c_of_match[] = {
-	{ .compatible = "ti,adc081c" },
-	{ .compatible = "ti,adc101c" },
-	{ .compatible = "ti,adc121c" },
+	{ .compatible = "ti,adc081c", .data = &adcxx1c_models[ADC081C] },
+	{ .compatible = "ti,adc101c", .data = &adcxx1c_models[ADC101C] },
+	{ .compatible = "ti,adc121c", .data = &adcxx1c_models[ADC121C] },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, adc081c_of_match);
@@ -222,6 +233,7 @@ static struct i2c_driver adc081c_driver
 	.driver = {
 		.name = "adc081c",
 		.of_match_table = adc081c_of_match,
+		.acpi_match_table = adc081c_acpi_match,
 	},
 	.probe = adc081c_probe,
 	.id_table = adc081c_id,
author maintainer
#94 lore raw

PATCH 94/1039 clk: bcm-2835: Pick the closest clock rate

In reply to Greg Kroah-Hartman

From: Maxime Ripard <[email protected]>

[ Upstream commit 5517357a4733d7cf7c17fc79d0530cfa47add372 ]

The driver currently tries to pick the closest rate that is lower than the rate being requested.

This causes an issue with clk_set_min_rate() since it actively checks for the rounded rate to be above the minimum that was just set.

Let's change the logic a bit to pick the closest rate to the requested rate, no matter if it's actually higher or lower.

---
 drivers/clk/bcm/clk-bcm2835.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/bcm/clk-bcm2835.c +1 -1
index a254512965eb8..bf97b2b2a63f8 100644
@@ -1216,7 +1216,7 @@ static int bcm2835_clock_determine_rate(struct clk_hw *hw,
 		rate = bcm2835_clock_choose_div_and_prate(hw, i, req->rate,
 							  &div, &prate,
 							  &avgrate);
-		if (rate > best_rate && rate <= req->rate) {
+		if (abs(req->rate - rate) < abs(req->rate - best_rate)) {
 			best_parent = parent;
 			best_prate = prate;
 			best_rate = rate;
Signature · 1 line
2.34.1
author maintainer
#96 lore raw

PATCH 96/1039 drm/vc4: hdmi: Set a default HSM rate

In reply to Greg Kroah-Hartman

From: Maxime Ripard <[email protected]>

[ Upstream commit 3e85b81591609bb794bb00cd619b20965b5b38cd ]

When the firmware doesn't setup the HSM rate (such as when booting without an HDMI cable plugged in), its rate is 0 and thus any register access results in a CPU stall, even though HSM is enabled.

Let's enforce a minimum rate at boot to avoid this issue.

---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/gpu/drm/vc4/vc4_hdmi.c +14 -0
index b284623e28634..33f61e2f7e6d1 100644
@@ -94,6 +94,7 @@
 # define VC4_HD_M_SW_RST			BIT(2)
 # define VC4_HD_M_ENABLE			BIT(0)
 
+#define HSM_MIN_CLOCK_FREQ	120000000
 #define CEC_CLOCK_FREQ 40000
 
 #define HDMI_14_MAX_TMDS_CLK   (340 * 1000 * 1000)
@@ -2162,6 +2163,19 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
 			vc4_hdmi->disable_4kp60 = true;
 	}
 
+	/*
+	 * If we boot without any cable connected to the HDMI connector,
+	 * the firmware will skip the HSM initialization and leave it
+	 * with a rate of 0, resulting in a bus lockup when we're
+	 * accessing the registers even if it's enabled.
+	 *
+	 * Let's put a sensible default at runtime_resume so that we
+	 * don't end up in this situation.
+	 */
+	ret = clk_set_min_rate(vc4_hdmi->hsm_clock, HSM_MIN_CLOCK_FREQ);
+	if (ret)
+		goto err_put_ddc;
+
 	if (vc4_hdmi->variant->reset)
 		vc4_hdmi->variant->reset(vc4_hdmi);
 
Signature · 1 line
2.34.1
author maintainer
#100 lore raw

PATCH 100/1039 drm/vc4: hdmi: Rework the pre_crtc_configure error handling

In reply to Greg Kroah-Hartman

From: Maxime Ripard <[email protected]>

[ Upstream commit caa51a4c11f1cadba9bcf61ed9e0105711952ce7 ]

Since our pre_crtc_configure hook returned void, we didn't implement a goto-based error path handling, leading to errors like failing to put back the device in pm_runtime in all the error paths, but also failing to disable the pixel clock if clk_set_min_rate on the HSM clock fails.

Move to a goto-based implementation to have an easier consitency.

Fixes 4f6e3d66ac52 ("drm/vc4: Add runtime PM support to the HDMI encoder driver")
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +14 -6
index 29ee9264b0870..05fd54fbb773e 100644
@@ -933,15 +933,16 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
 	ret = clk_set_rate(vc4_hdmi->pixel_clock, pixel_rate);
 	if (ret) {
 		DRM_ERROR("Failed to set pixel clock rate: %d\n", ret);
-		return;
+		goto err_put_runtime_pm;
 	}
 
 	ret = clk_prepare_enable(vc4_hdmi->pixel_clock);
 	if (ret) {
 		DRM_ERROR("Failed to turn on pixel clock: %d\n", ret);
-		return;
+		goto err_put_runtime_pm;
 	}
 
+
 	vc4_hdmi_cec_update_clk_div(vc4_hdmi);
 
 	if (pixel_rate > 297000000)
@@ -954,15 +955,13 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
 	ret = clk_set_min_rate(vc4_hdmi->pixel_bvb_clock, bvb_rate);
 	if (ret) {
 		DRM_ERROR("Failed to set pixel bvb clock rate: %d\n", ret);
-		clk_disable_unprepare(vc4_hdmi->pixel_clock);
-		return;
+		goto err_disable_pixel_clock;
 	}
 
 	ret = clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);
 	if (ret) {
 		DRM_ERROR("Failed to turn on pixel bvb clock: %d\n", ret);
-		clk_disable_unprepare(vc4_hdmi->pixel_clock);
-		return;
+		goto err_disable_pixel_clock;
 	}
 
 	if (vc4_hdmi->variant->phy_init)
@@ -975,6 +974,15 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
 
 	if (vc4_hdmi->variant->set_timings)
 		vc4_hdmi->variant->set_timings(vc4_hdmi, conn_state, mode);
+
+	return;
+
+err_disable_pixel_clock:
+	clk_disable_unprepare(vc4_hdmi->pixel_clock);
+err_put_runtime_pm:
+	pm_runtime_put(&vc4_hdmi->pdev->dev);
+
+	return;
 }
 
 static void vc4_hdmi_encoder_pre_crtc_enable(struct drm_encoder *encoder,
Signature · 1 line
2.34.1
author maintainer
#97 lore raw

PATCH 97/1039 drm/vc4: hdmi: Move the HSM clock enable to runtime_pm

In reply to Greg Kroah-Hartman

From: Maxime Ripard <[email protected]>

[ Upstream commit c86b41214362e8e715e1343e16d5d6af0562db05 ]

In order to access the HDMI controller, we need to make sure the HSM clock is enabled. If we were to access it with the clock disabled, the CPU would completely hang, resulting in an hard crash.

Since we have different code path that would require it, let's move that clock enable / disable to runtime_pm that will take care of the reference counting for us.

Since we also want to change the HSM clock rate and it's only valid while the clock is disabled, we need to move the clk_set_min_rate() call on the HSM clock above pm_runtime_get_and_sync().

---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 70 +++++++++++++++++++++-------------
 1 file changed, 44 insertions(+), 26 deletions(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +44 -26
index 33f61e2f7e6d1..63b07087d37e8 100644
@@ -628,7 +628,6 @@ static void vc4_hdmi_encoder_post_crtc_powerdown(struct drm_encoder *encoder,
 		vc4_hdmi->variant->phy_disable(vc4_hdmi);
 
 	clk_disable_unprepare(vc4_hdmi->pixel_bvb_clock);
-	clk_disable_unprepare(vc4_hdmi->hsm_clock);
 	clk_disable_unprepare(vc4_hdmi->pixel_clock);
 
 	ret = pm_runtime_put(&vc4_hdmi->pdev->dev);
@@ -894,28 +893,10 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
 		conn_state_to_vc4_hdmi_conn_state(conn_state);
 	struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
 	struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
-	unsigned long bvb_rate, pixel_rate, hsm_rate;
+	unsigned long pixel_rate = vc4_conn_state->pixel_rate;
+	unsigned long bvb_rate, hsm_rate;
 	int ret;
 
-	ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
-	if (ret < 0) {
-		DRM_ERROR("Failed to retain power domain: %d\n", ret);
-		return;
-	}
-
-	pixel_rate = vc4_conn_state->pixel_rate;
-	ret = clk_set_rate(vc4_hdmi->pixel_clock, pixel_rate);
-	if (ret) {
-		DRM_ERROR("Failed to set pixel clock rate: %d\n", ret);
-		return;
-	}
-
-	ret = clk_prepare_enable(vc4_hdmi->pixel_clock);
-	if (ret) {
-		DRM_ERROR("Failed to turn on pixel clock: %d\n", ret);
-		return;
-	}
-
 	/*
 	 * As stated in RPi's vc4 firmware "HDMI state machine (HSM) clock must
 	 * be faster than pixel clock, infinitesimally faster, tested in
@@ -939,10 +920,21 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
 		return;
 	}
 
-	ret = clk_prepare_enable(vc4_hdmi->hsm_clock);
+	ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
+	if (ret < 0) {
+		DRM_ERROR("Failed to retain power domain: %d\n", ret);
+		return;
+	}
+
+	ret = clk_set_rate(vc4_hdmi->pixel_clock, pixel_rate);
 	if (ret) {
-		DRM_ERROR("Failed to turn on HSM clock: %d\n", ret);
-		clk_disable_unprepare(vc4_hdmi->pixel_clock);
+		DRM_ERROR("Failed to set pixel clock rate: %d\n", ret);
+		return;
+	}
+
+	ret = clk_prepare_enable(vc4_hdmi->pixel_clock);
+	if (ret) {
+		DRM_ERROR("Failed to turn on pixel clock: %d\n", ret);
 		return;
 	}
 
@@ -958,7 +950,6 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
 	ret = clk_set_min_rate(vc4_hdmi->pixel_bvb_clock, bvb_rate);
 	if (ret) {
 		DRM_ERROR("Failed to set pixel bvb clock rate: %d\n", ret);
-		clk_disable_unprepare(vc4_hdmi->hsm_clock);
 		clk_disable_unprepare(vc4_hdmi->pixel_clock);
 		return;
 	}
@@ -966,7 +957,6 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
 	ret = clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);
 	if (ret) {
 		DRM_ERROR("Failed to turn on pixel bvb clock: %d\n", ret);
-		clk_disable_unprepare(vc4_hdmi->hsm_clock);
 		clk_disable_unprepare(vc4_hdmi->pixel_clock);
 		return;
 	}
@@ -2100,6 +2090,27 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi)
 	return 0;
 }
 
+static int __maybe_unused vc4_hdmi_runtime_suspend(struct device *dev)
+{
+	struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
+
+	clk_disable_unprepare(vc4_hdmi->hsm_clock);
+
+	return 0;
+}
+
+static int vc4_hdmi_runtime_resume(struct device *dev)
+{
+	struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
+	int ret;
+
+	ret = clk_prepare_enable(vc4_hdmi->hsm_clock);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
 static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
 {
 	const struct vc4_hdmi_variant *variant = of_device_get_match_data(dev);
@@ -2367,11 +2378,18 @@ static const struct of_device_id vc4_hdmi_dt_match[] = {
 	{}
 };
 
+static const struct dev_pm_ops vc4_hdmi_pm_ops = {
+	SET_RUNTIME_PM_OPS(vc4_hdmi_runtime_suspend,
+			   vc4_hdmi_runtime_resume,
+			   NULL)
+};
+
 struct platform_driver vc4_hdmi_driver = {
 	.probe = vc4_hdmi_dev_probe,
 	.remove = vc4_hdmi_dev_remove,
 	.driver = {
 		.name = "vc4_hdmi",
 		.of_match_table = vc4_hdmi_dt_match,
+		.pm = &vc4_hdmi_pm_ops,
 	},
 };
Signature · 1 line
2.34.1
author maintainer
#102 lore raw

PATCH 102/1039 drm/bridge: sn65dsi83: Fix bridge removal

In reply to Greg Kroah-Hartman

From: Maxime Ripard <[email protected]>

[ Upstream commit c05f1a4e2c4b8a217b448828c4e59fb47454dc75 ]

Commit 24417d5b0c00 ("drm/bridge: ti-sn65dsi83: Implement .detach callback") moved the unregistration of the bridge DSI device and bridge itself to the detach callback.

While this is correct for the DSI device detach and unregistration, the bridge is added in the driver probe, and should thus be removed as part of its remove callback.

---
 drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/ti-sn65dsi83.c +1 -1
index ba1160ec6d6e8..07917681782d2 100644
@@ -297,7 +297,6 @@ static void sn65dsi83_detach(struct drm_bridge *bridge)
 
 	mipi_dsi_detach(ctx->dsi);
 	mipi_dsi_device_unregister(ctx->dsi);
-	drm_bridge_remove(&ctx->bridge);
 	ctx->dsi = NULL;
 }
 
@@ -711,6 +710,7 @@ static int sn65dsi83_remove(struct i2c_client *client)
 {
 	struct sn65dsi83 *ctx = i2c_get_clientdata(client);
 
+	drm_bridge_remove(&ctx->bridge);
 	of_node_put(ctx->host_node);
 
 	return 0;
Signature · 1 line
2.34.1
author maintainer
#109 lore raw

PATCH 109/1039 libbpf: Fix non-C89 loop variable declaration in gen_loader.c

In reply to Greg Kroah-Hartman

From: Andrii Nakryiko <[email protected]>

[ Upstream commit b8b5cb55f5d3f03cc1479a3768d68173a10359ad ]

Fix the int i declaration inside the for statement. This is non-C89 compliant. See [0] for user report breaking BCC build.

[0] https://github.com/libbpf/libbpf/issues/403

Fixes 18f4fccbf314 ("libbpf: Update gen_loader to emit BTF_KIND_FUNC relocations")
---
 tools/lib/bpf/gen_loader.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/lib/bpf/gen_loader.c +2 -1
index 9934851ccde76..5aad39e92a7a5 100644
@@ -597,8 +597,9 @@ void bpf_gen__record_extern(struct bpf_gen *gen, const char *name, bool is_weak,
 static struct ksym_desc *get_ksym_desc(struct bpf_gen *gen, struct ksym_relo_desc *relo)
 {
 	struct ksym_desc *kdesc;
+	int i;
 
-	for (int i = 0; i < gen->nr_ksyms; i++) {
+	for (i = 0; i < gen->nr_ksyms; i++) {
 		if (!strcmp(gen->ksyms[i].name, relo->name)) {
 			gen->ksyms[i].ref++;
 			return &gen->ksyms[i];
Signature · 1 line
2.34.1
author maintainer
#85 lore raw

PATCH 85/1039 Bluetooth: L2CAP: Fix not initializing sk_peer_pid

In reply to Greg Kroah-Hartman

From: Luiz Augusto von Dentz <[email protected]>

[ Upstream commit f5ff291098f70a70b344df1e388596755c3c8315 ]

In order to group sockets being connected using L2CAP_MODE_EXT_FLOWCTL the pid is used but sk_peer_pid was not being initialized as it is currently only done for af_unix.

Fixes b48596d1dc25 ("Bluetooth: L2CAP: Add get_peer_pid callback")
---
 net/bluetooth/l2cap_sock.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
net/bluetooth/l2cap_sock.c +19 -0
index 160c016a5dfb9..4574c5cb1b596 100644
@@ -172,6 +172,21 @@ done:
 	return err;
 }
 
+static void l2cap_sock_init_pid(struct sock *sk)
+{
+	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
+
+	/* Only L2CAP_MODE_EXT_FLOWCTL ever need to access the PID in order to
+	 * group the channels being requested.
+	 */
+	if (chan->mode != L2CAP_MODE_EXT_FLOWCTL)
+		return;
+
+	spin_lock(&sk->sk_peer_lock);
+	sk->sk_peer_pid = get_pid(task_tgid(current));
+	spin_unlock(&sk->sk_peer_lock);
+}
+
 static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr,
 			      int alen, int flags)
 {
@@ -243,6 +258,8 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr,
 	if (chan->psm && bdaddr_type_is_le(chan->src_type) && !chan->mode)
 		chan->mode = L2CAP_MODE_LE_FLOWCTL;
 
+	l2cap_sock_init_pid(sk);
+
 	err = l2cap_chan_connect(chan, la.l2_psm, __le16_to_cpu(la.l2_cid),
 				 &la.l2_bdaddr, la.l2_bdaddr_type);
 	if (err)
@@ -298,6 +315,8 @@ static int l2cap_sock_listen(struct socket *sock, int backlog)
 		goto done;
 	}
 
+	l2cap_sock_init_pid(sk);
+
 	sk->sk_max_ack_backlog = backlog;
 	sk->sk_ack_backlog = 0;
 
Signature · 1 line
2.34.1
author maintainer
#120 lore raw

PATCH 120/1039 media: ipu3-cio2: fix error code in cio2_bridge_connect_sensor()

In reply to Greg Kroah-Hartman

From: Dan Carpenter <[email protected]>

[ Upstream commit 85db29d22cc521d9d06de2f5c7832981a55df157 ]

Return -ENODEV if acpi_get_physical_device_location() fails. Don't return success.

Fixes 485aa3df0dff ("media: ipu3-cio2: Parse sensor orientation and rotation")
---
 drivers/media/pci/intel/ipu3/cio2-bridge.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/pci/intel/ipu3/cio2-bridge.c +3 -1
index 67c467d3c81f9..0b586b4e537ef 100644
@@ -238,8 +238,10 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg,
 			goto err_put_adev;
 
 		status = acpi_get_physical_device_location(adev->handle, &sensor->pld);
-		if (ACPI_FAILURE(status))
+		if (ACPI_FAILURE(status)) {
+			ret = -ENODEV;
 			goto err_put_adev;
+		}
 
 		if (sensor->ssdb.lanes > CIO2_MAX_LANES) {
 			dev_err(&adev->dev,
Signature · 1 line
2.34.1
author maintainer
#110 lore raw

PATCH 110/1039 libbpf: Free up resources used by inner map definition

In reply to Greg Kroah-Hartman

From: Andrii Nakryiko <[email protected]>

[ Upstream commit 8f7b239ea8cfdc8e64c875ee417fed41431a1f37 ]

It's not enough to just free(map->inner_map), as inner_map itself can have extra memory allocated, like map name.

---
 tools/lib/bpf/libbpf.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tools/lib/bpf/libbpf.c +4 -1
index 5367bc8e52073..509f3719409bb 100644
@@ -9028,7 +9028,10 @@ int bpf_map__set_inner_map_fd(struct bpf_map *map, int fd)
 		pr_warn("error: inner_map_fd already specified\n");
 		return libbpf_err(-EINVAL);
 	}
-	zfree(&map->inner_map);
+	if (map->inner_map) {
+		bpf_map__destroy(map->inner_map);
+		zfree(&map->inner_map);
+	}
 	map->inner_map_fd = fd;
 	return 0;
 }
Signature · 1 line
2.34.1
author maintainer
#118 lore raw

PATCH 118/1039 mtd: hyperbus: rpc-if: Check return value of rpcif_sw_init()

In reply to Greg Kroah-Hartman

From: Lad Prabhakar <[email protected]>

[ Upstream commit 981387ed06b96908223a607f5fba6efa42728fc2 ]

rpcif_sw_init() can fail so make sure we check the return value of it and on error exit rpcif_hb_probe() callback with error code.

---
 drivers/mtd/hyperbus/rpc-if.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mtd/hyperbus/rpc-if.c +3 -1
index ecb050ba95cdf..367b0d72bf622 100644
@@ -124,7 +124,9 @@ static int rpcif_hb_probe(struct platform_device *pdev)
 	if (!hyperbus)
 		return -ENOMEM;
 
-	rpcif_sw_init(&hyperbus->rpc, pdev->dev.parent);
+	error = rpcif_sw_init(&hyperbus->rpc, pdev->dev.parent);
+	if (error)
+		return error;
 
 	platform_set_drvdata(pdev, hyperbus);
 
Signature · 1 line
2.34.1
author maintainer
#92 lore raw

PATCH 92/1039 Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()

In reply to Greg Kroah-Hartman

From: Soenke Huster <[email protected]>

[ Upstream commit 1d0688421449718c6c5f46e458a378c9b530ba18 ]

On the reception of packets with an invalid packet type, the memory of the allocated socket buffers is never freed. Add a default case that frees these to avoid a memory leak.

Fixes afd2daa26c7a ("Bluetooth: Add support for virtio transport driver")
---
 drivers/bluetooth/virtio_bt.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/bluetooth/virtio_bt.c +3 -0
index 57908ce4fae85..076e4942a3f0e 100644
@@ -202,6 +202,9 @@ static void virtbt_rx_handle(struct virtio_bluetooth *vbt, struct sk_buff *skb)
 		hci_skb_pkt_type(skb) = pkt_type;
 		hci_recv_frame(vbt->hdev, skb);
 		break;
+	default:
+		kfree_skb(skb);
+		break;
 	}
 }
 
Signature · 1 line
2.34.1
author maintainer
#111 lore raw

PATCH 111/1039 wcn36xx: Fix DMA channel enable/disable cycle

In reply to Greg Kroah-Hartman

From: Bryan O'Donoghue <[email protected]>

[ Upstream commit 89dcb1da611d9b3ff0728502d58372fdaae9ebff ]

Right now we have a broken sequence where we enable DMA channel interrupts which can be left enabled and never disabled if we hit an error path.

Worse still when we unload the driver, the DMA channel interrupt bits are left intact. About the only saving grace here is that we do remember to disable the wcnss interrupt when unload the driver.

Fixes 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware")
---
 drivers/net/wireless/ath/wcn36xx/dxe.c | 38 ++++++++++++++++++--------
 1 file changed, 27 insertions(+), 11 deletions(-)
drivers/net/wireless/ath/wcn36xx/dxe.c +27 -11
index aff04ef662663..0c4f63f1312f8 100644
@@ -272,6 +272,21 @@ static int wcn36xx_dxe_enable_ch_int(struct wcn36xx *wcn, u16 wcn_ch)
 	return 0;
 }
 
+static void wcn36xx_dxe_disable_ch_int(struct wcn36xx *wcn, u16 wcn_ch)
+{
+	int reg_data = 0;
+
+	wcn36xx_dxe_read_register(wcn,
+				  WCN36XX_DXE_INT_MASK_REG,
+				  &reg_data);
+
+	reg_data &= ~wcn_ch;
+
+	wcn36xx_dxe_write_register(wcn,
+				   WCN36XX_DXE_INT_MASK_REG,
+				   (int)reg_data);
+}
+
 static int wcn36xx_dxe_fill_skb(struct device *dev,
 				struct wcn36xx_dxe_ctl *ctl,
 				gfp_t gfp)
@@ -869,7 +884,6 @@ int wcn36xx_dxe_init(struct wcn36xx *wcn)
 		WCN36XX_DXE_WQ_TX_L);
 
 	wcn36xx_dxe_read_register(wcn, WCN36XX_DXE_REG_CH_EN, &reg_data);
-	wcn36xx_dxe_enable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_TX_L);
 
 	/***************************************/
 	/* Init descriptors for TX HIGH channel */
@@ -893,9 +907,6 @@ int wcn36xx_dxe_init(struct wcn36xx *wcn)
 
 	wcn36xx_dxe_read_register(wcn, WCN36XX_DXE_REG_CH_EN, &reg_data);
 
-	/* Enable channel interrupts */
-	wcn36xx_dxe_enable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_TX_H);
-
 	/***************************************/
 	/* Init descriptors for RX LOW channel */
 	/***************************************/
@@ -905,7 +916,6 @@ int wcn36xx_dxe_init(struct wcn36xx *wcn)
 		goto out_err_rxl_ch;
 	}
 
-
 	/* For RX we need to preallocated buffers */
 	wcn36xx_dxe_ch_alloc_skb(wcn, &wcn->dxe_rx_l_ch);
 
@@ -928,9 +938,6 @@ int wcn36xx_dxe_init(struct wcn36xx *wcn)
 		WCN36XX_DXE_REG_CTL_RX_L,
 		WCN36XX_DXE_CH_DEFAULT_CTL_RX_L);
 
-	/* Enable channel interrupts */
-	wcn36xx_dxe_enable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_RX_L);
-
 	/***************************************/
 	/* Init descriptors for RX HIGH channel */
 	/***************************************/
@@ -962,15 +969,18 @@ int wcn36xx_dxe_init(struct wcn36xx *wcn)
 		WCN36XX_DXE_REG_CTL_RX_H,
 		WCN36XX_DXE_CH_DEFAULT_CTL_RX_H);
 
-	/* Enable channel interrupts */
-	wcn36xx_dxe_enable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_RX_H);
-
 	ret = wcn36xx_dxe_request_irqs(wcn);
 	if (ret < 0)
 		goto out_err_irq;
 
 	timer_setup(&wcn->tx_ack_timer, wcn36xx_dxe_tx_timer, 0);
 
+	/* Enable channel interrupts */
+	wcn36xx_dxe_enable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_TX_L);
+	wcn36xx_dxe_enable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_TX_H);
+	wcn36xx_dxe_enable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_RX_L);
+	wcn36xx_dxe_enable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_RX_H);
+
 	return 0;
 
 out_err_irq:
@@ -987,6 +997,12 @@ out_err_txh_ch:
 
 void wcn36xx_dxe_deinit(struct wcn36xx *wcn)
 {
+	/* Disable channel interrupts */
+	wcn36xx_dxe_disable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_RX_H);
+	wcn36xx_dxe_disable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_RX_L);
+	wcn36xx_dxe_disable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_TX_H);
+	wcn36xx_dxe_disable_ch_int(wcn, WCN36XX_INT_MASK_CHAN_TX_L);
+
 	free_irq(wcn->tx_irq, wcn);
 	free_irq(wcn->rx_irq, wcn);
 	del_timer(&wcn->tx_ack_timer);
Signature · 1 line
2.34.1
author maintainer
#114 lore raw

PATCH 114/1039 wcn36xx: populate band before determining rate on RX

In reply to Greg Kroah-Hartman

From: Benjamin Li <[email protected]>

[ Upstream commit c9c5608fafe4dae975c9644c7d14c51ad3b0ed73 ]

status.band is used in determination of status.rate -- for 5GHz on legacy rates there is a linear shift between the BD descriptor's rate field and the wcn36xx driver's rate table (wcn_5ghz_rates).

We have a special clause to populate status.band for hardware scan offload frames. However, this block occurs after status.rate is already populated. Correctly handle this dependency by moving the band block before the rate block.

This patch addresses kernel warnings & missing scan results for 5GHz APs that send their beacons/probe responses at the higher four legacy rates (24-54 Mbps), when using hardware scan offload:

  ------------[ cut here ]------------
  WARNING: CPU: 0 PID: 0 at net/mac80211/rx.c:4532 ieee80211_rx_napi+0x744/0x8d8
  Modules linked in: wcn36xx [...]
  CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W         4.19.107-g73909fa #1
  Hardware name: Square, Inc. T2 (all variants) (DT)
  Call trace:
  dump_backtrace+0x0/0x148
  show_stack+0x14/0x1c
  dump_stack+0xb8/0xf0
  __warn+0x2ac/0x2d8
  warn_slowpath_null+0x44/0x54
  ieee80211_rx_napi+0x744/0x8d8
  ieee80211_tasklet_handler+0xa4/0xe0
  tasklet_action_common+0xe0/0x118
  tasklet_action+0x20/0x28
  __do_softirq+0x108/0x1ec
  irq_exit+0xd4/0xd8
  __handle_domain_irq+0x84/0xbc
  gic_handle_irq+0x4c/0xb8
  el1_irq+0xe8/0x190
  lpm_cpuidle_enter+0x220/0x260
  cpuidle_enter_state+0x114/0x1c0
  cpuidle_enter+0x34/0x48
  do_idle+0x150/0x268
  cpu_startup_entry+0x20/0x24
  rest_init+0xd4/0xe0
  start_kernel+0x398/0x430
  ---[ end trace ae28cb759352b403 ]---
Fixes 8a27ca394782 ("wcn36xx: Correct band/freq reporting on RX")
---
 drivers/net/wireless/ath/wcn36xx/txrx.c | 37 +++++++++++++------------
 1 file changed, 19 insertions(+), 18 deletions(-)
drivers/net/wireless/ath/wcn36xx/txrx.c +19 -18
index 75951ccbc840e..f0a9f069a92a9 100644
@@ -314,8 +314,6 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
 	fc = __le16_to_cpu(hdr->frame_control);
 	sn = IEEE80211_SEQ_TO_SN(__le16_to_cpu(hdr->seq_ctrl));
 
-	status.freq = WCN36XX_CENTER_FREQ(wcn);
-	status.band = WCN36XX_BAND(wcn);
 	status.mactime = 10;
 	status.signal = -get_rssi0(bd);
 	status.antenna = 1;
@@ -327,6 +325,25 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
 
 	wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%x\n", status.flag);
 
+	if (bd->scan_learn) {
+		/* If packet originate from hardware scanning, extract the
+		 * band/channel from bd descriptor.
+		 */
+		u8 hwch = (bd->reserved0 << 4) + bd->rx_ch;
+
+		if (bd->rf_band != 1 && hwch <= sizeof(ab_rx_ch_map) && hwch >= 1) {
+			status.band = NL80211_BAND_5GHZ;
+			status.freq = ieee80211_channel_to_frequency(ab_rx_ch_map[hwch - 1],
+								     status.band);
+		} else {
+			status.band = NL80211_BAND_2GHZ;
+			status.freq = ieee80211_channel_to_frequency(hwch, status.band);
+		}
+	} else {
+		status.band = WCN36XX_BAND(wcn);
+		status.freq = WCN36XX_CENTER_FREQ(wcn);
+	}
+
 	if (bd->rate_id < ARRAY_SIZE(wcn36xx_rate_table)) {
 		rate = &wcn36xx_rate_table[bd->rate_id];
 		status.encoding = rate->encoding;
@@ -353,22 +370,6 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
 	    ieee80211_is_probe_resp(hdr->frame_control))
 		status.boottime_ns = ktime_get_boottime_ns();
 
-	if (bd->scan_learn) {
-		/* If packet originates from hardware scanning, extract the
-		 * band/channel from bd descriptor.
-		 */
-		u8 hwch = (bd->reserved0 << 4) + bd->rx_ch;
-
-		if (bd->rf_band != 1 && hwch <= sizeof(ab_rx_ch_map) && hwch >= 1) {
-			status.band = NL80211_BAND_5GHZ;
-			status.freq = ieee80211_channel_to_frequency(ab_rx_ch_map[hwch - 1],
-								     status.band);
-		} else {
-			status.band = NL80211_BAND_2GHZ;
-			status.freq = ieee80211_channel_to_frequency(hwch, status.band);
-		}
-	}
-
 	memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));
 
 	if (ieee80211_is_beacon(hdr->frame_control)) {
Signature · 1 line
2.34.1
author maintainer
#133 lore raw

PATCH 133/1039 arm64: dts: amlogic: meson-g12: Fix GPU operating point table node name

In reply to Greg Kroah-Hartman

From: Alexander Stein <[email protected]>

[ Upstream commit bb98a6fd0b0e227cefb2ba91cea2b55455f203b7 ]

Starting with commit 94274f20f6bf ("dt-bindings: opp: Convert to DT schema") the opp node name has a mandatory pattern. This change fixes the dtbs_check warning:
gpu-opp-table: $nodename:0: 'gpu-opp-table' does not match '^opp-table(-[a-z0-9]+)?$'
Put the 'gpu' part at the end to match the pattern.

Fixes 916a0edc43f0 ("arm64: dts: amlogic: meson-g12: add the Mali OPP table and use DVFS")
---
 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +1 -1
index 00c6f53290d43..428449d98c0ae 100644
@@ -58,7 +58,7 @@
 		secure-monitor = <&sm>;
 	};
 
-	gpu_opp_table: gpu-opp-table {
+	gpu_opp_table: opp-table-gpu {
 		compatible = "operating-points-v2";
 
 		opp-124999998 {
Signature · 1 line
2.34.1
author maintainer
#136 lore raw

PATCH 136/1039 arm64: dts: meson-gxbb-wetek: fix missing GPIO binding

In reply to Greg Kroah-Hartman

From: Christian Hewitt <[email protected]>

[ Upstream commit c019abb2feba3cbbd7cf7178f8e6499c4fa6fced ]

The absence of this binding appears to be harmless in Linux but it breaks Ethernet support in mainline u-boot. So add the binding (which is present in all other u-boot supported GXBB device-trees).

Fixes fb72c03e0e32 ("ARM64: dts: meson-gxbb-wetek: add a wetek specific dtsi to cleanup hub and play2")
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi +1 -0
index 8e2af986cebaf..a4d34398da358 100644
@@ -6,6 +6,7 @@
  */
 
 #include "meson-gxbb.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	aliases {
Signature · 1 line
2.34.1
author maintainer
#137 lore raw

PATCH 137/1039 fs: dlm: dont call kernel_getpeername() in error_report()

In reply to Greg Kroah-Hartman

From: Alexander Aring <[email protected]>

[ Upstream commit 4c3d90570bcc2b338f70f61f01110268e281ca3c ]

In some cases kernel_getpeername() will held the socket lock which is already held when the socket layer calls error_report() callback. Since commit 9dfc685e0262 ("inet: remove races in inet{6}_getname()") this problem becomes more likely because the socket lock will be held always. You will see something like:

bob9-u5 login: [ 562.316860] BUG: spinlock recursion on CPU#7, swapper/7/0

[  562.318562]  lock: 0xffff8f2284720088, .magic: dead4ead, .owner: swapper/7/0, .owner_cpu: 7
[  562.319522] CPU: 7 PID: 0 Comm: swapper/7 Not tainted 5.15.0+ #135
[  562.320346] Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.13.0-2.module+el8.3.0+7353+9de0a3cc 04/01/2014
[  562.321277] Call Trace:
[  562.321529]  <IRQ>
[  562.321734]  dump_stack_lvl+0x33/0x42
[  562.322282]  do_raw_spin_lock+0x8b/0xc0
[  562.322674]  lock_sock_nested+0x1e/0x50
[  562.323057]  inet_getname+0x39/0x110
[  562.323425]  ? sock_def_readable+0x80/0x80
[  562.323838]  lowcomms_error_report+0x63/0x260 [dlm]
[  562.324338]  ? wait_for_completion_interruptible_timeout+0xd2/0x120
[  562.324949]  ? lock_timer_base+0x67/0x80
[  562.325330]  ? do_raw_spin_unlock+0x49/0xc0
[  562.325735]  ? _raw_spin_unlock_irqrestore+0x1e/0x40
[  562.326218]  ? del_timer+0x54/0x80
[  562.326549]  sk_error_report+0x12/0x70
[  562.326919]  tcp_validate_incoming+0x3c8/0x530
[  562.327347]  ? kvm_clock_read+0x14/0x30
[  562.327718]  ? ktime_get+0x3b/0xa0
[  562.328055]  tcp_rcv_established+0x121/0x660
[  562.328466]  tcp_v4_do_rcv+0x132/0x260
[  562.328835]  tcp_v4_rcv+0xcea/0xe20
[  562.329173]  ip_protocol_deliver_rcu+0x35/0x1f0
[  562.329615]  ip_local_deliver_finish+0x54/0x60
[  562.330050]  ip_local_deliver+0xf7/0x110
[  562.330431]  ? inet_rtm_getroute+0x211/0x840
[  562.330848]  ? ip_protocol_deliver_rcu+0x1f0/0x1f0
[  562.331310]  ip_rcv+0xe1/0xf0
[  562.331603]  ? ip_local_deliver+0x110/0x110
[  562.332011]  __netif_receive_skb_core+0x46a/0x1040
[  562.332476]  ? inet_gro_receive+0x263/0x2e0
[  562.332885]  __netif_receive_skb_list_core+0x13b/0x2c0
[  562.333383]  netif_receive_skb_list_internal+0x1c8/0x2f0
[  562.333896]  ? update_load_avg+0x7e/0x5e0
[  562.334285]  gro_normal_list.part.149+0x19/0x40
[  562.334722]  napi_complete_done+0x67/0x160
[  562.335134]  virtnet_poll+0x2ad/0x408 [virtio_net]
[  562.335644]  __napi_poll+0x28/0x140
[  562.336012]  net_rx_action+0x23d/0x300
[  562.336414]  __do_softirq+0xf2/0x2ea
[  562.336803]  irq_exit_rcu+0xc1/0xf0
[  562.337173]  common_interrupt+0xb9/0xd0

It is and was always forbidden to call kernel_getpeername() in context of error_report(). To get rid of the problem we access the destination address for the peer over the socket structure. While on it we fix to print out the destination port of the inet socket.

Fixes 1a31833d085a ("DLM: Replace nodeid_to_addr with kernel_getpeername")
---
 fs/dlm/lowcomms.c | 42 ++++++++++++++++++++----------------------
 1 file changed, 20 insertions(+), 22 deletions(-)
fs/dlm/lowcomms.c +20 -22
index 8f715c620e1f8..7b1c5f05a988b 100644
@@ -592,8 +592,8 @@ int dlm_lowcomms_nodes_set_mark(int nodeid, unsigned int mark)
 static void lowcomms_error_report(struct sock *sk)
 {
 	struct connection *con;
-	struct sockaddr_storage saddr;
 	void (*orig_report)(struct sock *) = NULL;
+	struct inet_sock *inet;
 
 	read_lock_bh(&sk->sk_callback_lock);
 	con = sock2con(sk);
@@ -601,33 +601,31 @@ static void lowcomms_error_report(struct sock *sk)
 		goto out;
 
 	orig_report = listen_sock.sk_error_report;
-	if (kernel_getpeername(sk->sk_socket, (struct sockaddr *)&saddr) < 0) {
-		printk_ratelimited(KERN_ERR "dlm: node %d: socket error "
-				   "sending to node %d, port %d, "
-				   "sk_err=%d/%d\n", dlm_our_nodeid(),
-				   con->nodeid, dlm_config.ci_tcp_port,
-				   sk->sk_err, sk->sk_err_soft);
-	} else if (saddr.ss_family == AF_INET) {
-		struct sockaddr_in *sin4 = (struct sockaddr_in *)&saddr;
 
+	inet = inet_sk(sk);
+	switch (sk->sk_family) {
+	case AF_INET:
 		printk_ratelimited(KERN_ERR "dlm: node %d: socket error "
-				   "sending to node %d at %pI4, port %d, "
+				   "sending to node %d at %pI4, dport %d, "
 				   "sk_err=%d/%d\n", dlm_our_nodeid(),
-				   con->nodeid, &sin4->sin_addr.s_addr,
-				   dlm_config.ci_tcp_port, sk->sk_err,
+				   con->nodeid, &inet->inet_daddr,
+				   ntohs(inet->inet_dport), sk->sk_err,
 				   sk->sk_err_soft);
-	} else {
-		struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&saddr;
-
+		break;
+	case AF_INET6:
 		printk_ratelimited(KERN_ERR "dlm: node %d: socket error "
-				   "sending to node %d at %u.%u.%u.%u, "
-				   "port %d, sk_err=%d/%d\n", dlm_our_nodeid(),
-				   con->nodeid, sin6->sin6_addr.s6_addr32[0],
-				   sin6->sin6_addr.s6_addr32[1],
-				   sin6->sin6_addr.s6_addr32[2],
-				   sin6->sin6_addr.s6_addr32[3],
-				   dlm_config.ci_tcp_port, sk->sk_err,
+				   "sending to node %d at %pI6c, "
+				   "dport %d, sk_err=%d/%d\n", dlm_our_nodeid(),
+				   con->nodeid, &sk->sk_v6_daddr,
+				   ntohs(inet->inet_dport), sk->sk_err,
 				   sk->sk_err_soft);
+		break;
+	default:
+		printk_ratelimited(KERN_ERR "dlm: node %d: socket error "
+				   "invalid socket family %d set, "
+				   "sk_err=%d/%d\n", dlm_our_nodeid(),
+				   sk->sk_family, sk->sk_err, sk->sk_err_soft);
+		goto out;
 	}
 
 	/* below sendcon only handling */
Signature · 1 line
2.34.1
author maintainer
#140 lore raw

PATCH 140/1039 Bluetooth: fix uninitialized variables notify_evt

In reply to Greg Kroah-Hartman

From: Jackie Liu <[email protected]>

[ Upstream commit a27c519a816437ec92f0ffa3adbc168c2c08725b ]

Coverity Scan report:

[...]
*** CID 1493985: Uninitialized variables (UNINIT) /net/bluetooth/hci_event.c: 4535 in hci_sync_conn_complete_evt() 4529

4530     	/* Notify only in case of SCO over HCI transport data path which
4531     	 * is zero and non-zero value shall be non-HCI transport data path
4532     	 */
4533     	if (conn->codec.data_path == 0) {
4534     		if (hdev->notify)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

CID 1493985: Uninitialized variables (UNINIT)
Using uninitialized value "notify_evt" when calling "*hdev->notify".

4535 hdev->notify(hdev, notify_evt);
4536 }
4537

4538     	hci_connect_cfm(conn, ev->status);
4539     	if (ev->status)
4540     		hci_conn_del(conn);

[...]

Although only btusb uses air_mode, and he only handles HCI_NOTIFY_ENABLE_SCO_CVSD and HCI_NOTIFY_ENABLE_SCO_TRANSP, there is still a very small chance that ev->air_mode is not equal to 0x2 and 0x3, but notify_evt is initialized to HCI_NOTIFY_ENABLE_SCO_CVSD or HCI_NOTIFY_ENABLE_SCO_TRANSP. the context is maybe not correct.

Let us directly use the required function instead of re-initializing it, so as to restore the original logic and make the code more correct.

Addresses-Coverity: ("Uninitialized variables")

Fixes f4f9fa0c07bb ("Bluetooth: Allow usb to auto-suspend when SCO use non-HCI transport")
---
 net/bluetooth/hci_event.c | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)
net/bluetooth/hci_event.c +9 -14
index 59f0691d907f6..6eba439487749 100644
@@ -4445,7 +4445,6 @@ static void hci_sync_conn_complete_evt(struct hci_dev *hdev,
 {
 	struct hci_ev_sync_conn_complete *ev = (void *) skb->data;
 	struct hci_conn *conn;
-	unsigned int notify_evt;
 
 	BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
 
@@ -4517,22 +4516,18 @@ static void hci_sync_conn_complete_evt(struct hci_dev *hdev,
 	}
 
 	bt_dev_dbg(hdev, "SCO connected with air mode: %02x", ev->air_mode);
-
-	switch (ev->air_mode) {
-	case 0x02:
-		notify_evt = HCI_NOTIFY_ENABLE_SCO_CVSD;
-		break;
-	case 0x03:
-		notify_evt = HCI_NOTIFY_ENABLE_SCO_TRANSP;
-		break;
-	}
-
 	/* Notify only in case of SCO over HCI transport data path which
 	 * is zero and non-zero value shall be non-HCI transport data path
 	 */
-	if (conn->codec.data_path == 0) {
-		if (hdev->notify)
-			hdev->notify(hdev, notify_evt);
+	if (conn->codec.data_path == 0 && hdev->notify) {
+		switch (ev->air_mode) {
+		case 0x02:
+			hdev->notify(hdev, HCI_NOTIFY_ENABLE_SCO_CVSD);
+			break;
+		case 0x03:
+			hdev->notify(hdev, HCI_NOTIFY_ENABLE_SCO_TRANSP);
+			break;
+		}
 	}
 
 	hci_connect_cfm(conn, ev->status);
Signature · 1 line
2.34.1
author maintainer
#151 lore raw

PATCH 151/1039 drm/vboxvideo: fix a NULL vs IS_ERR() check

In reply to Greg Kroah-Hartman

From: Dan Carpenter <[email protected]>

[ Upstream commit cebbb5c46d0cb0615fd0c62dea9b44273d0a9780 ]

The devm_gen_pool_create() function never returns NULL, it returns error pointers.

---
 drivers/gpu/drm/vboxvideo/vbox_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/vboxvideo/vbox_main.c +2 -2
index f28779715ccda..c9e8b3a63c621 100644
@@ -127,8 +127,8 @@ int vbox_hw_init(struct vbox_private *vbox)
 	/* Create guest-heap mem-pool use 2^4 = 16 byte chunks */
 	vbox->guest_pool = devm_gen_pool_create(vbox->ddev.dev, 4, -1,
 						"vboxvideo-accel");
-	if (!vbox->guest_pool)
-		return -ENOMEM;
+	if (IS_ERR(vbox->guest_pool))
+		return PTR_ERR(vbox->guest_pool);
 
 	ret = gen_pool_add_virt(vbox->guest_pool,
 				(unsigned long)vbox->guest_heap,
Signature · 1 line
2.34.1
author maintainer
#78 lore raw

PATCH 78/1039 ath11k: add string type to search board data in board-2.bin for WCN6855

In reply to Greg Kroah-Hartman

From: Wen Gong <[email protected]>

commit fc95d10ac41d75c14a81afcc8722333d8b2cf80f upstream.

Currently ath11k only support string type with bus, chip id and board id such as "bus=ahb,qmi-chip-id=1,qmi-board-id=4" for ahb bus chip and "bus=pci,qmi-chip-id=0,qmi-board-id=255" for PCIe bus chip in board-2.bin. For WCN6855, it is not enough to distinguish all different chips.

This is to add a new string type which include bus, chip id, board id, vendor, device, subsystem-vendor and subsystem-device for WCN6855.

ath11k will first load board-2.bin and search in it for the board data with the above parameters, if matched one board data, then download it to firmware, if not matched any one, then ath11k will download the file board.bin to firmware.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1

---
 drivers/net/wireless/ath/ath11k/core.c |   27 +++++++++++++++++++++------
 drivers/net/wireless/ath/ath11k/core.h |   13 +++++++++++++
 drivers/net/wireless/ath/ath11k/pci.c  |   10 ++++++++++
 3 files changed, 44 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath11k/core.c +21 -6
@@ -392,11 +392,26 @@ static int ath11k_core_create_board_name
 		scnprintf(variant, sizeof(variant), ",variant=%s",
 			  ab->qmi.target.bdf_ext);
 
-	scnprintf(name, name_len,
-		  "bus=%s,qmi-chip-id=%d,qmi-board-id=%d%s",
-		  ath11k_bus_str(ab->hif.bus),
-		  ab->qmi.target.chip_id,
-		  ab->qmi.target.board_id, variant);
+	switch (ab->id.bdf_search) {
+	case ATH11K_BDF_SEARCH_BUS_AND_BOARD:
+		scnprintf(name, name_len,
+			  "bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s",
+			  ath11k_bus_str(ab->hif.bus),
+			  ab->id.vendor, ab->id.device,
+			  ab->id.subsystem_vendor,
+			  ab->id.subsystem_device,
+			  ab->qmi.target.chip_id,
+			  ab->qmi.target.board_id,
+			  variant);
+		break;
+	default:
+		scnprintf(name, name_len,
+			  "bus=%s,qmi-chip-id=%d,qmi-board-id=%d%s",
+			  ath11k_bus_str(ab->hif.bus),
+			  ab->qmi.target.chip_id,
+			  ab->qmi.target.board_id, variant);
+		break;
+	}
 
 	ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot using board name '%s'\n", name);
 
@@ -633,7 +648,7 @@ static int ath11k_core_fetch_board_data_
 	return 0;
 }
 
-#define BOARD_NAME_SIZE 100
+#define BOARD_NAME_SIZE 200
 int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
 {
 	char boardname[BOARD_NAME_SIZE];
drivers/net/wireless/ath/ath11k/core.h +13 -0
@@ -47,6 +47,11 @@ enum ath11k_supported_bw {
 	ATH11K_BW_160	= 3,
 };
 
+enum ath11k_bdf_search {
+	ATH11K_BDF_SEARCH_DEFAULT,
+	ATH11K_BDF_SEARCH_BUS_AND_BOARD,
+};
+
 enum wme_ac {
 	WME_AC_BE,
 	WME_AC_BK,
@@ -759,6 +764,14 @@ struct ath11k_base {
 
 	struct completion htc_suspend;
 
+	struct {
+		enum ath11k_bdf_search bdf_search;
+		u32 vendor;
+		u32 device;
+		u32 subsystem_vendor;
+		u32 subsystem_device;
+	} id;
+
 	/* must be last */
 	u8 drv_priv[0] __aligned(sizeof(void *));
 };
drivers/net/wireless/ath/ath11k/pci.c +10 -0
@@ -1251,6 +1251,15 @@ static int ath11k_pci_probe(struct pci_d
 		goto err_free_core;
 	}
 
+	ath11k_dbg(ab, ATH11K_DBG_BOOT, "pci probe %04x:%04x %04x:%04x\n",
+		   pdev->vendor, pdev->device,
+		   pdev->subsystem_vendor, pdev->subsystem_device);
+
+	ab->id.vendor = pdev->vendor;
+	ab->id.device = pdev->device;
+	ab->id.subsystem_vendor = pdev->subsystem_vendor;
+	ab->id.subsystem_device = pdev->subsystem_device;
+
 	switch (pci_dev->device) {
 	case QCA6390_DEVICE_ID:
 		ath11k_pci_read_hw_version(ab, &soc_hw_version_major,
@@ -1273,6 +1282,7 @@ static int ath11k_pci_probe(struct pci_d
 		ab->hw_rev = ATH11K_HW_QCN9074_HW10;
 		break;
 	case WCN6855_DEVICE_ID:
+		ab->id.bdf_search = ATH11K_BDF_SEARCH_BUS_AND_BOARD;
 		ath11k_pci_read_hw_version(ab, &soc_hw_version_major,
 					   &soc_hw_version_minor);
 		switch (soc_hw_version_major) {
author maintainer
#154 lore raw

PATCH 154/1039 ath11k: add hw_param for wakeup_mhi

In reply to Greg Kroah-Hartman

From: Seevalamuthu Mariappan <[email protected]>

[ Upstream commit 081e2d6476e30399433b509684d5da4d1844e430 ]

Wakeup mhi is needed before pci_read/write only for QCA6390 and WCN6855. Since wakeup & release mhi is enabled for all hardwares, below mhi assert is seen in QCN9074 when doing 'rmmod ath11k_pci':

	Kernel panic - not syncing: dev_wake != 0
	CPU: 2 PID: 13535 Comm: procd Not tainted 4.4.60 #1
	Hardware name: Generic DT based system
	[<80316dac>] (unwind_backtrace) from [<80313700>] (show_stack+0x10/0x14)
	[<80313700>] (show_stack) from [<805135dc>] (dump_stack+0x7c/0x9c)
	[<805135dc>] (dump_stack) from [<8032136c>] (panic+0x84/0x1f8)
	[<8032136c>] (panic) from [<80549b24>] (mhi_pm_disable_transition+0x3b8/0x5b8)
	[<80549b24>] (mhi_pm_disable_transition) from [<80549ddc>] (mhi_power_down+0xb8/0x100)
	[<80549ddc>] (mhi_power_down) from [<7f5242b0>] (ath11k_mhi_op_status_cb+0x284/0x3ac [ath11k_pci])
	[E][__mhi_device_get_sync] Did not enter M0 state, cur_state:RESET pm_state:SHUTDOWN Process
	[E][__mhi_device_get_sync] Did not enter M0 state, cur_state:RESET pm_state:SHUTDOWN Process
	[E][__mhi_device_get_sync] Did not enter M0 state, cur_state:RESET pm_state:SHUTDOWN Process
	[<7f5242b0>] (ath11k_mhi_op_status_cb [ath11k_pci]) from [<7f524878>] (ath11k_mhi_stop+0x10/0x20 [ath11k_pci])
	[<7f524878>] (ath11k_mhi_stop [ath11k_pci]) from [<7f525b94>] (ath11k_pci_power_down+0x54/0x90 [ath11k_pci])
	[<7f525b94>] (ath11k_pci_power_down [ath11k_pci]) from [<8056b2a8>] (pci_device_shutdown+0x30/0x44)
	[<8056b2a8>] (pci_device_shutdown) from [<805cfa0c>] (device_shutdown+0x124/0x174)
	[<805cfa0c>] (device_shutdown) from [<8033aaa4>] (kernel_restart+0xc/0x50)
	[<8033aaa4>] (kernel_restart) from [<8033ada8>] (SyS_reboot+0x178/0x1ec)
	[<8033ada8>] (SyS_reboot) from [<80301b80>] (ret_fast_syscall+0x0/0x34)

Hence, disable wakeup/release mhi using hw_param for other hardwares.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01060-QCAHKSWPL_SILICONZ-1

Fixes a05bd8513335 ("ath11k: read and write registers below unwindowed address")
---
 drivers/net/wireless/ath/ath11k/core.c |  5 +++++
 drivers/net/wireless/ath/ath11k/hw.h   |  1 +
 drivers/net/wireless/ath/ath11k/pci.c  | 12 ++++++++----
 3 files changed, 14 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/core.c +5 -0
index 280f1c6411aeb..638dc97669df2 100644
@@ -84,6 +84,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.hal_params = &ath11k_hw_hal_params_ipq8074,
 		.supports_dynamic_smps_6ghz = false,
 		.alloc_cacheable_memory = true,
+		.wakeup_mhi = false,
 	},
 	{
 		.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -135,6 +136,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.hal_params = &ath11k_hw_hal_params_ipq8074,
 		.supports_dynamic_smps_6ghz = false,
 		.alloc_cacheable_memory = true,
+		.wakeup_mhi = false,
 	},
 	{
 		.name = "qca6390 hw2.0",
@@ -185,6 +187,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.hal_params = &ath11k_hw_hal_params_qca6390,
 		.supports_dynamic_smps_6ghz = false,
 		.alloc_cacheable_memory = false,
+		.wakeup_mhi = true,
 	},
 	{
 		.name = "qcn9074 hw1.0",
@@ -235,6 +238,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.hal_params = &ath11k_hw_hal_params_ipq8074,
 		.supports_dynamic_smps_6ghz = true,
 		.alloc_cacheable_memory = true,
+		.wakeup_mhi = false,
 	},
 	{
 		.name = "wcn6855 hw2.0",
@@ -285,6 +289,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.hal_params = &ath11k_hw_hal_params_qca6390,
 		.supports_dynamic_smps_6ghz = false,
 		.alloc_cacheable_memory = false,
+		.wakeup_mhi = true,
 	},
 };
 
drivers/net/wireless/ath/ath11k/hw.h +1 -0
index de9e9546f2ec6..aa93f0619f936 100644
@@ -178,6 +178,7 @@ struct ath11k_hw_params {
 	const struct ath11k_hw_hal_params *hal_params;
 	bool supports_dynamic_smps_6ghz;
 	bool alloc_cacheable_memory;
+	bool wakeup_mhi;
 };
 
 struct ath11k_hw_ops {
drivers/net/wireless/ath/ath11k/pci.c +8 -4
index 3d353e7c9d5c2..fadded5ef84b2 100644
@@ -182,7 +182,8 @@ void ath11k_pci_write32(struct ath11k_base *ab, u32 offset, u32 value)
 	/* for offset beyond BAR + 4K - 32, may
 	 * need to wakeup MHI to access.
 	 */
-	if (test_bit(ATH11K_PCI_FLAG_INIT_DONE, &ab_pci->flags) &&
+	if (ab->hw_params.wakeup_mhi &&
+	    test_bit(ATH11K_PCI_FLAG_INIT_DONE, &ab_pci->flags) &&
 	    offset >= ACCESS_ALWAYS_OFF)
 		mhi_device_get_sync(ab_pci->mhi_ctrl->mhi_dev);
 
@@ -206,7 +207,8 @@ void ath11k_pci_write32(struct ath11k_base *ab, u32 offset, u32 value)
 		}
 	}
 
-	if (test_bit(ATH11K_PCI_FLAG_INIT_DONE, &ab_pci->flags) &&
+	if (ab->hw_params.wakeup_mhi &&
+	    test_bit(ATH11K_PCI_FLAG_INIT_DONE, &ab_pci->flags) &&
 	    offset >= ACCESS_ALWAYS_OFF)
 		mhi_device_put(ab_pci->mhi_ctrl->mhi_dev);
 }
@@ -219,7 +221,8 @@ u32 ath11k_pci_read32(struct ath11k_base *ab, u32 offset)
 	/* for offset beyond BAR + 4K - 32, may
 	 * need to wakeup MHI to access.
 	 */
-	if (test_bit(ATH11K_PCI_FLAG_INIT_DONE, &ab_pci->flags) &&
+	if (ab->hw_params.wakeup_mhi &&
+	    test_bit(ATH11K_PCI_FLAG_INIT_DONE, &ab_pci->flags) &&
 	    offset >= ACCESS_ALWAYS_OFF)
 		mhi_device_get_sync(ab_pci->mhi_ctrl->mhi_dev);
 
@@ -243,7 +246,8 @@ u32 ath11k_pci_read32(struct ath11k_base *ab, u32 offset)
 		}
 	}
 
-	if (test_bit(ATH11K_PCI_FLAG_INIT_DONE, &ab_pci->flags) &&
+	if (ab->hw_params.wakeup_mhi &&
+	    test_bit(ATH11K_PCI_FLAG_INIT_DONE, &ab_pci->flags) &&
 	    offset >= ACCESS_ALWAYS_OFF)
 		mhi_device_put(ab_pci->mhi_ctrl->mhi_dev);
 
Signature · 1 line
2.34.1
author maintainer
#125 lore raw

PATCH 125/1039 media: atomisp: fix inverted error check for ia_css_mipi_is_source_port_valid()

In reply to Greg Kroah-Hartman

From: Tsuchiya Yuto <[email protected]>

[ Upstream commit d21ce8c2f7bf6d737b60c09f86db141b9e8e47f0 ]

The function ia_css_mipi_is_source_port_valid() returns true if the port is valid. So, we can't use the existing err variable as is.

To fix this issue while reusing that variable, invert the return value when assigning it to the variable.

Fixes 3c0538fbad9f ("media: atomisp: get rid of most checks for ISP2401 version")
---
 .../staging/media/atomisp/pci/sh_css_mipi.c   | 24 ++++++++++++-------
 1 file changed, 15 insertions(+), 9 deletions(-)
drivers/staging/media/atomisp/pci/sh_css_mipi.c +15 -9
index 65fc93c5d56bc..c1f2f6151c5f8 100644
@@ -423,10 +423,12 @@ allocate_mipi_frames(struct ia_css_pipe *pipe,
 		return 0; /* AM TODO: Check  */
 	}
 
-	if (!IS_ISP2401)
+	if (!IS_ISP2401) {
 		port = (unsigned int)pipe->stream->config.source.port.port;
-	else
-		err = ia_css_mipi_is_source_port_valid(pipe, &port);
+	} else {
+		/* Returns true if port is valid. So, invert it */
+		err = !ia_css_mipi_is_source_port_valid(pipe, &port);
+	}
 
 	assert(port < N_CSI_PORTS);
 
@@ -553,10 +555,12 @@ free_mipi_frames(struct ia_css_pipe *pipe)
 			return err;
 		}
 
-		if (!IS_ISP2401)
+		if (!IS_ISP2401) {
 			port = (unsigned int)pipe->stream->config.source.port.port;
-		else
-			err = ia_css_mipi_is_source_port_valid(pipe, &port);
+		} else {
+			/* Returns true if port is valid. So, invert it */
+			err = !ia_css_mipi_is_source_port_valid(pipe, &port);
+		}
 
 		assert(port < N_CSI_PORTS);
 
@@ -665,10 +669,12 @@ send_mipi_frames(struct ia_css_pipe *pipe)
 		/* TODO: AM: maybe this should be returning an error. */
 	}
 
-	if (!IS_ISP2401)
+	if (!IS_ISP2401) {
 		port = (unsigned int)pipe->stream->config.source.port.port;
-	else
-		err = ia_css_mipi_is_source_port_valid(pipe, &port);
+	} else {
+		/* Returns true if port is valid. So, invert it */
+		err = !ia_css_mipi_is_source_port_valid(pipe, &port);
+	}
 
 	assert(port < N_CSI_PORTS);
 
Signature · 1 line
2.34.1
author maintainer
#128 lore raw

PATCH 128/1039 media: atomisp: fix enum formats logic

In reply to Greg Kroah-Hartman

From: Mauro Carvalho Chehab <[email protected]>

[ Upstream commit fae46cb0531b45c789e39128f676f2bafa3a7b47 ]

Changeset 374d62e7aa50 ("media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument") added an extra verification for a pads parameter for enum mbus
format code.

Such change broke atomisp, because now the V4L2 core refuses to enum MBUS formats if the state is empty.

So, add .which field in order to select the active formats, in order to make it work again.

While here, improve error messages.

Fixes 374d62e7aa50 ("media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument")
---
 .../staging/media/atomisp/pci/atomisp_ioctl.c | 23 ++++++++++++++-----
 1 file changed, 17 insertions(+), 6 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_ioctl.c +17 -6
index a57e640fbf791..29826f8e4143d 100644
@@ -773,7 +773,10 @@ static int atomisp_enum_fmt_cap(struct file *file, void *fh,
 	struct video_device *vdev = video_devdata(file);
 	struct atomisp_device *isp = video_get_drvdata(vdev);
 	struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
-	struct v4l2_subdev_mbus_code_enum code = { 0 };
+	struct v4l2_subdev_mbus_code_enum code = {
+		.which = V4L2_SUBDEV_FORMAT_ACTIVE,
+	};
+	struct v4l2_subdev *camera;
 	unsigned int i, fi = 0;
 	int rval;
 
@@ -783,14 +786,20 @@ static int atomisp_enum_fmt_cap(struct file *file, void *fh,
 		return -EINVAL;
 	}
 
+	camera = isp->inputs[asd->input_curr].camera;
+	if(!camera) {
+		dev_err(isp->dev, "%s(): camera is NULL, device is %s\n",
+			__func__, vdev->name);
+		return -EINVAL;
+	}
+
 	rt_mutex_lock(&isp->mutex);
-	rval = v4l2_subdev_call(isp->inputs[asd->input_curr].camera, pad,
-				enum_mbus_code, NULL, &code);
+
+	rval = v4l2_subdev_call(camera, pad, enum_mbus_code, NULL, &code);
 	if (rval == -ENOIOCTLCMD) {
 		dev_warn(isp->dev,
-			 "enum_mbus_code pad op not supported. Please fix your sensor driver!\n");
-		//	rval = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
-		//				video, enum_mbus_fmt, 0, &code.code);
+			 "enum_mbus_code pad op not supported by %s. Please fix your sensor driver!\n",
+			 camera->name);
 	}
 	rt_mutex_unlock(&isp->mutex);
 
@@ -820,6 +829,8 @@ static int atomisp_enum_fmt_cap(struct file *file, void *fh,
 		f->pixelformat = format->pixelformat;
 		return 0;
 	}
+	dev_err(isp->dev, "%s(): format for code %x not found.\n",
+		__func__, code.code);
 
 	return -EINVAL;
 }
Signature · 1 line
2.34.1
author maintainer
#165 lore raw

PATCH 165/1039 cpufreq: qcom-cpufreq-hw: Update offline CPUs per-cpu thermal pressure

In reply to Greg Kroah-Hartman

From: Lukasz Luba <[email protected]>

[ Upstream commit 93d9e6f93e1586fcc97498c764be2e8c8401f4bd ]

The thermal pressure signal gives information to the scheduler about reduced CPU capacity due to thermal. It is based on a value stored in a per-cpu 'thermal_pressure' variable. The online CPUs will get the new value there, while the offline won't. Unfortunately, when the CPU is back online, the value read from per-cpu variable might be wrong (stale data). This might affect the scheduler decisions, since it sees the CPU capacity differently than what is actually available.

Fix it by making sure that all online+offline CPUs would get the proper value in their per-cpu variable when there is throttling or throttling is removed.

Fixes 275157b367f479 ("cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support")
---
 drivers/cpufreq/qcom-cpufreq-hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cpufreq/qcom-cpufreq-hw.c +2 -1
index a2be0df7e1747..0138b2ec406dc 100644
@@ -304,7 +304,8 @@ static void qcom_lmh_dcvs_notify(struct qcom_cpufreq_data *data)
 	if (capacity > max_capacity)
 		capacity = max_capacity;
 
-	arch_set_thermal_pressure(policy->cpus, max_capacity - capacity);
+	arch_set_thermal_pressure(policy->related_cpus,
+				  max_capacity - capacity);
 
 	/*
 	 * In the unlikely case policy is unregistered do not enable
Signature · 1 line
2.34.1
author maintainer
#166 lore raw

PATCH 166/1039 soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active

In reply to Greg Kroah-Hartman

From: Adam Ford <[email protected]>

[ Upstream commit 8361b8b29f9389084b679db854cf733375c64763 ]

Enable the vpu-h1 clock when the domain is active because reading or writing to the VPU-H1 IP block cause the system to hang.

Fixes 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
---
 drivers/soc/imx/gpcv2.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/imx/gpcv2.c +1 -0
index b8d52d8d29dbb..7b6dfa33dcb9f 100644
@@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
 			.map = IMX8MM_VPUH1_A53_DOMAIN,
 		},
 		.pgc   = BIT(IMX8MM_PGC_VPUH1),
+		.keep_clocks = true,
 	},
 
 	[IMX8MM_POWER_DOMAIN_DISPMIX] = {
Signature · 1 line
2.34.1
author maintainer
#168 lore raw

PATCH 168/1039 ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding on stm32f429 disco

In reply to Greg Kroah-Hartman

From: Dillon Min <[email protected]>

[ Upstream commit b046049e59dca5e5830dc75ed16acf7657a95161 ]

Since the compatible string defined from ilitek,ili9341.yaml is "st,sf-tc240t-9370-t", "ilitek,ili9341"

so, append "ilitek,ili9341" to avoid the below dtbs_check warning.

arch/arm/boot/dts/stm32f429-disco.dt.yaml: display@1: compatible:
['st,sf-tc240t-9370-t'] is too short

Fixes a726e2f000ec ("ARM: dts: stm32: enable ltdc binding with ili9341, gyro l3gd20 on stm32429-disco board")
---
 arch/arm/boot/dts/stm32f429-disco.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/stm32f429-disco.dts +1 -1
index 075ac57d0bf4a..6435e099c6326 100644
@@ -192,7 +192,7 @@
 
 	display: display@1{
 		/* Connect panel-ilitek-9341 to ltdc */
-		compatible = "st,sf-tc240t-9370-t";
+		compatible = "st,sf-tc240t-9370-t", "ilitek,ili9341";
 		reg = <1>;
 		spi-3wire;
 		spi-max-frequency = <10000000>;
Signature · 1 line
2.34.1
author maintainer
#172 lore raw

PATCH 172/1039 libbpf: Fix glob_syms memory leak in bpf_linker

In reply to Greg Kroah-Hartman

From: Andrii Nakryiko <[email protected]>

[ Upstream commit 8cb125566c40b7141d8842c534f0ea5820ee3d5c ]

glob_syms array wasn't freed on bpf_link__free(). Fix that.

Fixes a46349227cd8 ("libbpf: Add linker extern resolution support for functions and global variables")
---
 tools/lib/bpf/linker.c | 1 +
 1 file changed, 1 insertion(+)
tools/lib/bpf/linker.c +1 -0
index f677dccdeae44..94bdd97859285 100644
@@ -210,6 +210,7 @@ void bpf_linker__free(struct bpf_linker *linker)
 	}
 	free(linker->secs);
 
+	free(linker->glob_syms);
 	free(linker);
 }
 
Signature · 1 line
2.34.1
author maintainer
#157 lore raw

PATCH 157/1039 crypto: atmel-aes - Reestablish the correct tfm context at dequeue

In reply to Greg Kroah-Hartman

From: Tudor Ambarus <[email protected]>

[ Upstream commit 6d48de655917a9d782953eba65de4e3db593ddf0 ]

In case there were more requests from different tfms in the crypto queue, only the context of the last initialized tfm was considered.

Fixes ec2088b66f7a ("crypto: atmel-aes - Allocate aes dev at tfm init time")
---
 drivers/crypto/atmel-aes.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/crypto/atmel-aes.c +1 -5
index 9391ccc03382d..fe05584031914 100644
@@ -960,6 +960,7 @@ static int atmel_aes_handle_queue(struct atmel_aes_dev *dd,
 	ctx = crypto_tfm_ctx(areq->tfm);
 
 	dd->areq = areq;
+	dd->ctx = ctx;
 	start_async = (areq != new_areq);
 	dd->is_async = start_async;
 
@@ -1274,7 +1275,6 @@ static int atmel_aes_init_tfm(struct crypto_skcipher *tfm)
 
 	crypto_skcipher_set_reqsize(tfm, sizeof(struct atmel_aes_reqctx));
 	ctx->base.dd = dd;
-	ctx->base.dd->ctx = &ctx->base;
 	ctx->base.start = atmel_aes_start;
 
 	return 0;
@@ -1291,7 +1291,6 @@ static int atmel_aes_ctr_init_tfm(struct crypto_skcipher *tfm)
 
 	crypto_skcipher_set_reqsize(tfm, sizeof(struct atmel_aes_reqctx));
 	ctx->base.dd = dd;
-	ctx->base.dd->ctx = &ctx->base;
 	ctx->base.start = atmel_aes_ctr_start;
 
 	return 0;
@@ -1783,7 +1782,6 @@ static int atmel_aes_gcm_init(struct crypto_aead *tfm)
 
 	crypto_aead_set_reqsize(tfm, sizeof(struct atmel_aes_reqctx));
 	ctx->base.dd = dd;
-	ctx->base.dd->ctx = &ctx->base;
 	ctx->base.start = atmel_aes_gcm_start;
 
 	return 0;
@@ -1927,7 +1925,6 @@ static int atmel_aes_xts_init_tfm(struct crypto_skcipher *tfm)
 	crypto_skcipher_set_reqsize(tfm, sizeof(struct atmel_aes_reqctx) +
 				    crypto_skcipher_reqsize(ctx->fallback_tfm));
 	ctx->base.dd = dd;
-	ctx->base.dd->ctx = &ctx->base;
 	ctx->base.start = atmel_aes_xts_start;
 
 	return 0;
@@ -2154,7 +2151,6 @@ static int atmel_aes_authenc_init_tfm(struct crypto_aead *tfm,
 	crypto_aead_set_reqsize(tfm, (sizeof(struct atmel_aes_authenc_reqctx) +
 				      auth_reqsize));
 	ctx->base.dd = dd;
-	ctx->base.dd->ctx = &ctx->base;
 	ctx->base.start = atmel_aes_authenc_start;
 
 	return 0;
Signature · 1 line
2.34.1
author maintainer
#174 lore raw

PATCH 174/1039 crypto: qat - fix undetected PFVF timeout in ACK loop

In reply to Greg Kroah-Hartman

From: Giovanni Cabiddu <[email protected]>

[ Upstream commit 5002200b4fedd7e90e4fbc2e5c42a4b3351df814 ]

If the remote function did not ACK the reception of a message, the function __adf_iov_putmsg() could detect it as a collision.

This was due to the fact that the collision and the timeout checks after the ACK loop were in the wrong order. The timeout must be checked at the end of the loop, so fix by swapping the order of the two checks.

Fixes 9b768e8a3909 ("crypto: qat - detect PFVF collision after ACK")
---
 drivers/crypto/qat/qat_common/adf_pf2vf_msg.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/qat/qat_common/adf_pf2vf_msg.c +6 -6
index 59860bdaedb69..99ee17c3d06bf 100644
@@ -107,6 +107,12 @@ static int __adf_iov_putmsg(struct adf_accel_dev *accel_dev, u32 msg, u8 vf_nr)
 		val = ADF_CSR_RD(pmisc_bar_addr, pf2vf_offset);
 	} while ((val & int_bit) && (count++ < ADF_PFVF_MSG_ACK_MAX_RETRY));
 
+	if (val & int_bit) {
+		dev_dbg(&GET_DEV(accel_dev), "ACK not received from remote\n");
+		val &= ~int_bit;
+		ret = -EIO;
+	}
+
 	if (val != msg) {
 		dev_dbg(&GET_DEV(accel_dev),
 			"Collision - PFVF CSR overwritten by remote function\n");
@@ -114,12 +120,6 @@ static int __adf_iov_putmsg(struct adf_accel_dev *accel_dev, u32 msg, u8 vf_nr)
 		goto out;
 	}
 
-	if (val & int_bit) {
-		dev_dbg(&GET_DEV(accel_dev), "ACK not received from remote\n");
-		val &= ~int_bit;
-		ret = -EIO;
-	}
-
 	/* Finished with the PFVF CSR; relinquish it and leave msg in CSR */
 	ADF_CSR_WR(pmisc_bar_addr, pf2vf_offset, val & ~local_in_use_mask);
 out:
Signature · 1 line
2.34.1
author maintainer
#103 lore raw

PATCH 103/1039 drm/virtio: fix potential integer overflow on shift of a int

In reply to Greg Kroah-Hartman

From: Colin Ian King <[email protected]>

[ Upstream commit 8f4502fa284478a5264afa8a5a95511276fa9b80 ]

The left shift of unsigned int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to a signed 64 bit integer. In the case where i is 32 or more this can lead to an overflow. Fix this by shifting the value 1ULL instead.

Addresses-Coverity: ("Uninitentional integer overflow")

Fixes 8d6b006e1f51 ("drm/virtio: implement context init: handle VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK")
---
 drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_ioctl.c +1 -1
index 3607646d32295..5e8103a197a96 100644
@@ -819,7 +819,7 @@ static int virtio_gpu_context_init_ioctl(struct drm_device *dev,
 	if (vfpriv->ring_idx_mask) {
 		valid_ring_mask = 0;
 		for (i = 0; i < vfpriv->num_rings; i++)
-			valid_ring_mask |= 1 << i;
+			valid_ring_mask |= 1ULL << i;
 
 		if (~valid_ring_mask & vfpriv->ring_idx_mask) {
 			ret = -EINVAL;
Signature · 1 line
2.34.1
author maintainer
#175 lore raw

PATCH 175/1039 ath11k: Use host CE parameters for CE interrupts configuration

In reply to Greg Kroah-Hartman

From: Anilkumar Kolli <[email protected]>

[ Upstream commit b689f091aafd1a874b2f88137934276ab0fca480 ]

CE interrupt configuration uses host ce parameters to assign/free interrupts. Use host ce parameters to enable/disable interrupts. This patch fixes below BUG,

BUG: KASAN: global-out-of-bounds in 0xffffffbffdfb035c at addr
ffffffbffde6eeac
 Read of size 4 by task kworker/u8:2/132
 Address belongs to variable ath11k_core_qmi_firmware_ready+0x1b0/0x5bc [ath11k]

OOB is due to ath11k_ahb_ce_irqs_enable() iterates ce_count(which is 12) times and accessing 12th element in target_ce_config
(which has only 11 elements) from ath11k_ahb_ce_irq_enable().

With this change host ce configs are used to enable/disable interrupts.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-00471-QCAHKSWPL_SILICONZ-1

Fixes 967c1d1131fa ("ath11k: move target ce configs to hw_params")
---
 drivers/net/wireless/ath/ath11k/ahb.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath11k/ahb.c +8 -8
index 8c9c781afc3e5..096c502cce387 100644
@@ -206,13 +206,13 @@ static void ath11k_ahb_clearbit32(struct ath11k_base *ab, u8 bit, u32 offset)
 
 static void ath11k_ahb_ce_irq_enable(struct ath11k_base *ab, u16 ce_id)
 {
-	const struct ce_pipe_config *ce_config;
+	const struct ce_attr *ce_attr;
 
-	ce_config = &ab->hw_params.target_ce_config[ce_id];
-	if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_OUT)
+	ce_attr = &ab->hw_params.host_ce_config[ce_id];
+	if (ce_attr->src_nentries)
 		ath11k_ahb_setbit32(ab, ce_id, CE_HOST_IE_ADDRESS);
 
-	if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_IN) {
+	if (ce_attr->dest_nentries) {
 		ath11k_ahb_setbit32(ab, ce_id, CE_HOST_IE_2_ADDRESS);
 		ath11k_ahb_setbit32(ab, ce_id + CE_HOST_IE_3_SHIFT,
 				    CE_HOST_IE_3_ADDRESS);
@@ -221,13 +221,13 @@ static void ath11k_ahb_ce_irq_enable(struct ath11k_base *ab, u16 ce_id)
 
 static void ath11k_ahb_ce_irq_disable(struct ath11k_base *ab, u16 ce_id)
 {
-	const struct ce_pipe_config *ce_config;
+	const struct ce_attr *ce_attr;
 
-	ce_config = &ab->hw_params.target_ce_config[ce_id];
-	if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_OUT)
+	ce_attr = &ab->hw_params.host_ce_config[ce_id];
+	if (ce_attr->src_nentries)
 		ath11k_ahb_clearbit32(ab, ce_id, CE_HOST_IE_ADDRESS);
 
-	if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_IN) {
+	if (ce_attr->dest_nentries) {
 		ath11k_ahb_clearbit32(ab, ce_id, CE_HOST_IE_2_ADDRESS);
 		ath11k_ahb_clearbit32(ab, ce_id + CE_HOST_IE_3_SHIFT,
 				      CE_HOST_IE_3_ADDRESS);
Signature · 1 line
2.34.1
author maintainer
#86 lore raw

PATCH 86/1039 drm/bridge: display-connector: fix an uninitialized pointer in probe()

In reply to Greg Kroah-Hartman

From: Dan Carpenter <[email protected]>

[ Upstream commit 189723fbe9aca18d6f7d638c59a40288030932b5 ]

The "label" pointer is used for debug output. The code assumes that it is either NULL or valid, but it is never set to NULL. It is either valid or uninitialized.

Fixes 0c275c30176b ("drm/bridge: Add bridge driver for display connectors")
---
 drivers/gpu/drm/bridge/display-connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/display-connector.c +1 -1
index 05eb759da6fc6..847a0dce7f1d3 100644
@@ -107,7 +107,7 @@ static int display_connector_probe(struct platform_device *pdev)
 {
 	struct display_connector *conn;
 	unsigned int type;
-	const char *label;
+	const char *label = NULL;
 	int ret;
 
 	conn = devm_kzalloc(&pdev->dev, sizeof(*conn), GFP_KERNEL);
Signature · 1 line
2.34.1
author maintainer
#116 lore raw

PATCH 116/1039 ath11k: Send PPDU_STATS_CFG with proper pdev mask to firmware

In reply to Greg Kroah-Hartman

From: Rameshkumar Sundaram <[email protected]>

[ Upstream commit 16a2c3d5406f95ef6139de52669c60a39443f5f7 ]

HTT_PPDU_STATS_CFG_PDEV_ID bit mask for target FW PPDU stats request message was set as bit 8 to 15. Bit 8 is reserved for soc stats and pdev id starts from bit 9. Hence change the bitmask as bit 9 to 15 and fill the proper pdev id in the request message.

In commit 701e48a43e15 ("ath11k: add packet log support for QCA6390"), both HTT_PPDU_STATS_CFG_PDEV_ID and pdev_mask were changed, but this pdev_mask calculation is not valid for platforms which has multiple pdevs with 1 rxdma per pdev, as this is writing same value(i.e. 2) for all pdevs. Hence fixed it to consider pdev_idx as well, to make it compatible for both single and multi pd cases.

Tested on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01092-QCAHKSWPL_SILICONZ-1 Tested on: IPQ6018 hw1.0 WLAN.HK.2.5.0.1-01067-QCAHKSWPL_SILICONZ-1

Fixes 701e48a43e15 ("ath11k: add packet log support for QCA6390")
---
 drivers/net/wireless/ath/ath11k/dp.h    | 3 ++-
 drivers/net/wireless/ath/ath11k/dp_tx.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/dp.h +2 -1
index 4794ca04f2136..f524d19aca349 100644
@@ -517,7 +517,8 @@ struct htt_ppdu_stats_cfg_cmd {
 } __packed;
 
 #define HTT_PPDU_STATS_CFG_MSG_TYPE		GENMASK(7, 0)
-#define HTT_PPDU_STATS_CFG_PDEV_ID		GENMASK(15, 8)
+#define HTT_PPDU_STATS_CFG_SOC_STATS		BIT(8)
+#define HTT_PPDU_STATS_CFG_PDEV_ID		GENMASK(15, 9)
 #define HTT_PPDU_STATS_CFG_TLV_TYPE_BITMASK	GENMASK(31, 16)
 
 enum htt_ppdu_stats_tag_type {
drivers/net/wireless/ath/ath11k/dp_tx.c +1 -1
index 879fb2a9dc0c6..10b76f6f710b0 100644
@@ -903,7 +903,7 @@ int ath11k_dp_tx_htt_h2t_ppdu_stats_req(struct ath11k *ar, u32 mask)
 		cmd->msg = FIELD_PREP(HTT_PPDU_STATS_CFG_MSG_TYPE,
 				      HTT_H2T_MSG_TYPE_PPDU_STATS_CFG);
 
-		pdev_mask = 1 << (i + 1);
+		pdev_mask = 1 << (ar->pdev_idx + i);
 		cmd->msg |= FIELD_PREP(HTT_PPDU_STATS_CFG_PDEV_ID, pdev_mask);
 		cmd->msg |= FIELD_PREP(HTT_PPDU_STATS_CFG_TLV_TYPE_BITMASK, mask);
 
Signature · 1 line
2.34.1
author maintainer
#88 lore raw

PATCH 88/1039 drm/panel: kingdisplay-kd097d04: Delete panel on attach() failure

In reply to Greg Kroah-Hartman

From: Brian Norris <[email protected]>

[ Upstream commit 5f31dbeae8a88f31c3eb4eb526ab4807c40da241 ]

If we fail to attach (e.g., because 1 of 2 dual-DSI controllers aren't ready), we leave a dangling drm_panel reference to freed memory. Clean that up on failure.

---
 drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c +7 -1
index 86e4213e8bb13..daccb1fd5fdad 100644
@@ -406,7 +406,13 @@ static int kingdisplay_panel_probe(struct mipi_dsi_device *dsi)
 	if (err < 0)
 		return err;
 
-	return mipi_dsi_attach(dsi);
+	err = mipi_dsi_attach(dsi);
+	if (err < 0) {
+		kingdisplay_panel_del(kingdisplay);
+		return err;
+	}
+
+	return 0;
 }
 
 static int kingdisplay_panel_remove(struct mipi_dsi_device *dsi)
Signature · 1 line
2.34.1
author maintainer
#117 lore raw

PATCH 117/1039 bpftool: Fix memory leak in prog_dump()

In reply to Greg Kroah-Hartman

From: Quentin Monnet <[email protected]>

[ Upstream commit ebbd7f64a3fbe9e0f235e39fc244ee9735e2a52a ]

Following the extraction of prog_dump() from do_dump(), the struct btf allocated in prog_dump() is no longer freed on error; the struct bpf_prog_linfo is not freed at all. Make sure we release them before exiting the function.

Fixes ec2025095cf6 ("bpftool: Match several programs with same tag")
---
 tools/bpf/bpftool/prog.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
tools/bpf/bpftool/prog.c +9 -6
index 515d229526026..6ccd17b8eb560 100644
@@ -639,8 +639,8 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,
 	char func_sig[1024];
 	unsigned char *buf;
 	__u32 member_len;
+	int fd, err = -1;
 	ssize_t n;
-	int fd;
 
 	if (mode == DUMP_JITED) {
 		if (info->jited_prog_len == 0 || !info->jited_prog_insns) {
@@ -679,7 +679,7 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,
 		if (fd < 0) {
 			p_err("can't open file %s: %s", filepath,
 			      strerror(errno));
-			return -1;
+			goto exit_free;
 		}
 
 		n = write(fd, buf, member_len);
@@ -687,7 +687,7 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,
 		if (n != (ssize_t)member_len) {
 			p_err("error writing output file: %s",
 			      n < 0 ? strerror(errno) : "short write");
-			return -1;
+			goto exit_free;
 		}
 
 		if (json_output)
@@ -701,7 +701,7 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,
 						     info->netns_ino,
 						     &disasm_opt);
 			if (!name)
-				return -1;
+				goto exit_free;
 		}
 
 		if (info->nr_jited_func_lens && info->jited_func_lens) {
@@ -796,9 +796,12 @@ prog_dump(struct bpf_prog_info *info, enum dump_mode mode,
 		kernel_syms_destroy(&dd);
 	}
 
-	btf__free(btf);
+	err = 0;
 
-	return 0;
+exit_free:
+	btf__free(btf);
+	bpf_prog_linfo__free(prog_linfo);
+	return err;
 }
 
 static int do_dump(int argc, char **argv)
Signature · 1 line
2.34.1
author maintainer
#131 lore raw

PATCH 131/1039 media: em28xx: fix memory leak in em28xx_init_dev

In reply to Greg Kroah-Hartman

From: Dongliang Mu <[email protected]>

[ Upstream commit 22be5a10d0b24eec9e45decd15d7e6112b25f080 ]

In the em28xx_init_rev, if em28xx_audio_setup fails, this function fails to deallocate the media_dev allocated in the em28xx_media_device_init.

Fix this by adding em28xx_unregister_media_device to free media_dev.

BTW, this patch is tested in my local syzkaller instance, and it can prevent the memory leak from occurring again.

CC Pavel Skripkin <[email protected]>
Fixes 37ecc7b1278f ("[media] em28xx: add media controller support")
---
 drivers/media/usb/em28xx/em28xx-cards.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/media/usb/em28xx/em28xx-cards.c +12 -6
index b207f34af5c6f..b451ce3cb169a 100644
@@ -3630,8 +3630,10 @@ static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
 
 	if (dev->is_audio_only) {
 		retval = em28xx_audio_setup(dev);
-		if (retval)
-			return -ENODEV;
+		if (retval) {
+			retval = -ENODEV;
+			goto err_deinit_media;
+		}
 		em28xx_init_extension(dev);
 
 		return 0;
@@ -3650,7 +3652,7 @@ static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
 		dev_err(&dev->intf->dev,
 			"%s: em28xx_i2c_register bus 0 - error [%d]!\n",
 		       __func__, retval);
-		return retval;
+		goto err_deinit_media;
 	}
 
 	/* register i2c bus 1 */
@@ -3666,9 +3668,7 @@ static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
 				"%s: em28xx_i2c_register bus 1 - error [%d]!\n",
 				__func__, retval);
 
-			em28xx_i2c_unregister(dev, 0);
-
-			return retval;
+			goto err_unreg_i2c;
 		}
 	}
 
@@ -3676,6 +3676,12 @@ static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
 	em28xx_card_setup(dev);
 
 	return 0;
+
+err_unreg_i2c:
+	em28xx_i2c_unregister(dev, 0);
+err_deinit_media:
+	em28xx_unregister_media_device(dev);
+	return retval;
 }
 
 static int em28xx_duplicate_dev(struct em28xx *dev)
Signature · 1 line
2.34.1
author maintainer
#134 lore raw

PATCH 134/1039 arm64: dts: amlogic: Fix SPI NOR flash node name for ODROID N2/N2+

In reply to Greg Kroah-Hartman

From: Alexander Stein <[email protected]>

[ Upstream commit 95d35256b564aca33fb661eac77dc94bfcffc8df ]

Fix the schema warning: "spi-flash@0: $nodename:0: 'spi-flash@0' does
not match '^flash(@.*)?$'" from jedec,spi-nor.yaml

Fixes a084eaf3096c ("arm64: dts: meson-g12b-odroid-n2: add SPIFC controller node")
---
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi +1 -1
index e8a00a2f88128..3e968b2441918 100644
@@ -609,7 +609,7 @@
 	pinctrl-0 = <&nor_pins>;
 	pinctrl-names = "default";
 
-	mx25u64: spi-flash@0 {
+	mx25u64: flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "mxicy,mx25u6435f", "jedec,spi-nor";
Signature · 1 line
2.34.1
author maintainer
#139 lore raw

PATCH 139/1039 Bluetooth: stop proccessing malicious adv data

In reply to Greg Kroah-Hartman

From: Pavel Skripkin <[email protected]>

[ Upstream commit 3a56ef719f0b9682afb8a86d64b2399e36faa4e6 ]

Syzbot reported slab-out-of-bounds read in hci_le_adv_report_evt(). The problem was in missing validaion check.

We should check if data is not malicious and we can read next data block. If we won't check ptr validness, code can read a way beyond skb->end and it can cause problems, of course.

Fixes e95beb414168 ("Bluetooth: hci_le_adv_report_evt code refactoring")
Reported-and-tested-by [email protected]
---
 net/bluetooth/hci_event.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
net/bluetooth/hci_event.c +7 -1
index 7d0db1ca12482..59f0691d907f6 100644
@@ -5825,7 +5825,8 @@ static void hci_le_adv_report_evt(struct hci_dev *hdev, struct sk_buff *skb)
 		struct hci_ev_le_advertising_info *ev = ptr;
 		s8 rssi;
 
-		if (ev->length <= HCI_MAX_AD_LENGTH) {
+		if (ev->length <= HCI_MAX_AD_LENGTH &&
+		    ev->data + ev->length <= skb_tail_pointer(skb)) {
 			rssi = ev->data[ev->length];
 			process_adv_report(hdev, ev->evt_type, &ev->bdaddr,
 					   ev->bdaddr_type, NULL, 0, rssi,
@@ -5835,6 +5836,11 @@ static void hci_le_adv_report_evt(struct hci_dev *hdev, struct sk_buff *skb)
 		}
 
 		ptr += sizeof(*ev) + ev->length + 1;
+
+		if (ptr > (void *) skb_tail_pointer(skb) - sizeof(*ev)) {
+			bt_dev_err(hdev, "Malicious advertising data. Stopping processing");
+			break;
+		}
 	}
 
 	hci_dev_unlock(hdev);
Signature · 1 line
2.34.1
author maintainer
#121 lore raw

PATCH 121/1039 media: atomisp: add missing media_device_cleanup() in atomisp_unregister_entities()

In reply to Greg Kroah-Hartman

From: Tsuchiya Yuto <[email protected]>

[ Upstream commit ce3015b7212e96db426d0c36f80fd159c91155d1 ]

After the commit 9832e155f1ed ("[media] media-device: split media initialization and registration"), calling media_device_cleanup() is needed it seems. However, currently it is missing for the module unload path.

Note that for the probe failure path, it is already added in atomisp_register_entities().

This patch adds the missing call of media_device_cleanup() in atomisp_unregister_entities().

Fixes a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
---
 drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/media/atomisp/pci/atomisp_v4l2.c +1 -0
index 1e324f1f656e5..0511c454e769d 100644
@@ -1182,6 +1182,7 @@ static void atomisp_unregister_entities(struct atomisp_device *isp)
 
 	v4l2_device_unregister(&isp->v4l2_dev);
 	media_device_unregister(&isp->media_dev);
+	media_device_cleanup(&isp->media_dev);
 }
 
 static int atomisp_register_entities(struct atomisp_device *isp)
Signature · 1 line
2.34.1
author maintainer
#141 lore raw

PATCH 141/1039 ath11k: Fix ETSI regd with weather radar overlap

In reply to Greg Kroah-Hartman

From: Sven Eckelmann <[email protected]>

[ Upstream commit 086c921a354089f209318501038d43c98d3f409f ]

Some ETSI countries have a small overlap in the wireless-regdb with an ETSI channel (5590-5650). A good example is Australia:

country AU: DFS-ETSI
(2400 - 2483.5 @ 40), (36)
(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW (5250 - 5350 @ 80), (20), NO-OUTDOOR, AUTO-BW, DFS (5470 - 5600 @ 80), (27), DFS
(5650 - 5730 @ 80), (27), DFS
(5730 - 5850 @ 80), (36)
(57000 - 66000 @ 2160), (43), NO-OUTDOOR

If the firmware (or the BDF) is shipped with these rules then there is only a 10 MHz overlap with the weather radar:

* below: 5470 - 5590
* weather radar: 5590 - 5600
* above: (none for the rule "5470 - 5600 @ 80")

There are several wrong assumption in the ath11k code:

* there is always a valid range below the weather radar (actually: there could be no range below the weather radar range OR range could be smaller than 20 MHz)
* intersected range in the weather radar range is valid (actually: the range could be smaller than 20 MHz)
* range above weather radar is either empty or valid
(actually: the range could be smaller than 20 MHz)

These wrong assumption will lead in this example to a rule

(5590 - 5600 @ 20), (N/A, 27), (600000 ms), DFS, AUTO-BW

which is invalid according to is_valid_reg_rule() because the freq_diff is only 10 MHz but the max_bandwidth is set to 20 MHz. Which results in a rejection like:

  WARNING: at backports-20210222_001-4.4.60-b157d2276/net/wireless/reg.c:3984
  [...]
  Call trace:
  [<ffffffbffc3d2e50>] reg_get_max_bandwidth+0x300/0x3a8 [cfg80211]
  [<ffffffbffc3d3d0c>] regulatory_set_wiphy_regd_sync+0x3c/0x98 [cfg80211]
  [<ffffffbffc651598>] ath11k_regd_update+0x1a8/0x210 [ath11k]
  [<ffffffbffc652108>] ath11k_regd_update_work+0x18/0x20 [ath11k]
  [<ffffffc0000a93e0>] process_one_work+0x1f8/0x340
  [<ffffffc0000a9784>] worker_thread+0x25c/0x448
  [<ffffffc0000aedc8>] kthread+0xd0/0xd8
  [<ffffffc000085550>] ret_from_fork+0x10/0x40
  ath11k c000000.wifi: failed to perform regd update : -22
  Invalid regulatory domain detected

To avoid this, the algorithm has to be changed slightly. Instead of splitting a rule which overlaps with the weather radar range into 3 pieces and accepting the first two parts blindly, it must actually be checked for each piece whether it is a valid range. And only if it is valid, add it to the output array.

When these checks are in place, the processed rules for AU would end up as

country AU: DFS-ETSI

          (2400 - 2483 @ 40), (N/A, 36), (N/A)
          (5150 - 5250 @ 80), (6, 23), (N/A), NO-OUTDOOR, AUTO-BW
          (5250 - 5350 @ 80), (6, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
          (5470 - 5590 @ 80), (6, 27), (0 ms), DFS, AUTO-BW
          (5650 - 5730 @ 80), (6, 27), (0 ms), DFS, AUTO-BW
          (5730 - 5850 @ 80), (6, 36), (N/A), AUTO-BW

and will be accepted by the wireless regulatory code.

Fixes d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
---
 drivers/net/wireless/ath/ath11k/reg.c | 103 ++++++++++++++------------
 1 file changed, 56 insertions(+), 47 deletions(-)
drivers/net/wireless/ath/ath11k/reg.c +56 -47
index a66b5bdd21679..8606170ba80d5 100644
@@ -456,6 +456,9 @@ ath11k_reg_adjust_bw(u16 start_freq, u16 end_freq, u16 max_bw)
 {
 	u16 bw;
 
+	if (end_freq <= start_freq)
+		return 0;
+
 	bw = end_freq - start_freq;
 	bw = min_t(u16, bw, max_bw);
 
@@ -463,8 +466,10 @@ ath11k_reg_adjust_bw(u16 start_freq, u16 end_freq, u16 max_bw)
 		bw = 80;
 	else if (bw >= 40 && bw < 80)
 		bw = 40;
-	else if (bw < 40)
+	else if (bw >= 20 && bw < 40)
 		bw = 20;
+	else
+		bw = 0;
 
 	return bw;
 }
@@ -488,73 +493,77 @@ ath11k_reg_update_weather_radar_band(struct ath11k_base *ab,
 				     struct cur_reg_rule *reg_rule,
 				     u8 *rule_idx, u32 flags, u16 max_bw)
 {
+	u32 start_freq;
 	u32 end_freq;
 	u16 bw;
 	u8 i;
 
 	i = *rule_idx;
 
+	/* there might be situations when even the input rule must be dropped */
+	i--;
+
+	/* frequencies below weather radar */
 	bw = ath11k_reg_adjust_bw(reg_rule->start_freq,
 				  ETSI_WEATHER_RADAR_BAND_LOW, max_bw);
+	if (bw > 0) {
+		i++;
 
-	ath11k_reg_update_rule(regd->reg_rules + i, reg_rule->start_freq,
-			       ETSI_WEATHER_RADAR_BAND_LOW, bw,
-			       reg_rule->ant_gain, reg_rule->reg_power,
-			       flags);
+		ath11k_reg_update_rule(regd->reg_rules + i,
+				       reg_rule->start_freq,
+				       ETSI_WEATHER_RADAR_BAND_LOW, bw,
+				       reg_rule->ant_gain, reg_rule->reg_power,
+				       flags);
 
-	ath11k_dbg(ab, ATH11K_DBG_REG,
-		   "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
-		   i + 1, reg_rule->start_freq, ETSI_WEATHER_RADAR_BAND_LOW,
-		   bw, reg_rule->ant_gain, reg_rule->reg_power,
-		   regd->reg_rules[i].dfs_cac_ms,
-		   flags);
-
-	if (reg_rule->end_freq > ETSI_WEATHER_RADAR_BAND_HIGH)
-		end_freq = ETSI_WEATHER_RADAR_BAND_HIGH;
-	else
-		end_freq = reg_rule->end_freq;
+		ath11k_dbg(ab, ATH11K_DBG_REG,
+			   "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
+			   i + 1, reg_rule->start_freq,
+			   ETSI_WEATHER_RADAR_BAND_LOW, bw, reg_rule->ant_gain,
+			   reg_rule->reg_power, regd->reg_rules[i].dfs_cac_ms,
+			   flags);
+	}
 
-	bw = ath11k_reg_adjust_bw(ETSI_WEATHER_RADAR_BAND_LOW, end_freq,
-				  max_bw);
+	/* weather radar frequencies */
+	start_freq = max_t(u32, reg_rule->start_freq,
+			   ETSI_WEATHER_RADAR_BAND_LOW);
+	end_freq = min_t(u32, reg_rule->end_freq, ETSI_WEATHER_RADAR_BAND_HIGH);
 
-	i++;
+	bw = ath11k_reg_adjust_bw(start_freq, end_freq, max_bw);
+	if (bw > 0) {
+		i++;
 
-	ath11k_reg_update_rule(regd->reg_rules + i,
-			       ETSI_WEATHER_RADAR_BAND_LOW, end_freq, bw,
-			       reg_rule->ant_gain, reg_rule->reg_power,
-			       flags);
+		ath11k_reg_update_rule(regd->reg_rules + i, start_freq,
+				       end_freq, bw, reg_rule->ant_gain,
+				       reg_rule->reg_power, flags);
 
-	regd->reg_rules[i].dfs_cac_ms = ETSI_WEATHER_RADAR_BAND_CAC_TIMEOUT;
+		regd->reg_rules[i].dfs_cac_ms = ETSI_WEATHER_RADAR_BAND_CAC_TIMEOUT;
 
-	ath11k_dbg(ab, ATH11K_DBG_REG,
-		   "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
-		   i + 1, ETSI_WEATHER_RADAR_BAND_LOW, end_freq,
-		   bw, reg_rule->ant_gain, reg_rule->reg_power,
-		   regd->reg_rules[i].dfs_cac_ms,
-		   flags);
-
-	if (end_freq == reg_rule->end_freq) {
-		regd->n_reg_rules--;
-		*rule_idx = i;
-		return;
+		ath11k_dbg(ab, ATH11K_DBG_REG,
+			   "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
+			   i + 1, start_freq, end_freq, bw,
+			   reg_rule->ant_gain, reg_rule->reg_power,
+			   regd->reg_rules[i].dfs_cac_ms, flags);
 	}
 
+	/* frequencies above weather radar */
 	bw = ath11k_reg_adjust_bw(ETSI_WEATHER_RADAR_BAND_HIGH,
 				  reg_rule->end_freq, max_bw);
+	if (bw > 0) {
+		i++;
 
-	i++;
-
-	ath11k_reg_update_rule(regd->reg_rules + i, ETSI_WEATHER_RADAR_BAND_HIGH,
-			       reg_rule->end_freq, bw,
-			       reg_rule->ant_gain, reg_rule->reg_power,
-			       flags);
+		ath11k_reg_update_rule(regd->reg_rules + i,
+				       ETSI_WEATHER_RADAR_BAND_HIGH,
+				       reg_rule->end_freq, bw,
+				       reg_rule->ant_gain, reg_rule->reg_power,
+				       flags);
 
-	ath11k_dbg(ab, ATH11K_DBG_REG,
-		   "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
-		   i + 1, ETSI_WEATHER_RADAR_BAND_HIGH, reg_rule->end_freq,
-		   bw, reg_rule->ant_gain, reg_rule->reg_power,
-		   regd->reg_rules[i].dfs_cac_ms,
-		   flags);
+		ath11k_dbg(ab, ATH11K_DBG_REG,
+			   "\t%d. (%d - %d @ %d) (%d, %d) (%d ms) (FLAGS %d)\n",
+			   i + 1, ETSI_WEATHER_RADAR_BAND_HIGH,
+			   reg_rule->end_freq, bw, reg_rule->ant_gain,
+			   reg_rule->reg_power, regd->reg_rules[i].dfs_cac_ms,
+			   flags);
+	}
 
 	*rule_idx = i;
 }
Signature · 1 line
2.34.1
author maintainer
#142 lore raw

PATCH 142/1039 ath11k: clear the keys properly via DISABLE_KEY

In reply to Greg Kroah-Hartman

From: Karthikeyan Kathirvel <[email protected]>

[ Upstream commit 436a4e88659842a7cf634d7cc088c8f2cc94ebf5 ]

DISABLE_KEY sets the key_len to 0, firmware will not delete the keys if key_len is 0. Changing from security mode to open mode will cause mcast to be still encrypted without vdev restart.

Set the proper key_len for DISABLE_KEY cmd to clear the keys in firmware.

Tested-on: IPQ6018 hw1.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1

Fixes d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
[[email protected]: split into separate patches, clean up commit message]
---
 drivers/net/wireless/ath/ath11k/mac.c | 4 +---
 drivers/net/wireless/ath/ath11k/wmi.c | 3 ++-
 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +1 -3
index 1cc55602787bb..cdee7545e876a 100644
@@ -3316,9 +3316,7 @@ static int ath11k_install_key(struct ath11k_vif *arvif,
 		return 0;
 
 	if (cmd == DISABLE_KEY) {
-		/* TODO: Check if FW expects  value other than NONE for del */
-		/* arg.key_cipher = WMI_CIPHER_NONE; */
-		arg.key_len = 0;
+		arg.key_cipher = WMI_CIPHER_NONE;
 		arg.key_data = NULL;
 		goto install;
 	}
drivers/net/wireless/ath/ath11k/wmi.c +2 -1
index 04238c29419b5..621a63d6c8c6d 100644
@@ -1689,7 +1689,8 @@ int ath11k_wmi_vdev_install_key(struct ath11k *ar,
 	tlv = (struct wmi_tlv *)(skb->data + sizeof(*cmd));
 	tlv->header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_ARRAY_BYTE) |
 		      FIELD_PREP(WMI_TLV_LEN, key_len_aligned);
-	memcpy(tlv->value, (u8 *)arg->key_data, key_len_aligned);
+	if (arg->key_data)
+		memcpy(tlv->value, (u8 *)arg->key_data, key_len_aligned);
 
 	ret = ath11k_wmi_cmd_send(wmi, skb, WMI_VDEV_INSTALL_KEY_CMDID);
 	if (ret) {
Signature · 1 line
2.34.1
author maintainer
#115 lore raw

PATCH 115/1039 wcn36xx: fix RX BD rate mapping for 5GHz legacy rates

In reply to Greg Kroah-Hartman

From: Benjamin Li <[email protected]>

[ Upstream commit cfdf6b19e750f7de8ae71a26932f63b52e3bf74c ]

The linear mapping between the BD rate field and the driver's 5GHz legacy rates table (wcn_5ghz_rates) does not only apply for the latter four rates -- it applies to all eight rates.

Fixes 6ea131acea98 ("wcn36xx: Fix warning due to bad rate_idx")
---
 drivers/net/wireless/ath/wcn36xx/txrx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/wireless/ath/wcn36xx/txrx.c +1 -3
index f0a9f069a92a9..dd58dde8c8363 100644
@@ -272,7 +272,6 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
 	const struct wcn36xx_rate *rate;
 	struct ieee80211_hdr *hdr;
 	struct wcn36xx_rx_bd *bd;
-	struct ieee80211_supported_band *sband;
 	u16 fc, sn;
 
 	/*
@@ -350,12 +349,11 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
 		status.enc_flags = rate->encoding_flags;
 		status.bw = rate->bw;
 		status.rate_idx = rate->mcs_or_legacy_index;
-		sband = wcn->hw->wiphy->bands[status.band];
 		status.nss = 1;
 
 		if (status.band == NL80211_BAND_5GHZ &&
 		    status.encoding == RX_ENC_LEGACY &&
-		    status.rate_idx >= sband->n_bitrates) {
+		    status.rate_idx >= 4) {
 			/* no dsss rates in 5Ghz rates table */
 			status.rate_idx -= 4;
 		}
Signature · 1 line
2.34.1
author maintainer
#108 lore raw

PATCH 108/1039 drm/vc4: hdmi: Enable the scrambler on reconnection

In reply to Greg Kroah-Hartman

From: Maxime Ripard <[email protected]>

[ Upstream commit b7551457c5d0b3505b0be247d47919c1ee30506d ]

If we have a state already and disconnect/reconnect the display, the SCDC messages won't be sent again since we didn't go through a disable / enable cycle.

In order to fix this, let's call the vc4_hdmi_enable_scrambling function in the detect callback if there is a mode and it needs the scrambler to be enabled.

Fixes c85695a2016e ("drm/vc4: hdmi: Enable the scrambler")
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/vc4/vc4_hdmi.c +3 -0
index 05fd54fbb773e..c000946996edb 100644
@@ -162,6 +162,8 @@ static void vc4_hdmi_cec_update_clk_div(struct vc4_hdmi *vc4_hdmi)
 static void vc4_hdmi_cec_update_clk_div(struct vc4_hdmi *vc4_hdmi) {}
 #endif
 
+static void vc4_hdmi_enable_scrambling(struct drm_encoder *encoder);
+
 static enum drm_connector_status
 vc4_hdmi_connector_detect(struct drm_connector *connector, bool force)
 {
@@ -190,6 +192,7 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force)
 			}
 		}
 
+		vc4_hdmi_enable_scrambling(&vc4_hdmi->encoder.base.base);
 		pm_runtime_put(&vc4_hdmi->pdev->dev);
 		return connector_status_connected;
 	}
Signature · 1 line
2.34.1
author maintainer
#149 lore raw

PATCH 149/1039 selftests/bpf: Fix xdpxceiver failures for no hugepages

In reply to Greg Kroah-Hartman

From: Tirthendu Sarkar <[email protected]>

[ Upstream commit dd7f091fd22b1dce6c20e8f7769aa068ed88ac6d ]

xsk_configure_umem() needs hugepages to work in unaligned mode. So when hugepages are not configured, 'unaligned' tests should be skipped which is determined by the helper function hugepages_present(). This function erroneously returns true with MAP_NORESERVE flag even when no hugepages are configured. The removal of this flag fixes the issue.

The test TEST_TYPE_UNALIGNED_INV_DESC also needs to be skipped when there are no hugepages. However, this was not skipped as there was no check for presence of hugepages and hence was failing. The check to skip the test has now been added.

Fixes a4ba98dd0c69 (selftests: xsk: Add test for unaligned mode)
---
 tools/testing/selftests/bpf/xdpxceiver.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tools/testing/selftests/bpf/xdpxceiver.c +5 -1
index 6c7cf8aadc792..621342ec30c48 100644
@@ -1219,7 +1219,7 @@ static bool hugepages_present(struct ifobject *ifobject)
 	void *bufs;
 
 	bufs = mmap(NULL, mmap_sz, PROT_READ | PROT_WRITE,
-		    MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE | MAP_HUGETLB, -1, 0);
+		    MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);
 	if (bufs == MAP_FAILED)
 		return false;
 
@@ -1366,6 +1366,10 @@ static void run_pkt_test(struct test_spec *test, enum test_mode mode, enum test_
 		testapp_invalid_desc(test);
 		break;
 	case TEST_TYPE_UNALIGNED_INV_DESC:
+		if (!hugepages_present(test->ifobj_tx)) {
+			ksft_test_result_skip("No 2M huge pages present.\n");
+			return;
+		}
 		test_spec_set_name(test, "UNALIGNED_INV_DESC");
 		test->ifobj_tx->umem->unaligned_mode = true;
 		test->ifobj_rx->umem->unaligned_mode = true;
Signature · 1 line
2.34.1
author maintainer
#107 lore raw

PATCH 107/1039 libbpf: Fix section counting logic

In reply to Greg Kroah-Hartman

From: Andrii Nakryiko <[email protected]>

[ Upstream commit 0d6988e16a12ebd41d3e268992211b0ceba44ed7 ]

e_shnum does include section #0 and as such is exactly the number of ELF sections that we need to allocate memory for to use section indices as array indices. Fix the off-by-one error.

This is purely accounting fix, previously we were overallocating one too many array items. But no correctness errors otherwise.

Fixes 25bbbd7a444b ("libbpf: Remove assumptions about uniqueness of .rodata/.data/.bss maps")
---
 tools/lib/bpf/libbpf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/lib/bpf/libbpf.c +4 -4
index 7c74342bb6680..5367bc8e52073 100644
@@ -3191,11 +3191,11 @@ static int bpf_object__elf_collect(struct bpf_object *obj)
 	Elf_Scn *scn;
 	Elf64_Shdr *sh;
 
-	/* ELF section indices are 1-based, so allocate +1 element to keep
-	 * indexing simple. Also include 0th invalid section into sec_cnt for
-	 * simpler and more traditional iteration logic.
+	/* ELF section indices are 0-based, but sec #0 is special "invalid"
+	 * section. e_shnum does include sec #0, so e_shnum is the necessary
+	 * size of an array to keep all the sections.
 	 */
-	obj->efile.sec_cnt = 1 + obj->efile.ehdr->e_shnum;
+	obj->efile.sec_cnt = obj->efile.ehdr->e_shnum;
 	obj->efile.secs = calloc(obj->efile.sec_cnt, sizeof(*obj->efile.secs));
 	if (!obj->efile.secs)
 		return -ENOMEM;
Signature · 1 line
2.34.1
author maintainer
#152 lore raw

PATCH 152/1039 ath11k: set correct NL80211_FEATURE_DYNAMIC_SMPS for WCN6855

In reply to Greg Kroah-Hartman

From: Wen Gong <[email protected]>

[ Upstream commit 82c434c103408842a87404e873992b7698b6df2b ]

Commit 6f4d70308e5e ("ath11k: support SMPS configuration for 6 GHz") changed "if (ht_cap & WMI_HT_CAP_DYNAMIC_SMPS)" to "if (ht_cap & WMI_HT_CAP_DYNAMIC_SMPS || ar->supports_6ghz)" which means NL80211_FEATURE_DYNAMIC_SMPS is enabled for all chips which support 6 GHz. However, WCN6855 supports 6 GHz but it does not support feature NL80211_FEATURE_DYNAMIC_SMPS, and this can lead to MU-MIMO test failures for WCN6855.

Disable NL80211_FEATURE_DYNAMIC_SMPS for WCN6855 since its ht_cap does not support WMI_HT_CAP_DYNAMIC_SMPS. Enable the feature only on QCN9074 as that's the only other device supporting 6 GHz band.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1

---
 drivers/net/wireless/ath/ath11k/core.c | 5 +++++
 drivers/net/wireless/ath/ath11k/hw.h   | 1 +
 drivers/net/wireless/ath/ath11k/mac.c  | 3 ++-
 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/core.c +5 -0
index b5a2af3ffc3e1..7ee2ccc49c747 100644
@@ -82,6 +82,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fix_l1ss = true,
 		.max_tx_ring = DP_TCL_NUM_RING_MAX,
 		.hal_params = &ath11k_hw_hal_params_ipq8074,
+		.supports_dynamic_smps_6ghz = false,
 	},
 	{
 		.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -131,6 +132,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fix_l1ss = true,
 		.max_tx_ring = DP_TCL_NUM_RING_MAX,
 		.hal_params = &ath11k_hw_hal_params_ipq8074,
+		.supports_dynamic_smps_6ghz = false,
 	},
 	{
 		.name = "qca6390 hw2.0",
@@ -179,6 +181,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fix_l1ss = true,
 		.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
 		.hal_params = &ath11k_hw_hal_params_qca6390,
+		.supports_dynamic_smps_6ghz = false,
 	},
 	{
 		.name = "qcn9074 hw1.0",
@@ -227,6 +230,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fix_l1ss = true,
 		.max_tx_ring = DP_TCL_NUM_RING_MAX,
 		.hal_params = &ath11k_hw_hal_params_ipq8074,
+		.supports_dynamic_smps_6ghz = true,
 	},
 	{
 		.name = "wcn6855 hw2.0",
@@ -275,6 +279,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fix_l1ss = false,
 		.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
 		.hal_params = &ath11k_hw_hal_params_qca6390,
+		.supports_dynamic_smps_6ghz = false,
 	},
 };
 
drivers/net/wireless/ath/ath11k/hw.h +1 -0
index 19223d36846e8..6dcac596e3fe5 100644
@@ -176,6 +176,7 @@ struct ath11k_hw_params {
 	bool fix_l1ss;
 	u8 max_tx_ring;
 	const struct ath11k_hw_hal_params *hal_params;
+	bool supports_dynamic_smps_6ghz;
 };
 
 struct ath11k_hw_ops {
drivers/net/wireless/ath/ath11k/mac.c +2 -1
index 9ed7eb09bdb70..821332cbeb5de 100644
@@ -7674,7 +7674,8 @@ static int __ath11k_mac_register(struct ath11k *ar)
 	 * for each band for a dual band capable radio. It will be tricky to
 	 * handle it when the ht capability different for each band.
 	 */
-	if (ht_cap & WMI_HT_CAP_DYNAMIC_SMPS || ar->supports_6ghz)
+	if (ht_cap & WMI_HT_CAP_DYNAMIC_SMPS ||
+	    (ar->supports_6ghz && ab->hw_params.supports_dynamic_smps_6ghz))
 		ar->hw->wiphy->features |= NL80211_FEATURE_DYNAMIC_SMPS;
 
 	ar->hw->wiphy->max_scan_ssids = WLAN_SCAN_PARAMS_MAX_SSID;
Signature · 1 line
2.34.1
author maintainer
#123 lore raw

PATCH 123/1039 media: atomisp: fix inverted logic in buffers_needed()

In reply to Greg Kroah-Hartman

From: Tsuchiya Yuto <[email protected]>

[ Upstream commit e1921cd14640f0f4d1fad5eb8e448c58a536415d ]

When config.mode is IA_CSS_INPUT_MODE_BUFFERED_SENSOR, it rather needs buffers. Fix it by inverting the return value.

Fixes 3c0538fbad9f ("media: atomisp: get rid of most checks for ISP2401 version")
---
 drivers/staging/media/atomisp/pci/sh_css_mipi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/media/atomisp/pci/sh_css_mipi.c +4 -4
index 75489f7d75eec..483d40a467c74 100644
@@ -374,17 +374,17 @@ static bool buffers_needed(struct ia_css_pipe *pipe)
 {
 	if (!IS_ISP2401) {
 		if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
-			return false;
-		else
 			return true;
+		else
+			return false;
 	}
 
 	if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
 	    pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
 	    pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS)
-		return false;
+		return true;
 
-	return true;
+	return false;
 }
 
 int
Signature · 1 line
2.34.1
author maintainer
#156 lore raw

PATCH 156/1039 media: dmxdev: fix UAF when dvb_register_device() fails

In reply to Greg Kroah-Hartman

From: Wang Hai <[email protected]>

[ Upstream commit ab599eb11882f834951c436cc080c3455ba32b9b ]

I got a use-after-free report:

dvbdev: dvb_register_device: failed to create device dvb1.dvr0 (-12)
...
==================================================================

BUG: KASAN: use-after-free in dvb_dmxdev_release+0xce/0x2f0
...
Call Trace:
 dump_stack_lvl+0x6c/0x8b
 print_address_description.constprop.0+0x48/0x70
 kasan_report.cold+0x82/0xdb
 __asan_load4+0x6b/0x90
 dvb_dmxdev_release+0xce/0x2f0
...
Allocated by task 7666:
 kasan_save_stack+0x23/0x50
 __kasan_kmalloc+0x83/0xa0
 kmem_cache_alloc_trace+0x22e/0x470
 dvb_register_device+0x12f/0x980
 dvb_dmxdev_init+0x1f3/0x230
...
Freed by task 7666:
 kasan_save_stack+0x23/0x50
 kasan_set_track+0x20/0x30
 kasan_set_free_info+0x24/0x40
 __kasan_slab_free+0xf2/0x130
 kfree+0xd1/0x5c0
 dvb_register_device.cold+0x1ac/0x1fa
 dvb_dmxdev_init+0x1f3/0x230

...

When dvb_register_device() in dvb_dmxdev_init() fails, dvb_dmxdev_init() does not return a failure, and the memory pointed to by dvbdev or dvr_dvbdev is invalid at this point. If they are used subsequently, it will result in UFA or null-ptr-deref.

If dvb_register_device() in dvb_dmxdev_init() fails, fix the bug by making dvb_dmxdev_init() return an error as well.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")
---
 drivers/media/dvb-core/dmxdev.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/media/dvb-core/dmxdev.c +15 -3
index 5d5a48475a54f..01f288fa37e0e 100644
@@ -1413,7 +1413,7 @@ static const struct dvb_device dvbdev_dvr = {
 };
 int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter)
 {
-	int i;
+	int i, ret;
 
 	if (dmxdev->demux->open(dmxdev->demux) < 0)
 		return -EUSERS;
@@ -1432,14 +1432,26 @@ int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter)
 					    DMXDEV_STATE_FREE);
 	}
 
-	dvb_register_device(dvb_adapter, &dmxdev->dvbdev, &dvbdev_demux, dmxdev,
+	ret = dvb_register_device(dvb_adapter, &dmxdev->dvbdev, &dvbdev_demux, dmxdev,
 			    DVB_DEVICE_DEMUX, dmxdev->filternum);
-	dvb_register_device(dvb_adapter, &dmxdev->dvr_dvbdev, &dvbdev_dvr,
+	if (ret < 0)
+		goto err_register_dvbdev;
+
+	ret = dvb_register_device(dvb_adapter, &dmxdev->dvr_dvbdev, &dvbdev_dvr,
 			    dmxdev, DVB_DEVICE_DVR, dmxdev->filternum);
+	if (ret < 0)
+		goto err_register_dvr_dvbdev;
 
 	dvb_ringbuffer_init(&dmxdev->dvr_buffer, NULL, 8192);
 
 	return 0;
+
+err_register_dvr_dvbdev:
+	dvb_unregister_device(dmxdev->dvbdev);
+err_register_dvbdev:
+	vfree(dmxdev->filter);
+	dmxdev->filter = NULL;
+	return ret;
 }
 
 EXPORT_SYMBOL(dvb_dmxdev_init);
Signature · 1 line
2.34.1
author maintainer
#177 lore raw

PATCH 177/1039 tty: serial: atmel: Check return code of dmaengine_submit()

In reply to Greg Kroah-Hartman

From: Tudor Ambarus <[email protected]>

[ Upstream commit 1e67bd2b8cb90b66e89562598e9c2046246832d3 ]

The tx_submit() method of struct dma_async_tx_descriptor is entitled to do sanity checks and return errors if encountered. It's not the case for the DMA controller drivers that this client is using (at_h/xdmac), because they currently don't do sanity checks and always return a positive cookie at tx_submit() method. In case the controller drivers will implement sanity checks and return errors, print a message so that the client will be informed that something went wrong at tx_submit() level.

---
 drivers/tty/serial/atmel_serial.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/tty/serial/atmel_serial.c +10 -0
index 2c99a47a25357..376f7a9c2868a 100644
@@ -1004,6 +1004,11 @@ static void atmel_tx_dma(struct uart_port *port)
 		desc->callback = atmel_complete_tx_dma;
 		desc->callback_param = atmel_port;
 		atmel_port->cookie_tx = dmaengine_submit(desc);
+		if (dma_submit_error(atmel_port->cookie_tx)) {
+			dev_err(port->dev, "dma_submit_error %d\n",
+				atmel_port->cookie_tx);
+			return;
+		}
 	}
 
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
@@ -1258,6 +1263,11 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
 	desc->callback_param = port;
 	atmel_port->desc_rx = desc;
 	atmel_port->cookie_rx = dmaengine_submit(desc);
+	if (dma_submit_error(atmel_port->cookie_rx)) {
+		dev_err(port->dev, "dma_submit_error %d\n",
+			atmel_port->cookie_rx);
+		goto chan_err;
+	}
 
 	return 0;
 
Signature · 1 line
2.34.1
author maintainer
#180 lore raw

PATCH 180/1039 net: dsa: rtl8365mb: set RGMII RX delay in steps of 0.3 ns

In reply to Greg Kroah-Hartman

From: Alvin Šipraga <[email protected]>

[ Upstream commit ef136837aaf6f37f2dec78551671a6883f868d69 ]

A contact at Realtek has clarified what exactly the units of RGMII RX delay are. The answer is that the unit of RX delay is "about 0.3 ns". Take this into account when parsing rx-internal-delay-ps by approximating the closest step value. Delays of more than 2.1 ns are rejected.

This obviously contradicts the previous assumption in the driver that a step value of 4 was "about 2 ns", but Realtek also points out that it is easy to find more than one RX delay step value which makes RGMII work.

Fixes 4af2950c50c8 ("net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC")
Cc Arınç ÜNAL <[email protected]>
---
 drivers/net/dsa/rtl8365mb.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
drivers/net/dsa/rtl8365mb.c +6 -9
index 078ca4cd71605..48c0e3e466001 100644
@@ -767,7 +767,8 @@ static int rtl8365mb_ext_config_rgmii(struct realtek_smi *smi, int port,
 	 *     0 = no delay, 1 = 2 ns delay
 	 *   RX delay:
 	 *     0 = no delay, 7 = maximum delay
-	 *     No units are specified, but there are a total of 8 steps.
+	 *     Each step is approximately 0.3 ns, so the maximum delay is about
+	 *     2.1 ns.
 	 *
 	 * The vendor driver also states that this must be configured *before*
 	 * forcing the external interface into a particular mode, which is done
@@ -778,10 +779,6 @@ static int rtl8365mb_ext_config_rgmii(struct realtek_smi *smi, int port,
 	 * specified. We ignore the detail of the RGMII interface mode
 	 * (RGMII_{RXID, TXID, etc.}), as this is considered to be a PHY-only
 	 * property.
-	 *
-	 * For the RX delay, we assume that a register value of 4 corresponds to
-	 * 2 ns. But this is just an educated guess, so ignore all other values
-	 * to avoid too much confusion.
 	 */
 	if (!of_property_read_u32(dn, "tx-internal-delay-ps", &val)) {
 		val = val / 1000; /* convert to ns */
@@ -794,13 +791,13 @@ static int rtl8365mb_ext_config_rgmii(struct realtek_smi *smi, int port,
 	}
 
 	if (!of_property_read_u32(dn, "rx-internal-delay-ps", &val)) {
-		val = val / 1000; /* convert to ns */
+		val = DIV_ROUND_CLOSEST(val, 300); /* convert to 0.3 ns step */
 
-		if (val == 0 || val == 2)
-			rx_delay = val * 2;
+		if (val <= 7)
+			rx_delay = val;
 		else
 			dev_warn(smi->dev,
-				 "EXT port RX delay must be 0 to 2 ns\n");
+				 "EXT port RX delay must be 0 to 2.1 ns\n");
 	}
 
 	ret = regmap_update_bits(
Signature · 1 line
2.34.1
author maintainer
#181 lore raw

PATCH 181/1039 mfd: atmel-flexcom: Remove #ifdef CONFIG_PM_SLEEP

In reply to Greg Kroah-Hartman

From: Claudiu Beznea <[email protected]>

[ Upstream commit 8c0fad75dcaa650e3f3145a2c35847bc6a65cb7f ]

Remove compilation flag and use __maybe_unused and pm_ptr instead.

---
 drivers/mfd/atmel-flexcom.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mfd/atmel-flexcom.c +2 -4
index d2f5c073fdf31..962f66dc8813e 100644
@@ -87,8 +87,7 @@ static const struct of_device_id atmel_flexcom_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, atmel_flexcom_of_match);
 
-#ifdef CONFIG_PM_SLEEP
-static int atmel_flexcom_resume(struct device *dev)
+static int __maybe_unused atmel_flexcom_resume(struct device *dev)
 {
 	struct atmel_flexcom *ddata = dev_get_drvdata(dev);
 	int err;
@@ -105,7 +104,6 @@ static int atmel_flexcom_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(atmel_flexcom_pm_ops, NULL,
 			 atmel_flexcom_resume);
@@ -114,7 +112,7 @@ static struct platform_driver atmel_flexcom_driver = {
 	.probe	= atmel_flexcom_probe,
 	.driver	= {
 		.name		= "atmel_flexcom",
-		.pm		= &atmel_flexcom_pm_ops,
+		.pm		= pm_ptr(&atmel_flexcom_pm_ops),
 		.of_match_table	= atmel_flexcom_of_match,
 	},
 };
Signature · 1 line
2.34.1
author maintainer
#182 lore raw

PATCH 182/1039 mfd: atmel-flexcom: Use .resume_noirq

In reply to Greg Kroah-Hartman

From: Claudiu Beznea <[email protected]>

[ Upstream commit 5d051cf94fd5834a1513aa77e542c49fd973988a ]

Flexcom IP embeds 3 other IPs: usart, i2c, spi and selects the operation mode (usart, i2c, spi) via mode register (FLEX_MR). On i2c bus there might be connected critical devices (like PMIC) which on suspend/resume should be suspended/resumed at the end/beginning. i2c uses .suspend_noirq/.resume_noirq for this kind of purposes. Align flexcom to use .resume_noirq as it should be resumed before the embedded IPs. Otherwise the embedded devices might behave badly.

---
 drivers/mfd/atmel-flexcom.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/mfd/atmel-flexcom.c +4 -3
index 962f66dc8813e..559eb4d352b68 100644
@@ -87,7 +87,7 @@ static const struct of_device_id atmel_flexcom_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, atmel_flexcom_of_match);
 
-static int __maybe_unused atmel_flexcom_resume(struct device *dev)
+static int __maybe_unused atmel_flexcom_resume_noirq(struct device *dev)
 {
 	struct atmel_flexcom *ddata = dev_get_drvdata(dev);
 	int err;
@@ -105,8 +105,9 @@ static int __maybe_unused atmel_flexcom_resume(struct device *dev)
 	return 0;
 }
 
-static SIMPLE_DEV_PM_OPS(atmel_flexcom_pm_ops, NULL,
-			 atmel_flexcom_resume);
+static const struct dev_pm_ops atmel_flexcom_pm_ops = {
+	.resume_noirq = atmel_flexcom_resume_noirq,
+};
 
 static struct platform_driver atmel_flexcom_driver = {
 	.probe	= atmel_flexcom_probe,
Signature · 1 line
2.34.1
author maintainer
#184 lore raw

PATCH 184/1039 libbpf: Silence uninitialized warning/error in btf_dump_dump_type_data

In reply to Greg Kroah-Hartman

From: Alan Maguire <[email protected]>

[ Upstream commit 43174f0d4597325cb91f1f1f55263eb6e6101036 ]

When compiling libbpf with gcc 4.8.5, we see:

CC staticobjs/btf_dump.o
btf_dump.c: In function ‘btf_dump_dump_type_data.isra.24’:
btf_dump.c:2296:5: error: ‘err’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (err < 0)

     ^

cc1: all warnings being treated as errors
make: *** [staticobjs/btf_dump.o] Error 1

While gcc 4.8.5 is too old to build the upstream kernel, it's possible it could be used to build standalone libbpf which suffers from the same problem. Silence the error by initializing 'err' to 0. The warning/error seems to be a false positive since err is set early in the function. Regardless we shouldn't prevent libbpf from building for this.

Fixes 920d16af9b42 ("libbpf: BTF dumper support for typed data")
---
 tools/lib/bpf/btf_dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/btf_dump.c +1 -1
index 17db62b5002e8..5cae71600631b 100644
@@ -2194,7 +2194,7 @@ static int btf_dump_dump_type_data(struct btf_dump *d,
 				   __u8 bits_offset,
 				   __u8 bit_sz)
 {
-	int size, err;
+	int size, err = 0;
 
 	size = btf_dump_type_data_check_overflow(d, t, id, data, bits_offset);
 	if (size < 0)
Signature · 1 line
2.34.1
author maintainer
#178 lore raw

PATCH 178/1039 tty: serial: atmel: Call dma_async_issue_pending()

In reply to Greg Kroah-Hartman

From: Tudor Ambarus <[email protected]>

[ Upstream commit 4f4b9b5895614eb2e2b5f4cab7858f44bd113e1b ]

The driver wrongly assummed that tx_submit() will start the transfer, which is not the case, now that the at_xdmac driver is fixed. tx_submit is supposed to push the current transaction descriptor to a pending queue, waiting for issue_pending to be called. issue_pending must start the transfer, not tx_submit.

Fixes 34df42f59a60 ("serial: at91: add rx dma support")
Fixes 08f738be88bb ("serial: at91: add tx dma support")
---
 drivers/tty/serial/atmel_serial.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/tty/serial/atmel_serial.c +4 -0
index 376f7a9c2868a..269b4500e9e78 100644
@@ -1009,6 +1009,8 @@ static void atmel_tx_dma(struct uart_port *port)
 				atmel_port->cookie_tx);
 			return;
 		}
+
+		dma_async_issue_pending(chan);
 	}
 
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
@@ -1269,6 +1271,8 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
 		goto chan_err;
 	}
 
+	dma_async_issue_pending(atmel_port->chan_rx);
+
 	return 0;
 
 chan_err:
Signature · 1 line
2.34.1
author maintainer
#179 lore raw

PATCH 179/1039 pinctrl: apple: return an error if pinmux is missing in the DT

In reply to Greg Kroah-Hartman

From: Joey Gouly <[email protected]>

[ Upstream commit 839930ca1bd0c79cdf370d11462ef4a81b664e44 ]

If of_property_count_u32_elems returned 0, return -EINVAL to indicate a failure. Previously this would return 0.

Fixes a0f160ffcb83 ("pinctrl: add pinctrl/GPIO driver for Apple SoCs")
---
 drivers/pinctrl/pinctrl-apple-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-apple-gpio.c +1 -1
index a7861079a6502..c772e31d21223 100644
@@ -114,7 +114,7 @@ static int apple_gpio_dt_node_to_map(struct pinctrl_dev *pctldev,
 		dev_err(pctl->dev,
 			"missing or empty pinmux property in node %pOFn.\n",
 			node);
-		return ret;
+		return ret ? ret : -EINVAL;
 	}
 
 	num_pins = ret;
Signature · 1 line
2.34.1
author maintainer
#185 lore raw

PATCH 185/1039 media: i2c: imx274: fix s_frame_interval runtime resume not requested

In reply to Greg Kroah-Hartman

From: Eugen Hristev <[email protected]>

[ Upstream commit da653498c20ba5b185214d8ae43b4e8e9594f520 ]

pm_runtime_resume_and_get should be called when the s_frame_interval is called.

The driver will try to access device registers to configure VMAX, coarse time and exposure.

Currently if the runtime is not resumed, this fails:

 # media-ctl -d /dev/media0 --set-v4l2 '"IMX274 1-001a":0[fmt:SRGGB10_1X10/3840x2
160@1/10]'

IMX274 1-001a: imx274_binning_goodness: ask 3840x2160, size 3840x2160, goodness 0 IMX274 1-001a: imx274_binning_goodness: ask 3840x2160, size 1920x1080, goodness -3000 IMX274 1-001a: imx274_binning_goodness: ask 3840x2160, size 1280x720, goodness -4000 IMX274 1-001a: imx274_binning_goodness: ask 3840x2160, size 1280x540, goodness -4180 IMX274 1-001a: __imx274_change_compose: selected 1x1 binning
IMX274 1-001a: imx274_set_frame_interval: input frame interval = 1 / 10 IMX274 1-001a: imx274_read_mbreg : addr 0x300e, val=0x1 (2 bytes) IMX274 1-001a: imx274_set_frame_interval : register SVR = 1
IMX274 1-001a: imx274_read_mbreg : addr 0x30f6, val=0x6a8 (2 bytes) IMX274 1-001a: imx274_set_frame_interval : register HMAX = 1704
IMX274 1-001a: imx274_set_frame_length : input length = 2112
IMX274 1-001a: imx274_write_mbreg : i2c bulk write failed, 30f8 = 884 (3 bytes) IMX274 1-001a: imx274_set_frame_length error = -121
IMX274 1-001a: imx274_set_frame_interval error = -121
Unable to setup formats: Remote I/O error (121)

The device is not resumed thus the remote I/O error.

Setting the frame interval works at streaming time, because pm_runtime_resume_and_get is called at s_stream time before sensor setup. The failure happens when only the s_frame_interval is called separately independently on streaming time.

Fixes ad97bc37426c ("media: i2c: imx274: Add IMX274 power on and off sequence")
---
 drivers/media/i2c/imx274.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/media/i2c/imx274.c +5 -0
index 0dce92872176d..4d9b64c61f603 100644
@@ -1367,6 +1367,10 @@ static int imx274_s_frame_interval(struct v4l2_subdev *sd,
 	int min, max, def;
 	int ret;
 
+	ret = pm_runtime_resume_and_get(&imx274->client->dev);
+	if (ret < 0)
+		return ret;
+
 	mutex_lock(&imx274->lock);
 	ret = imx274_set_frame_interval(imx274, fi->interval);
 
@@ -1398,6 +1402,7 @@ static int imx274_s_frame_interval(struct v4l2_subdev *sd,
 
 unlock:
 	mutex_unlock(&imx274->lock);
+	pm_runtime_put(&imx274->client->dev);
 
 	return ret;
 }
Signature · 1 line
2.34.1
author maintainer
#173 lore raw

PATCH 173/1039 libbpf: Fix using invalidated memory in bpf_linker

In reply to Greg Kroah-Hartman

From: Andrii Nakryiko <[email protected]>

[ Upstream commit 593835377f24ca1bb98008ec1dc3baefe491ad6e ]

add_dst_sec() can invalidate bpf_linker's section index making dst_symtab pointer pointing into unallocated memory. Reinitialize dst_symtab pointer on each iteration to make sure it's always valid.

---
 tools/lib/bpf/linker.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tools/lib/bpf/linker.c +4 -1
index 94bdd97859285..6923a0ab3b127 100644
@@ -2000,7 +2000,7 @@ add_sym:
 static int linker_append_elf_relos(struct bpf_linker *linker, struct src_obj *obj)
 {
 	struct src_sec *src_symtab = &obj->secs[obj->symtab_sec_idx];
-	struct dst_sec *dst_symtab = &linker->secs[linker->symtab_sec_idx];
+	struct dst_sec *dst_symtab;
 	int i, err;
 
 	for (i = 1; i < obj->sec_cnt; i++) {
@@ -2033,6 +2033,9 @@ static int linker_append_elf_relos(struct bpf_linker *linker, struct src_obj *ob
 			return -1;
 		}
 
+		/* add_dst_sec() above could have invalidated linker->secs */
+		dst_symtab = &linker->secs[linker->symtab_sec_idx];
+
 		/* shdr->sh_link points to SYMTAB */
 		dst_sec->shdr->sh_link = linker->symtab_sec_idx;
 
Signature · 1 line
2.34.1
author maintainer
#186 lore raw

PATCH 186/1039 media: i2c: Re-order runtime pm initialisation

In reply to Greg Kroah-Hartman

From: Daniel Scally <[email protected]>

[ Upstream commit d2484fbf780762f6f9cc3abb7a07ee42dca2eaa3 ]

The kerneldoc for pm_runtime_set_suspended() says:

"It is not valid to call this function for devices with runtime PM enabled"

To satisfy that requirement, re-order the calls so that pm_runtime_enable() is the last one.

Fixes 11c0d8fdccc5 ("media: i2c: Add support for the OV8865 image sensor")
---
 drivers/media/i2c/ov8865.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov8865.c +1 -1
@@ -2899,8 +2899,8 @@ static int ov8865_probe(struct i2c_clien
 
 	/* Runtime PM */
 
-	pm_runtime_enable(sensor->dev);
 	pm_runtime_set_suspended(sensor->dev);
+	pm_runtime_enable(sensor->dev);
 
 	/* V4L2 subdev register */
 
author maintainer
#189 lore raw

PATCH 189/1039 media: imx-pxp: Initialize the spinlock prior to using it

In reply to Greg Kroah-Hartman

From: Fabio Estevam <[email protected]>

[ Upstream commit ed2f97ad4b21072f849cf4ae6645d1f2b1d3f550 ]

After devm_request_threaded_irq() is called there is a chance that an interrupt may occur before the spinlock is initialized, which will trigger a kernel oops.

To prevent that, move the initialization of the spinlock prior to requesting the interrupts.

Fixes 51abcf7fdb70 ("media: imx-pxp: add i.MX Pixel Pipeline driver")
---
 drivers/media/platform/imx-pxp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/imx-pxp.c +2 -2
index 723b096fedd10..b7174778db539 100644
@@ -1659,6 +1659,8 @@ static int pxp_probe(struct platform_device *pdev)
 	if (irq < 0)
 		return irq;
 
+	spin_lock_init(&dev->irqlock);
+
 	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, pxp_irq_handler,
 			IRQF_ONESHOT, dev_name(&pdev->dev), dev);
 	if (ret < 0) {
@@ -1676,8 +1678,6 @@ static int pxp_probe(struct platform_device *pdev)
 		goto err_clk;
 	}
 
-	spin_lock_init(&dev->irqlock);
-
 	ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);
 	if (ret)
 		goto err_clk;
Signature · 1 line
2.34.1
author maintainer
#188 lore raw

PATCH 188/1039 media: rcar-csi2: Correct the selection of hsfreqrange

In reply to Greg Kroah-Hartman

From: Suresh Udipi <[email protected]>

[ Upstream commit cee44d4fbacbbdfe62697ec94e76c6e4f726c5df ]

hsfreqrange should be chosen based on the calculated mbps which is closer to the default bit rate and within the range as per table[1]. But current calculation always selects first value which is greater than or equal to the calculated mbps which may lead to chosing a wrong range in some cases.

For example for 360 mbps for H3/M3N
Existing logic selects
Calculated value 360Mbps : Default 400Mbps Range [368.125 -433.125 mbps]

This hsfreqrange is out of range.

The logic is changed to get the default value which is closest to the calculated value [1]

Calculated value 360Mbps : Default 350Mbps Range [320.625 -380.625 mpbs]

[1] specs r19uh0105ej0200-r-car-3rd-generation.pdf [Table 25.9]

Please note that According to Renesas in Table 25.9 the range for 220 default value is corrected as below

|Range (Mbps) | Default Bit rate (Mbps) |
-----------------------------------------------
| 197.125-244.125 | 220 |
-----------------------------------------------

Fixes 769afd212b16 ("media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver")
---
 drivers/media/platform/rcar-vin/rcar-csi2.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/media/platform/rcar-vin/rcar-csi2.c +8 -1
index 11848d0c4a55c..436b7be969202 100644
@@ -542,16 +542,23 @@ static int rcsi2_wait_phy_start(struct rcar_csi2 *priv,
 static int rcsi2_set_phypll(struct rcar_csi2 *priv, unsigned int mbps)
 {
 	const struct rcsi2_mbps_reg *hsfreq;
+	const struct rcsi2_mbps_reg *hsfreq_prev = NULL;
 
-	for (hsfreq = priv->info->hsfreqrange; hsfreq->mbps != 0; hsfreq++)
+	for (hsfreq = priv->info->hsfreqrange; hsfreq->mbps != 0; hsfreq++) {
 		if (hsfreq->mbps >= mbps)
 			break;
+		hsfreq_prev = hsfreq;
+	}
 
 	if (!hsfreq->mbps) {
 		dev_err(priv->dev, "Unsupported PHY speed (%u Mbps)", mbps);
 		return -ERANGE;
 	}
 
+	if (hsfreq_prev &&
+	    ((mbps - hsfreq_prev->mbps) <= (hsfreq->mbps - mbps)))
+		hsfreq = hsfreq_prev;
+
 	rcsi2_write(priv, PHYPLL_REG, PHYPLL_HSFREQRANGE(hsfreq->reg));
 
 	return 0;
Signature · 1 line
2.34.1
author maintainer
#163 lore raw

PATCH 163/1039 arm64: dts: qcom: sc7280: Fix interrupt-map parent address cells

In reply to Greg Kroah-Hartman

From: Prasad Malisetty <[email protected]>

[ Upstream commit 66b788133030f0c69a0ecc7f72f7939b119c9a69 ]

Update interrupt-map parent address cells for sc7280 Similar to existing Qcom SoCs.

Fixes 92e0ee9f8 ("arm64: dts: qcom: sc7280: Add PCIe and PHY related nodes")
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +4 -4
index cb94b877d6246..6e27a1beaa33a 100644
@@ -1592,10 +1592,10 @@
 			interrupt-names = "msi";
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 0x7>;
-			interrupt-map = <0 0 0 1 &intc 0 434 IRQ_TYPE_LEVEL_HIGH>,
-					<0 0 0 2 &intc 0 435 IRQ_TYPE_LEVEL_HIGH>,
-					<0 0 0 3 &intc 0 438 IRQ_TYPE_LEVEL_HIGH>,
-					<0 0 0 4 &intc 0 439 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>,
+					<0 0 0 2 &intc 0 0 0 435 IRQ_TYPE_LEVEL_HIGH>,
+					<0 0 0 3 &intc 0 0 0 438 IRQ_TYPE_LEVEL_HIGH>,
+					<0 0 0 4 &intc 0 0 0 439 IRQ_TYPE_LEVEL_HIGH>;
 
 			clocks = <&gcc GCC_PCIE_1_PIPE_CLK>,
 				 <&gcc GCC_PCIE_1_PIPE_CLK_SRC>,
Signature · 1 line
2.34.1
author maintainer
#200 lore raw

PATCH 200/1039 thermal/drivers/imx: Implement runtime PM support

In reply to Greg Kroah-Hartman

From: Oleksij Rempel <[email protected]>

[ Upstream commit 4cf2ddf16e175ee18c5c29865c32da7d6269cf44 ]

Starting with commit d92ed2c9d3ff ("thermal: imx: Use driver's local data to decide whether to run a measurement") this driver stared using irq_enabled flag to make decision to power on/off the thermal core. This triggered a regression, where after reaching critical temperature, alarm IRQ handler set irq_enabled to false, disabled thermal core and was not able read temperature and disable cooling sequence.

In case the cooling device is "CPU/GPU freq", the system will run with reduce performance until next reboot.

To solve this issue, we need to move all parts implementing hand made runtime power management and let it handle actual runtime PM framework.

Fixes d92ed2c9d3ff ("thermal: imx: Use driver's local data to decide whether to run a measurement")
---
 drivers/thermal/imx_thermal.c | 145 +++++++++++++++++++++-------------
 1 file changed, 91 insertions(+), 54 deletions(-)
drivers/thermal/imx_thermal.c +91 -54
index 2c7473d86a59b..16663373b6829 100644
@@ -15,6 +15,7 @@
 #include <linux/regmap.h>
 #include <linux/thermal.h>
 #include <linux/nvmem-consumer.h>
+#include <linux/pm_runtime.h>
 
 #define REG_SET		0x4
 #define REG_CLR		0x8
@@ -194,6 +195,7 @@ static struct thermal_soc_data thermal_imx7d_data = {
 };
 
 struct imx_thermal_data {
+	struct device *dev;
 	struct cpufreq_policy *policy;
 	struct thermal_zone_device *tz;
 	struct thermal_cooling_device *cdev;
@@ -252,44 +254,15 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
 	const struct thermal_soc_data *soc_data = data->socdata;
 	struct regmap *map = data->tempmon;
 	unsigned int n_meas;
-	bool wait, run_measurement;
 	u32 val;
+	int ret;
 
-	run_measurement = !data->irq_enabled;
-	if (!run_measurement) {
-		/* Check if a measurement is currently in progress */
-		regmap_read(map, soc_data->temp_data, &val);
-		wait = !(val & soc_data->temp_valid_mask);
-	} else {
-		/*
-		 * Every time we measure the temperature, we will power on the
-		 * temperature sensor, enable measurements, take a reading,
-		 * disable measurements, power off the temperature sensor.
-		 */
-		regmap_write(map, soc_data->sensor_ctrl + REG_CLR,
-			    soc_data->power_down_mask);
-		regmap_write(map, soc_data->sensor_ctrl + REG_SET,
-			    soc_data->measure_temp_mask);
-
-		wait = true;
-	}
-
-	/*
-	 * According to the temp sensor designers, it may require up to ~17us
-	 * to complete a measurement.
-	 */
-	if (wait)
-		usleep_range(20, 50);
+	ret = pm_runtime_resume_and_get(data->dev);
+	if (ret < 0)
+		return ret;
 
 	regmap_read(map, soc_data->temp_data, &val);
 
-	if (run_measurement) {
-		regmap_write(map, soc_data->sensor_ctrl + REG_CLR,
-			     soc_data->measure_temp_mask);
-		regmap_write(map, soc_data->sensor_ctrl + REG_SET,
-			     soc_data->power_down_mask);
-	}
-
 	if ((val & soc_data->temp_valid_mask) == 0) {
 		dev_dbg(&tz->device, "temp measurement never finished\n");
 		return -EAGAIN;
@@ -328,6 +301,8 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
 		enable_irq(data->irq);
 	}
 
+	pm_runtime_put(data->dev);
+
 	return 0;
 }
 
@@ -335,24 +310,16 @@ static int imx_change_mode(struct thermal_zone_device *tz,
 			   enum thermal_device_mode mode)
 {
 	struct imx_thermal_data *data = tz->devdata;
-	struct regmap *map = data->tempmon;
-	const struct thermal_soc_data *soc_data = data->socdata;
 
 	if (mode == THERMAL_DEVICE_ENABLED) {
-		regmap_write(map, soc_data->sensor_ctrl + REG_CLR,
-			     soc_data->power_down_mask);
-		regmap_write(map, soc_data->sensor_ctrl + REG_SET,
-			     soc_data->measure_temp_mask);
+		pm_runtime_get(data->dev);
 
 		if (!data->irq_enabled) {
 			data->irq_enabled = true;
 			enable_irq(data->irq);
 		}
 	} else {
-		regmap_write(map, soc_data->sensor_ctrl + REG_CLR,
-			     soc_data->measure_temp_mask);
-		regmap_write(map, soc_data->sensor_ctrl + REG_SET,
-			     soc_data->power_down_mask);
+		pm_runtime_put(data->dev);
 
 		if (data->irq_enabled) {
 			disable_irq(data->irq);
@@ -393,6 +360,11 @@ static int imx_set_trip_temp(struct thermal_zone_device *tz, int trip,
 			     int temp)
 {
 	struct imx_thermal_data *data = tz->devdata;
+	int ret;
+
+	ret = pm_runtime_resume_and_get(data->dev);
+	if (ret < 0)
+		return ret;
 
 	/* do not allow changing critical threshold */
 	if (trip == IMX_TRIP_CRITICAL)
@@ -406,6 +378,8 @@ static int imx_set_trip_temp(struct thermal_zone_device *tz, int trip,
 
 	imx_set_alarm_temp(data, temp);
 
+	pm_runtime_put(data->dev);
+
 	return 0;
 }
 
@@ -681,6 +655,8 @@ static int imx_thermal_probe(struct platform_device *pdev)
 	if (!data)
 		return -ENOMEM;
 
+	data->dev = &pdev->dev;
+
 	map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "fsl,tempmon");
 	if (IS_ERR(map)) {
 		ret = PTR_ERR(map);
@@ -800,6 +776,16 @@ static int imx_thermal_probe(struct platform_device *pdev)
 		     data->socdata->power_down_mask);
 	regmap_write(map, data->socdata->sensor_ctrl + REG_SET,
 		     data->socdata->measure_temp_mask);
+	/* After power up, we need a delay before first access can be done. */
+	usleep_range(20, 50);
+
+	/* the core was configured and enabled just before */
+	pm_runtime_set_active(&pdev->dev);
+	pm_runtime_enable(data->dev);
+
+	ret = pm_runtime_resume_and_get(data->dev);
+	if (ret < 0)
+		goto disable_runtime_pm;
 
 	data->irq_enabled = true;
 	ret = thermal_zone_device_enable(data->tz);
@@ -814,10 +800,15 @@ static int imx_thermal_probe(struct platform_device *pdev)
 		goto thermal_zone_unregister;
 	}
 
+	pm_runtime_put(data->dev);
+
 	return 0;
 
 thermal_zone_unregister:
 	thermal_zone_device_unregister(data->tz);
+disable_runtime_pm:
+	pm_runtime_put_noidle(data->dev);
+	pm_runtime_disable(data->dev);
 clk_disable:
 	clk_disable_unprepare(data->thermal_clk);
 legacy_cleanup:
@@ -829,13 +820,9 @@ legacy_cleanup:
 static int imx_thermal_remove(struct platform_device *pdev)
 {
 	struct imx_thermal_data *data = platform_get_drvdata(pdev);
-	struct regmap *map = data->tempmon;
 
-	/* Disable measurements */
-	regmap_write(map, data->socdata->sensor_ctrl + REG_SET,
-		     data->socdata->power_down_mask);
-	if (!IS_ERR(data->thermal_clk))
-		clk_disable_unprepare(data->thermal_clk);
+	pm_runtime_put_noidle(data->dev);
+	pm_runtime_disable(data->dev);
 
 	thermal_zone_device_unregister(data->tz);
 	imx_thermal_unregister_legacy_cooling(data);
@@ -858,29 +845,79 @@ static int __maybe_unused imx_thermal_suspend(struct device *dev)
 	ret = thermal_zone_device_disable(data->tz);
 	if (ret)
 		return ret;
+
+	return pm_runtime_force_suspend(data->dev);
+}
+
+static int __maybe_unused imx_thermal_resume(struct device *dev)
+{
+	struct imx_thermal_data *data = dev_get_drvdata(dev);
+	int ret;
+
+	ret = pm_runtime_force_resume(data->dev);
+	if (ret)
+		return ret;
+	/* Enabled thermal sensor after resume */
+	return thermal_zone_device_enable(data->tz);
+}
+
+static int __maybe_unused imx_thermal_runtime_suspend(struct device *dev)
+{
+	struct imx_thermal_data *data = dev_get_drvdata(dev);
+	const struct thermal_soc_data *socdata = data->socdata;
+	struct regmap *map = data->tempmon;
+	int ret;
+
+	ret = regmap_write(map, socdata->sensor_ctrl + REG_CLR,
+			   socdata->measure_temp_mask);
+	if (ret)
+		return ret;
+
+	ret = regmap_write(map, socdata->sensor_ctrl + REG_SET,
+			   socdata->power_down_mask);
+	if (ret)
+		return ret;
+
 	clk_disable_unprepare(data->thermal_clk);
 
 	return 0;
 }
 
-static int __maybe_unused imx_thermal_resume(struct device *dev)
+static int __maybe_unused imx_thermal_runtime_resume(struct device *dev)
 {
 	struct imx_thermal_data *data = dev_get_drvdata(dev);
+	const struct thermal_soc_data *socdata = data->socdata;
+	struct regmap *map = data->tempmon;
 	int ret;
 
 	ret = clk_prepare_enable(data->thermal_clk);
 	if (ret)
 		return ret;
-	/* Enabled thermal sensor after resume */
-	ret = thermal_zone_device_enable(data->tz);
+
+	ret = regmap_write(map, socdata->sensor_ctrl + REG_CLR,
+			   socdata->power_down_mask);
+	if (ret)
+		return ret;
+
+	ret = regmap_write(map, socdata->sensor_ctrl + REG_SET,
+			   socdata->measure_temp_mask);
 	if (ret)
 		return ret;
 
+	/*
+	 * According to the temp sensor designers, it may require up to ~17us
+	 * to complete a measurement.
+	 */
+	usleep_range(20, 50);
+
 	return 0;
 }
 
-static SIMPLE_DEV_PM_OPS(imx_thermal_pm_ops,
-			 imx_thermal_suspend, imx_thermal_resume);
+static const struct dev_pm_ops imx_thermal_pm_ops = {
+	SET_SYSTEM_SLEEP_PM_OPS(imx_thermal_suspend, imx_thermal_resume)
+	SET_RUNTIME_PM_OPS(imx_thermal_runtime_suspend,
+			   imx_thermal_runtime_resume, NULL)
+};
 
 static struct platform_driver imx_thermal = {
 	.driver = {
Signature · 1 line
2.34.1
author maintainer
#155 lore raw

PATCH 155/1039 arm64: dts: renesas: cat875: Add rx/tx delays

In reply to Greg Kroah-Hartman

From: Biju Das <[email protected]>

[ Upstream commit e1a9faddffe7e555304dc2e3284c84fbee0679ee ]

The CAT875 sub board from Silicon Linux uses a Realtek PHY.

The phy driver commit bbc4d71d63549bcd003 ("net: phy: realtek: fix rtl8211e rx/tx delay config") introduced NFS mount failures. Now it needs both rx/tx delays for the NFS mount to work.

This patch fixes the NFS mount failure issue by adding "rgmii-id" mode to the avb device node.

Fixes bbc4d71d63549bcd ("net: phy: realtek: fix rtl8211e rx/tx delay config")
---
 arch/arm64/boot/dts/renesas/cat875.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/renesas/cat875.dtsi +1 -0
index a69d24e9c61db..8c9da8b4bd60b 100644
@@ -18,6 +18,7 @@
 	pinctrl-names = "default";
 	renesas,no-ether-link;
 	phy-handle = <&phy0>;
+	phy-mode = "rgmii-id";
 	status = "okay";
 
 	phy0: ethernet-phy@0 {
Signature · 1 line
2.34.1
author maintainer
#299 lore raw

PATCH 299/1039 drm/tegra: vic: Fix DMA API misuse

In reply to Greg Kroah-Hartman

From: Robin Murphy <[email protected]>

[ Upstream commit 5566174cb10a5167d59b0793871cab7990b149b8 ]

Upon failure, dma_alloc_coherent() returns NULL. If that does happen, passing some uninitialised stack contents to dma_mapping_error() - which belongs to a different API in the first place - has precious little chance of detecting it.

Also include the correct header, because the fragile transitive inclusion currently providing it is going to break soon.

Fixes 20e7dce255e9 ("drm/tegra: Remove memory allocation from Falcon library")
CC Thierry Reding <[email protected]>
CC Mikko Perttunen <[email protected]>
---
 drivers/gpu/drm/tegra/vic.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/tegra/vic.c +3 -4
index c02010ff2b7f2..da4af53719917 100644
@@ -5,6 +5,7 @@
 
 #include <linux/clk.h>
 #include <linux/delay.h>
+#include <linux/dma-mapping.h>
 #include <linux/host1x.h>
 #include <linux/iommu.h>
 #include <linux/module.h>
@@ -232,10 +233,8 @@ static int vic_load_firmware(struct vic *vic)
 
 	if (!client->group) {
 		virt = dma_alloc_coherent(vic->dev, size, &iova, GFP_KERNEL);
-
-		err = dma_mapping_error(vic->dev, iova);
-		if (err < 0)
-			return err;
+		if (!virt)
+			return -ENOMEM;
 	} else {
 		virt = tegra_drm_alloc(tegra, size, &iova);
 	}
Signature · 1 line
2.34.1
author maintainer
#201 lore raw

PATCH 201/1039 igc: AF_XDP zero-copy metadata adjust breaks SKBs on XDP_PASS

In reply to Greg Kroah-Hartman

From: Jesper Dangaard Brouer <[email protected]>

[ Upstream commit 4fa8fcd3440101dbacf4fae91de69877ef751977 ]

Driver already implicitly supports XDP metadata access in AF_XDP zero-copy mode, as xsk_buff_pool's xp_alloc() naturally set xdp_buff data_meta equal data.

This works fine for XDP and AF_XDP, but if a BPF-prog adjust via bpf_xdp_adjust_meta() and choose to call XDP_PASS, then igc function igc_construct_skb_zc() will construct an invalid SKB packet. The function correctly include the xdp->data_meta area in the memcpy, but forgot to pull header to take metasize into account.

---
 drivers/net/ethernet/intel/igc/igc_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/igc/igc_main.c +3 -1
index d28a80a009537..d83e665b3a4f2 100644
@@ -2448,8 +2448,10 @@ static struct sk_buff *igc_construct_skb_zc(struct igc_ring *ring,
 
 	skb_reserve(skb, xdp->data_meta - xdp->data_hard_start);
 	memcpy(__skb_put(skb, totalsize), xdp->data_meta, totalsize);
-	if (metasize)
+	if (metasize) {
 		skb_metadata_set(skb, metasize);
+		__skb_pull(skb, metasize);
+	}
 
 	return skb;
 }
Signature · 1 line
2.34.1
author maintainer
#202 lore raw

PATCH 202/1039 netfilter: bridge: add support for pppoe filtering

In reply to Greg Kroah-Hartman

From: Florian Westphal <[email protected]>

[ Upstream commit 28b78ecffea8078d81466b2e01bb5a154509f1ba ]

This makes 'bridge-nf-filter-pppoe-tagged' sysctl work for bridged traffic.

Looking at the original commit it doesn't appear this ever worked:

static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff **pskb,
[..]

        if (skb->protocol == htons(ETH_P_8021Q)) {
                skb_pull(skb, VLAN_HLEN);
                skb->network_header += VLAN_HLEN;
+       } else if (skb->protocol == htons(ETH_P_PPP_SES)) {
+               skb_pull(skb, PPPOE_SES_HLEN);
+               skb->network_header += PPPOE_SES_HLEN;
        }
 [..]
	NF_HOOK(... POST_ROUTING, ...)

... but the adjusted offsets are never restored.

The alternative would be to rip this code out for good, but otoh we'd have to keep this anyway for the vlan handling (which works because vlan tag info is in the skb, not the packet
payload).

Reported-and-tested-by Amish Chana <[email protected]>
Fixes 516299d2f5b6f97 ("[NETFILTER]: bridge-nf: filter bridged IPv4/IPv6 encapsulated in pppoe traffic")
---
 net/bridge/br_netfilter_hooks.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
net/bridge/br_netfilter_hooks.c +3 -4
index b5af68c105a83..4fd882686b04d 100644
@@ -743,6 +743,9 @@ static int br_nf_dev_queue_xmit(struct net *net, struct sock *sk, struct sk_buff
 	if (nf_bridge->frag_max_size && nf_bridge->frag_max_size < mtu)
 		mtu = nf_bridge->frag_max_size;
 
+	nf_bridge_update_protocol(skb);
+	nf_bridge_push_encap_header(skb);
+
 	if (skb_is_gso(skb) || skb->len + mtu_reserved <= mtu) {
 		nf_bridge_info_free(skb);
 		return br_dev_queue_push_xmit(net, sk, skb);
@@ -760,8 +763,6 @@ static int br_nf_dev_queue_xmit(struct net *net, struct sock *sk, struct sk_buff
 
 		IPCB(skb)->frag_max_size = nf_bridge->frag_max_size;
 
-		nf_bridge_update_protocol(skb);
-
 		data = this_cpu_ptr(&brnf_frag_data_storage);
 
 		if (skb_vlan_tag_present(skb)) {
@@ -789,8 +790,6 @@ static int br_nf_dev_queue_xmit(struct net *net, struct sock *sk, struct sk_buff
 
 		IP6CB(skb)->frag_max_size = nf_bridge->frag_max_size;
 
-		nf_bridge_update_protocol(skb);
-
 		data = this_cpu_ptr(&brnf_frag_data_storage);
 		data->encap_size = nf_bridge_encap_header_len(skb);
 		data->size = ETH_HLEN + data->encap_size;
Signature · 1 line
2.34.1
author maintainer
#203 lore raw

PATCH 203/1039 powerpc: Avoid discarding flags in system_call_exception()

In reply to Greg Kroah-Hartman

From: Mark Rutland <[email protected]>

[ Upstream commit 08b0af5b2affbe7419853e8dd1330e4b3fe27125 ]

Some thread flags can be set remotely, and so even when IRQs are disabled, the flags can change under our feet. Thus, when setting flags we must use an atomic operation rather than a plain read-modify-write sequence, as a plain read-modify-write may discard flags which are concurrently set by a remote thread, e.g.

	// task A			// task B
	tmp = A->thread_info.flags;
					set_tsk_thread_flag(A, NEWFLAG_B);
	tmp |= NEWFLAG_A;
	A->thread_info.flags = tmp;

arch/powerpc/kernel/interrupt.c's system_call_exception() sets _TIF_RESTOREALL in the thread info flags with a read-modify-write, which may result in other flags being discarded.

Elsewhere in the file it uses clear_bits() to atomically remove flag bits, so use set_bits() here for consistency with those.

There may be reasons (e.g. instrumentation) that prevent the use of set_thread_flag() and clear_thread_flag() here, which would otherwise be preferable.

Fixes ae7aaecc3f2f78b7 ("powerpc/64s: system call rfscv workaround for TM bugs")
Cc Eirik Fuller <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Nicholas Piggin <[email protected]>
---
 arch/powerpc/kernel/interrupt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/interrupt.c +1 -1
index 835b626cd4760..df048e331cbfe 100644
@@ -148,7 +148,7 @@ notrace long system_call_exception(long r3, long r4, long r5,
 	 */
 	if (IS_ENABLED(CONFIG_PPC_TRANSACTIONAL_MEM) &&
 			unlikely(MSR_TM_TRANSACTIONAL(regs->msr)))
-		current_thread_info()->flags |= _TIF_RESTOREALL;
+		set_bits(_TIF_RESTOREALL, &current_thread_info()->flags);
 
 	/*
 	 * If the system call was made with a transaction active, doom it and
Signature · 1 line
2.34.1
author maintainer
#206 lore raw

PATCH 206/1039 drm/vmwgfx: Remove the deprecated lower mem limit

In reply to Greg Kroah-Hartman

From: Zack Rusin <[email protected]>

[ Upstream commit 826c387d015247df396a91eadbaca94f0394853c ]

TTM during the transition to the new page allocator lost the ability to constrain the allocations via the lower_mem_limit. The code has been unused since the change:
256dd44bd897 ("drm/ttm: nuke old page allocator")
and there's no reason to keep it.

---
 drivers/gpu/drm/vmwgfx/ttm_memory.c | 99 +----------------------------
 drivers/gpu/drm/vmwgfx/ttm_memory.h |  6 +-
 2 files changed, 2 insertions(+), 103 deletions(-)
drivers/gpu/drm/vmwgfx/ttm_memory.c +1 -98
index 7f7fe35fc21df..326d2d177c8bb 100644
@@ -34,7 +34,6 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-#include <linux/swap.h>
 
 #include <drm/drm_device.h>
 #include <drm/drm_file.h>
@@ -173,69 +172,7 @@ static struct kobj_type ttm_mem_zone_kobj_type = {
 	.sysfs_ops = &ttm_mem_zone_ops,
 	.default_attrs = ttm_mem_zone_attrs,
 };
-
-static struct attribute ttm_mem_global_lower_mem_limit = {
-	.name = "lower_mem_limit",
-	.mode = S_IRUGO | S_IWUSR
-};
-
-static ssize_t ttm_mem_global_show(struct kobject *kobj,
-				 struct attribute *attr,
-				 char *buffer)
-{
-	struct ttm_mem_global *glob =
-		container_of(kobj, struct ttm_mem_global, kobj);
-	uint64_t val = 0;
-
-	spin_lock(&glob->lock);
-	val = glob->lower_mem_limit;
-	spin_unlock(&glob->lock);
-	/* convert from number of pages to KB */
-	val <<= (PAGE_SHIFT - 10);
-	return snprintf(buffer, PAGE_SIZE, "%llu\n",
-			(unsigned long long) val);
-}
-
-static ssize_t ttm_mem_global_store(struct kobject *kobj,
-				  struct attribute *attr,
-				  const char *buffer,
-				  size_t size)
-{
-	int chars;
-	uint64_t val64;
-	unsigned long val;
-	struct ttm_mem_global *glob =
-		container_of(kobj, struct ttm_mem_global, kobj);
-
-	chars = sscanf(buffer, "%lu", &val);
-	if (chars == 0)
-		return size;
-
-	val64 = val;
-	/* convert from KB to number of pages */
-	val64 >>= (PAGE_SHIFT - 10);
-
-	spin_lock(&glob->lock);
-	glob->lower_mem_limit = val64;
-	spin_unlock(&glob->lock);
-
-	return size;
-}
-
-static struct attribute *ttm_mem_global_attrs[] = {
-	&ttm_mem_global_lower_mem_limit,
-	NULL
-};
-
-static const struct sysfs_ops ttm_mem_global_ops = {
-	.show = &ttm_mem_global_show,
-	.store = &ttm_mem_global_store,
-};
-
-static struct kobj_type ttm_mem_glob_kobj_type = {
-	.sysfs_ops = &ttm_mem_global_ops,
-	.default_attrs = ttm_mem_global_attrs,
-};
+static struct kobj_type ttm_mem_glob_kobj_type = {0};
 
 static bool ttm_zones_above_swap_target(struct ttm_mem_global *glob,
 					bool from_wq, uint64_t extra)
@@ -435,11 +372,6 @@ int ttm_mem_global_init(struct ttm_mem_global *glob, struct device *dev)
 
 	si_meminfo(&si);
 
-	spin_lock(&glob->lock);
-	/* set it as 0 by default to keep original behavior of OOM */
-	glob->lower_mem_limit = 0;
-	spin_unlock(&glob->lock);
-
 	ret = ttm_mem_init_kernel_zone(glob, &si);
 	if (unlikely(ret != 0))
 		goto out_no_zone;
@@ -526,35 +458,6 @@ void ttm_mem_global_free(struct ttm_mem_global *glob,
 }
 EXPORT_SYMBOL(ttm_mem_global_free);
 
-/*
- * check if the available mem is under lower memory limit
- *
- * a. if no swap disk at all or free swap space is under swap_mem_limit
- * but available system mem is bigger than sys_mem_limit, allow TTM
- * allocation;
- *
- * b. if the available system mem is less than sys_mem_limit but free
- * swap disk is bigger than swap_mem_limit, allow TTM allocation.
- */
-bool
-ttm_check_under_lowerlimit(struct ttm_mem_global *glob,
-			uint64_t num_pages,
-			struct ttm_operation_ctx *ctx)
-{
-	int64_t available;
-
-	/* We allow over commit during suspend */
-	if (ctx->force_alloc)
-		return false;
-
-	available = get_nr_swap_pages() + si_mem_available();
-	available -= num_pages;
-	if (available < glob->lower_mem_limit)
-		return true;
-
-	return false;
-}
-
 static int ttm_mem_global_reserve(struct ttm_mem_global *glob,
 				  struct ttm_mem_zone *single_zone,
 				  uint64_t amount, bool reserve)
drivers/gpu/drm/vmwgfx/ttm_memory.h +1 -5
index c50dba7744854..7b0d617ebcb1e 100644
@@ -50,8 +50,6 @@
  * @work: The workqueue callback for the shrink queue.
  * @lock: Lock to protect the @shrink - and the memory accounting members,
  * that is, essentially the whole structure with some exceptions.
- * @lower_mem_limit: include lower limit of swap space and lower limit of
- * system memory.
  * @zones: Array of pointers to accounting zones.
  * @num_zones: Number of populated entries in the @zones array.
  * @zone_kernel: Pointer to the kernel zone.
@@ -69,7 +67,6 @@ extern struct ttm_mem_global {
 	struct workqueue_struct *swap_queue;
 	struct work_struct work;
 	spinlock_t lock;
-	uint64_t lower_mem_limit;
 	struct ttm_mem_zone *zones[TTM_MEM_MAX_ZONES];
 	unsigned int num_zones;
 	struct ttm_mem_zone *zone_kernel;
@@ -91,6 +88,5 @@ int ttm_mem_global_alloc_page(struct ttm_mem_global *glob,
 void ttm_mem_global_free_page(struct ttm_mem_global *glob,
 			      struct page *page, uint64_t size);
 size_t ttm_round_pot(size_t size);
-bool ttm_check_under_lowerlimit(struct ttm_mem_global *glob, uint64_t num_pages,
-				struct ttm_operation_ctx *ctx);
+
 #endif
Signature · 1 line
2.34.1
author maintainer
#215 lore raw

PATCH 215/1039 libbpf: Clean gen_loaders attach kind.

In reply to Greg Kroah-Hartman

From: Alexei Starovoitov <[email protected]>

[ Upstream commit 19250f5fc0c283892a61f3abf9d65e6325f63897 ]

The gen_loader has to clear attach_kind otherwise the programs without attach_btf_id will fail load if they follow programs with attach_btf_id.

Fixes 67234743736a ("libbpf: Generate loader program out of BPF ELF file.")
---
 tools/lib/bpf/gen_loader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/lib/bpf/gen_loader.c +3 -1
index 5aad39e92a7a5..4ac65afc99e50 100644
@@ -993,9 +993,11 @@ void bpf_gen__prog_load(struct bpf_gen *gen,
 	debug_ret(gen, "prog_load %s insn_cnt %d", attr.prog_name, attr.insn_cnt);
 	/* successful or not, close btf module FDs used in extern ksyms and attach_btf_obj_fd */
 	cleanup_relos(gen, insns);
-	if (gen->attach_kind)
+	if (gen->attach_kind) {
 		emit_sys_close_blob(gen,
 				    attr_field(prog_load_attr, attach_btf_obj_fd));
+		gen->attach_kind = 0;
+	}
 	emit_check_err(gen);
 	/* remember prog_fd in the stack, if successful */
 	emit(gen, BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_7,
Signature · 1 line
2.34.1
author maintainer
#217 lore raw

PATCH 217/1039 crypto: caam - save caam memory to support crypto engine retry mechanism.

In reply to Greg Kroah-Hartman

From: Gaurav Jain <[email protected]>

[ Upstream commit 087e1d715bccf25dc0e83294576e416b0386ba20 ]

When caam queue is full (-ENOSPC), caam frees descriptor memory. crypto-engine checks if retry support is true and h/w queue is full(-ENOSPC), then requeue the crypto request.
During processing the requested descriptor again, caam gives below error. (caam_jr 30902000.jr: 40000006: DECO: desc idx 0: Invalid KEY Command).

This patch adds a check to return when caam input ring is full and retry support is true. so descriptor memory is not freed and requeued request can be processed again.

Fixes 2d653936eb2cf ("crypto: caam - enable crypto-engine retry mechanism")
---
 drivers/crypto/caam/caamalg.c  | 6 ++++++
 drivers/crypto/caam/caamhash.c | 3 +++
 drivers/crypto/caam/caampkc.c  | 3 +++
 3 files changed, 12 insertions(+)
drivers/crypto/caam/caamalg.c +6 -0
index 8697ae53b0633..d3d8bb0a69900 100644
@@ -1533,6 +1533,9 @@ static int aead_do_one_req(struct crypto_engine *engine, void *areq)
 
 	ret = caam_jr_enqueue(ctx->jrdev, desc, aead_crypt_done, req);
 
+	if (ret == -ENOSPC && engine->retry_support)
+		return ret;
+
 	if (ret != -EINPROGRESS) {
 		aead_unmap(ctx->jrdev, rctx->edesc, req);
 		kfree(rctx->edesc);
@@ -1762,6 +1765,9 @@ static int skcipher_do_one_req(struct crypto_engine *engine, void *areq)
 
 	ret = caam_jr_enqueue(ctx->jrdev, desc, skcipher_crypt_done, req);
 
+	if (ret == -ENOSPC && engine->retry_support)
+		return ret;
+
 	if (ret != -EINPROGRESS) {
 		skcipher_unmap(ctx->jrdev, rctx->edesc, req);
 		kfree(rctx->edesc);
drivers/crypto/caam/caamhash.c +3 -0
index e8a6d8bc43b5d..36ef738e4a181 100644
@@ -765,6 +765,9 @@ static int ahash_do_one_req(struct crypto_engine *engine, void *areq)
 
 	ret = caam_jr_enqueue(jrdev, desc, state->ahash_op_done, req);
 
+	if (ret == -ENOSPC && engine->retry_support)
+		return ret;
+
 	if (ret != -EINPROGRESS) {
 		ahash_unmap(jrdev, state->edesc, req, 0);
 		kfree(state->edesc);
drivers/crypto/caam/caampkc.c +3 -0
index bf6275ffc4aad..8867275767101 100644
@@ -380,6 +380,9 @@ static int akcipher_do_one_req(struct crypto_engine *engine, void *areq)
 
 	ret = caam_jr_enqueue(jrdev, desc, req_ctx->akcipher_op_done, req);
 
+	if (ret == -ENOSPC && engine->retry_support)
+		return ret;
+
 	if (ret != -EINPROGRESS) {
 		rsa_pub_unmap(jrdev, req_ctx->edesc, req);
 		rsa_io_unmap(jrdev, req_ctx->edesc, req);
Signature · 1 line
2.34.1
author maintainer
#219 lore raw

PATCH 219/1039 arm64: dts: ti: k3-j7200: Fix the L2 cache sets

In reply to Greg Kroah-Hartman

From: Nishanth Menon <[email protected]>

[ Upstream commit d0c826106f3fc11ff97285102b576b65576654ae ]

A72's L2 cache[1] on J7200[2] is 1MB. A72's L2 is fixed line length of 64 bytes and 16-way set-associative cache structure.

1MB of L2 / 64 (line length) = 16384 ways
16384 ways / 16 = 1024 sets

Fix the l2 cache-sets.

[1] https://developer.arm.com/documentation/100095/0003/Level-2-Memory-System/About-the-L2-memory-system
[2] https://www.ti.com/lit/pdf/spruiu1

---
 arch/arm64/boot/dts/ti/k3-j7200.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-j7200.dtsi +1 -1
index 47567cb260c2b..a99a4d305b7ec 100644
@@ -86,7 +86,7 @@
 		cache-level = <2>;
 		cache-size = <0x100000>;
 		cache-line-size = <64>;
-		cache-sets = <2048>;
+		cache-sets = <1024>;
 		next-level-cache = <&msmc_l3>;
 	};
 
Signature · 1 line
2.34.1
author maintainer
#194 lore raw

PATCH 194/1039 media: coda: fix CODA960 JPEG encoder buffer overflow

In reply to Greg Kroah-Hartman

From: Philipp Zabel <[email protected]>

[ Upstream commit 1a59cd88f55068710f6549bee548846661673780 ]

Stop the CODA960 JPEG encoder from overflowing capture buffers. The bitstream buffer overflow interrupt doesn't seem to be connected, so this has to be handled via timeout instead.

Fixes 96f6f62c4656 ("media: coda: jpeg: add CODA960 JPEG encoder support")
---
 drivers/media/platform/coda/coda-common.c |  8 +++++---
 drivers/media/platform/coda/coda-jpeg.c   | 21 ++++++++++++++++++++-
 2 files changed, 25 insertions(+), 4 deletions(-)
drivers/media/platform/coda/coda-common.c +5 -3
index 0e312b0842d7f..9a2640a9c75c6 100644
@@ -1537,11 +1537,13 @@ static void coda_pic_run_work(struct work_struct *work)
 
 	if (!wait_for_completion_timeout(&ctx->completion,
 					 msecs_to_jiffies(1000))) {
-		dev_err(dev->dev, "CODA PIC_RUN timeout\n");
+		if (ctx->use_bit) {
+			dev_err(dev->dev, "CODA PIC_RUN timeout\n");
 
-		ctx->hold = true;
+			ctx->hold = true;
 
-		coda_hw_reset(ctx);
+			coda_hw_reset(ctx);
+		}
 
 		if (ctx->ops->run_timeout)
 			ctx->ops->run_timeout(ctx);
drivers/media/platform/coda/coda-jpeg.c +20 -1
index b11cfbe166dd3..a72f4655e5ad5 100644
@@ -1127,7 +1127,8 @@ static int coda9_jpeg_prepare_encode(struct coda_ctx *ctx)
 	coda_write(dev, 0, CODA9_REG_JPEG_GBU_BT_PTR);
 	coda_write(dev, 0, CODA9_REG_JPEG_GBU_WD_PTR);
 	coda_write(dev, 0, CODA9_REG_JPEG_GBU_BBSR);
-	coda_write(dev, 0, CODA9_REG_JPEG_BBC_STRM_CTRL);
+	coda_write(dev, BIT(31) | ((end_addr - start_addr - header_len) / 256),
+		   CODA9_REG_JPEG_BBC_STRM_CTRL);
 	coda_write(dev, 0, CODA9_REG_JPEG_GBU_CTRL);
 	coda_write(dev, 0, CODA9_REG_JPEG_GBU_FF_RPTR);
 	coda_write(dev, 127, CODA9_REG_JPEG_GBU_BBER);
@@ -1257,6 +1258,23 @@ static void coda9_jpeg_finish_encode(struct coda_ctx *ctx)
 	coda_hw_reset(ctx);
 }
 
+static void coda9_jpeg_encode_timeout(struct coda_ctx *ctx)
+{
+	struct coda_dev *dev = ctx->dev;
+	u32 end_addr, wr_ptr;
+
+	/* Handle missing BBC overflow interrupt via timeout */
+	end_addr = coda_read(dev, CODA9_REG_JPEG_BBC_END_ADDR);
+	wr_ptr = coda_read(dev, CODA9_REG_JPEG_BBC_WR_PTR);
+	if (wr_ptr >= end_addr - 256) {
+		v4l2_err(&dev->v4l2_dev, "JPEG too large for capture buffer\n");
+		coda9_jpeg_finish_encode(ctx);
+		return;
+	}
+
+	coda_hw_reset(ctx);
+}
+
 static void coda9_jpeg_release(struct coda_ctx *ctx)
 {
 	int i;
@@ -1276,6 +1294,7 @@ const struct coda_context_ops coda9_jpeg_encode_ops = {
 	.start_streaming = coda9_jpeg_start_encoding,
 	.prepare_run = coda9_jpeg_prepare_encode,
 	.finish_run = coda9_jpeg_finish_encode,
+	.run_timeout = coda9_jpeg_encode_timeout,
 	.release = coda9_jpeg_release,
 };
 
Signature · 1 line
2.34.1
author maintainer
#221 lore raw

PATCH 221/1039 arm64: dts: ti: k3-j7200: Correct the d-cache-sets info

In reply to Greg Kroah-Hartman

From: Nishanth Menon <[email protected]>

[ Upstream commit a172c86931709d6663318609d71a811333bdf4b0 ]

A72 Cluster (chapter 1.3.1 [1]) has 48KB Icache, 32KB Dcache and 1MB L2 Cache
- ICache is 3-way set-associative
- Dcache is 2-way set-associative
- Line size are 64bytes

32KB (Dcache)/64 (fixed line length of 64 bytes) = 512 ways 512 ways / 2 (Dcache is 2-way per set) = 256 sets.

So, correct the d-cache-sets info.

[1] https://www.ti.com/lit/pdf/spruiu1

---
 arch/arm64/boot/dts/ti/k3-j7200.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-j7200.dtsi +2 -2
index a99a4d305b7ec..64fef4e67d76a 100644
@@ -62,7 +62,7 @@
 			i-cache-sets = <256>;
 			d-cache-size = <0x8000>;
 			d-cache-line-size = <64>;
-			d-cache-sets = <128>;
+			d-cache-sets = <256>;
 			next-level-cache = <&L2_0>;
 		};
 
@@ -76,7 +76,7 @@
 			i-cache-sets = <256>;
 			d-cache-size = <0x8000>;
 			d-cache-line-size = <64>;
-			d-cache-sets = <128>;
+			d-cache-sets = <256>;
 			next-level-cache = <&L2_0>;
 		};
 	};
Signature · 1 line
2.34.1
author maintainer
#224 lore raw

PATCH 224/1039 mtd: core: provide unique name for nvmem device

In reply to Greg Kroah-Hartman

From: Michael Walle <[email protected]>

[ Upstream commit c048b60d39e109c201d31ed5ad3a4f939064d6c4 ]

If there is more than one mtd device which supports OTP, there will be a kernel warning about duplicated sysfs entries and the probing will fail. This is because the nvmem device name is not unique. Make it unique by prepending the name of the mtd. E.g. before the name was "user-otp", now it will be "mtd0-user-otp".

For reference the kernel splash is:

[    4.665531] sysfs: cannot create duplicate filename '/bus/nvmem/devices/user-otp'
[    4.673056] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.0-next-20211101+ #1296
[    4.680565] Hardware name: Kontron SMARC-sAL28 (Single PHY) on SMARC Eval 2.0 carrier (DT)
[    4.688856] Call trace:
[    4.691303]  dump_backtrace+0x0/0x1bc
[    4.694984]  show_stack+0x24/0x30
[    4.698306]  dump_stack_lvl+0x68/0x84
[    4.701980]  dump_stack+0x18/0x34
[    4.705302]  sysfs_warn_dup+0x70/0x90
[    4.708973]  sysfs_do_create_link_sd+0x144/0x150
[    4.713603]  sysfs_create_link+0x2c/0x50
[    4.717535]  bus_add_device+0x74/0x120
[    4.721293]  device_add+0x330/0x890
[    4.724791]  device_register+0x2c/0x40
[    4.728550]  nvmem_register+0x240/0x9f0
[    4.732398]  mtd_otp_nvmem_register+0xb0/0x10c
[    4.736854]  mtd_device_parse_register+0x28c/0x2b4
[    4.741659]  spi_nor_probe+0x20c/0x2e0
[    4.745418]  spi_mem_probe+0x78/0xbc
[    4.749001]  spi_probe+0x90/0xf0
[    4.752237]  really_probe.part.0+0xa4/0x320
..
[    4.873936] mtd mtd1: Failed to register OTP NVMEM device
[    4.894468] spi-nor: probe of spi0.0 failed with error -17
Fixes 4b361cfa8624 ("mtd: core: add OTP nvmem provider support")
---
 drivers/mtd/mtdcore.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/mtdcore.c +2 -2
index 9186268d361b4..fc0bed14bfb10 100644
@@ -825,8 +825,7 @@ static struct nvmem_device *mtd_otp_nvmem_register(struct mtd_info *mtd,
 
 	/* OTP nvmem will be registered on the physical device */
 	config.dev = mtd->dev.parent;
-	/* just reuse the compatible as name */
-	config.name = compatible;
+	config.name = kasprintf(GFP_KERNEL, "%s-%s", dev_name(&mtd->dev), compatible);
 	config.id = NVMEM_DEVID_NONE;
 	config.owner = THIS_MODULE;
 	config.type = NVMEM_TYPE_OTP;
@@ -842,6 +841,7 @@ static struct nvmem_device *mtd_otp_nvmem_register(struct mtd_info *mtd,
 		nvmem = NULL;
 
 	of_node_put(np);
+	kfree(config.name);
 
 	return nvmem;
 }
Signature · 1 line
2.34.1
author maintainer
#195 lore raw

PATCH 195/1039 media: venus: correct low power frequency calculation for encoder

In reply to Greg Kroah-Hartman

From: Mansur Alisha Shaik <[email protected]>

[ Upstream commit b1f9bb8020783a48151e3a2864fbdc70548566dd ]

In exististing implimentation, in min_loaded_core() for low_power vpp frequency value is considering as vpp_freq instead of low_power_freq. Fixed this by correcting vpp frequency calculation for encoder.

Fixes 3cfe5815ce0e (media: venus: Enable low power setting for encoder)
---
 drivers/media/platform/qcom/venus/pm_helpers.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/qcom/venus/pm_helpers.c +2 -2
index cedc664ba755f..184f0cea2fdb8 100644
@@ -587,8 +587,8 @@ min_loaded_core(struct venus_inst *inst, u32 *min_coreid, u32 *min_load, bool lo
 		if (inst->session_type == VIDC_SESSION_TYPE_DEC)
 			vpp_freq = inst_pos->clk_data.vpp_freq;
 		else if (inst->session_type == VIDC_SESSION_TYPE_ENC)
-			vpp_freq = low_power ? inst_pos->clk_data.vpp_freq :
-				inst_pos->clk_data.low_power_freq;
+			vpp_freq = low_power ? inst_pos->clk_data.low_power_freq :
+				inst_pos->clk_data.vpp_freq;
 		else
 			continue;
 
Signature · 1 line
2.34.1
author maintainer
#198 lore raw

PATCH 198/1039 net: stmmac: Add platform level debug register dump feature

In reply to Greg Kroah-Hartman

From: Bhupesh Sharma <[email protected]>

[ Upstream commit 4047b9db1aa7512a10ba3560a3f63821c8c40235 ]

dwmac-qcom-ethqos currently exposes a mechanism to dump rgmii registers after the 'stmmac_dvr_probe()' returns. However with commit 5ec55823438e ("net: stmmac: add clocks management for gmac driver"), we now let 'pm_runtime_put()' disable the clocks before returning from 'stmmac_dvr_probe()'.

This causes a crash when 'rgmii_dump()' register dumps are enabled, as the clocks are already off.

Since other dwmac drivers (possible future users as well) might require a similar register dump feature, introduce a platform level callback to allow the same.

This fixes the crash noticed while enabling rgmii_dump() dumps in dwmac-qcom-ethqos driver as well. It also allows future changes to keep a invoking the register dump callback from the correct place inside 'stmmac_dvr_probe()'.

Fixes 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
Cc Joakim Zhang <[email protected]>
Cc David S. Miller <[email protected]>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 7 ++++---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c       | 3 +++
 include/linux/stmmac.h                                  | 1 +
 3 files changed, 8 insertions(+), 3 deletions(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +4 -3
index 5c74b6279d690..6b1d9e8879f46 100644
@@ -113,8 +113,10 @@ static void rgmii_updatel(struct qcom_ethqos *ethqos,
 	rgmii_writel(ethqos, temp, offset);
 }
 
-static void rgmii_dump(struct qcom_ethqos *ethqos)
+static void rgmii_dump(void *priv)
 {
+	struct qcom_ethqos *ethqos = priv;
+
 	dev_dbg(&ethqos->pdev->dev, "Rgmii register dump\n");
 	dev_dbg(&ethqos->pdev->dev, "RGMII_IO_MACRO_CONFIG: %x\n",
 		rgmii_readl(ethqos, RGMII_IO_MACRO_CONFIG));
@@ -499,6 +501,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
 
 	plat_dat->bsp_priv = ethqos;
 	plat_dat->fix_mac_speed = ethqos_fix_mac_speed;
+	plat_dat->dump_debug_regs = rgmii_dump;
 	plat_dat->has_gmac4 = 1;
 	plat_dat->pmt = 1;
 	plat_dat->tso_en = of_property_read_bool(np, "snps,tso");
@@ -507,8 +510,6 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_clk;
 
-	rgmii_dump(ethqos);
-
 	return ret;
 
 err_clk:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +3 -0
index 8ded4be08b001..e81a79845d425 100644
@@ -7094,6 +7094,9 @@ int stmmac_dvr_probe(struct device *device,
 	stmmac_init_fs(ndev);
 #endif
 
+	if (priv->plat->dump_debug_regs)
+		priv->plat->dump_debug_regs(priv->plat->bsp_priv);
+
 	/* Let pm_runtime_put() disable the clocks.
 	 * If CONFIG_PM is not enabled, the clocks will stay powered.
 	 */
include/linux/stmmac.h +1 -0
index a6f03b36fc4f7..1450397fc0bcd 100644
@@ -233,6 +233,7 @@ struct plat_stmmacenet_data {
 	int (*clks_config)(void *priv, bool enabled);
 	int (*crosststamp)(ktime_t *device, struct system_counterval_t *system,
 			   void *ctx);
+	void (*dump_debug_regs)(void *priv);
 	void *bsp_priv;
 	struct clk *stmmac_clk;
 	struct clk *pclk;
Signature · 1 line
2.34.1
author maintainer
#227 lore raw

PATCH 227/1039 staging: rtl8192e: rtllib_module: fix error handle case in alloc_rtllib()

In reply to Greg Kroah-Hartman

From: Yang Yingliang <[email protected]>

[ Upstream commit e730cd57ac2dfe94bca0f14a3be8e1b21de41a9c ]

Some variables are leaked in the error handling in alloc_rtllib(), free the variables in the error path.

---
 drivers/staging/rtl8192e/rtllib_module.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtllib_module.c +12 -4
index 64d9feee1f392..f00ac94b2639b 100644
@@ -88,7 +88,7 @@ struct net_device *alloc_rtllib(int sizeof_priv)
 	err = rtllib_networks_allocate(ieee);
 	if (err) {
 		pr_err("Unable to allocate beacon storage: %d\n", err);
-		goto failed;
+		goto free_netdev;
 	}
 	rtllib_networks_initialize(ieee);
 
@@ -121,11 +121,13 @@ struct net_device *alloc_rtllib(int sizeof_priv)
 	ieee->hwsec_active = 0;
 
 	memset(ieee->swcamtable, 0, sizeof(struct sw_cam_table) * 32);
-	rtllib_softmac_init(ieee);
+	err = rtllib_softmac_init(ieee);
+	if (err)
+		goto free_crypt_info;
 
 	ieee->pHTInfo = kzalloc(sizeof(struct rt_hi_throughput), GFP_KERNEL);
 	if (!ieee->pHTInfo)
-		return NULL;
+		goto free_softmac;
 
 	HTUpdateDefaultSetting(ieee);
 	HTInitializeHTInfo(ieee);
@@ -141,8 +143,14 @@ struct net_device *alloc_rtllib(int sizeof_priv)
 
 	return dev;
 
- failed:
+free_softmac:
+	rtllib_softmac_free(ieee);
+free_crypt_info:
+	lib80211_crypt_info_free(&ieee->crypt_info);
+	rtllib_networks_free(ieee);
+free_netdev:
 	free_netdev(dev);
+
 	return NULL;
 }
 EXPORT_SYMBOL(alloc_rtllib);
Signature · 1 line
2.34.1
author maintainer
#240 lore raw

PATCH 240/1039 platform/x86: wmi: Fix driver->notify() vs ->probe() race

In reply to Greg Kroah-Hartman

From: Hans de Goede <[email protected]>

[ Upstream commit 9918878676a5f9e99b98679f04b9e6c0f5426b0a ]

The driver core sets struct device->driver before calling out to the bus' probe() method, this leaves a window where an ACPI notify may happen on the WMI object before the driver's probe() method has completed running, causing e.g. the driver's notify() callback to get called with drvdata not yet being set leading to a NULL pointer deref.

At a check for this to the WMI core, ensuring that the notify() callback is not called before the driver is ready.

Fixes 1686f5444546 ("platform/x86: wmi: Incorporate acpi_install_notify_handler")
---
 drivers/platform/x86/wmi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/platform/x86/wmi.c +5 -1
index 46178e03aecad..02aba274c4bc2 100644
@@ -59,6 +59,7 @@ static_assert(__alignof__(struct guid_block) == 1);
 
 enum {	/* wmi_block flags */
 	WMI_READ_TAKES_NO_ARGS,
+	WMI_PROBED,
 };
 
 struct wmi_block {
@@ -1008,6 +1009,7 @@ static int wmi_dev_probe(struct device *dev)
 		}
 	}
 
+	set_bit(WMI_PROBED, &wblock->flags);
 	return 0;
 
 probe_misc_failure:
@@ -1025,6 +1027,8 @@ static void wmi_dev_remove(struct device *dev)
 	struct wmi_block *wblock = dev_to_wblock(dev);
 	struct wmi_driver *wdriver = drv_to_wdrv(dev->driver);
 
+	clear_bit(WMI_PROBED, &wblock->flags);
+
 	if (wdriver->filter_callback) {
 		misc_deregister(&wblock->char_dev);
 		kfree(wblock->char_dev.name);
@@ -1322,7 +1326,7 @@ static void acpi_wmi_notify_handler(acpi_handle handle, u32 event,
 		return;
 
 	/* If a driver is bound, then notify the driver. */
-	if (wblock->dev.dev.driver) {
+	if (test_bit(WMI_PROBED, &wblock->flags) && wblock->dev.dev.driver) {
 		struct wmi_driver *driver = drv_to_wdrv(wblock->dev.dev.driver);
 		struct acpi_buffer evdata = { ACPI_ALLOCATE_BUFFER, NULL };
 		acpi_status status;
Signature · 1 line
2.34.1
author maintainer
#241 lore raw

PATCH 241/1039 samples/bpf: Clean up samples/bpf build failes

In reply to Greg Kroah-Hartman

From: Andrii Nakryiko <[email protected]>

[ Upstream commit 527024f7aeb683ce7ef49b07ef7ce9ecf015288d ]

Remove xdp_samples_user.o rule redefinition which generates Makefile warning and instead override TPROGS_CFLAGS. This seems to work fine when building inside selftests/bpf.

That was one big head-scratcher before I found that generic Makefile.target hid this surprising specialization for for xdp_samples_user.o.

Main change is to use actual locally installed libbpf headers.

Also drop printk macro re-definition (not even used!).

---
 samples/bpf/Makefile            | 13 ++++++++++++-
 samples/bpf/Makefile.target     | 11 -----------
 samples/bpf/lwt_len_hist_kern.c |  7 -------
 3 files changed, 12 insertions(+), 19 deletions(-)
samples/bpf/Makefile +12 -1
index a886dff1ba899..6ae62b1dc9388 100644
@@ -328,7 +328,7 @@ $(BPF_SAMPLES_PATH)/*.c: verify_target_bpf $(LIBBPF)
 $(src)/*.c: verify_target_bpf $(LIBBPF)
 
 libbpf_hdrs: $(LIBBPF)
-$(obj)/$(TRACE_HELPERS): | libbpf_hdrs
+$(obj)/$(TRACE_HELPERS) $(obj)/$(CGROUP_HELPERS) $(obj)/$(XDP_SAMPLE): | libbpf_hdrs
 
 .PHONY: libbpf_hdrs
 
@@ -343,6 +343,17 @@ $(obj)/hbm_out_kern.o: $(src)/hbm.h $(src)/hbm_kern.h
 $(obj)/hbm.o: $(src)/hbm.h
 $(obj)/hbm_edt_kern.o: $(src)/hbm.h $(src)/hbm_kern.h
 
+# Override includes for xdp_sample_user.o because $(srctree)/usr/include in
+# TPROGS_CFLAGS causes conflicts
+XDP_SAMPLE_CFLAGS += -Wall -O2 -lm \
+		     -I$(src)/../../tools/include \
+		     -I$(src)/../../tools/include/uapi \
+		     -I$(LIBBPF_INCLUDE) \
+		     -I$(src)/../../tools/testing/selftests/bpf
+
+$(obj)/$(XDP_SAMPLE): TPROGS_CFLAGS = $(XDP_SAMPLE_CFLAGS)
+$(obj)/$(XDP_SAMPLE): $(src)/xdp_sample_user.h $(src)/xdp_sample_shared.h
+
 -include $(BPF_SAMPLES_PATH)/Makefile.target
 
 VMLINUX_BTF_PATHS ?= $(abspath $(if $(O),$(O)/vmlinux))				\
samples/bpf/Makefile.target +0 -11
index 5a368affa0386..7621f55e2947d 100644
@@ -73,14 +73,3 @@ quiet_cmd_tprog-cobjs	= CC  $@
       cmd_tprog-cobjs	= $(CC) $(tprogc_flags) -c -o $@ $<
 $(tprog-cobjs): $(obj)/%.o: $(src)/%.c FORCE
 	$(call if_changed_dep,tprog-cobjs)
-
-# Override includes for xdp_sample_user.o because $(srctree)/usr/include in
-# TPROGS_CFLAGS causes conflicts
-XDP_SAMPLE_CFLAGS += -Wall -O2 -lm \
-		     -I./tools/include \
-		     -I./tools/include/uapi \
-		     -I./tools/lib \
-		     -I./tools/testing/selftests/bpf
-$(obj)/xdp_sample_user.o: $(src)/xdp_sample_user.c \
-	$(src)/xdp_sample_user.h $(src)/xdp_sample_shared.h
-	$(CC) $(XDP_SAMPLE_CFLAGS) -c -o $@ $<
samples/bpf/lwt_len_hist_kern.c +0 -7
index 9ed63e10e1709..1fa14c54963a1 100644
@@ -16,13 +16,6 @@
 #include <uapi/linux/in.h>
 #include <bpf/bpf_helpers.h>
 
-# define printk(fmt, ...)						\
-		({							\
-			char ____fmt[] = fmt;				\
-			bpf_trace_printk(____fmt, sizeof(____fmt),	\
-				     ##__VA_ARGS__);			\
-		})
-
 struct bpf_elf_map {
 	__u32 type;
 	__u32 size_key;
Signature · 1 line
2.34.1
author maintainer
#242 lore raw

PATCH 242/1039 samples: bpf: Fix xdp_sample_user.o linking with Clang

In reply to Greg Kroah-Hartman

From: Alexander Lobakin <[email protected]>

[ Upstream commit e64fbcaa7a666f16329b1c67af15ea501bc84586 ]

Clang (13) doesn't get the jokes about specifying libraries to link in cclags of individual .o objects:

clang-13: warning: -lm: 'linker' input unused [-Wunused-command-line-argument] [ ... ]

  LD  samples/bpf/xdp_redirect_cpu
  LD  samples/bpf/xdp_redirect_map_multi
  LD  samples/bpf/xdp_redirect_map
  LD  samples/bpf/xdp_redirect
  LD  samples/bpf/xdp_monitor

/usr/bin/ld: samples/bpf/xdp_sample_user.o: in function `sample_summary_print':
xdp_sample_user.c:(.text+0x84c): undefined reference to floor' /usr/bin/ld: xdp_sample_user.c:(.text+0x870): undefined reference to ceil' /usr/bin/ld: xdp_sample_user.c:(.text+0x8cf): undefined reference to floor' /usr/bin/ld: xdp_sample_user.c:(.text+0x8f3): undefined reference to ceil' [ more ]

Specify '-lm' as ldflags for all xdp_sample_user.o users in the main Makefile and remove it from ccflags of ^ in Makefile.target -- just like it's done for all other samples. This works with all compilers.

Fixes 6e1051a54e31 ("samples: bpf: Convert xdp_monitor to XDP samples helper")
Fixes b926c55d856c ("samples: bpf: Convert xdp_redirect to XDP samples helper")
Fixes e531a220cc59 ("samples: bpf: Convert xdp_redirect_cpu to XDP samples helper")
Fixes bbe65865aa05 ("samples: bpf: Convert xdp_redirect_map to XDP samples helper")
Fixes 594a116b2aa1 ("samples: bpf: Convert xdp_redirect_map_multi to XDP samples helper")
---
 samples/bpf/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
samples/bpf/Makefile +6 -1
index 6ae62b1dc9388..38638845db9d7 100644
@@ -215,6 +215,11 @@ TPROGS_LDFLAGS := -L$(SYSROOT)/usr/lib
 endif
 
 TPROGS_LDLIBS			+= $(LIBBPF) -lelf -lz
+TPROGLDLIBS_xdp_monitor		+= -lm
+TPROGLDLIBS_xdp_redirect	+= -lm
+TPROGLDLIBS_xdp_redirect_cpu	+= -lm
+TPROGLDLIBS_xdp_redirect_map	+= -lm
+TPROGLDLIBS_xdp_redirect_map_multi += -lm
 TPROGLDLIBS_tracex4		+= -lrt
 TPROGLDLIBS_trace_output	+= -lrt
 TPROGLDLIBS_map_perf_test	+= -lrt
@@ -345,7 +350,7 @@ $(obj)/hbm_edt_kern.o: $(src)/hbm.h $(src)/hbm_kern.h
 
 # Override includes for xdp_sample_user.o because $(srctree)/usr/include in
 # TPROGS_CFLAGS causes conflicts
-XDP_SAMPLE_CFLAGS += -Wall -O2 -lm \
+XDP_SAMPLE_CFLAGS += -Wall -O2 \
 		     -I$(src)/../../tools/include \
 		     -I$(src)/../../tools/include/uapi \
 		     -I$(LIBBPF_INCLUDE) \
Signature · 1 line
2.34.1
author maintainer
#243 lore raw

PATCH 243/1039 samples: bpf: Fix unknown warning group build warning on Clang

In reply to Greg Kroah-Hartman

From: Alexander Lobakin <[email protected]>

[ Upstream commit 6f670d06e47c774bc065aaa84a527a4838f34bd8 ]

Clang doesn't have 'stringop-truncation' group like GCC does, and complains about it when building samples which use xdp_sample_user infra:

samples/bpf/xdp_sample_user.h:48:32: warning: unknown warning group '-Wstringop-truncation', ignored [-Wunknown-warning-option] #pragma GCC diagnostic ignored "-Wstringop-truncation"

                                ^

[ repeat ]

Those are harmless, but avoidable when guarding it with ifdef. I could guard push/pop as well, but this would require one more ifdef cruft around a single line which I don't think is reasonable.

---
 samples/bpf/xdp_sample_user.h | 2 ++
 1 file changed, 2 insertions(+)
samples/bpf/xdp_sample_user.h +2 -0
index d97465ff8c62c..5f44b877ecf5f 100644
@@ -45,7 +45,9 @@ const char *get_driver_name(int ifindex);
 int get_mac_addr(int ifindex, void *mac_addr);
 
 #pragma GCC diagnostic push
+#ifndef __clang__
 #pragma GCC diagnostic ignored "-Wstringop-truncation"
+#endif
 __attribute__((unused))
 static inline char *safe_strncpy(char *dst, const char *src, size_t size)
 {
Signature · 1 line
2.34.1
author maintainer
#229 lore raw

PATCH 229/1039 bpf: Fix the test_task_vma selftest to support output shorter than 1 kB

In reply to Greg Kroah-Hartman

From: Maxim Mikityanskiy <[email protected]>

[ Upstream commit da54ab14953c38d98cb3e34c564c06c3739394b2 ]

The test for bpf_iter_task_vma assumes that the output will be longer than 1 kB, as the comment above the loop says. Due to this assumption, the loop becomes infinite if the output turns to be shorter than 1 kB. The return value of read_fd_into_buffer is 0 when the end of file was reached, and len isn't being increased any more.

This commit adds a break on EOF to handle short output correctly. For the reference, this is the contents that I get when running test_progs under vmtest.sh, and it's shorter than 1 kB:

00400000-00401000 r--p 00000000 fe:00 25867     /root/bpf/test_progs
00401000-00674000 r-xp 00001000 fe:00 25867     /root/bpf/test_progs
00674000-0095f000 r--p 00274000 fe:00 25867     /root/bpf/test_progs
0095f000-00983000 r--p 0055e000 fe:00 25867     /root/bpf/test_progs
00983000-00a8a000 rw-p 00582000 fe:00 25867     /root/bpf/test_progs

00a8a000-0484e000 rw-p 00000000 00:00 0 7f6c64000000-7f6c64021000 rw-p 00000000 00:00 0 7f6c64021000-7f6c68000000 ---p 00000000 00:00 0 7f6c6ac8f000-7f6c6ac90000 r--s 00000000 00:0d 8032 anon_inode:bpf-map 7f6c6ac90000-7f6c6ac91000 ---p 00000000 00:00 0 7f6c6ac91000-7f6c6b491000 rw-p 00000000 00:00 0 7f6c6b491000-7f6c6b492000 r--s 00000000 00:0d 8032 anon_inode:bpf-map 7f6c6b492000-7f6c6b493000 rw-s 00000000 00:0d 8032 anon_inode:bpf-map 7ffc1e23d000-7ffc1e25e000 rw-p 00000000 00:00 0 7ffc1e3b8000-7ffc1e3bc000 r--p 00000000 00:00 0 7ffc1e3bc000-7ffc1e3bd000 r-xp 00000000 00:00 0 7fffffffe000-7ffffffff000 --xp 00000000 00:00 0

Fixes e8168840e16c ("selftests/bpf: Add test for bpf_iter_task_vma")
---
 tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/prog_tests/bpf_iter.c +3 -2
index 9454331aaf85f..ea6823215e9c0 100644
@@ -1206,13 +1206,14 @@ static void test_task_vma(void)
 		goto out;
 
 	/* Read CMP_BUFFER_SIZE (1kB) from bpf_iter. Read in small chunks
-	 * to trigger seq_file corner cases. The expected output is much
-	 * longer than 1kB, so the while loop will terminate.
+	 * to trigger seq_file corner cases.
 	 */
 	len = 0;
 	while (len < CMP_BUFFER_SIZE) {
 		err = read_fd_into_buffer(iter_fd, task_vma_output + len,
 					  min(read_size, CMP_BUFFER_SIZE - len));
+		if (!err)
+			break;
 		if (CHECK(err < 0, "read_iter_fd", "read_iter_fd failed\n"))
 			goto out;
 		len += err;
Signature · 1 line
2.34.1
author maintainer
#255 lore raw

PATCH 255/1039 ath11k: Fix QMI file type enum value

In reply to Greg Kroah-Hartman

From: Seevalamuthu Mariappan <[email protected]>

[ Upstream commit 18ae1ab04525507ae5528245a6df004cacd0d39a ]

bdf_type for caldata in QMI_WLANFW_BDF_DOWNLOAD_REQ_V01 is wrongly sent as 1. But, expected bdf_type value for caldata and EEPROM is 2 and 3 respectively. It leads to firmware crash. Fix ath11k_qmi_file_type enum values.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00192-QCAHKSWPL_SILICONZ-1

Fixes 336e7b53c82f ("ath11k: clean up BDF download functions")
---
 drivers/net/wireless/ath/ath11k/qmi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/qmi.h +1 -1
index 3bb0f9ef79968..d9e95b7007653 100644
@@ -41,7 +41,7 @@ struct ath11k_base;
 
 enum ath11k_qmi_file_type {
 	ATH11K_QMI_FILE_TYPE_BDF_GOLDEN,
-	ATH11K_QMI_FILE_TYPE_CALDATA,
+	ATH11K_QMI_FILE_TYPE_CALDATA = 2,
 	ATH11K_QMI_FILE_TYPE_EEPROM,
 	ATH11K_QMI_MAX_FILE_TYPE,
 };
Signature · 1 line
2.34.1