Skip to contentSkip to conversation

5.15.179-rc1 review

PATCH In review Greg Kroah-Hartman 9 participants 633 messages Mar 10, 2025 – Mar 29, 2025 Page 1 of 5

Subsystems (7)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

cover 5.15.179-rc1 review

This is the start of the stable review cycle for the 5.15.179 release. There are 620 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, 12 Mar 2025 17:04:00 +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.15.179-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.15.y
and the diffstat can be found below.

thanks,

greg k-h

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

Greg Kroah-Hartman <[email protected]>

    Linux 5.15.179-rc1

Jakub Kicinski <[email protected]>
net: ipv6: fix dst refleaks in rpl, seg6 and ioam6 lwtunnels

Thomas Weißschuh <[email protected]>
kbuild: userprogs: use correct lld when linking through clang

Toke Høiland-Jørgensen <[email protected]>
sched: sch_cake: add bounds checks to host bulk flow fairness counts

Michal Luczaj <[email protected]>
vsock: Orphan socket after transport release

Michal Luczaj <[email protected]>
vsock: Keep the binding until socket destruction

Michal Luczaj <[email protected]>
bpf, vsock: Invoke proto::close on close()

Ricardo Ribalda <[email protected]>
media: uvcvideo: Remove dangling pointers

Ricardo Ribalda <[email protected]>
media: uvcvideo: Fix crash during unbind if gpio unit is in use

Ryusuke Konishi <[email protected]>
nilfs2: handle errors that nilfs_prepare_chunk() may return

Ryusuke Konishi <[email protected]>
nilfs2: eliminate staggered calls to kunmap in nilfs_rename

Ryusuke Konishi <[email protected]>
nilfs2: move page release outside of nilfs_delete_entry and nilfs_set_link

Ralf Schlatterbeck <[email protected]>
spi-mxs: Fix chipselect glitch

Niravkumar L Rabara <[email protected]>
mtd: rawnand: cadence: fix unchecked dereference

NeilBrown <[email protected]>
md: select BLOCK_LEGACY_AUTOLOAD

Ricardo Ribalda <[email protected]>
media: uvcvideo: Avoid returning invalid controls

Ricardo Ribalda <[email protected]>
media: uvcvideo: Avoid invalid memory access

Haoyu Li <[email protected]>
drivers: virt: acrn: hsm: Use kzalloc to avoid info leak in pmcmd_ioctl

Andy Shevchenko <[email protected]>
eeprom: digsy_mtc: Make GPIO lookup table match the device

Manivannan Sadhasivam <[email protected]>
bus: mhi: host: pci_generic: Use pci_try_reset_function() to avoid deadlock

Visweswara Tanuku <[email protected]>
slimbus: messaging: Free transaction ID in delayed interrupt scenario

Alexander Shishkin <[email protected]>
intel_th: pci: Add Panther Lake-P/U support

Alexander Shishkin <[email protected]>
intel_th: pci: Add Panther Lake-H support

Pawel Chmielewski <[email protected]>
intel_th: pci: Add Arrow Lake support

Alexander Usyskin <[email protected]>
mei: me: add panther lake P DID

Phillip Lougher <[email protected]>
Squashfs: check the inode number is not the invalid value of zero

Michal Pecio <[email protected]>
usb: xhci: Enable the TRB overfetch quirk on VIA VL805

Andy Shevchenko <[email protected]>
xhci: pci: Fix indentation in the PCI device ID definitions

Prashanth K <[email protected]>
usb: gadget: Check bmAttributes only if configuration is valid

Marek Szyprowski <[email protected]>
usb: gadget: Fix setting self-powered state on suspend

Prashanth K <[email protected]>
usb: gadget: Set self-powered based on MaxPower and bmAttributes

AngeloGioacchino Del Regno <[email protected]>
usb: typec: tcpci_rt1711h: Unmask alert interrupts to fix functionality

Fedor Pchelkin <[email protected]>
usb: typec: ucsi: increase timeout for PPM reset operations

Badhri Jagan Sridharan <[email protected]>
usb: dwc3: gadget: Prevent irq storm when TH re-executes

Thinh Nguyen <[email protected]>
usb: dwc3: Set SUSPENDENABLE soon after phy init

Nikita Zhandarovich <[email protected]>
usb: atm: cxacru: fix a flaw in existing endpoint checks

Claudiu Beznea <[email protected]>
usb: renesas_usbhs: Flush the notify_hotplug_work

Miao Li <[email protected]>
usb: quirks: Add DELAY_INIT and NO_LPM for Prolific Mass Storage Card Reader

Pawel Laszczak <[email protected]>
usb: hub: lack of clearing xHC resources

Claudiu Beznea <[email protected]>
usb: renesas_usbhs: Use devm_usb_get_phy()

Claudiu Beznea <[email protected]>
usb: renesas_usbhs: Call clk_put()

Christian Heusel <[email protected]>
Revert "drivers/card_reader/rtsx_usb: Restore interrupt based detection"

Fabrizio Castro <[email protected]>
gpio: rcar: Fix missing of_node_put() call

Justin Iurman <[email protected]>
net: ipv6: fix missing dst ref drop in ila lwtunnel

Justin Iurman <[email protected]>
net: ipv6: fix dst ref loop in ila lwtunnel

Zecheng Li <[email protected]>
sched/fair: Fix potential memory corruption in child_cfs_rq_on_list

Jason Xing <[email protected]>
net-timestamp: support TCP GSO case for a few missing flags

Namjae Jeon <[email protected]>
exfat: fix soft lockup in exfat_clear_bitmap

Jarkko Sakkinen <[email protected]>
x86/sgx: Fix size overflows in sgx_encl_create()

Reinette Chatre <[email protected]>
x86/sgx: Support VA page allocation without reclaiming

Reinette Chatre <[email protected]>

    x86/sgx: Export sgx_encl_{grow,shrink}()

Reinette Chatre <[email protected]>
x86/sgx: Move PTE zap code to new sgx_zap_enclave_ptes()

Reinette Chatre <[email protected]>
x86/sgx: Support loading enclave page without VMA permissions check

Oscar Maes <[email protected]>
vlan: enforce underlying device type

Jiayuan Chen <[email protected]>
ppp: Fix KMSAN uninit-value warning with bpf

Peiyang Wang <[email protected]>
net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an error

Nikolay Aleksandrov <[email protected]>
be2net: fix sleeping while atomic bugs in be_ndo_bridge_getlink

Philipp Stanner <[email protected]>
drm/sched: Fix preprocessor guard

Xinghuo Chen <[email protected]>
hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe()

Eric Dumazet <[email protected]>
llc: do not use skb_get() before dev_queue_xmit()

Murad Masimov <[email protected]>
ALSA: usx2y: validate nrpacks module parameter on probe

Erik Schumacher <[email protected]>
hwmon: (ad7314) Validate leading zero bits and return error

Maud Spierings <[email protected]>
hwmon: (ntc_thermistor) Fix the ncpXXxh103 sensor table

Titus Rwantare <[email protected]>
hwmon: (pmbus) Initialise page count in pmbus_identify()

Vitaliy Shevtsov <[email protected]>
caif_virtio: fix wrong pointer check in cfv_probe()

Antoine Tenart <[email protected]>
net: gso: fix ownership in __udp_gso_segment

Meir Elisha <[email protected]>
nvmet-tcp: Fix a possible sporadic response drops in weakly ordered arch

Zhang Lixu <[email protected]>
HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove()

Yu-Chun Lin <[email protected]>
HID: google: fix unused variable warning under !CONFIG_ACPI

Johannes Berg <[email protected]>
wifi: iwlwifi: limit printed string from FW file

Ryan Roberts <[email protected]>
mm: don't skip arch_sync_kernel_mappings() in error paths

Hao Zhang <[email protected]>
mm/page_alloc: fix uninitialized variable

Olivier Gayot <[email protected]>
block: fix conversion of GPT partition name to 7-bit

Heiko Carstens <[email protected]>
s390/traps: Fix test_monitor_call() inline assembly

Haoxiang Li <[email protected]>
rapidio: fix an API misues when rio_add_net() fails

Haoxiang Li <[email protected]>
rapidio: add check for rio_add_net() in rio_scan_alloc_net()

Vitaliy Shevtsov <[email protected]>
wifi: nl80211: reject cooked mode if it is set along with other flags

Nikita Zhandarovich <[email protected]>
wifi: cfg80211: regulatory: improve invalid hints checking

Ahmed S. Darwish <[email protected]>

    x86/cpu: Properly parse CPUID leaf 0x2 TLB descriptor 0x63

Ahmed S. Darwish <[email protected]>

    x86/cpu: Validate CPUID leaf 0x2 EDX output

Ahmed S. Darwish <[email protected]>

    x86/cacheinfo: Validate CPUID leaf 0x2 EDX output

Mingcong Bai <[email protected]>
platform/x86: thinkpad_acpi: Add battery quirk for ThinkPad X131e

Richard Thier <[email protected]>
drm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M

Kailang Yang <[email protected]>
ALSA: hda/realtek: update ALC222 depop optimize

Hoku Ishibe <[email protected]>
ALSA: hda: intel: Add Dell ALC3271 to power_save denylist

Koichiro Den <[email protected]>
gpio: aggregator: protect driver attr handlers against module unload

Niklas Söderlund <[email protected]>
gpio: rcar: Use raw_spinlock to protect register access

Daniil Dulov <[email protected]>
HID: appleir: Fix potential NULL dereference at raw event handle

Rob Herring (Arm) <[email protected]>
Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'"

Alex Deucher <[email protected]>
drm/amdgpu: disable BAR resize on Dell G5 SE

Ma Jun <[email protected]>
drm/amdgpu: Check extended configuration space register when system uses large bar

Haoxiang Li <[email protected]>
smb: client: Add check for next_buffer in receive_encrypted_standard()

Quang Le <[email protected]>

    pfifo_tail_enqueue: Drop new packet when sch->limit == 0

Thomas Gleixner <[email protected]>
intel_idle: Handle older CPUs, which stop the TSC in deeper C states, correctly

Thomas Gleixner <[email protected]>
sched/core: Prevent rescheduling when interrupts are disabled

Ard Biesheuvel <[email protected]>
vmlinux.lds: Ensure that const vars with relocations are mapped R/O

Paolo Abeni <[email protected]>
mptcp: always handle address removal under msk socket lock

Kaustabh Chakraborty <[email protected]>
phy: exynos5-usbdrd: fix MPLL_MULTIPLIER and SSC_REFCLKSEL masks in refclk

BH Hsieh <[email protected]>
phy: tegra: xusb: reset VBUS & ID OVERRIDE

Wei Fang <[email protected]>
net: enetc: correct the xdp_tx statistics

Wei Fang <[email protected]>
net: enetc: update UDP checksum when updating originTimestamp field

Wei Fang <[email protected]>
net: enetc: fix the off-by-one issue in enetc_map_tx_buffs()

Nikita Zhandarovich <[email protected]>
usbnet: gl620a: fix endpoint checking in genelink_bind()

Tyrone Ting <[email protected]>
i2c: npcm: disable interrupt enable bit before devm_request_irq

Roman Li <[email protected]>
drm/amd/display: Fix HPD after gpu reset

Kan Liang <[email protected]>
perf/core: Fix low freq setting via IOC_PERIOD

Dmitry Panchenko <[email protected]>
ALSA: usb-audio: Re-add sample rate quirk for Pioneer DJM-900NXS2

Nikolay Kuratov <[email protected]>
ftrace: Avoid potential division by zero in function_stat_show()

Russell Senior <[email protected]>
x86/CPU: Fix warm boot hang regression on AMD SC1100 SoC systems

Justin Iurman <[email protected]>
net: ipv6: fix dst ref loop on input in rpl lwt

Justin Iurman <[email protected]>
net: ipv6: rpl_iptunnel: mitigate 2-realloc issue

Justin Iurman <[email protected]>
net: ipv6: fix dst ref loop on input in seg6 lwt

Justin Iurman <[email protected]>
net: ipv6: seg6_iptunnel: mitigate 2-realloc issue

Justin Iurman <[email protected]>
include: net: add static inline dst_dev_overhead() to dst.h

Andrea Mayer <[email protected]>
seg6: add support for SRv6 H.L2Encaps.Red behavior

Andrea Mayer <[email protected]>
seg6: add support for SRv6 H.Encaps.Red behavior

Shay Drory <[email protected]>
net/mlx5: IRQ, Fix null string in debug print

Harshal Chaudhari <[email protected]>
net: mvpp2: cls: Fixed Non IP flow, with vlan tag flow defination.

Wang Hai <[email protected]>
tcp: Defer ts_recent changes until req is owned

Philo Lu <[email protected]>
ipvs: Always clear ipvs_property flag in skb_scrub_packet()

Nicolas Frattaroli <[email protected]>
ASoC: es8328: fix route from DAC to output

Sean Anderson <[email protected]>
net: cadence: macb: Synchronize stats calculations

Ido Schimmel <[email protected]>
net: loopback: Avoid sending IP packets without an Ethernet header

David Howells <[email protected]>
afs: Fix the server_list to unuse a displaced server rather than putting it

David Howells <[email protected]>
afs: Make it possible to find the volumes that are using a server

Colin Ian King <[email protected]>
afs: remove variable nr_servers

Luiz Augusto von Dentz <[email protected]>
Bluetooth: L2CAP: Fix L2CAP_ECRED_CONN_RSP response

Takashi Iwai <[email protected]>
ALSA: usb-audio: Avoid dropping MIDI events at closing multiple ports

Arnd Bergmann <[email protected]>
sunrpc: suppress warnings for unused procfs functions

Patrisious Haddad <[email protected]>
RDMA/mlx5: Fix bind QP error cleanup flow

Ye Bin <[email protected]>
scsi: core: Clear driver private data when retrying request

Christoph Hellwig <[email protected]>
scsi: core: Don't memset() the entire scsi_cmnd in scsi_init_command()

Vasiliy Kovalev <[email protected]>
ovl: fix UAF in ovl_dentry_update_reval by moving dput() in ovl_link_up

Christian Brauner <[email protected]>
ovl: pass ofs to creation operations

Amir Goldstein <[email protected]>
ovl: use wrappers to all vfs_*xattr() calls

Mark Zhang <[email protected]>
IB/mlx5: Set and get correct qp_num for a DCT QP

Patrick Bellasi <[email protected]>
x86/cpu/kvm: SRSO: Fix possible missing IBPB on VM-Exit

Niravkumar L Rabara <[email protected]>
mtd: rawnand: cadence: fix incorrect device in dma_unmap_single

Niravkumar L Rabara <[email protected]>
mtd: rawnand: cadence: use dma_map_resource for sdma address

Niravkumar L Rabara <[email protected]>
mtd: rawnand: cadence: fix error code in cadence_nand_init()

Christian Brauner <[email protected]>
acct: block access to kernel internal filesystems

Christian Brauner <[email protected]>
acct: perform last write from workqueue

John Veness <[email protected]>
ALSA: hda/conexant: Add quirk for HP ProBook 450 G4 mute LED

Haoxiang Li <[email protected]>
nfp: bpf: Add check for nfp_app_ctrl_msg_alloc()

Gavrilov Ilia <[email protected]>
drop_monitor: fix incorrect initialization order

Sumit Garg <[email protected]>
tee: optee: Fix supplicant wait loop

Yan Zhai <[email protected]>
bpf: skip non exist keys in generic_map_lookup_batch

Caleb Sander Mateos <[email protected]>
nvme/ioctl: add missing space in err message

Andrey Vatoropin <[email protected]>
power: supply: da9150-fg: fix potential overflow

Breno Leitao <[email protected]>
arp: switch to dev_getbyhwaddr() in arp_req_set_public()

Breno Leitao <[email protected]>
net: Add non-RCU dev_getbyhwaddr() helper

Cong Wang <[email protected]>
flow_dissector: Fix port range key handling in BPF conversion

Cong Wang <[email protected]>
flow_dissector: Fix handling of mixed port and port-range keys

Maksym Glubokiy <[email protected]>
net: extract port range fields from fl_flow_key

Kuniyuki Iwashima <[email protected]>
geneve: Suppress list corruption splat in geneve_destroy_tunnels().

Kuniyuki Iwashima <[email protected]>
gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl().

Kuniyuki Iwashima <[email protected]>
geneve: Fix use-after-free in geneve_find_dev().

Christophe Leroy <[email protected]>
powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC

Kailang Yang <[email protected]>
ALSA: hda/realtek: Fixup ALC225 depop procedure

Christophe Leroy <[email protected]>
powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline

Michael Ellerman <[email protected]>
powerpc/64s/mm: Move __real_pte stubs into hash-4k.h

Jill Donahue <[email protected]>
USB: gadget: f_midi: f_midi_complete to call queue_work

Selvarasu Ganesan <[email protected]>
usb: dwc3: Fix timeout issue during controller enter/exit from halt state

Wesley Cheng <[email protected]>
usb: dwc3: Increase DWC3 controller halt timeout

Sven Eckelmann <[email protected]>
batman-adv: Drop unmanaged ELP metric worker

Sven Eckelmann <[email protected]>
batman-adv: Drop initialization of flexible ethtool_link_ksettings

Ricardo Ribalda <[email protected]>
media: uvcvideo: Only save async fh if success

Ricardo Ribalda <[email protected]>
media: uvcvideo: Refactor iterators

Ricardo Ribalda <[email protected]>
media: uvcvideo: Set error_idx during ctrl_commit errors

Krzysztof Kozlowski <[email protected]>
soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove

Uwe Kleine-König <[email protected]>
soc/mediatek: mtk-devapc: Convert to platform remove callback returning void

Krzysztof Kozlowski <[email protected]>
soc: mediatek: mtk-devapc: Fix leaking IO map on error paths

AngeloGioacchino Del Regno <[email protected]>
soc: mediatek: mtk-devapc: Switch to devm_clk_get_enabled()

Marco Elver <[email protected]>
kfence: skip __GFP_THISNODE allocations on NUMA systems

huangshaobo <[email protected]>
kfence: enable check kfence canary on panic via boot param

Marco Elver <[email protected]>
kfence: allow use of a deferrable timer

Jarkko Sakkinen <[email protected]>
tpm: Change to kvalloc() in eventlog/acpi.c

Eddie James <[email protected]>
tpm: Use managed allocation for bios event log

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8183: Disable DSI display output by default

Dan Carpenter <[email protected]>
ASoC: renesas: rz-ssi: Add a check for negative sample_space

Thomas Zimmermann <[email protected]>
drm/rockchip: cdn-dp: Use drm_connector_helper_hpd_irq_event()

Maxime Ripard <[email protected]>
drm/probe-helper: Create a HPD IRQ event helper for a single connector

Dan Carpenter <[email protected]>
ksmbd: fix integer overflows on 32 bit systems

Chen Ridong <[email protected]>
memcg: fix soft lockup in the OOM process

Carlos Galo <[email protected]>
mm: update mark_victim tracepoints fields

Dan Carpenter <[email protected]>
media: imx-jpeg: Fix potential error pointer dereference in detach_pm()

Ignat Korchagin <[email protected]>
crypto: testmgr - some more fixes to RSA test vectors

Ignat Korchagin <[email protected]>
crypto: testmgr - populate RSA CRT parameters in RSA test vectors

lei he <[email protected]>
crypto: testmgr - fix version number of RSA tests

Lei He <[email protected]>
crypto: testmgr - Fix wrong test case of RSA

Lei He <[email protected]>
crypto: testmgr - fix wrong key length for pkcs1pad

Catalin Marinas <[email protected]>
arm64: mte: Do not allow PROT_MTE on MAP_HUGETLB user mappings

Calvin Owens <[email protected]>
pps: Fix a use-after-free

Filipe Manana <[email protected]>
btrfs: avoid monopolizing a core when activating a swap file

Koichiro Den <[email protected]>
Revert "btrfs: avoid monopolizing a core when activating a swap file"

David Woodhouse <[email protected]>
x86/i8253: Disable PIT timer 0 when not in use

Chao Yu <[email protected]>
f2fs: fix to wait dio completion

Romain Naour <[email protected]>
ARM: dts: dra7: Add bus_dma_limit for l4 cfg bus

Hangbin Liu <[email protected]>
selftests: rtnetlink: update netdevsim ipsec output format

Hangbin Liu <[email protected]>
netdevsim: print human readable IP address

Jiaqing Zhao <[email protected]>
parport_pc: add support for ASIX AX99100

Jiaqing Zhao <[email protected]>

    serial: 8250_pci: add support for ASIX AX99100

Jiaqing Zhao <[email protected]>
can: ems_pci: move ASIX AX99100 ids to pci_ids.h

Ryusuke Konishi <[email protected]>
nilfs2: protect access to buffers with no active references

Ryusuke Konishi <[email protected]>
nilfs2: do not force clear folio if buffer is referenced

Ryusuke Konishi <[email protected]>
nilfs2: do not output warnings when clearing dirty buffers

Ivan Kokshaysky <[email protected]>
alpha: replace hardcoded stack offsets with autogenerated ones

Andrew Cooper <[email protected]>
x86/static-call: Remove early_boot_irqs_disabled check to fix Xen PVH dom0

John Ogness <[email protected]>
kdb: Do not assume write() callback available

Christian Gmeiner <[email protected]>
drm/v3d: Stop active perfmon if it is being destroyed

Devarsh Thakkar <[email protected]>
drm/tidss: Clear the interrupt status for interrupts being disabled

Tomi Valkeinen <[email protected]>
drm/tidss: Fix issue in irq handling causing irq-flood issue

Eric Dumazet <[email protected]>
ipv6: mcast: add RCU protection to mld_newpack()

Eric Dumazet <[email protected]>
ndisc: extend RCU protection in ndisc_send_skb()

Eric Dumazet <[email protected]>
openvswitch: use RCU protection in ovs_vport_cmd_fill_info()

Eric Dumazet <[email protected]>
arp: use RCU protection in arp_xmit()

Eric Dumazet <[email protected]>
neighbour: use RCU protection in __neigh_notify()

Li Zetao <[email protected]>
neighbour: delete redundant judgment statements

Eric Dumazet <[email protected]>
ndisc: use RCU protection in ndisc_alloc_skb()

Eric Dumazet <[email protected]>
ipv6: use RCU protection in ip6_default_advmss()

Eric Dumazet <[email protected]>
ipv4: use RCU protection in __ip_rt_update_pmtu()

Vladimir Vdovin <[email protected]>
net: ipv4: Cache pmtu for all packet paths if multipath enabled

Guillaume Nault <[email protected]>
selftest: net: Test IPv4 PMTU exceptions with DSCP and ECN

xu xin <[email protected]>
Namespaceify mtu_expires sysctl

xu xin <[email protected]>
Namespaceify min_pmtu sysctl

Eric Dumazet <[email protected]>
ipv4: use RCU protection in inet_select_addr()

Eric Dumazet <[email protected]>
ipv4: use RCU protection in rt_is_expired()

Eric Dumazet <[email protected]>
net: add dev_net_rcu() helper

Jiri Pirko <[email protected]>
net: treat possible_net_t net pointer as an RCU one and add read_pnet_rcu()

Eric Dumazet <[email protected]>
ipv4: add RCU protection to ip4_dst_hoplimit()

Waiman Long <[email protected]>
clocksource: Use migrate_disable() to avoid calling get_random_u32() in atomic context

Waiman Long <[email protected]>
clocksource: Use pr_info() for "Checking clocksource synchronization" message

Yury Norov <[email protected]>
clocksource: Replace cpumask_weight() with cpumask_empty()

Filipe Manana <[email protected]>
btrfs: fix hole expansion when writing at an offset beyond EOF

Wentao Liang <[email protected]>
mlxsw: Add return value check for mlxsw_sp_port_get_stats_raw()

Nathan Chancellor <[email protected]>
arm64: Handle .ARM.attributes section in linker scripts

Jiasheng Jiang <[email protected]>
regmap-irq: Add missing kfree()

Jann Horn <[email protected]>
partitions: mac: fix handling of bogus partition table

Wentao Liang <[email protected]>
gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock

Ivan Kokshaysky <[email protected]>
alpha: align stack for page fault and user unaligned trap handlers

John Keeping <[email protected]>
serial: 8250: Fix fifo underflow on flush

Shakeel Butt <[email protected]>
cgroup: fix race between fork and cgroup.kill

Ard Biesheuvel <[email protected]>
efi: Avoid cold plugged memory for placing the kernel

Ivan Kokshaysky <[email protected]>
alpha: make stack 16-byte aligned (most cases)

Alexander Hölzl <[email protected]>
can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero

Krzysztof Kozlowski <[email protected]>
can: c_can: fix unbalanced runtime PM disable in error path

Johan Hovold <[email protected]>
USB: serial: option: drop MeiG Smart defines

Fabio Porcedda <[email protected]>
USB: serial: option: fix Telit Cinterion FN990A name

Fabio Porcedda <[email protected]>
USB: serial: option: add Telit Cinterion FN990B compositions

Chester A. Unal <[email protected]>
USB: serial: option: add MeiG Smart SLM828

Jann Horn <[email protected]>
usb: cdc-acm: Fix handling of oversized fragments

Jann Horn <[email protected]>
usb: cdc-acm: Check control transfer buffer size before access

Marek Vasut <[email protected]>
USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk

Alan Stern <[email protected]>
USB: hub: Ignore non-compliant devices with too many configs or interfaces

John Keeping <[email protected]>
usb: gadget: f_midi: fix MIDI Streaming descriptor lengths

Mathias Nyman <[email protected]>
USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone

Lei Huang <[email protected]>
USB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist

Stefan Eichenberger <[email protected]>
usb: core: fix pipe creation for get_bMaxPacketSize0

Huacai Chen <[email protected]>
USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI

Fabrice Gasnier <[email protected]>
usb: dwc2: gadget: remove of_node reference upon udc_stop

Guo Ren <[email protected]>
usb: gadget: udc: renesas_usb3: Fix compiler warning

Elson Roy Serrao <[email protected]>
usb: roles: set switch registered flag early on

Sean Christopherson <[email protected]>
perf/x86/intel: Ensure LBRs are disabled when a CPU is starting

Sean Christopherson <[email protected]>
KVM: x86: Reject Hyper-V's SEND_IPI hypercalls if local APIC isn't in-kernel

Sven Eckelmann <[email protected]>
batman-adv: Ignore neighbor throughput metrics in error case

Andy Strohman <[email protected]>
batman-adv: fix panic during interface removal

Hans de Goede <[email protected]>
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet 5V

Mike Marshall <[email protected]>
orangefs: fix a oob in orangefs_debug_write

Rik van Riel <[email protected]>
x86/mm/tlb: Only trim the mm_cpumask once a second

Maksym Planeta <[email protected]>
Grab mm lock before grabbing pt lock

Ramesh Thomas <[email protected]>
vfio/pci: Enable iowrite64 and ioread64 for vfio pci

Takashi Iwai <[email protected]>
PCI/DPC: Quirk PIO log size for Intel Raptor Lake-P

Edward Adam Davis <[email protected]>
media: vidtv: Fix a null-ptr-deref in vidtv_mux_stop_thread

Arnd Bergmann <[email protected]>
media: cxd2841er: fix 64-bit division on gcc-9

Juergen Gross <[email protected]>
x86/xen: allow larger contiguous memory regions in PV guests

Petr Tesarik <[email protected]>
xen: remove a confusing comment on auto-translated guest I/O

Artur Weber <[email protected]>
gpio: bcm-kona: Add missing newline to dev_err format string

Artur Weber <[email protected]>
gpio: bcm-kona: Make sure GPIO bits are unlocked when requesting IRQ

Artur Weber <[email protected]>
gpio: bcm-kona: Fix GPIO lock/unlock for banks above bank 0

Krzysztof Karas <[email protected]>
drm/i915/selftests: avoid using uninitialized context

Radu Rendec <[email protected]>
arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array

Eric Dumazet <[email protected]>
team: better TEAM_OPTION_TYPE_STRING validation

Eric Dumazet <[email protected]>
vrf: use RCU protection in l3mdev_l3_out()

Eric Dumazet <[email protected]>
ndisc: ndisc_send_redirect() must use dev_get_by_index_rcu()

Charles Han <[email protected]>
HID: multitouch: Add NULL check in mt_input_configured

Dai Ngo <[email protected]>
NFSD: fix hang in nfsd4_shutdown_callback

Li Lingfeng <[email protected]>
nfsd: clear acl_access/acl_default after releasing them

Sean Anderson <[email protected]>
tty: xilinx_uartps: split sysrq handling

Paolo Abeni <[email protected]>
mptcp: prevent excessive coalescing on receive

Su Yue <[email protected]>
ocfs2: check dir i_size in ocfs2_find_entry

Dmitry Osipenko <[email protected]>
memory: tegra20-emc: Correct memory device mask

Bartosz Golaszewski <[email protected]>
gpio: xilinx: remove excess kernel doc

Paul Fertser <[email protected]>
net/ncsi: use dev_set_mac_address() for Get MC MAC Address handling

WangYuli <[email protected]>
MIPS: ftrace: Declare ftrace_get_parent_ra_addr() as static

Thomas Weißschuh <[email protected]>

    ptp: Ensure info->enable callback is always set

Milos Reljin <[email protected]>
net: phy: c45-tjaxx: add delay between MDIO write and read in soft_reset

Paul Fertser <[email protected]>
net/ncsi: wait for the last response to Deselect Package before configuring channel

Ekansh Gupta <[email protected]>
misc: fastrpc: Fix registered buffer page address

Ivan Stepchenko <[email protected]>
mtd: onenand: Fix uninitialized retlen in do_otp_read()

Dan Carpenter <[email protected]>
NFC: nci: Add bounds checking in nci_hci_create_pipe()

Nikita Zhandarovich <[email protected]>
nilfs2: fix possible int overflows in nilfs_fiemap()

Matthew Wilcox (Oracle) <[email protected]>
ocfs2: handle a symlink read error correctly

Heming Zhao <[email protected]>
ocfs2: fix incorrect CPU endianness conversion causing mount failure

Mike Snitzer <[email protected]>
pnfs/flexfiles: retry getting layout segment for reads

Alex Williamson <[email protected]>
vfio/platform: check the bounds of read/write syscalls

Jennifer Berringer <[email protected]>
nvmem: core: improve range check for nvmem_cell_write()

Luca Weiss <[email protected]>
nvmem: qcom-spmi-sdam: Set size in struct nvmem_config

Bartosz Golaszewski <[email protected]>
crypto: qce - unregister previously registered algos in error path

Bartosz Golaszewski <[email protected]>
crypto: qce - fix goto jump in error path

Ricardo Ribalda <[email protected]>
media: uvcvideo: Remove redundant NULL assignment

Ricardo Ribalda <[email protected]>
media: uvcvideo: Fix event flags in uvc_ctrl_send_events

Mehdi Djait <[email protected]>
media: ccs: Fix cleanup order in ccs_probe()

Sakari Ailus <[email protected]>
media: ccs: Fix CCS static data parsing for large block sizes

Sam Bobrowicz <[email protected]>
media: ov5640: fix get_light_freq on auto

Cosmin Tanislav <[email protected]>
media: mc: fix endpoint iteration

Krzysztof Kozlowski <[email protected]>
soc: qcom: smem_state: fix missing of_node_put in error path

Javier Carrasco <[email protected]>
iio: light: as73211: fix channel handling in only-color triggered buffer

Sakari Ailus <[email protected]>
media: ccs: Clean up parsed CCS static data on parse failure

Wentao Liang <[email protected]>
xfs: Add error handling for xfs_reflink_cancel_cow_range

Eric Biggers <[email protected]>
crypto: qce - fix priority to be less than ARMv8 CE

Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8350: Fix MPSS memory length

Nathan Chancellor <[email protected]>
x86/boot: Use '-std=gnu11' to fix build with GCC 15

Nathan Chancellor <[email protected]>
kbuild: Move -Wenum-enum-conversion to W=2

Long Li <[email protected]>
scsi: storvsc: Set correct data length for sending SCSI command without payload

Quinn Tran <[email protected]>
scsi: qla2xxx: Move FCE Trace buffer allocation to user control

Georg Gottleuber <[email protected]>
nvme-pci: Add TUXEDO IBP Gen9 to Samsung sleep quirk

Georg Gottleuber <[email protected]>
nvme-pci: Add TUXEDO InfinityFlex to Samsung sleep quirk

Zijun Hu <[email protected]>
PCI: endpoint: Finish virtual EP removal in pci_epf_remove_vepf()

Edson Juliano Drosdeck <[email protected]>
ALSA: hda/realtek: Enable headset mic on Positivo C6400

Thadeu Lima de Souza Cascardo <[email protected]>
Revert "media: uvcvideo: Require entities to have a non-zero unique ID"

Mateusz Jończyk <[email protected]>
mips/math-emu: fix emulation of the prefx instruction

Hou Tao <[email protected]>
dm-crypt: track tag_offset in convert_context

Hou Tao <[email protected]>

    dm-crypt: don't update io->sector after kcryptd_crypt_write_io_submit()

Narayana Murty N <[email protected]>
powerpc/pseries/eeh: Fix get PE state translation

Kexy Biscuit <[email protected]>
MIPS: Loongson64: remove ROM Size unit in boardinfo

Claudiu Beznea <[email protected]>

    serial: sh-sci: Do not probe the serial port if its slot in sci_ports[] is in use

Claudiu Beznea <[email protected]>
serial: sh-sci: Drop __initdata macro for port_cfg

Stephan Gerhold <[email protected]>
soc: qcom: socinfo: Avoid out of bounds read of serial number

Thinh Nguyen <[email protected]>
usb: gadget: f_tcm: Don't prepare BOT write request twice

Thinh Nguyen <[email protected]>
usb: gadget: f_tcm: ep_autoconfig with fullspeed endpoint

Thinh Nguyen <[email protected]>
usb: gadget: f_tcm: Decrement command ref count on cleanup

Thinh Nguyen <[email protected]>
usb: gadget: f_tcm: Translate error to sense

Marcel Hamer <[email protected]>
wifi: brcmfmac: fix NULL pointer dereference in brcmf_txfinalize()

Bitterblue Smith <[email protected]>
wifi: rtlwifi: rtl8821ae: Fix media status report

Heiko Stuebner <[email protected]>
HID: hid-sensor-hub: don't use stale platform-data on remove

Zijun Hu <[email protected]>
of: reserved-memory: Fix using wrong number of cells to get property 'alignment'

Zijun Hu <[email protected]>
of: Fix of_find_node_opts_by_path() handling of alias+path+options

Zijun Hu <[email protected]>
of: Correct child specifier used as input of the 2nd nexus node

Kuan-Wei Chiu <[email protected]>
perf bench: Fix undefined behavior in cmpworker()

Nathan Chancellor <[email protected]>
efi: libstub: Use '-std=gnu11' to fix build with GCC 15

Zijun Hu <[email protected]>
blk-cgroup: Fix class @block_class's subsystem refcount leakage

Anastasia Belova <[email protected]>
clk: qcom: clk-rpmh: prevent integer overflow in recalc_rate

Satya Priya Kakitapalli <[email protected]>
clk: qcom: gcc-mdm9607: Fix cmd_rcgr offset for blsp1_uart6 rcg

Luca Weiss <[email protected]>
clk: qcom: gcc-sm6350: Add missing parent_map for two clocks

Gabor Juhos <[email protected]>
clk: qcom: clk-alpha-pll: fix alpha mode configuration

Cody Eksal <[email protected]>
clk: sunxi-ng: a100: enable MMC clock reparenting

Fedor Pchelkin <[email protected]>
Bluetooth: L2CAP: accept zero as a special value for MTU auto-selection

Fedor Pchelkin <[email protected]>
Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc

Ville Syrjälä <[email protected]>
drm/i915: Drop 64bpp YUV formats from ICL+ SDR planes

Haoxiang Li <[email protected]>
drm/komeda: Add check for komeda_get_layer_fourcc_list()

Lijo Lazar <[email protected]>
drm/amd/pm: Mark MM activity as unsupported

David Hildenbrand <[email protected]>
KVM: s390: vsie: fix some corner-cases when grabbing vsie pages

Sean Christopherson <[email protected]>
KVM: Explicitly verify target vCPU is online in kvm_get_vcpu()

Jakob Unterwurzacher <[email protected]>
arm64: dts: rockchip: increase gmac rx_delay on rk3399-puma

Dan Carpenter <[email protected]>
binfmt_flat: Fix integer overflow bug on 32 bit systems

Thomas Zimmermann <[email protected]>
m68k: vga: Fix I/O defines

Heiko Carstens <[email protected]>
s390/futex: Fix FUTEX_OP_ANDN implementation

Maarten Lankhorst <[email protected]>
drm/modeset: Handle tiled displays in pan_display_atomic.

Alexander Sverdlin <[email protected]>
leds: lp8860: Write full EEPROM, not only half of it

Viresh Kumar <[email protected]>
cpufreq: s3c64xx: Fix compilation warning

Willem de Bruijn <[email protected]>
tun: revert fix group permission check

Cong Wang <[email protected]>

    netem: Update sch->q.qlen before qdisc_tree_reduce_backlog()

Juergen Gross <[email protected]>
x86/xen: add FRAME_END to xen_hypercall_hvm()

Juergen Gross <[email protected]>
x86/xen: fix xen_hypercall_hvm() to not clobber %rbx

Eric Dumazet <[email protected]>
net: rose: lock the socket in rose_bind()

Jacob Moroni <[email protected]>
net: atlantic: fix warning during hot unplug

Mark Tomlinson <[email protected]>
gpio: pca953x: Improve interrupt support

Yan Zhai <[email protected]>
udp: gso: do not drop small packets when PMTU reduces

Lenny Szubowicz <[email protected]>
tg3: Disable tg3 PCIe AER on system reboot

Hans Verkuil <[email protected]>
gpu: drm_dp_cec: fix broken CEC adapter properties check

Prasad Pandit <[email protected]>
firmware: iscsi_ibft: fix ISCSI_IBFT Kconfig entry

Daniel Wagner <[email protected]>
nvme: handle connectivity loss in nvme_set_queue_count

Michal Pecio <[email protected]>
usb: xhci: Fix NULL pointer dereference on certain command aborts

Hardik Gajjar <[email protected]>
usb: xhci: Add timeout argument in address_device USB HCD callback

Darrick J. Wong <[email protected]>
xfs: don't over-report free space or inodes in statvfs

Darrick J. Wong <[email protected]>
xfs: report realtime block quota limits on realtime directories

Sean Anderson <[email protected]>
gpio: xilinx: Convert gpio_lock to raw spinlock

Linus Walleij <[email protected]>
gpio: xilinx: Convert to immutable irq_chip

Marc Zyngier <[email protected]>
gpio: Add helpers to ease the transition towards immutable irq_chip

Marc Zyngier <[email protected]>
gpio: Expose the gpiochip_irq_re[ql]res helpers

Marc Zyngier <[email protected]>
gpio: Don't fiddle with irqchips marked as immutable

Paul Fertser <[email protected]>
net/ncsi: fix locking in Get MAC Address handling

Peter Delevoryas <[email protected]>
net/ncsi: Add NC-SI 1.2 Get MC MAC Address command

Joe Hattori <[email protected]>
usb: chipidea: ci_hdrc_imx: decrement device's refcount in .remove() and in the error path of .probe()

Uwe Kleine-König <[email protected]>
usb: chipidea/ci_hdrc_imx: Convert to platform remove callback returning void

Alexander Stein <[email protected]>
usb: chipidea: ci_hdrc_imx: use dev_err_probe()

Xi Ruoyao <[email protected]>
x86/mm: Don't disable PCID when INVLPG has been fixed by microcode

Armin Wolf <[email protected]>
platform/x86: acer-wmi: Ignore AC events

Illia Ostapyshyn <[email protected]>
Input: allocate keycode for phone linking

Liu Ye <[email protected]>
selftests/net/ipsec: Fix Null pointer dereference in rtattr_pack()

Dan Carpenter <[email protected]>
tipc: re-order conditions in tipc_crypto_key_rcv()

Yuanjie Yang <[email protected]>
mmc: sdhci-msm: Correctly set the load for the regulator

Maciej S. Szmigiero <[email protected]>
net: wwan: iosm: Fix hibernation by re-binding the driver around it

Borislav Petkov <[email protected]>
APEI: GHES: Have GHES honor the panic= setting

Randolph Ha <[email protected]>
i2c: Force ELAN06FA touchpad I2C bus freq to 100KHz

Miri Korenblit <[email protected]>
wifi: iwlwifi: avoid memory leak

Vadim Fedorenko <[email protected]>
net/mlx5: use do_aux_work for PHC overflow checks

Even Xu <[email protected]>
HID: Wacom: Add PCI Wacom device support

Hans de Goede <[email protected]>
mfd: lpc_ich: Add another Gemini Lake ISA bridge PCI device-id

Tetsuo Handa <[email protected]>
tomoyo: don't emit warning in tomoyo_write_control()

Dmitry Antipov <[email protected]>
wifi: brcmsmac: add gain range check to wlc_phy_iqcal_gainparams_nphy()

Shawn Lin <[email protected]>
mmc: core: Respect quirk_max_rate for non-UHS SDIO card

Stas Sergeev <[email protected]>
tun: fix group permission check

Leo Stone <[email protected]>
safesetid: check size of policy writes

Kuan-Wei Chiu <[email protected]>
printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX

Yazen Ghannam <[email protected]>
x86/amd_nb: Restrict init function to AMD-based systems

Carlos Llamas <[email protected]>
lockdep: Fix upper limit for LOCKDEP_*_BITS configs

Suleiman Souhlal <[email protected]>
sched: Don't try to catch up excess steal time.

Josef Bacik <[email protected]>
btrfs: convert BUG_ON in btrfs_reloc_cow_block() to proper error handling

Hao-ran Zheng <[email protected]>
btrfs: fix data race when accessing the inode's disk_i_size at btrfs_drop_extents()

Filipe Manana <[email protected]>
btrfs: fix use-after-free when attempting to join an aborted transaction

Qu Wenruo <[email protected]>
btrfs: output the reason for open_ctree() failure

Thinh Nguyen <[email protected]>
usb: gadget: f_tcm: Don't free command immediately

Laurent Pinchart <[email protected]>
media: uvcvideo: Fix double free in error path

Paolo Abeni <[email protected]>
mptcp: consolidate suboption status

Kyle Tso <[email protected]>
usb: typec: tcpci: Prevent Sink disconnection before vPpsShutdown in SPR PPS

Jos Wang <[email protected]>
usb: typec: tcpm: set SRC_SEND_CAPABILITIES timeout to PD_T_SENDER_RESPONSE

Kyle Tso <[email protected]>
usb: dwc3: core: Defer the probe until USB power supply ready

Thinh Nguyen <[email protected]>
usb: gadget: f_tcm: Fix Get/SetInterface return value

Sean Rhodes <[email protected]>
drivers/card_reader/rtsx_usb: Restore interrupt based detection

Nikita Zhandarovich <[email protected]>
net: usb: rtl8150: enable basic endpoint checking

Lianqin Hu <[email protected]>
ALSA: usb-audio: Add delay quirk for iBasso DC07 Pro

Ricardo B. Marliere <[email protected]>
ktest.pl: Check kernelrelease return in get_version

Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: reject mismatching sum of field_len with set key length

Chuck Lever <[email protected]>
NFSD: Reset cb_seq_status after NFS4ERR_DELAY

Daniel Lee <[email protected]>
f2fs: Introduce linear search for dentries

Lin Yujun <[email protected]>
hexagon: Fix unbalanced spinlock in die()

Willem de Bruijn <[email protected]>
hexagon: fix using plain integer as NULL pointer warning in cmpxchg

Masahiro Yamada <[email protected]>
kconfig: fix memory leak in sym_warn_unmet_dep()

Sergey Senozhatsky <[email protected]>
kconfig: WERROR unmet symbol dependency

Masahiro Yamada <[email protected]>
kconfig: deduplicate code in conf_read_simple()

Masahiro Yamada <[email protected]>
kconfig: remove unused code for S_DEF_AUTO in conf_read_simple()

Masahiro Yamada <[email protected]>
kconfig: require a space after '#' for valid input

Sergey Senozhatsky <[email protected]>
kconfig: add warn-unknown-symbols sanity check

Masahiro Yamada <[email protected]>
kconfig: fix file name in warnings when loading KCONFIG_DEFCONFIG_LIST

Masahiro Yamada <[email protected]>
genksyms: fix memory leak when the same symbol is read from *.symref file

Masahiro Yamada <[email protected]>
genksyms: fix memory leak when the same symbol is added from source

Eric Dumazet <[email protected]>
net: hsr: fix fill_frame_info() regression vs VLAN packets

Kory Maincent <[email protected]>
net: sh_eth: Fix missing rtnl lock in suspend/resume path

Rafał Miłecki <[email protected]>
bgmac: reduce max frame size to support just MTU 1500

Michal Luczaj <[email protected]>
vsock: Allow retrying on connect() failure

Howard Chu <[email protected]>
perf trace: Fix runtime error of index out of bounds

Thomas Weißschuh <[email protected]>
ptp: Properly handle compat ioctls

Chenyuan Yang <[email protected]>
net: davicom: fix UAF in dm9000_drv_remove

Jakub Kicinski <[email protected]>
net: netdevsim: try to close UDP port harness races

Eric Dumazet <[email protected]>
net: rose: fix timer races against user threads

Wentao Liang <[email protected]>
PM: hibernate: Add error handling for syscore_suspend()

Eric Dumazet <[email protected]>
ipmr: do not call mr_mfc_uses_dev() for unres entries

Dheeraj Reddy Jonnalagadda <[email protected]>
net: fec: implement TSO descriptor cleanup

Ahmad Fatoum <[email protected]>
gpio: mxc: remove dead code after switch to DT-only

Jian Shen <[email protected]>
net: hns3: fix oops when unload drivers paralleling

pangliyuan <[email protected]>
ubifs: skip dumping tnc tree when zroot is null

Oleksij Rempel <[email protected]>
rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read

Joe Hattori <[email protected]>
dmaengine: ti: edma: fix OF node reference leaks in edma_driver

Jianbo Liu <[email protected]>

    xfrm: replay: Fix the update of replay_esn->oseq_hi for GSO

Luo Yifan <[email protected]>
tools/bootconfig: Fix the wrong format specifier

Olga Kornievskaia <[email protected]>
NFSv4.2: mark OFFLOAD_CANCEL MOVEABLE

Olga Kornievskaia <[email protected]>
NFSv4.2: fix COPY_NOTIFY xdr buf size calculation

Sebastian Andrzej Siewior <[email protected]>
module: Extend the preempt disabled section in dereference_symbol_descriptor().

Su Yue <[email protected]>
ocfs2: mark dquot as inactive if failed to start trans while releasing dquot

Guixin Liu <[email protected]>
scsi: ufs: bsg: Delete bsg_dev when setting up bsg fails

Paul Menzel <[email protected]>

    scsi: mpt3sas: Set ioc->manu_pg11.EEDPTagMode directly to 1

King Dix <[email protected]>
PCI: rcar-ep: Fix incorrect variable used when calling devm_request_mem_region()

Joe Hattori <[email protected]>
staging: media: imx: fix OF node leak in imx_media_add_of_subdevs()

Joe Hattori <[email protected]>
mtd: hyperbus: hbmc-am654: fix an OF node reference leak

Uwe Kleine-König <[email protected]>
mtd: hyperbus: hbmc-am654: Convert to platform remove callback returning void

Uwe Kleine-König <[email protected]>
mtd: hyperbus: Make hyperbus_unregister_device() return void

Ricardo Ribalda <[email protected]>

    media: uvcvideo: Propagate buf->error to userspace

Jiasheng Jiang <[email protected]>
media: camif-core: Add check for clk_enable()

Jiasheng Jiang <[email protected]>
media: mipi-csis: Add check for clk_enable()

Dave Stevenson <[email protected]>
media: i2c: ov9282: Correct the exposure offset

Luca Weiss <[email protected]>
media: i2c: imx412: Add missing newline to prints

Jiasheng Jiang <[email protected]>
media: marvell: Add check for clk_enable()

Zijun Hu <[email protected]>
PCI: endpoint: Destroy the EPC device in devm_pci_epc_destroy()

Chen Ni <[email protected]>
media: lmedm04: Handle errors for lme2510_int_read

Oliver Neukum <[email protected]>
media: rc: iguanair: handle timeouts

Randy Dunlap <[email protected]>
efi: sysfb_efi: fix W=1 warnings when EFI is not set

Zijun Hu <[email protected]>
of: reserved-memory: Do not make kmemleak ignore freed address

Mike Rapoport <[email protected]>
memblock: drop memblock_free_early_nid() and memblock_free_early()

Mike Rapoport <[email protected]>
xen/x86: free_p2m_page: use memblock_free_ptr() to free a virtual pointer

Michael Guralnik <[email protected]>
RDMA/mlx5: Fix indirect mkey ODP page count

Michael Guralnik <[email protected]>
RDMA/mlx5: Enforce umem boundaries for explicit ODP page faults

Aharon Landau <[email protected]>
RDMA/mlx5: Remove iova from struct mlx5_core_mkey

Joe Hattori <[email protected]>
fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device()

Rafał Miłecki <[email protected]>
ARM: dts: mediatek: mt7623: fix IR nodename

Vladimir Zapolskiy <[email protected]>
arm64: dts: qcom: sdm845: Fix interrupt types of camss interrupts

Neil Armstrong <[email protected]>
arm64: dts: qcom: sm8150-microsoft-surface-duo: fix typos in da7280 properties

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8350: correct sleep clock frequency

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8250: correct sleep clock frequency

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm6125: correct sleep clock frequency

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sc7280: correct sleep clock frequency

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8994: correct sleep clock frequency

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8916: correct sleep clock frequency

Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8994: Describe USB interrupts

Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8996: Fix up USB3 interrupts

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8183-kukui-jacuzzi: Drop pp3300_panel voltage settings

Joe Hattori <[email protected]>
memory: tegra20-emc: fix an OF node reference bug in tegra_emc_find_node_by_ram_code()

Dmitry Osipenko <[email protected]>
memory: tegra20-emc: Support matching timings by LPDDR2 configuration

Dmitry Osipenko <[email protected]>
memory: Add LPDDR2-info helpers

Hsin-Te Yuan <[email protected]>
arm64: dts: mediatek: mt8183: willow: Support second source touchscreen

Hsin-Te Yuan <[email protected]>
arm64: dts: mediatek: mt8183: kenzo: Support second source touchscreen

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8173-evb: Fix MT6397 PMIC sub-node names

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8173-elm: Fix MT6397 PMIC sub-node names

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8173-elm: Drop regulator-compatible property

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8173-evb: Drop regulator-compatible property

Dan Carpenter <[email protected]>
rdma/cxgb4: Prevent potential integer overflow on 32bit

Leon Romanovsky <[email protected]>
RDMA/mlx4: Avoid false error about access to uninitialized gids array

Val Packett <[email protected]>

    arm64: dts: mediatek: mt8516: reserve 192 KiB for TF-A

Val Packett <[email protected]>
arm64: dts: mediatek: mt8516: add i2c clock-div property

Fabien Parent <[email protected]>
arm64: dts: mediatek: mt8516: remove 2 invalid i2c clocks

Val Packett <[email protected]>
arm64: dts: mediatek: mt8516: fix wdt irq type

Val Packett <[email protected]>
arm64: dts: mediatek: mt8516: fix GICv2 range

Hsin-Yi Wang <[email protected]>
arm64: dts: mt8183: set DMIC one-wire mode on Damu

Nicolas Ferre <[email protected]>
ARM: at91: pm: change BU Power Switch to automatic mode

Chen Ridong <[email protected]>
padata: avoid UAF for reorder_work

Chen Ridong <[email protected]>
padata: add pd get/put refcnt helper

Chen Ridong <[email protected]>
padata: fix UAF in padata_reorder

Puranjay Mohan <[email protected]>
bpf: Send signals asynchronously if !preemptible

Jiachen Zhang <[email protected]>
perf report: Fix misleading help message about --demangle

Arnaldo Carvalho de Melo <[email protected]>
perf top: Don't complain about lack of vmlinux when not resolving some kernel samples

Thomas Weißschuh <[email protected]>
padata: fix sysfs store callback check

Joe Hattori <[email protected]>
crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto()

Wenkai Lin <[email protected]>
crypto: hisilicon/sec2 - fix for aead invalid authsize

Wenkai Lin <[email protected]>
crypto: hisilicon/sec2 - fix for aead icv error

Chenghai Huang <[email protected]>
crypto: hisilicon/sec2 - optimize the error return process

Kai Ye <[email protected]>
crypto: hisilicon/sec - delete redundant blank lines

Kai Ye <[email protected]>
crypto: hisilicon/sec - add some comments for soft fallback

Ba Jing <[email protected]>
ktest.pl: Remove unused declarations in run_bisect_test function

Claudiu Beznea <[email protected]>
ASoC: renesas: rz-ssi: Use only the proper amount of dividers

Zhongqiu Han <[email protected]>
perf bpf: Fix two memory leakages when calling perf_env__insert_bpf_prog_info()

Zhongqiu Han <[email protected]>
perf header: Fix one memory leakage in process_bpf_prog_info()

Zhongqiu Han <[email protected]>
perf header: Fix one memory leakage in process_bpf_btf()

George Lander <[email protected]>
ASoC: sun4i-spdif: Add clock multiplier settings

Quentin Monnet <[email protected]>
libbpf: Fix segfault due to libelf functions not setting errno

Marco Leogrande <[email protected]>
tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind

Nikita Zhandarovich <[email protected]>
net/rose: prevent integer overflows in rose_setsockopt()

Mahdi Arghavani <[email protected]>
tcp_cubic: fix incorrect HyStart round start detection

Roger Quadros <[email protected]>
net: ethernet: ti: am65-cpsw: fix freeing IRQ in am65_cpsw_nuss_remove_tx_chns()

Florian Westphal <[email protected]>
netfilter: nft_flow_offload: update tcp state flags under lock

Jamal Hadi Salim <[email protected]>
net: sched: Disallow replacing of child qdisc from one parent to another

Antoine Tenart <[email protected]>
net: avoid race between device unregistration and ethnl ops

Maher Sanalla <[email protected]>
net/mlxfw: Drop hard coded max FW flash image size

Liu Jian <[email protected]>
net: let net.core.dev_weight always be non-zero

Mickaël Salaün <[email protected]>
selftests/landlock: Fix error message

Bo Gan <[email protected]>
clk: analogbits: Fix incorrect calculation of vco rate delta

Dmitry Antipov <[email protected]>
wifi: cfg80211: adjust allocation of colocated AP data

Ilan Peer <[email protected]>
wifi: cfg80211: Handle specific BSSID in 6GHz scanning

Dmitry V. Levin <[email protected]>
selftests: harness: fix printing of mismatch values in __EXPECT()

Gautham R. Shenoy <[email protected]>
cpufreq: ACPI: Fix max-frequency computation

WangYuli <[email protected]>
wifi: mt76: mt76u_vendor_request: Do not print error messages when -EPROTO

Mickaël Salaün <[email protected]>
landlock: Handle weird files

Mickaël Salaün <[email protected]>
landlock: Move filesystem helpers and add a new one

Guangguan Wang <[email protected]>
net/smc: fix data error when recvmsg with MSG_PEEK flag

Andreas Kemnade <[email protected]>
wifi: wlcore: fix unbalanced pm_runtime calls

Zichen Xie <[email protected]>
samples/landlock: Fix possible NULL dereference in parse_path()

Joe Hattori <[email protected]>
regulator: of: Implement the unwind path of of_regulator_match()

Octavian Purdila <[email protected]>
team: prevent adding a device which is already a team device lower

Marek Vasut <[email protected]>
clk: imx8mp: Fix clkout1/2 support

Sultan Alsawaf (unemployed) <[email protected]>
cpufreq: schedutil: Fix superfluous updates caused by need_freq_update

Joe Hattori <[email protected]>
leds: netxbig: Fix an OF node reference leak in netxbig_leds_get_of_pdata()

Matti Vaittinen <[email protected]>
dt-bindings: mfd: bd71815: Fix rsense and typos

He Rongguang <[email protected]>
cpupower: fix TSC MHz calculation

Joe Hattori <[email protected]>
ACPI: fan: cleanup resources in the error path of .probe()

Chen-Yu Tsai <[email protected]>
regulator: dt-bindings: mt6315: Drop regulator-compatible property

Jiri Kosina <[email protected]>

    HID: multitouch: fix support for Goodix PID 0x01e9

Jiri Kosina <[email protected]>
Revert "HID: multitouch: Add support for lenovo Y9000P Touchpad"

He Lugang <[email protected]>
HID: multitouch: Add support for lenovo Y9000P Touchpad

Thadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: pci: wait for firmware loading before releasing memory

Thadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: fix memory leaks and invalid access at probe error path

Thadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: destroy workqueue at rtl_deinit_core

Thadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: remove unused check_buddy_priv

Dmitry Antipov <[email protected]>
wifi: rtlwifi: remove unused dualmac control leftovers

Dmitry Antipov <[email protected]>
wifi: rtlwifi: remove unused timer and related code

Jakob Koschel <[email protected]>
rtlwifi: replace usage of found with dedicated list iterator variable

Geert Uytterhoeven <[email protected]>
dt-bindings: leds: class-multicolor: Fix path to color definitions

Krzysztof Kozlowski <[email protected]>
dt-bindings: leds: class-multicolor: reference class directly in multi-led node

Sven Schwermer <[email protected]>
dt-bindings: leds: Add multicolor PWM LED bindings

Sven Schwermer <[email protected]>
dt-bindings: leds: Optional multi-led unit address

Bjorn Andersson <[email protected]>
dt-bindings: leds: Add Qualcomm Light Pulse Generator binding

Rob Herring <[email protected]>
dt-bindings: Another pass removing cases of 'allOf' containing a '$ref'

Pratyush Yadav <[email protected]>
spi: dt-bindings: add schema listing peripheral-specific properties

Neil Armstrong <[email protected]>
dt-bindings: mmc: controller: clarify the address-cells description

Mingwei Zheng <[email protected]>
spi: zynq-qspi: Add check for clk_enable()

Thadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: usb: fix workqueue leak when probe fails

Thadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: fix init_sw_vars leak when probe fails

Thadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: wait for firmware loading before releasing memory

Thadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: rtl8192se: rise completion of firmware loading as last step

Thadeu Lima de Souza Cascardo <[email protected]>
wifi: rtlwifi: do not complete firmware loading needlessly

Charles Han <[email protected]>
ipmi: ipmb: Add check devm_kasprintf() returned value

Thomas Gleixner <[email protected]>
genirq: Make handle_enforce_irqctx() unconditionally available

Ivan Stepchenko <[email protected]>
drm/amdgpu: Fix potential NULL pointer dereference in atomctrl_get_smc_sclk_range_table

Alan Stern <[email protected]>
HID: core: Fix assumption that Resolution Multipliers must be in Logical Collections

Sui Jingfeng <[email protected]>
drm/etnaviv: Fix page property being used for non writecombine buffers

Peter Zijlstra <[email protected]>
sched/fair: Fix value reported by hot tasks pulled in /proc/schedstat

Chengming Zhou <[email protected]>

    sched/psi: Use task->psi_flags to clear in CPU migration

David Howells <[email protected]>
afs: Fix the fallback handling for the YFS.RemoveFile2 RPC call

Christophe Leroy <[email protected]>
select: Fix unbalanced user_access_end()

Randy Dunlap <[email protected]>
partitions: ldm: remove the initial kernel-doc notation

Keisuke Nishimura <[email protected]>
nvme: Add error check for xa_store in nvme_get_effects_log

Eugen Hristev <[email protected]>
pstore/blk: trivial typo fixes

Yu Kuai <[email protected]>
nbd: don't allow reconnect after disconnect

Yang Erkun <[email protected]>
block: retry call probe after request_module in blk_request_module

Christoph Hellwig <[email protected]>
block: deprecate autoloading based on dev_t

Jinliang Zheng <[email protected]>
fs: fix proc_handler for sysctl_nr_open

Luis Chamberlain <[email protected]>
fs: move fs stat sysctls to file_table.c

Luis Chamberlain <[email protected]>
fs: move inode sysctls to its own file

Luis Chamberlain <[email protected]>
sysctl: share unsigned long const values

Xiaoming Ni <[email protected]>
sysctl: use const for typically used max/min proc sysctls

Xiaoming Ni <[email protected]>
hung_task: move hung_task sysctl interface to hung_task.c

David Howells <[email protected]>
afs: Fix directory format encoding struct

David Howells <[email protected]>
afs: Fix EEXIST error returned from afs_rmdir() to be ENOTEMPTY

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

Diffstat:

 Documentation/dev-tools/kfence.rst                 |  12 ++
 .../bindings/connector/usb-connector.yaml          |   3 +-
 .../bindings/display/brcm,bcm2711-hdmi.yaml        |   3 +-
 .../bindings/display/bridge/adi,adv7511.yaml       |   5 +-
 .../bindings/display/bridge/synopsys,dw-hdmi.yaml  |   5 +-
 .../bindings/display/panel/display-timings.yaml    |   3 +-
 .../devicetree/bindings/display/ste,mcde.yaml      |   4 +-
 .../devicetree/bindings/input/adc-joystick.yaml    |   9 +-
 .../bindings/leds/cznic,turris-omnia-leds.yaml     |   5 +-
 .../bindings/leds/leds-class-multicolor.yaml       |  28 +--
 .../devicetree/bindings/leds/leds-lp50xx.yaml      |   5 +-
 .../bindings/leds/leds-pwm-multicolor.yaml         |  78 +++++++
 .../devicetree/bindings/leds/leds-qcom-lpg.yaml    | 175 ++++++++++++++++
 .../devicetree/bindings/mfd/google,cros-ec.yaml    |  12 +-
 .../devicetree/bindings/mfd/rohm,bd71815-pmic.yaml |  20 +-
 .../devicetree/bindings/mmc/mmc-controller.yaml    |   2 +-
 .../bindings/mtd/rockchip,nand-controller.yaml     |   3 +-
 .../devicetree/bindings/net/ti,cpsw-switch.yaml    |   3 +-
 .../devicetree/bindings/phy/phy-stm32-usbphyc.yaml |   3 +-
 .../bindings/power/supply/sbs,sbs-manager.yaml     |   4 +-
 .../bindings/regulator/mt6315-regulator.yaml       |   6 -
 .../bindings/remoteproc/ti,k3-r5f-rproc.yaml       |   3 +-
 .../devicetree/bindings/soc/ti/ti,pruss.yaml       |  15 +-
 .../devicetree/bindings/sound/st,stm32-sai.yaml    |   3 +-
 .../devicetree/bindings/sound/tlv320adcx140.yaml   |  13 +-
 .../devicetree/bindings/spi/spi-controller.yaml    |  69 +------
 .../bindings/spi/spi-peripheral-props.yaml         |  87 ++++++++
 .../devicetree/bindings/usb/st,stusb160x.yaml      |   4 +-
 Documentation/kbuild/kconfig.rst                   |   9 +
 Makefile                                           |   9 +-
 arch/alpha/include/uapi/asm/ptrace.h               |   2 +
 arch/alpha/kernel/asm-offsets.c                    |   2 +
 arch/alpha/kernel/entry.S                          |  24 +--
 arch/alpha/kernel/traps.c                          |   2 +-
 arch/alpha/mm/fault.c                              |   4 +-
 arch/arm/boot/dts/dra7-l4.dtsi                     |   2 +
 arch/arm/boot/dts/mt7623.dtsi                      |   2 +-
 arch/arm/mach-at91/pm.c                            |  31 ++-
 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi       |  29 +--
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts        |  25 +--
 .../dts/mediatek/mt8183-kukui-jacuzzi-damu.dts     |   4 +
 .../dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dts    |  15 ++
 .../dts/mediatek/mt8183-kukui-jacuzzi-willow.dtsi  |  15 ++
 .../boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi    |   2 -
 arch/arm64/boot/dts/mediatek/mt8183.dtsi           |   1 +
 arch/arm64/boot/dts/mediatek/mt8516.dtsi           |  38 ++--
 arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi   |   2 -
 arch/arm64/boot/dts/qcom/msm8916.dtsi              |   2 +-
 arch/arm64/boot/dts/qcom/msm8994.dtsi              |  11 +-
 arch/arm64/boot/dts/qcom/msm8996.dtsi              |   9 +-
 arch/arm64/boot/dts/qcom/sc7280.dtsi               |   2 +-
 arch/arm64/boot/dts/qcom/sdm845.dtsi               |  20 +-
 arch/arm64/boot/dts/qcom/sm6125.dtsi               |   2 +-
 .../boot/dts/qcom/sm8150-microsoft-surface-duo.dts |   4 +-
 arch/arm64/boot/dts/qcom/sm8250.dtsi               |   2 +-
 arch/arm64/boot/dts/qcom/sm8350.dtsi               |   4 +-
 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi      |   2 +-
 arch/arm64/include/asm/mman.h                      |   9 +-
 arch/arm64/kernel/cacheinfo.c                      |  12 +-
 arch/arm64/kernel/vdso/vdso.lds.S                  |   1 +
 arch/arm64/kernel/vmlinux.lds.S                    |   1 +
 arch/hexagon/include/asm/cmpxchg.h                 |   2 +-
 arch/hexagon/kernel/traps.c                        |   4 +-
 arch/m68k/include/asm/vga.h                        |   8 +-
 arch/mips/kernel/ftrace.c                          |   2 +-
 arch/mips/loongson64/boardinfo.c                   |   2 -
 arch/mips/math-emu/cp1emu.c                        |   2 +-
 arch/mips/mm/init.c                                |   2 +-
 arch/powerpc/include/asm/book3s/64/hash-4k.h       |  28 +++
 arch/powerpc/include/asm/book3s/64/pgtable.h       |  26 ---
 arch/powerpc/lib/code-patching.c                   |   2 +-
 arch/powerpc/platforms/pseries/eeh_pseries.c       |   6 +-
 arch/powerpc/platforms/pseries/svm.c               |   3 +-
 arch/s390/include/asm/futex.h                      |   2 +-
 arch/s390/kernel/smp.c                             |   2 +-
 arch/s390/kernel/traps.c                           |   6 +-
 arch/s390/kvm/vsie.c                               |  25 ++-
 arch/x86/Kconfig                                   |   3 +-
 arch/x86/boot/compressed/Makefile                  |   1 +
 arch/x86/events/intel/core.c                       |   5 +-
 arch/x86/include/asm/mmu.h                         |   2 +
 arch/x86/include/asm/mmu_context.h                 |   1 +
 arch/x86/include/asm/msr-index.h                   |   3 +-
 arch/x86/include/asm/tlbflush.h                    |   1 +
 arch/x86/kernel/amd_nb.c                           |   4 +
 arch/x86/kernel/cpu/bugs.c                         |  20 +-
 arch/x86/kernel/cpu/cacheinfo.c                    |   2 +-
 arch/x86/kernel/cpu/cyrix.c                        |   4 +-
 arch/x86/kernel/cpu/intel.c                        |  52 +++--
 arch/x86/kernel/cpu/sgx/encl.c                     | 108 ++++++++--
 arch/x86/kernel/cpu/sgx/encl.h                     |   8 +-
 arch/x86/kernel/cpu/sgx/ioctl.c                    |  17 +-
 arch/x86/kernel/cpu/sgx/main.c                     |  31 +--
 arch/x86/kernel/i8253.c                            |  11 +-
 arch/x86/kernel/static_call.c                      |   1 -
 arch/x86/kvm/hyperv.c                              |   6 +-
 arch/x86/mm/init.c                                 |  23 ++-
 arch/x86/mm/tlb.c                                  |  35 +++-
 arch/x86/xen/mmu_pv.c                              |  79 +++++--
 arch/x86/xen/p2m.c                                 |   2 +-
 arch/x86/xen/xen-head.S                            |   5 +-
 block/Kconfig                                      |  12 ++
 block/bdev.c                                       |   9 +-
 block/blk-cgroup.c                                 |   1 +
 block/genhd.c                                      |  30 ++-
 block/partitions/efi.c                             |   2 +-
 block/partitions/ldm.h                             |   2 +-
 block/partitions/mac.c                             |  18 +-
 crypto/testmgr.h                                   | 227 ++++++++++++++------
 drivers/acpi/apei/ghes.c                           |  10 +-
 drivers/acpi/fan.c                                 |  10 +-
 drivers/base/arch_numa.c                           |   2 +-
 drivers/base/regmap/regmap-irq.c                   |   2 +
 drivers/block/nbd.c                                |   1 +
 drivers/bus/mhi/host/pci_generic.c                 |   5 +-
 drivers/char/ipmi/ipmb_dev_int.c                   |   3 +
 drivers/char/tpm/eventlog/acpi.c                   |  16 +-
 drivers/char/tpm/eventlog/efi.c                    |  13 +-
 drivers/char/tpm/eventlog/of.c                     |   3 +-
 drivers/char/tpm/tpm-chip.c                        |   1 -
 drivers/clk/analogbits/wrpll-cln28hpc.c            |   2 +-
 drivers/clk/imx/clk-imx8mp.c                       |   5 +-
 drivers/clk/qcom/clk-alpha-pll.c                   |   2 +
 drivers/clk/qcom/clk-rpmh.c                        |   2 +-
 drivers/clk/qcom/gcc-mdm9607.c                     |   2 +-
 drivers/clk/qcom/gcc-sm6350.c                      |  22 +-
 drivers/clk/sunxi-ng/ccu-sun50i-a100.c             |   6 +-
 drivers/clocksource/i8253.c                        |  13 +-
 drivers/cpufreq/acpi-cpufreq.c                     |  36 +++-
 drivers/cpufreq/s3c64xx-cpufreq.c                  |  11 +-
 drivers/crypto/hisilicon/sec2/sec.h                |   3 +-
 drivers/crypto/hisilicon/sec2/sec_crypto.c         | 178 ++++++++--------
 drivers/crypto/hisilicon/sec2/sec_crypto.h         |  11 -
 drivers/crypto/ixp4xx_crypto.c                     |   3 +
 drivers/crypto/qce/aead.c                          |   2 +-
 drivers/crypto/qce/core.c                          |  13 +-
 drivers/crypto/qce/sha.c                           |   2 +-
 drivers/crypto/qce/skcipher.c                      |   2 +-
 drivers/dma/ti/edma.c                              |   3 +-
 drivers/firmware/Kconfig                           |   2 +-
 drivers/firmware/efi/efi.c                         |   6 +-
 drivers/firmware/efi/libstub/Makefile              |   2 +-
 drivers/firmware/efi/libstub/randomalloc.c         |   3 +
 drivers/firmware/efi/libstub/relocate.c            |   3 +
 drivers/firmware/efi/sysfb_efi.c                   |   2 +-
 drivers/gpio/gpio-aggregator.c                     |  20 +-
 drivers/gpio/gpio-bcm-kona.c                       |  71 +++++--
 drivers/gpio/gpio-mxc.c                            |   3 +-
 drivers/gpio/gpio-pca953x.c                        |  19 --
 drivers/gpio/gpio-rcar.c                           |  31 +--
 drivers/gpio/gpio-stmpe.c                          |  15 +-
 drivers/gpio/gpio-xilinx.c                         |  56 ++---
 drivers/gpio/gpiolib.c                             |  13 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c         |  11 +
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c  |  14 ++
 .../gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c    |   2 +
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c |   1 -
 .../drm/arm/display/komeda/komeda_wb_connector.c   |   4 +
 drivers/gpu/drm/drm_dp_cec.c                       |  14 +-
 drivers/gpu/drm/drm_fb_helper.c                    |  14 +-
 drivers/gpu/drm/drm_probe_helper.c                 | 116 ++++++++---
 drivers/gpu/drm/etnaviv/etnaviv_gem.c              |  16 +-
 drivers/gpu/drm/i915/display/skl_universal_plane.c |   4 -
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c      |   4 +-
 drivers/gpu/drm/radeon/r300.c                      |   3 +-
 drivers/gpu/drm/radeon/radeon_asic.h               |   1 +
 drivers/gpu/drm/radeon/rs400.c                     |  18 +-
 drivers/gpu/drm/rockchip/cdn-dp-core.c             |   9 +-
 drivers/gpu/drm/scheduler/gpu_scheduler_trace.h    |   4 +-
 drivers/gpu/drm/tidss/tidss_dispc.c                |  22 +-
 drivers/gpu/drm/v3d/v3d_perfmon.c                  |   5 +
 drivers/hid/hid-appleir.c                          |   2 +-
 drivers/hid/hid-core.c                             |   2 +
 drivers/hid/hid-google-hammer.c                    |   2 +
 drivers/hid/hid-multitouch.c                       |   7 +-
 drivers/hid/hid-sensor-hub.c                       |  21 +-
 drivers/hid/intel-ish-hid/ishtp-hid.c              |   4 +-
 drivers/hid/wacom_wac.c                            |   5 +
 drivers/hwmon/ad7314.c                             |  10 +
 drivers/hwmon/ntc_thermistor.c                     |  66 +++---
 drivers/hwmon/pmbus/pmbus.c                        |   2 +
 drivers/hwmon/xgene-hwmon.c                        |   2 +-
 drivers/hwtracing/intel_th/pci.c                   |  15 ++
 drivers/i2c/busses/i2c-npcm7xx.c                   |   7 +
 drivers/i2c/i2c-core-acpi.c                        |  22 ++
 drivers/idle/intel_idle.c                          |   4 +
 drivers/iio/light/as73211.c                        |  24 ++-
 drivers/infiniband/hw/cxgb4/device.c               |   6 +-
 drivers/infiniband/hw/mlx4/main.c                  |   6 +-
 drivers/infiniband/hw/mlx5/counters.c              |   8 +-
 drivers/infiniband/hw/mlx5/devx.c                  |   1 -
 drivers/infiniband/hw/mlx5/mr.c                    |  16 +-
 drivers/infiniband/hw/mlx5/odp.c                   |  61 +++---
 drivers/infiniband/hw/mlx5/qp.c                    |   4 +-
 drivers/leds/leds-lp8860.c                         |   2 +-
 drivers/leds/leds-netxbig.c                        |   1 +
 drivers/md/Kconfig                                 |   4 +
 drivers/md/dm-crypt.c                              |  27 +--
 drivers/media/dvb-frontends/cxd2841er.c            |   8 +-
 drivers/media/i2c/ccs/ccs-core.c                   |   6 +-
 drivers/media/i2c/ccs/ccs-data.c                   |  14 +-
 drivers/media/i2c/imx412.c                         |  42 ++--
 drivers/media/i2c/ov5640.c                         |   1 +
 drivers/media/i2c/ov9282.c                         |   2 +-
 drivers/media/platform/exynos4-is/mipi-csis.c      |  10 +-
 drivers/media/platform/imx-jpeg/mxc-jpeg.c         |   7 +-
 drivers/media/platform/marvell-ccic/mcam-core.c    |   7 +-
 drivers/media/platform/s3c-camif/camif-core.c      |  13 +-
 drivers/media/rc/iguanair.c                        |   4 +-
 drivers/media/test-drivers/vidtv/vidtv_bridge.c    |   8 +-
 drivers/media/usb/dvb-usb-v2/lmedm04.c             |  12 +-
 drivers/media/usb/uvc/uvc_ctrl.c                   | 139 ++++++++++---
 drivers/media/usb/uvc/uvc_driver.c                 | 105 +++++-----
 drivers/media/usb/uvc/uvc_queue.c                  |   3 +-
 drivers/media/usb/uvc/uvc_status.c                 |   1 +
 drivers/media/usb/uvc/uvc_v4l2.c                   |   4 +-
 drivers/media/usb/uvc/uvcvideo.h                   |  20 +-
 drivers/media/v4l2-core/v4l2-mc.c                  |   2 +-
 drivers/memory/jedec_ddr.h                         |  47 +++++
 drivers/memory/jedec_ddr_data.c                    |  41 ++++
 drivers/memory/of_memory.c                         |  87 ++++++++
 drivers/memory/of_memory.h                         |   9 +
 drivers/memory/tegra/Kconfig                       |   1 +
 drivers/memory/tegra/tegra20-emc.c                 | 203 ++++++++++++++++--
 drivers/mfd/lpc_ich.c                              |   3 +-
 drivers/misc/eeprom/digsy_mtc_eeprom.c             |   2 +-
 drivers/misc/fastrpc.c                             |   2 +-
 drivers/misc/mei/hw-me-regs.h                      |   2 +
 drivers/misc/mei/pci-me.c                          |   2 +
 drivers/mmc/core/sdio.c                            |   2 +
 drivers/mmc/host/sdhci-msm.c                       |  53 ++++-
 drivers/mtd/hyperbus/hbmc-am654.c                  |  29 +--
 drivers/mtd/hyperbus/hyperbus-core.c               |   8 +-
 drivers/mtd/hyperbus/rpc-if.c                      |   5 +-
 drivers/mtd/nand/onenand/onenand_base.c            |   1 +
 drivers/mtd/nand/raw/cadence-nand-controller.c     |  44 +++-
 drivers/net/caif/caif_virtio.c                     |   2 +-
 drivers/net/can/c_can/c_can_platform.c             |   5 +-
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c    |   4 +-
 drivers/net/ethernet/broadcom/bgmac.h              |   3 +-
 drivers/net/ethernet/broadcom/tg3.c                |  58 ++++++
 drivers/net/ethernet/cadence/macb.h                |   2 +
 drivers/net/ethernet/cadence/macb_main.c           |  12 +-
 drivers/net/ethernet/davicom/dm9000.c              |   3 +-
 drivers/net/ethernet/emulex/benet/be.h             |   2 +-
 drivers/net/ethernet/emulex/benet/be_cmds.c        | 197 +++++++++---------
 drivers/net/ethernet/emulex/benet/be_main.c        |   2 +-
 drivers/net/ethernet/freescale/enetc/enetc.c       |  69 +++++--
 drivers/net/ethernet/freescale/fec_main.c          |  31 ++-
 drivers/net/ethernet/hisilicon/hns3/hnae3.c        |  15 ++
 drivers/net/ethernet/hisilicon/hns3/hnae3.h        |   2 +
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c    |   2 +
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c    |   2 +
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c |   2 +-
 .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c  |   2 +
 drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c     |   2 +-
 .../net/ethernet/mellanox/mlx5/core/lib/clock.c    |  24 ++-
 drivers/net/ethernet/mellanox/mlx5/core/mr.c       |   1 -
 drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c  |   2 +-
 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c    |   2 -
 .../net/ethernet/mellanox/mlxsw/spectrum_ethtool.c |   4 +-
 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c      |   2 +
 drivers/net/ethernet/renesas/sh_eth.c              |   4 +
 drivers/net/ethernet/ti/am65-cpsw-nuss.c           |   2 +-
 drivers/net/geneve.c                               |  16 +-
 drivers/net/gtp.c                                  |   5 -
 drivers/net/loopback.c                             |  14 ++
 drivers/net/netdevsim/ipsec.c                      |  12 +-
 drivers/net/netdevsim/netdevsim.h                  |   1 +
 drivers/net/netdevsim/udp_tunnels.c                |  23 ++-
 drivers/net/phy/nxp-c45-tja11xx.c                  |   2 +
 drivers/net/ppp/ppp_generic.c                      |  28 ++-
 drivers/net/team/team.c                            |  11 +-
 drivers/net/tun.c                                  |   2 +-
 drivers/net/usb/gl620a.c                           |   4 +-
 drivers/net/usb/rtl8150.c                          |  22 ++
 .../wireless/broadcom/brcm80211/brcmfmac/core.c    |   5 +
 .../broadcom/brcm80211/brcmsmac/phy/phy_n.c        |   3 +
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c       |  13 +-
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c       |   2 +-
 drivers/net/wireless/mediatek/mt76/usb.c           |   4 +-
 drivers/net/wireless/realtek/rtlwifi/base.c        |  42 ++--
 drivers/net/wireless/realtek/rtlwifi/base.h        |   2 -
 drivers/net/wireless/realtek/rtlwifi/pci.c         |  67 +-----
 .../net/wireless/realtek/rtlwifi/rtl8192se/sw.c    |   7 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/fw.h    |   4 +-
 drivers/net/wireless/realtek/rtlwifi/usb.c         |  12 +-
 drivers/net/wireless/realtek/rtlwifi/wifi.h        |  23 ---
 drivers/net/wireless/ti/wlcore/main.c              |  10 +-
 drivers/net/wwan/iosm/iosm_ipc_pcie.c              |  56 ++++-
 drivers/nvme/host/core.c                           |  16 +-
 drivers/nvme/host/ioctl.c                          |   3 +-
 drivers/nvme/host/pci.c                            |   4 +-
 drivers/nvme/target/tcp.c                          |  15 +-
 drivers/nvmem/core.c                               |   2 +
 drivers/nvmem/qcom-spmi-sdam.c                     |   1 +
 drivers/of/base.c                                  |   8 +-
 drivers/of/of_reserved_mem.c                       |   3 +-
 drivers/parport/parport_pc.c                       |   5 +
 drivers/pci/controller/pcie-rcar-ep.c              |   2 +-
 drivers/pci/endpoint/pci-epc-core.c                |   2 +-
 drivers/pci/endpoint/pci-epf-core.c                |   1 +
 drivers/pci/quirks.c                               |   1 +
 drivers/phy/samsung/phy-exynos5-usbdrd.c           |  12 +-
 drivers/phy/tegra/xusb-tegra186.c                  |  11 +
 drivers/platform/x86/acer-wmi.c                    |   4 +
 drivers/platform/x86/thinkpad_acpi.c               |   1 +
 drivers/power/supply/da9150-fg.c                   |   4 +-
 drivers/pps/clients/pps-gpio.c                     |   4 +-
 drivers/pps/clients/pps-ktimer.c                   |   4 +-
 drivers/pps/clients/pps-ldisc.c                    |   6 +-
 drivers/pps/clients/pps_parport.c                  |   4 +-
 drivers/pps/kapi.c                                 |  10 +-
 drivers/pps/kc.c                                   |  10 +-
 drivers/pps/pps.c                                  | 127 ++++++------
 drivers/ptp/ptp_chardev.c                          |   4 +
 drivers/ptp/ptp_clock.c                            |   8 +
 drivers/ptp/ptp_ocp.c                              |   2 +-
 drivers/rapidio/devices/rio_mport_cdev.c           |   3 +-
 drivers/rapidio/rio-scan.c                         |   5 +-
 drivers/regulator/of_regulator.c                   |  14 +-
 drivers/rtc/rtc-pcf85063.c                         |  11 +-
 drivers/s390/char/sclp_early.c                     |   2 +-
 drivers/scsi/mpt3sas/mpt3sas_base.c                |   3 +-
 drivers/scsi/qla2xxx/qla_def.h                     |   2 +
 drivers/scsi/qla2xxx/qla_dfs.c                     | 122 +++++++++--
 drivers/scsi/qla2xxx/qla_gbl.h                     |   3 +
 drivers/scsi/qla2xxx/qla_init.c                    |  28 ++-
 drivers/scsi/scsi_lib.c                            |  58 +++---
 drivers/scsi/storvsc_drv.c                         |   1 +
 drivers/scsi/ufs/ufs_bsg.c                         |   1 +
 drivers/slimbus/messaging.c                        |   5 +-
 drivers/soc/mediatek/mtk-devapc.c                  |  36 ++--
 drivers/soc/qcom/smem_state.c                      |   3 +-
 drivers/soc/qcom/socinfo.c                         |   2 +-
 drivers/spi/spi-mxs.c                              |   3 +-
 drivers/spi/spi-zynq-qspi.c                        |  13 +-
 drivers/staging/media/imx/imx-media-of.c           |   8 +-
 drivers/tee/optee/supp.c                           |  35 +---
 drivers/tty/serial/8250/8250.h                     |   2 +
 drivers/tty/serial/8250/8250_dma.c                 |  16 ++
 drivers/tty/serial/8250/8250_pci.c                 |  10 +
 drivers/tty/serial/8250/8250_port.c                |   9 +
 drivers/tty/serial/sh-sci.c                        |  25 ++-
 drivers/tty/serial/xilinx_uartps.c                 |  10 +-
 drivers/usb/atm/cxacru.c                           |  13 +-
 drivers/usb/chipidea/ci_hdrc_imx.c                 |  38 ++--
 drivers/usb/class/cdc-acm.c                        |  28 ++-
 drivers/usb/core/hub.c                             |  49 ++++-
 drivers/usb/core/quirks.c                          |  10 +
 drivers/usb/dwc2/gadget.c                          |   1 +
 drivers/usb/dwc3/core.c                            | 115 ++++++-----
 drivers/usb/dwc3/core.h                            |   2 +-
 drivers/usb/dwc3/drd.c                             |   4 +-
 drivers/usb/dwc3/gadget.c                          |  47 ++++-
 drivers/usb/gadget/composite.c                     |  17 +-
 drivers/usb/gadget/function/f_midi.c               |  10 +-
 drivers/usb/gadget/function/f_tcm.c                |  66 +++---
 drivers/usb/gadget/udc/renesas_usb3.c              |   2 +-
 drivers/usb/host/pci-quirks.c                      |   9 +
 drivers/usb/host/xhci-mem.c                        |   5 +-
 drivers/usb/host/xhci-pci.c                        |  18 +-
 drivers/usb/host/xhci-ring.c                       |  12 +-
 drivers/usb/host/xhci.c                            |  23 ++-
 drivers/usb/host/xhci.h                            |  11 +-
 drivers/usb/renesas_usbhs/common.c                 |   6 +-
 drivers/usb/renesas_usbhs/mod_gadget.c             |   2 +-
 drivers/usb/roles/class.c                          |   5 +-
 drivers/usb/serial/option.c                        |  49 +++--
 drivers/usb/typec/tcpm/tcpci.c                     |  13 +-
 drivers/usb/typec/tcpm/tcpci_rt1711h.c             |  11 +
 drivers/usb/typec/tcpm/tcpm.c                      |  10 +-
 drivers/usb/typec/ucsi/ucsi.c                      |   2 +-
 drivers/vdpa/mlx5/core/resources.c                 |   1 -
 drivers/vfio/pci/vfio_pci_rdwr.c                   |   1 +
 drivers/vfio/platform/vfio_platform_common.c       |  10 +
 drivers/video/fbdev/omap2/omapfb/dss/dss-of.c      |   1 +
 drivers/virt/acrn/hsm.c                            |   6 +-
 fs/afs/cell.c                                      |   1 +
 fs/afs/dir.c                                       |   7 +-
 fs/afs/internal.h                                  |  23 ++-
 fs/afs/server.c                                    |   1 +
 fs/afs/server_list.c                               | 114 +++++++++-
 fs/afs/vl_alias.c                                  |   2 +-
 fs/afs/volume.c                                    |  40 ++--
 fs/afs/xdr_fs.h                                    |   2 +-
 fs/afs/yfsclient.c                                 |   5 +-
 fs/binfmt_flat.c                                   |   2 +-
 fs/btrfs/file.c                                    |   6 +-
 fs/btrfs/inode.c                                   |   4 +-
 fs/btrfs/relocation.c                              |  14 +-
 fs/btrfs/super.c                                   |   2 +-
 fs/btrfs/transaction.c                             |   4 +-
 fs/cifs/smb2ops.c                                  |   4 +
 fs/exfat/balloc.c                                  |  10 +-
 fs/exfat/exfat_fs.h                                |   2 +-
 fs/exfat/fatent.c                                  |  11 +-
 fs/f2fs/dir.c                                      |  53 +++--
 fs/f2fs/f2fs.h                                     |   6 +-
 fs/f2fs/file.c                                     |  13 ++
 fs/f2fs/inline.c                                   |   5 +-
 fs/file_table.c                                    |  47 ++++-
 fs/inode.c                                         |  39 +++-
 fs/ksmbd/transport_ipc.c                           |   9 +
 fs/nfs/flexfilelayout/flexfilelayout.c             |  27 ++-
 fs/nfs/nfs42proc.c                                 |   2 +-
 fs/nfs/nfs42xdr.c                                  |   2 +
 fs/nfsd/nfs2acl.c                                  |   2 +
 fs/nfsd/nfs3acl.c                                  |   2 +
 fs/nfsd/nfs4callback.c                             |   8 +-
 fs/nilfs2/dir.c                                    |  24 +--
 fs/nilfs2/inode.c                                  |  10 +-
 fs/nilfs2/mdt.c                                    |   6 +-
 fs/nilfs2/namei.c                                  |  37 ++--
 fs/nilfs2/nilfs.h                                  |  10 +-
 fs/nilfs2/page.c                                   |  55 ++---
 fs/nilfs2/page.h                                   |   4 +-
 fs/nilfs2/segment.c                                |   4 +-
 fs/ocfs2/dir.c                                     |  25 ++-
 fs/ocfs2/quota_global.c                            |   5 +
 fs/ocfs2/super.c                                   |   2 +-
 fs/ocfs2/symlink.c                                 |   5 +-
 fs/orangefs/orangefs-debugfs.c                     |   4 +-
 fs/overlayfs/copy_up.c                             |  44 ++--
 fs/overlayfs/dir.c                                 | 100 ++++-----
 fs/overlayfs/inode.c                               |  17 +-
 fs/overlayfs/namei.c                               |   6 +-
 fs/overlayfs/overlayfs.h                           |  96 ++++++---
 fs/overlayfs/readdir.c                             |  32 +--
 fs/overlayfs/super.c                               |  40 ++--
 fs/overlayfs/util.c                                |  18 +-
 fs/proc/proc_sysctl.c                              |   3 +
 fs/pstore/blk.c                                    |   4 +-
 fs/select.c                                        |   4 +-
 fs/squashfs/inode.c                                |   5 +-
 fs/ubifs/debug.c                                   |  22 +-
 fs/xfs/xfs_inode.c                                 |   7 +-
 fs/xfs/xfs_qm_bhv.c                                |  41 ++--
 fs/xfs/xfs_super.c                                 |  11 +-
 include/asm-generic/vmlinux.lds.h                  |   2 +-
 include/drm/drm_probe_helper.h                     |   1 +
 include/linux/cgroup-defs.h                        |   6 +-
 include/linux/efi.h                                |   1 +
 include/linux/fs.h                                 |   6 -
 include/linux/gpio/driver.h                        |  16 ++
 include/linux/i8253.h                              |   1 +
 include/linux/irq.h                                |   2 +
 include/linux/kallsyms.h                           |   2 +-
 include/linux/kvm_host.h                           |   9 +
 include/linux/memblock.h                           |  12 --
 include/linux/mlx5/driver.h                        |   2 -
 include/linux/mtd/hyperbus.h                       |   4 +-
 include/linux/netdevice.h                          |   8 +
 include/linux/pci_ids.h                            |   4 +
 include/linux/pps_kernel.h                         |   3 +-
 include/linux/sched.h                              |   4 +-
 include/linux/sched/sysctl.h                       |  14 +-
 include/linux/sched/task.h                         |   1 +
 include/linux/sysctl.h                             |   6 +
 include/linux/usb/hcd.h                            |   5 +-
 include/linux/usb/tcpm.h                           |   3 +-
 include/net/dst.h                                  |   9 +
 include/net/flow_dissector.h                       |  16 ++
 include/net/flow_offload.h                         |   6 +
 include/net/l3mdev.h                               |   2 +
 include/net/net_namespace.h                        |  15 +-
 include/net/netns/ipv4.h                           |   3 +
 include/net/route.h                                |   9 +-
 include/trace/events/oom.h                         |  36 +++-
 include/uapi/linux/input-event-codes.h             |   1 +
 include/uapi/linux/seg6_iptunnel.h                 |   2 +
 kernel/acct.c                                      | 134 +++++++-----
 kernel/bpf/syscall.c                               |  18 +-
 kernel/cgroup/cgroup.c                             |  20 +-
 kernel/debug/kdb/kdb_io.c                          |   2 +
 kernel/dma/swiotlb.c                               |   2 +-
 kernel/events/core.c                               |  17 +-
 kernel/hung_task.c                                 |  81 +++++++-
 kernel/irq/debugfs.c                               |   1 +
 kernel/irq/internals.h                             |   9 +-
 kernel/padata.c                                    |  45 +++-
 kernel/power/hibernate.c                           |   7 +-
 kernel/printk/printk.c                             |   2 +-
 kernel/sched/core.c                                |  10 +-
 kernel/sched/cpufreq_schedutil.c                   |   4 +-
 kernel/sched/fair.c                                |  23 ++-
 kernel/sched/stats.h                               |  22 +-
 kernel/sysctl.c                                    | 146 ++-----------
 kernel/time/clocksource.c                          |  11 +-
 kernel/trace/bpf_trace.c                           |   2 +-
 kernel/trace/ftrace.c                              |  27 ++-
 lib/Kconfig.debug                                  |   8 +-
 lib/Kconfig.kfence                                 |  12 ++
 lib/cpumask.c                                      |   2 +-
 mm/kfence/core.c                                   |  51 ++++-
 mm/memcontrol.c                                    |   7 +-
 mm/memory.c                                        |   6 +-
 mm/oom_kill.c                                      |  14 +-
 mm/page_alloc.c                                    |   1 +
 mm/percpu.c                                        |   8 +-
 mm/sparse.c                                        |   2 +-
 mm/vmalloc.c                                       |   4 +-
 net/8021q/vlan.c                                   |   3 +-
 net/batman-adv/bat_v.c                             |   2 -
 net/batman-adv/bat_v_elp.c                         | 123 +++++++----
 net/batman-adv/bat_v_elp.h                         |   2 -
 net/batman-adv/types.h                             |   3 -
 net/bluetooth/l2cap_core.c                         |   9 +-
 net/bluetooth/l2cap_sock.c                         |   7 +-
 net/can/j1939/socket.c                             |   4 +-
 net/can/j1939/transport.c                          |   5 +-
 net/core/dev.c                                     |  37 +++-
 net/core/drop_monitor.c                            |  39 ++--
 net/core/flow_dissector.c                          |  49 +++--
 net/core/flow_offload.c                            |   7 +
 net/core/neighbour.c                               |  11 +-
 net/core/skbuff.c                                  |   2 +-
 net/core/sysctl_net_core.c                         |   5 +-
 net/ethtool/netlink.c                              |   2 +-
 net/hsr/hsr_forward.c                              |   7 +-
 net/ipv4/arp.c                                     |   6 +-
 net/ipv4/devinet.c                                 |   3 +-
 net/ipv4/ipmr_base.c                               |   3 -
 net/ipv4/route.c                                   | 102 ++++++---
 net/ipv4/tcp_cubic.c                               |   8 +-
 net/ipv4/tcp_minisocks.c                           |  10 +-
 net/ipv4/tcp_offload.c                             |  11 +-
 net/ipv4/udp.c                                     |   4 +-
 net/ipv4/udp_offload.c                             |   8 +-
 net/ipv6/ila/ila_lwt.c                             |   4 +-
 net/ipv6/mcast.c                                   |  14 +-
 net/ipv6/ndisc.c                                   |  28 +--
 net/ipv6/route.c                                   |   7 +-
 net/ipv6/rpl_iptunnel.c                            |  62 +++---
 net/ipv6/seg6_iptunnel.c                           | 227 +++++++++++++++++---
 net/ipv6/udp.c                                     |   4 +-
 net/llc/llc_s_ac.c                                 |  49 +++--
 net/mptcp/options.c                                |  13 +-
 net/mptcp/pm_netlink.c                             |   6 -
 net/mptcp/protocol.c                               |   1 +
 net/mptcp/protocol.h                               |  30 +--
 net/ncsi/internal.h                                |   2 +
 net/ncsi/ncsi-cmd.c                                |   3 +-
 net/ncsi/ncsi-manage.c                             |  38 +++-
 net/ncsi/ncsi-pkt.h                                |  10 +
 net/ncsi/ncsi-rsp.c                                |  58 ++++--
 net/netfilter/nf_tables_api.c                      |   8 +-
 net/netfilter/nft_flow_offload.c                   |  16 +-
 net/nfc/nci/hci.c                                  |   2 +
 net/openvswitch/datapath.c                         |  12 +-
 net/rose/af_rose.c                                 |  40 ++--
 net/rose/rose_timer.c                              |  15 ++
 net/sched/cls_flower.c                             |   8 +-
 net/sched/sch_api.c                                |   4 +
 net/sched/sch_cake.c                               | 140 +++++++------
 net/sched/sch_fifo.c                               |   3 +
 net/sched/sch_netem.c                              |   2 +-
 net/smc/af_smc.c                                   |   2 +-
 net/smc/smc_rx.c                                   |  37 ++--
 net/smc/smc_rx.h                                   |   8 +-
 net/sunrpc/cache.c                                 |  10 +-
 net/tipc/crypto.c                                  |   4 +-
 net/vmw_vsock/af_vsock.c                           |  82 +++++---
 net/wireless/nl80211.c                             |   5 +
 net/wireless/reg.c                                 |   3 +-
 net/wireless/scan.c                                |  35 ++++
 net/xfrm/xfrm_replay.c                             |  10 +-
 samples/landlock/sandboxer.c                       |   7 +
 scripts/Makefile.extrawarn                         |   5 +-
 scripts/genksyms/genksyms.c                        |  11 +-
 scripts/genksyms/genksyms.h                        |   2 +-
 scripts/genksyms/parse.y                           |  18 +-
 scripts/kconfig/conf.c                             |   6 +
 scripts/kconfig/confdata.c                         | 102 ++++-----
 scripts/kconfig/lkc_proto.h                        |   2 +
 scripts/kconfig/symbol.c                           |  10 +
 security/landlock/fs.c                             |  86 ++++----
 security/safesetid/securityfs.c                    |   3 +
 security/tomoyo/common.c                           |   2 +-
 sound/pci/hda/hda_intel.c                          |   2 +
 sound/pci/hda/patch_conexant.c                     |   1 +
 sound/pci/hda/patch_realtek.c                      |  78 +++++++
 sound/soc/codecs/es8328.c                          |  15 +-
 sound/soc/intel/boards/bytcr_rt5640.c              |  17 +-
 sound/soc/sh/rz-ssi.c                              |   5 +-
 sound/soc/sunxi/sun4i-spdif.c                      |   7 +
 sound/usb/midi.c                                   |   2 +-
 sound/usb/quirks.c                                 |   3 +
 sound/usb/usx2y/usbusx2y.c                         |  11 +
 sound/usb/usx2y/usbusx2y.h                         |  26 +++
 sound/usb/usx2y/usbusx2yaudio.c                    |  27 ---
 tools/bootconfig/main.c                            |   4 +-
 tools/lib/bpf/linker.c                             |  22 +-
 tools/perf/bench/epoll-wait.c                      |   7 +-
 tools/perf/builtin-report.c                        |   2 +-
 tools/perf/builtin-top.c                           |   2 +-
 tools/perf/builtin-trace.c                         |   6 +-
 tools/perf/util/bpf-event.c                        |  10 +-
 tools/perf/util/env.c                              |  13 +-
 tools/perf/util/env.h                              |   4 +-
 tools/perf/util/header.c                           |   8 +-
 .../cpupower/utils/idle_monitor/mperf_monitor.c    |  15 +-
 tools/testing/ktest/ktest.pl                       |   7 +-
 tools/testing/selftests/bpf/test_tc_tunnel.sh      |   1 +
 .../drivers/net/netdevsim/udp_tunnel_nic.sh        |  16 +-
 tools/testing/selftests/kselftest_harness.h        |  24 +--
 tools/testing/selftests/landlock/fs_test.c         |   3 +-
 tools/testing/selftests/net/ipsec.c                |   3 +-
 tools/testing/selftests/net/pmtu.sh                | 229 ++++++++++++++++++++-
 tools/testing/selftests/net/rtnetlink.sh           |   4 +-
 tools/testing/selftests/net/udpgso.c               |  26 +++
 611 files changed, 7032 insertions(+), 3364 deletions(-)
author maintainer
#1 lore raw

PATCH 1/620 afs: Fix EEXIST error returned from afs_rmdir() to be ENOTEMPTY

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: David Howells <[email protected]>

[ Upstream commit b49194da2aff2c879dec9c59ef8dec0f2b0809ef ]

AFS servers pass back a code indicating EEXIST when they're asked to remove a directory that is not empty rather than ENOTEMPTY because not all the systems that an AFS server can run on have the latter error available and AFS preexisted the addition of that error in general.

Fix afs_rmdir() to translate EEXIST to ENOTEMPTY.

---
 fs/afs/dir.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
fs/afs/dir.c +6 -1
index cec18f9f8bd7a..d4bd6efc8c447 100644
@@ -1493,7 +1493,12 @@ static int afs_rmdir(struct inode *dir, struct dentry *dentry)
 		op->file[1].vnode = vnode;
 	}
 
-	return afs_do_sync_operation(op);
+	ret = afs_do_sync_operation(op);
+
+	/* Not all systems that can host afs servers have ENOTEMPTY. */
+	if (ret == -EEXIST)
+		ret = -ENOTEMPTY;
+	return ret;
 
 error:
 	return afs_put_operation(op);
Signature · 1 line
2.39.5
author maintainer
#2 lore raw

PATCH 2/620 afs: Fix directory format encoding struct

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: David Howells <[email protected]>

[ Upstream commit 07a10767853adcbdbf436dc91393b729b52c4e81 ]

The AFS directory format structure, union afs_xdr_dir_block::meta, has too many alloc counter slots declared and so pushes the hash table along and over the data. This doesn't cause a problem at the moment because I'm currently ignoring the hash table and only using the correct number of alloc_ctrs in the code anyway. In future, however, I should start using the hash table to try and speed up afs_lookup().

Fix this by using the correct constant to declare the counter array.

Fixes 4ea219a839bf ("afs: Split the directory content defs into a header")
cc Marc Dionne <[email protected]>
---
 fs/afs/xdr_fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/afs/xdr_fs.h +1 -1
index 8ca8681645077..cc5f143d21a34 100644
@@ -88,7 +88,7 @@ union afs_xdr_dir_block {
 
 	struct {
 		struct afs_xdr_dir_hdr	hdr;
-		u8			alloc_ctrs[AFS_DIR_MAX_BLOCKS];
+		u8			alloc_ctrs[AFS_DIR_BLOCKS_WITH_CTR];
 		__be16			hashtable[AFS_DIR_HASHTBL_SIZE];
 	} meta;
 
Signature · 1 line
2.39.5
author maintainer
#3 lore raw

PATCH 3/620 hung_task: move hung_task sysctl interface to hung_task.c

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Xiaoming Ni <[email protected]>

[ Upstream commit bbe7a10ed83a5fa0b0ff6161ecdc4e65a0e9c993 ]

The kernel/sysctl.c is a kitchen sink where everyone leaves their dirty dishes, this makes it very difficult to maintain.

To help with this maintenance let's start by moving sysctls to places where they actually belong. The proc sysctl maintainers do not want to know what sysctl knobs you wish to add for your own piece of code, we just care about the core logic.

So move hung_task sysctl interface to hung_task.c and use register_sysctl() to register the sysctl interface.

[[email protected]: commit log refresh and fixed 2-3 0day reported compile issues]

Cc Al Viro <[email protected]>
Cc Amir Goldstein <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Benjamin LaHaise <[email protected]>
Cc "Eric W. Biederman" <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Iurii Zaikin <[email protected]>
Cc Jan Kara <[email protected]>
Cc Paul Turner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Qing Wang <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc Stephen Kitt <[email protected]>
Cc Tetsuo Handa <[email protected]>
Cc Antti Palosaari <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Clemens Ladisch <[email protected]>
Cc David Airlie <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Joel Becker <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Joseph Qi <[email protected]>
Cc Julia Lawall <[email protected]>
Cc Lukas Middendorf <[email protected]>
Cc Mark Fasheh <[email protected]>
Cc Phillip Potter <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Douglas Gilbert <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Jani Nikula <[email protected]>
Cc John Ogness <[email protected]>
Cc Martin K. Petersen <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Steven Rostedt (VMware) <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc "Theodore Ts'o" <[email protected]>

Stable-dep-of: d727935cad9f ("fs: fix proc_handler for sysctl_nr_open")

---
 include/linux/sched/sysctl.h | 14 +------
 kernel/hung_task.c           | 81 ++++++++++++++++++++++++++++++++++--
 kernel/sysctl.c              | 61 ---------------------------
 3 files changed, 79 insertions(+), 77 deletions(-)
include/linux/sched/sysctl.h +1 -13
index 304f431178fd9..c19dd5a2c05c6 100644
@@ -7,20 +7,8 @@
 struct ctl_table;
 
 #ifdef CONFIG_DETECT_HUNG_TASK
-
-#ifdef CONFIG_SMP
-extern unsigned int sysctl_hung_task_all_cpu_backtrace;
-#else
-#define sysctl_hung_task_all_cpu_backtrace 0
-#endif /* CONFIG_SMP */
-
-extern int	     sysctl_hung_task_check_count;
-extern unsigned int  sysctl_hung_task_panic;
+/* used for hung_task and block/ */
 extern unsigned long sysctl_hung_task_timeout_secs;
-extern unsigned long sysctl_hung_task_check_interval_secs;
-extern int sysctl_hung_task_warnings;
-int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
-		void *buffer, size_t *lenp, loff_t *ppos);
 #else
 /* Avoid need for ifdefs elsewhere in the code */
 enum { sysctl_hung_task_timeout_secs = 0 };
kernel/hung_task.c +78 -3

108 lines not on this page · raw message

kernel/sysctl.c +0 -61

73 lines not on this page · raw message

Signature · 1 line
2.39.5
author maintainer
#4 lore raw

PATCH 4/620 sysctl: use const for typically used max/min proc sysctls

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Xiaoming Ni <[email protected]>

[ Upstream commit d73840ec2f747b860331bbba53677d0ce38fb9c1 ]

When proc_dointvec_minmax() or proc_doulongvec_minmax() are used we are using the extra1 and extra2 parameters on the sysctl table only for a min and max boundary, these extra1 and extra2 arguments are then used for read-only operations. So make them const to reflect this.

[[email protected]: commit log love]

Cc Al Viro <[email protected]>
Cc Amir Goldstein <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Benjamin LaHaise <[email protected]>
Cc "Eric W. Biederman" <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Iurii Zaikin <[email protected]>
Cc Jan Kara <[email protected]>
Cc Kees Cook <[email protected]>
Cc Paul Turner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Petr Mladek <[email protected]>
Cc Qing Wang <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc Stephen Kitt <[email protected]>
Cc Tetsuo Handa <[email protected]>
Cc Antti Palosaari <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Clemens Ladisch <[email protected]>
Cc David Airlie <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Joel Becker <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Joseph Qi <[email protected]>
Cc Julia Lawall <[email protected]>
Cc Lukas Middendorf <[email protected]>
Cc Mark Fasheh <[email protected]>
Cc Phillip Potter <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Douglas Gilbert <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Jani Nikula <[email protected]>
Cc John Ogness <[email protected]>
Cc Martin K. Petersen <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Steven Rostedt (VMware) <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc "Theodore Ts'o" <[email protected]>

Stable-dep-of: d727935cad9f ("fs: fix proc_handler for sysctl_nr_open")

---
 kernel/sysctl.c | 53 ++++++++++++++++++++++++-------------------------
 1 file changed, 26 insertions(+), 27 deletions(-)
kernel/sysctl.c +26 -27
index 0a84cb7a8bffe..48eb4e7b72dea 100644
@@ -113,27 +113,26 @@
 static int sixty = 60;
 #endif
 
-static unsigned long zero_ul;
-static unsigned long one_ul = 1;
-static unsigned long long_max = LONG_MAX;
+static const unsigned long zero_ul;
+static const unsigned long one_ul = 1;
+static const unsigned long long_max = LONG_MAX;
 #ifdef CONFIG_PRINTK
-static int ten_thousand = 10000;
+static const int ten_thousand = 10000;
 #endif
 #ifdef CONFIG_PERF_EVENTS
-static int six_hundred_forty_kb = 640 * 1024;
+static const int six_hundred_forty_kb = 640 * 1024;
 #endif
 
 /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
-static unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
+static const unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
 
 /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
-static int maxolduid = 65535;
-static int minolduid;
+static const int maxolduid = 65535;
+static const int minolduid;
 
 static int ngroups_max = NGROUPS_MAX;
 static const int cap_last_cap = CAP_LAST_CAP;
 
-
 #ifdef CONFIG_INOTIFY_USER
 #include <linux/inotify.h>
 #endif
@@ -177,8 +176,8 @@ int sysctl_legacy_va_layout;
 #endif
 
 #ifdef CONFIG_COMPACTION
-static int min_extfrag_threshold;
-static int max_extfrag_threshold = 1000;
+static const int min_extfrag_threshold;
+static const int max_extfrag_threshold = 1000;
 #endif
 
 #endif /* CONFIG_SYSCTL */
@@ -2196,8 +2195,8 @@ static struct ctl_table kern_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
-		.extra1		= &minolduid,
-		.extra2		= &maxolduid,
+		.extra1		= (void *)&minolduid,
+		.extra2		= (void *)&maxolduid,
 	},
 	{
 		.procname	= "overflowgid",
@@ -2205,8 +2204,8 @@ static struct ctl_table kern_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
-		.extra1		= &minolduid,
-		.extra2		= &maxolduid,
+		.extra1		= (void *)&minolduid,
+		.extra2		= (void *)&maxolduid,
 	},
 #ifdef CONFIG_S390
 	{
@@ -2269,7 +2268,7 @@ static struct ctl_table kern_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
 		.extra1		= SYSCTL_ZERO,
-		.extra2		= &ten_thousand,
+		.extra2		= (void *)&ten_thousand,
 	},
 	{
 		.procname	= "printk_devkmsg",
@@ -2571,7 +2570,7 @@ static struct ctl_table kern_table[] = {
 		.mode		= 0644,
 		.proc_handler	= perf_event_max_stack_handler,
 		.extra1		= SYSCTL_ZERO,
-		.extra2		= &six_hundred_forty_kb,
+		.extra2		= (void *)&six_hundred_forty_kb,
 	},
 	{
 		.procname	= "perf_event_max_contexts_per_stack",
@@ -2727,7 +2726,7 @@ static struct ctl_table vm_table[] = {
 		.maxlen		= sizeof(dirty_background_bytes),
 		.mode		= 0644,
 		.proc_handler	= dirty_background_bytes_handler,
-		.extra1		= &one_ul,
+		.extra1		= (void *)&one_ul,
 	},
 	{
 		.procname	= "dirty_ratio",
@@ -2744,7 +2743,7 @@ static struct ctl_table vm_table[] = {
 		.maxlen		= sizeof(vm_dirty_bytes),
 		.mode		= 0644,
 		.proc_handler	= dirty_bytes_handler,
-		.extra1		= &dirty_bytes_min,
+		.extra1		= (void *)&dirty_bytes_min,
 	},
 	{
 		.procname	= "dirty_writeback_centisecs",
@@ -2860,8 +2859,8 @@ static struct ctl_table vm_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
-		.extra1		= &min_extfrag_threshold,
-		.extra2		= &max_extfrag_threshold,
+		.extra1		= (void *)&min_extfrag_threshold,
+		.extra2		= (void *)&max_extfrag_threshold,
 	},
 	{
 		.procname	= "compact_unevictable_allowed",
@@ -3147,8 +3146,8 @@ static struct ctl_table fs_table[] = {
 		.maxlen		= sizeof(files_stat.max_files),
 		.mode		= 0644,
 		.proc_handler	= proc_doulongvec_minmax,
-		.extra1		= &zero_ul,
-		.extra2		= &long_max,
+		.extra1		= (void *)&zero_ul,
+		.extra2		= (void *)&long_max,
 	},
 	{
 		.procname	= "nr_open",
@@ -3172,8 +3171,8 @@ static struct ctl_table fs_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
-		.extra1		= &minolduid,
-		.extra2		= &maxolduid,
+		.extra1		= (void *)&minolduid,
+		.extra2		= (void *)&maxolduid,
 	},
 	{
 		.procname	= "overflowgid",
@@ -3181,8 +3180,8 @@ static struct ctl_table fs_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
-		.extra1		= &minolduid,
-		.extra2		= &maxolduid,
+		.extra1		= (void *)&minolduid,
+		.extra2		= (void *)&maxolduid,
 	},
 #ifdef CONFIG_FILE_LOCKING
 	{
Signature · 1 line
2.39.5
author maintainer
#5 lore raw

PATCH 5/620 sysctl: share unsigned long const values

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Luis Chamberlain <[email protected]>

[ Upstream commit b1f2aff888af54a057c2c3c0d88a13ef5d37b52a ]

Provide a way to share unsigned long values. This will allow others to not have to re-invent these values.

Cc Al Viro <[email protected]>
Cc Amir Goldstein <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Antti Palosaari <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Benjamin LaHaise <[email protected]>
Cc Clemens Ladisch <[email protected]>
Cc David Airlie <[email protected]>
Cc Douglas Gilbert <[email protected]>
Cc Eric Biederman <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Iurii Zaikin <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Jan Kara <[email protected]>
Cc Joel Becker <[email protected]>
Cc John Ogness <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Joseph Qi <[email protected]>
Cc Julia Lawall <[email protected]>
Cc Kees Cook <[email protected]>
Cc Lukas Middendorf <[email protected]>
Cc Mark Fasheh <[email protected]>
Cc Martin K. Petersen <[email protected]>
Cc Paul Turner <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Petr Mladek <[email protected]>
Cc Phillip Potter <[email protected]>
Cc Qing Wang <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc Stephen Kitt <[email protected]>
Cc Steven Rostedt (VMware) <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Tetsuo Handa <[email protected]>
Cc "Theodore Ts'o" <[email protected]>
Cc Xiaoming Ni <[email protected]>

Stable-dep-of: d727935cad9f ("fs: fix proc_handler for sysctl_nr_open")

---
 fs/proc/proc_sysctl.c  | 3 +++
 include/linux/sysctl.h | 6 ++++++
 kernel/sysctl.c        | 9 +++------
 3 files changed, 12 insertions(+), 6 deletions(-)
fs/proc/proc_sysctl.c +3 -0
index 213ea008fe2db..7c5d472b193f8 100644
@@ -29,6 +29,9 @@ static const struct inode_operations proc_sys_dir_operations;
 const int sysctl_vals[] = { -1, 0, 1, 2, 4, 100, 200, 1000, 3000, INT_MAX };
 EXPORT_SYMBOL(sysctl_vals);
 
+const unsigned long sysctl_long_vals[] = { 0, 1, LONG_MAX };
+EXPORT_SYMBOL_GPL(sysctl_long_vals);
+
 /* Support for permanently empty directories */
 
 struct ctl_table sysctl_mount_point[] = {
include/linux/sysctl.h +6 -0
index 32d79ef906e51..3fa5e2713aace 100644
@@ -51,6 +51,12 @@ struct ctl_dir;
 
 extern const int sysctl_vals[];
 
+#define SYSCTL_LONG_ZERO	((void *)&sysctl_long_vals[0])
+#define SYSCTL_LONG_ONE		((void *)&sysctl_long_vals[1])
+#define SYSCTL_LONG_MAX		((void *)&sysctl_long_vals[2])
+
+extern const unsigned long sysctl_long_vals[];
+
 typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer,
 		size_t *lenp, loff_t *ppos);
 
kernel/sysctl.c +3 -6
index 48eb4e7b72dea..05853e7681512 100644
@@ -113,9 +113,6 @@
 static int sixty = 60;
 #endif
 
-static const unsigned long zero_ul;
-static const unsigned long one_ul = 1;
-static const unsigned long long_max = LONG_MAX;
 #ifdef CONFIG_PRINTK
 static const int ten_thousand = 10000;
 #endif
@@ -2726,7 +2723,7 @@ static struct ctl_table vm_table[] = {
 		.maxlen		= sizeof(dirty_background_bytes),
 		.mode		= 0644,
 		.proc_handler	= dirty_background_bytes_handler,
-		.extra1		= (void *)&one_ul,
+		.extra1		= SYSCTL_LONG_ONE,
 	},
 	{
 		.procname	= "dirty_ratio",
@@ -3146,8 +3143,8 @@ static struct ctl_table fs_table[] = {
 		.maxlen		= sizeof(files_stat.max_files),
 		.mode		= 0644,
 		.proc_handler	= proc_doulongvec_minmax,
-		.extra1		= (void *)&zero_ul,
-		.extra2		= (void *)&long_max,
+		.extra1		= SYSCTL_LONG_ZERO,
+		.extra2		= SYSCTL_LONG_MAX,
 	},
 	{
 		.procname	= "nr_open",
Signature · 1 line
2.39.5
author maintainer
#6 lore raw

PATCH 6/620 fs: move inode sysctls to its own file

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Luis Chamberlain <[email protected]>

[ Upstream commit 1d67fe585049d3e2448b997af78c68cbf90ada09 ]

Patch series "sysctl: 4th set of kernel/sysctl cleanups".

This is slimming down the fs uses of kernel/sysctl.c to the point that the next step is to just get rid of the fs base directory for it and move that elsehwere, so that next patch series starts dealing with that to demo how we can end up cleaning up a full base directory from kernel/sysctl.c, one at a time.

This patch (of 9):

kernel/sysctl.c is a kitchen sink where everyone leaves their dirty dishes, this makes it very difficult to maintain.

To help with this maintenance let's start by moving sysctls to places where they actually belong. The proc sysctl maintainers do not want to know what sysctl knobs you wish to add for your own piece of code, we just care about the core logic.

So move the inode sysctls to its own file. Since we are no longer using this outside of fs/ remove the extern declaration of its respective proc helper.

We use early_initcall() as it is the earliest we can use.

Stable-dep-of: d727935cad9f ("fs: fix proc_handler for sysctl_nr_open")

---
 fs/inode.c         | 39 ++++++++++++++++++++++++++++++++-------
 include/linux/fs.h |  3 ---
 kernel/sysctl.c    | 14 --------------
 3 files changed, 32 insertions(+), 24 deletions(-)
fs/inode.c +32 -7
index c7ef50d0fe38b..0a3a14b9ee46f 100644
@@ -67,11 +67,6 @@ const struct address_space_operations empty_aops = {
 };
 EXPORT_SYMBOL(empty_aops);
 
-/*
- * Statistics gathering..
- */
-struct inodes_stat_t inodes_stat;
-
 static DEFINE_PER_CPU(unsigned long, nr_inodes);
 static DEFINE_PER_CPU(unsigned long, nr_unused);
 
@@ -106,13 +101,43 @@ long get_nr_dirty_inodes(void)
  * Handle nr_inode sysctl
  */
 #ifdef CONFIG_SYSCTL
-int proc_nr_inodes(struct ctl_table *table, int write,
-		   void *buffer, size_t *lenp, loff_t *ppos)
+/*
+ * Statistics gathering..
+ */
+static struct inodes_stat_t inodes_stat;
+
+static int proc_nr_inodes(struct ctl_table *table, int write, void *buffer,
+			  size_t *lenp, loff_t *ppos)
 {
 	inodes_stat.nr_inodes = get_nr_inodes();
 	inodes_stat.nr_unused = get_nr_inodes_unused();
 	return proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
 }
+
+static struct ctl_table inodes_sysctls[] = {
+	{
+		.procname	= "inode-nr",
+		.data		= &inodes_stat,
+		.maxlen		= 2*sizeof(long),
+		.mode		= 0444,
+		.proc_handler	= proc_nr_inodes,
+	},
+	{
+		.procname	= "inode-state",
+		.data		= &inodes_stat,
+		.maxlen		= 7*sizeof(long),
+		.mode		= 0444,
+		.proc_handler	= proc_nr_inodes,
+	},
+	{ }
+};
+
+static int __init init_fs_inode_sysctls(void)
+{
+	register_sysctl_init("fs", inodes_sysctls);
+	return 0;
+}
+early_initcall(init_fs_inode_sysctls);
 #endif
 
 static int no_open(struct inode *inode, struct file *file)
include/linux/fs.h +0 -3
index 2ef0e48c89ec4..2af01758a1abf 100644
@@ -81,7 +81,6 @@ extern void __init files_maxfiles_init(void);
 extern struct files_stat_struct files_stat;
 extern unsigned long get_max_files(void);
 extern unsigned int sysctl_nr_open;
-extern struct inodes_stat_t inodes_stat;
 extern int leases_enable, lease_break_time;
 extern int sysctl_protected_symlinks;
 extern int sysctl_protected_hardlinks;
@@ -3674,8 +3673,6 @@ int proc_nr_files(struct ctl_table *table, int write,
 		  void *buffer, size_t *lenp, loff_t *ppos);
 int proc_nr_dentry(struct ctl_table *table, int write,
 		  void *buffer, size_t *lenp, loff_t *ppos);
-int proc_nr_inodes(struct ctl_table *table, int write,
-		   void *buffer, size_t *lenp, loff_t *ppos);
 int __init list_bdev_fs_names(char *buf, size_t size);
 
 #define __FMODE_EXEC		((__force int) FMODE_EXEC)
kernel/sysctl.c +0 -14
index 05853e7681512..a491d145acc31 100644
@@ -3116,20 +3116,6 @@ static struct ctl_table vm_table[] = {
 };
 
 static struct ctl_table fs_table[] = {
-	{
-		.procname	= "inode-nr",
-		.data		= &inodes_stat,
-		.maxlen		= 2*sizeof(long),
-		.mode		= 0444,
-		.proc_handler	= proc_nr_inodes,
-	},
-	{
-		.procname	= "inode-state",
-		.data		= &inodes_stat,
-		.maxlen		= 7*sizeof(long),
-		.mode		= 0444,
-		.proc_handler	= proc_nr_inodes,
-	},
 	{
 		.procname	= "file-nr",
 		.data		= &files_stat,
Signature · 1 line
2.39.5
author maintainer
#7 lore raw

PATCH 7/620 fs: move fs stat sysctls to file_table.c

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Luis Chamberlain <[email protected]>

[ Upstream commit 204d5a24e15562b2816825c0f9b49d26814b77be ]

kernel/sysctl.c is a kitchen sink where everyone leaves their dirty dishes, this makes it very difficult to maintain.

To help with this maintenance let's start by moving sysctls to places where they actually belong. The proc sysctl maintainers do not want to know what sysctl knobs you wish to add for your own piece of code, we just care about the core logic.

We can create the sysctl dynamically on early init for fs stat to help with this clutter. This dusts off the fs stat syctls knobs and puts them into where they are declared.

Cc Al Viro <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Antti Palosaari <[email protected]>
Cc Eric Biederman <[email protected]>
Cc Iurii Zaikin <[email protected]>
Cc "J. Bruce Fields" <[email protected]>
Cc Jeff Layton <[email protected]>
Cc Kees Cook <[email protected]>
Cc Lukas Middendorf <[email protected]>
Cc Stephen Kitt <[email protected]>
Cc Xiaoming Ni <[email protected]>

Stable-dep-of: d727935cad9f ("fs: fix proc_handler for sysctl_nr_open")

---
 fs/file_table.c    | 47 ++++++++++++++++++++++++++++++++++++++--------
 include/linux/fs.h |  3 ---
 kernel/sysctl.c    | 25 ------------------------
 3 files changed, 39 insertions(+), 36 deletions(-)
fs/file_table.c +39 -8
index 6f297f9782fc5..a8d4a2fb9c67f 100644
@@ -33,7 +33,7 @@
 #include "internal.h"
 
 /* sysctl tunables... */
-struct files_stat_struct files_stat = {
+static struct files_stat_struct files_stat = {
 	.max_files = NR_FILE
 };
 
@@ -75,22 +75,53 @@ unsigned long get_max_files(void)
 }
 EXPORT_SYMBOL_GPL(get_max_files);
 
+#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
+
 /*
  * Handle nr_files sysctl
  */
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
-int proc_nr_files(struct ctl_table *table, int write,
-                     void *buffer, size_t *lenp, loff_t *ppos)
+static int proc_nr_files(struct ctl_table *table, int write, void *buffer,
+			 size_t *lenp, loff_t *ppos)
 {
 	files_stat.nr_files = get_nr_files();
 	return proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
 }
-#else
-int proc_nr_files(struct ctl_table *table, int write,
-                     void *buffer, size_t *lenp, loff_t *ppos)
+
+static struct ctl_table fs_stat_sysctls[] = {
+	{
+		.procname	= "file-nr",
+		.data		= &files_stat,
+		.maxlen		= sizeof(files_stat),
+		.mode		= 0444,
+		.proc_handler	= proc_nr_files,
+	},
+	{
+		.procname	= "file-max",
+		.data		= &files_stat.max_files,
+		.maxlen		= sizeof(files_stat.max_files),
+		.mode		= 0644,
+		.proc_handler	= proc_doulongvec_minmax,
+		.extra1		= SYSCTL_LONG_ZERO,
+		.extra2		= SYSCTL_LONG_MAX,
+	},
+	{
+		.procname	= "nr_open",
+		.data		= &sysctl_nr_open,
+		.maxlen		= sizeof(unsigned int),
+		.mode		= 0644,
+		.proc_handler	= proc_dointvec_minmax,
+		.extra1		= &sysctl_nr_open_min,
+		.extra2		= &sysctl_nr_open_max,
+	},
+	{ }
+};
+
+static int __init init_fs_stat_sysctls(void)
 {
-	return -ENOSYS;
+	register_sysctl_init("fs", fs_stat_sysctls);
+	return 0;
 }
+fs_initcall(init_fs_stat_sysctls);
 #endif
 
 static struct file *__alloc_file(int flags, const struct cred *cred)
include/linux/fs.h +0 -3
index 2af01758a1abf..d011dc742e3ef 100644
@@ -78,7 +78,6 @@ extern void __init inode_init_early(void);
 extern void __init files_init(void);
 extern void __init files_maxfiles_init(void);
 
-extern struct files_stat_struct files_stat;
 extern unsigned long get_max_files(void);
 extern unsigned int sysctl_nr_open;
 extern int leases_enable, lease_break_time;
@@ -3669,8 +3668,6 @@ ssize_t simple_attr_write_signed(struct file *file, const char __user *buf,
 				 size_t len, loff_t *ppos);
 
 struct ctl_table;
-int proc_nr_files(struct ctl_table *table, int write,
-		  void *buffer, size_t *lenp, loff_t *ppos);
 int proc_nr_dentry(struct ctl_table *table, int write,
 		  void *buffer, size_t *lenp, loff_t *ppos);
 int __init list_bdev_fs_names(char *buf, size_t size);
kernel/sysctl.c +0 -25
index a491d145acc31..eaf9dd6a2f12f 100644
@@ -3116,31 +3116,6 @@ static struct ctl_table vm_table[] = {
 };
 
 static struct ctl_table fs_table[] = {
-	{
-		.procname	= "file-nr",
-		.data		= &files_stat,
-		.maxlen		= sizeof(files_stat),
-		.mode		= 0444,
-		.proc_handler	= proc_nr_files,
-	},
-	{
-		.procname	= "file-max",
-		.data		= &files_stat.max_files,
-		.maxlen		= sizeof(files_stat.max_files),
-		.mode		= 0644,
-		.proc_handler	= proc_doulongvec_minmax,
-		.extra1		= SYSCTL_LONG_ZERO,
-		.extra2		= SYSCTL_LONG_MAX,
-	},
-	{
-		.procname	= "nr_open",
-		.data		= &sysctl_nr_open,
-		.maxlen		= sizeof(unsigned int),
-		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
-		.extra1		= &sysctl_nr_open_min,
-		.extra2		= &sysctl_nr_open_max,
-	},
 	{
 		.procname	= "dentry-state",
 		.data		= &dentry_stat,
Signature · 1 line
2.39.5
author maintainer
#8 lore raw

PATCH 8/620 fs: fix proc_handler for sysctl_nr_open

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Jinliang Zheng <[email protected]>

[ Upstream commit d727935cad9f6f52c8d184968f9720fdc966c669 ]

Use proc_douintvec_minmax() instead of proc_dointvec_minmax() to handle sysctl_nr_open, because its data type is unsigned int, not int.

Fixes 9b80a184eaad ("fs/file: more unsigned file descriptors")
---
 fs/file_table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/file_table.c +1 -1
index a8d4a2fb9c67f..e03ff9a2c2b1f 100644
@@ -109,7 +109,7 @@ static struct ctl_table fs_stat_sysctls[] = {
 		.data		= &sysctl_nr_open,
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
+		.proc_handler	= proc_douintvec_minmax,
 		.extra1		= &sysctl_nr_open_min,
 		.extra2		= &sysctl_nr_open_max,
 	},
Signature · 1 line
2.39.5
author maintainer
#9 lore raw

PATCH 9/620 block: deprecate autoloading based on dev_t

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Christoph Hellwig <[email protected]>

[ Upstream commit fbdee71bb5d8d054e1bdb5af4c540f2cb86fe296 ]

Make the legacy dev_t based autoloading optional and add a deprecation warning. This kind of autoloading has ceased to be useful about 20 years ago.

Stable-dep-of: 457ef47c08d2 ("block: retry call probe after request_module in blk_request_module")

---
 block/Kconfig | 12 ++++++++++++
 block/bdev.c  |  9 ++++++---
 block/genhd.c |  6 ++++++
 3 files changed, 24 insertions(+), 3 deletions(-)
block/Kconfig +12 -0
index 8e28ae7718bd2..0d415226e3daa 100644
@@ -26,6 +26,18 @@ menuconfig BLOCK
 
 if BLOCK
 
+config BLOCK_LEGACY_AUTOLOAD
+	bool "Legacy autoloading support"
+	help
+	  Enable loading modules and creating block device instances based on
+	  accesses through their device special file.  This is a historic Linux
+	  feature and makes no sense in a udev world where device files are
+	  created on demand.
+
+	  Say N here unless booting or other functionality broke without it, in
+	  which case you should also send a report to your distribution and
+	  [email protected].
+
 config BLK_RQ_ALLOC_TIME
 	bool
 
block/bdev.c +6 -3
index b8599a4088843..85c090ef3bf2c 100644
@@ -736,12 +736,15 @@ struct block_device *blkdev_get_no_open(dev_t dev)
 	struct inode *inode;
 
 	inode = ilookup(blockdev_superblock, dev);
-	if (!inode) {
+	if (!inode && IS_ENABLED(CONFIG_BLOCK_LEGACY_AUTOLOAD)) {
 		blk_request_module(dev);
 		inode = ilookup(blockdev_superblock, dev);
-		if (!inode)
-			return NULL;
+		if (inode)
+			pr_warn_ratelimited(
+"block device autoloading is deprecated. It will be removed in Linux 5.19\n");
 	}
+	if (!inode)
+		return NULL;
 
 	/* switch from the inode reference to a device mode one: */
 	bdev = &BDEV_I(inode)->bdev;
block/genhd.c +6 -0
index 88d1a6385a242..2f66745de5d5a 100644
@@ -182,7 +182,9 @@ static struct blk_major_name {
 	struct blk_major_name *next;
 	int major;
 	char name[16];
+#ifdef CONFIG_BLOCK_LEGACY_AUTOLOAD
 	void (*probe)(dev_t devt);
+#endif
 } *major_names[BLKDEV_MAJOR_HASH_SIZE];
 static DEFINE_MUTEX(major_names_lock);
 static DEFINE_SPINLOCK(major_names_spinlock);
@@ -269,7 +271,9 @@ int __register_blkdev(unsigned int major, const char *name,
 	}
 
 	p->major = major;
+#ifdef CONFIG_BLOCK_LEGACY_AUTOLOAD
 	p->probe = probe;
+#endif
 	strlcpy(p->name, name, sizeof(p->name));
 	p->next = NULL;
 	index = major_to_index(major);
@@ -669,6 +673,7 @@ static ssize_t disk_badblocks_store(struct device *dev,
 	return badblocks_store(disk->bb, page, len, 0);
 }
 
+#ifdef CONFIG_BLOCK_LEGACY_AUTOLOAD
 void blk_request_module(dev_t devt)
 {
 	unsigned int major = MAJOR(devt);
@@ -688,6 +693,7 @@ void blk_request_module(dev_t devt)
 		/* Make old-style 2.4 aliases work */
 		request_module("block-major-%d", MAJOR(devt));
 }
+#endif /* CONFIG_BLOCK_LEGACY_AUTOLOAD */
 
 /*
  * print a full list of all partitions - intended for places where the root
Signature · 1 line
2.39.5
author maintainer
#10 lore raw

PATCH 10/620 block: retry call probe after request_module in blk_request_module

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Yang Erkun <[email protected]>

[ Upstream commit 457ef47c08d2979f3e59ce66267485c3faed70c8 ]

Set kernel config:

CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_LOOP_MIN_COUNT=0

Do latter:

mknod loop0 b 7 0
exec 4<> loop0

Before commit e418de3abcda ("block: switch gendisk lookup to a simple xarray"), lookup_gendisk will first use base_probe to load module loop, and then the retry will call loop_probe to prepare the loop disk. Finally open for this disk will success. However, after this commit, we lose the retry logic, and open will fail with ENXIO. Block device autoloading is deprecated and will be removed soon, but maybe we should keep open success until we really remove it. So, give a retry to fix it.

---
 block/genhd.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
block/genhd.c +17 -5
index 2f66745de5d5a..421e02794614e 100644
@@ -674,7 +674,7 @@ static ssize_t disk_badblocks_store(struct device *dev,
 }
 
 #ifdef CONFIG_BLOCK_LEGACY_AUTOLOAD
-void blk_request_module(dev_t devt)
+static bool blk_probe_dev(dev_t devt)
 {
 	unsigned int major = MAJOR(devt);
 	struct blk_major_name **n;
@@ -684,14 +684,26 @@ void blk_request_module(dev_t devt)
 		if ((*n)->major == major && (*n)->probe) {
 			(*n)->probe(devt);
 			mutex_unlock(&major_names_lock);
-			return;
+			return true;
 		}
 	}
 	mutex_unlock(&major_names_lock);
+	return false;
+}
+
+void blk_request_module(dev_t devt)
+{
+	int error;
+
+	if (blk_probe_dev(devt))
+		return;
 
-	if (request_module("block-major-%d-%d", MAJOR(devt), MINOR(devt)) > 0)
-		/* Make old-style 2.4 aliases work */
-		request_module("block-major-%d", MAJOR(devt));
+	error = request_module("block-major-%d-%d", MAJOR(devt), MINOR(devt));
+	/* Make old-style 2.4 aliases work */
+	if (error > 0)
+		error = request_module("block-major-%d", MAJOR(devt));
+	if (!error)
+		blk_probe_dev(devt);
 }
 #endif /* CONFIG_BLOCK_LEGACY_AUTOLOAD */
 
Signature · 1 line
2.39.5
author maintainer
#11 lore raw

PATCH 11/620 nbd: dont allow reconnect after disconnect

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Yu Kuai <[email protected]>

[ Upstream commit 844b8cdc681612ff24df62cdefddeab5772fadf1 ]

Following process can cause nbd_config UAF:

1) grab nbd_config temporarily;

2) nbd_genl_disconnect() flush all recv_work() and release the initial reference:

nbd_genl_disconnect
nbd_disconnect_and_put

    nbd_disconnect
     flush_workqueue(nbd->recv_workq)
    if (test_and_clear_bit(NBD_RT_HAS_CONFIG_REF, ...))
     nbd_config_put
     -> due to step 1), reference is still not zero

3) nbd_genl_reconfigure() queue recv_work() again;

nbd_genl_reconfigure
config = nbd_get_config_unlocked(nbd)
if (!config)
-> succeed
if (!test_bit(NBD_RT_BOUND, ...))
-> succeed
nbd_reconnect_socket

    queue_work(nbd->recv_workq, &args->work)

4) step 1) release the reference;

5) Finially, recv_work() will trigger UAF:

recv_work
nbd_config_put(nbd)
-> nbd_config is freed
atomic_dec(&config->recv_threads)
-> UAF

Fix the problem by clearing NBD_RT_BOUND in nbd_genl_disconnect(), so that nbd_genl_reconfigure() will fail.

---
 drivers/block/nbd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/block/nbd.c +1 -0
index d12e9f1721c8e..1b04fd7c6b98a 100644
@@ -2055,6 +2055,7 @@ static void nbd_disconnect_and_put(struct nbd_device *nbd)
 	flush_workqueue(nbd->recv_workq);
 	nbd_clear_que(nbd);
 	nbd->task_setup = NULL;
+	clear_bit(NBD_RT_BOUND, &nbd->config->runtime_flags);
 	mutex_unlock(&nbd->config_lock);
 
 	if (test_and_clear_bit(NBD_RT_HAS_CONFIG_REF,
Signature · 1 line
2.39.5
author maintainer
#12 lore raw

PATCH 12/620 pstore/blk: trivial typo fixes

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Eugen Hristev <[email protected]>

[ Upstream commit 542243af7182efaeaf6d0f4643f7de437541a9af ]

Fix trivial typos in comments.

Fixes 2a03ddbde1e1 ("pstore/blk: Move verify_size() macro out of function")
Fixes 17639f67c1d6 ("pstore/blk: Introduce backend for block devices")
---
 fs/pstore/blk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/pstore/blk.c +2 -2
index 6093088de49fd..cb5fe2f28c708 100644
@@ -89,7 +89,7 @@ static struct pstore_device_info *pstore_device_info;
 		_##name_ = check_size(name, alignsize);		\
 	else							\
 		_##name_ = 0;					\
-	/* Synchronize module parameters with resuls. */	\
+	/* Synchronize module parameters with results. */	\
 	name = _##name_ / 1024;					\
 	dev->zone.name = _##name_;				\
 }
@@ -121,7 +121,7 @@ static int __register_pstore_device(struct pstore_device_info *dev)
 	if (pstore_device_info)
 		return -EBUSY;
 
-	/* zero means not limit on which backends to attempt to store. */
+	/* zero means no limit on which backends attempt to store. */
 	if (!dev->flags)
 		dev->flags = UINT_MAX;
 
Signature · 1 line
2.39.5
author maintainer
#13 lore raw

PATCH 13/620 nvme: Add error check for xa_store in nvme_get_effects_log

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Keisuke Nishimura <[email protected]>

[ Upstream commit ac32057acc7f3d7a238dafaa9b2aa2bc9750080e ]

The xa_store() may fail due to memory allocation failure because there is no guarantee that the index csi is already used. This fix adds an error check of the return value of xa_store() in nvme_get_effects_log().

Fixes 1cf7a12e09aa ("nvme: use an xarray to lookup the Commands Supported and Effects log")
---
 drivers/nvme/host/core.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/nvme/host/core.c +6 -2
index 93a19588ae92a..17ba2e59fce26 100644
@@ -2861,7 +2861,7 @@ int nvme_get_log(struct nvme_ctrl *ctrl, u32 nsid, u8 log_page, u8 lsp, u8 csi,
 static int nvme_get_effects_log(struct nvme_ctrl *ctrl, u8 csi,
 				struct nvme_effects_log **log)
 {
-	struct nvme_effects_log	*cel = xa_load(&ctrl->cels, csi);
+	struct nvme_effects_log *old, *cel = xa_load(&ctrl->cels, csi);
 	int ret;
 
 	if (cel)
@@ -2878,7 +2878,11 @@ static int nvme_get_effects_log(struct nvme_ctrl *ctrl, u8 csi,
 		return ret;
 	}
 
-	xa_store(&ctrl->cels, csi, cel, GFP_KERNEL);
+	old = xa_store(&ctrl->cels, csi, cel, GFP_KERNEL);
+	if (xa_is_err(old)) {
+		kfree(cel);
+		return xa_err(old);
+	}
 out:
 	*log = cel;
 	return 0;
Signature · 1 line
2.39.5
author maintainer
#14 lore raw

PATCH 14/620 partitions: ldm: remove the initial kernel-doc notation

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Randy Dunlap <[email protected]>

[ Upstream commit e494e451611a3de6ae95f99e8339210c157d70fb ]

Remove the file's first comment describing what the file is. This comment is not in kernel-doc format so it causes a kernel-doc warning.

ldm.h:13: warning: expecting prototype for ldm(). Prototype was for _FS_PT_LDM_H_() instead

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc Richard Russon (FlatCap) <[email protected]>
Cc Jens Axboe <[email protected]>
---
 block/partitions/ldm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/partitions/ldm.h +1 -1
index 8693704dcf5e9..84a66b51cd2ab 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
-/**
+/*
  * ldm - Part of the Linux-NTFS project.
  *
  * Copyright (C) 2001,2002 Richard Russon <[email protected]>
Signature · 1 line
2.39.5
author maintainer
#15 lore raw

PATCH 15/620 select: Fix unbalanced user_access_end()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Christophe Leroy <[email protected]>

[ Upstream commit 344af27715ddbf357cf76978d674428b88f8e92d ]

While working on implementing user access validation on powerpc I got the following warnings on a pmac32_defconfig build:

	  CC      fs/select.o
	fs/select.o: warning: objtool: sys_pselect6+0x1bc: redundant UACCESS disable
	fs/select.o: warning: objtool: sys_pselect6_time32+0x1bc: redundant UACCESS disable

On powerpc/32s, user_read_access_begin/end() are no-ops, but the failure path has a user_access_end() instead of user_read_access_end() which means an access end without any prior access begin.

Replace that user_access_end() by user_read_access_end().

---
 fs/select.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/select.c +2 -2
index 668a5200503ae..7ce67428582e6 100644
@@ -787,7 +787,7 @@ static inline int get_sigset_argpack(struct sigset_argpack *to,
 	}
 	return 0;
 Efault:
-	user_access_end();
+	user_read_access_end();
 	return -EFAULT;
 }
 
@@ -1360,7 +1360,7 @@ static inline int get_compat_sigset_argpack(struct compat_sigset_argpack *to,
 	}
 	return 0;
 Efault:
-	user_access_end();
+	user_read_access_end();
 	return -EFAULT;
 }
 
Signature · 1 line
2.39.5
author maintainer
#16 lore raw

PATCH 16/620 afs: Fix the fallback handling for the YFS.RemoveFile2 RPC call

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: David Howells <[email protected]>

[ Upstream commit e30458d690f35abb01de8b3cbc09285deb725d00 ]

Fix a pair of bugs in the fallback handling for the YFS.RemoveFile2 RPC call:

(1) Fix the abort code check to also look for RXGEN_OPCODE. The lack of this masks the second bug.

(2) call->server is now not used for ordinary filesystem RPC calls that

     have an operation descriptor.  Fix to use call->op->server instead.
Fixes e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept")
cc Marc Dionne <[email protected]>
---
 fs/afs/yfsclient.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
fs/afs/yfsclient.c +3 -2
index 88ea20e79ae27..b3bc46a112242 100644
@@ -662,8 +662,9 @@ static int yfs_deliver_fs_remove_file2(struct afs_call *call)
 static void yfs_done_fs_remove_file2(struct afs_call *call)
 {
 	if (call->error == -ECONNABORTED &&
-	    call->abort_code == RX_INVALID_OPERATION) {
-		set_bit(AFS_SERVER_FL_NO_RM2, &call->server->flags);
+	    (call->abort_code == RX_INVALID_OPERATION ||
+	     call->abort_code == RXGEN_OPCODE)) {
+		set_bit(AFS_SERVER_FL_NO_RM2, &call->op->server->flags);
 		call->op->flags |= AFS_OPERATION_DOWNGRADE;
 	}
 }
Signature · 1 line
2.39.5
author maintainer
#17 lore raw

PATCH 17/620 sched/psi: Use task->psi_flags to clear in CPU migration

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chengming Zhou <[email protected]>

[ Upstream commit 52b33d87b9197c51e8ffdc61873739d90dd0a16f ]

The commit d583d360a620 ("psi: Fix psi state corruption when schedule() races with cgroup move") fixed a race problem by making cgroup_move_task() use task->psi_flags instead of looking at the scheduler state.

We can extend task->psi_flags usage to CPU migration, which should be a minor optimization for performance and code simplicity.

Stable-dep-of: a430d99e3490 ("sched/fair: Fix value reported by hot tasks pulled in /proc/schedstat")

---
 include/linux/sched.h |  3 ---
 kernel/sched/core.c   |  2 +-
 kernel/sched/stats.h  | 22 ++++------------------
 3 files changed, 5 insertions(+), 22 deletions(-)
include/linux/sched.h +0 -3
index 9b3cfe685cb45..875f3d317b9c8 100644
@@ -874,9 +874,6 @@ struct task_struct {
 	unsigned			sched_reset_on_fork:1;
 	unsigned			sched_contributes_to_load:1;
 	unsigned			sched_migrated:1;
-#ifdef CONFIG_PSI
-	unsigned			sched_psi_wake_requeue:1;
-#endif
 
 	/* Force alignment to the next boundary: */
 	unsigned			:0;
kernel/sched/core.c +1 -1
index ed92b75f7e024..fee8e2a7c7530 100644
@@ -1967,7 +1967,7 @@ static inline void enqueue_task(struct rq *rq, struct task_struct *p, int flags)
 
 	if (!(flags & ENQUEUE_RESTORE)) {
 		sched_info_enqueue(rq, p);
-		psi_enqueue(p, flags & ENQUEUE_WAKEUP);
+		psi_enqueue(p, (flags & ENQUEUE_WAKEUP) && !(flags & ENQUEUE_MIGRATED));
 	}
 
 	uclamp_rq_inc(rq, p);
kernel/sched/stats.h +4 -18
index 975703572bc0d..cee3100c74cd5 100644
@@ -91,11 +91,9 @@ static inline void psi_enqueue(struct task_struct *p, bool wakeup)
 	if (p->in_memstall)
 		set |= TSK_MEMSTALL_RUNNING;
 
-	if (!wakeup || p->sched_psi_wake_requeue) {
+	if (!wakeup) {
 		if (p->in_memstall)
 			set |= TSK_MEMSTALL;
-		if (p->sched_psi_wake_requeue)
-			p->sched_psi_wake_requeue = 0;
 	} else {
 		if (p->in_iowait)
 			clear |= TSK_IOWAIT;
@@ -106,8 +104,6 @@ static inline void psi_enqueue(struct task_struct *p, bool wakeup)
 
 static inline void psi_dequeue(struct task_struct *p, bool sleep)
 {
-	int clear = TSK_RUNNING;
-
 	if (static_branch_likely(&psi_disabled))
 		return;
 
@@ -120,10 +116,7 @@ static inline void psi_dequeue(struct task_struct *p, bool sleep)
 	if (sleep)
 		return;
 
-	if (p->in_memstall)
-		clear |= (TSK_MEMSTALL | TSK_MEMSTALL_RUNNING);
-
-	psi_task_change(p, clear, 0);
+	psi_task_change(p, p->psi_flags, 0);
 }
 
 static inline void psi_ttwu_dequeue(struct task_struct *p)
@@ -135,19 +128,12 @@ static inline void psi_ttwu_dequeue(struct task_struct *p)
 	 * deregister its sleep-persistent psi states from the old
 	 * queue, and let psi_enqueue() know it has to requeue.
 	 */
-	if (unlikely(p->in_iowait || p->in_memstall)) {
+	if (unlikely(p->psi_flags)) {
 		struct rq_flags rf;
 		struct rq *rq;
-		int clear = 0;
-
-		if (p->in_iowait)
-			clear |= TSK_IOWAIT;
-		if (p->in_memstall)
-			clear |= TSK_MEMSTALL;
 
 		rq = __task_rq_lock(p, &rf);
-		psi_task_change(p, clear, 0);
-		p->sched_psi_wake_requeue = 1;
+		psi_task_change(p, p->psi_flags, 0);
 		__task_rq_unlock(rq, &rf);
 	}
 }
Signature · 1 line
2.39.5
author maintainer
#18 lore raw

PATCH 18/620 sched/fair: Fix value reported by hot tasks pulled in /proc/schedstat

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Peter Zijlstra <[email protected]>

[ Upstream commit a430d99e349026d53e2557b7b22bd2ebd61fe12a ]

In /proc/schedstat, lb_hot_gained reports the number hot tasks pulled during load balance. This value is incremented in can_migrate_task() if the task is migratable and hot. After incrementing the value, load balancer can still decide not to migrate this task leading to wrong accounting. Fix this by incrementing stats when hot tasks are detached. This issue only exists in detach_tasks() where we can decide to not migrate hot task even if it is migratable. However, in detach_one_task(), we migrate it unconditionally.

[Swapnil: Handled the case where nr_failed_migrations_hot was not accounted properly and wrote commit log]

---
 include/linux/sched.h |  1 +
 kernel/sched/fair.c   | 17 +++++++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)
include/linux/sched.h +1 -0
index 875f3d317b9c8..5d0a44e4db4b5 100644
@@ -874,6 +874,7 @@ struct task_struct {
 	unsigned			sched_reset_on_fork:1;
 	unsigned			sched_contributes_to_load:1;
 	unsigned			sched_migrated:1;
+	unsigned			sched_task_hot:1;
 
 	/* Force alignment to the next boundary: */
 	unsigned			:0;
kernel/sched/fair.c +13 -4
index 4056330d38887..20044e7506ae1 100644
@@ -8022,6 +8022,8 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
 	int tsk_cache_hot;
 
 	lockdep_assert_rq_held(env->src_rq);
+	if (p->sched_task_hot)
+		p->sched_task_hot = 0;
 
 	/*
 	 * We do not migrate tasks that are:
@@ -8094,10 +8096,8 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
 
 	if (tsk_cache_hot <= 0 ||
 	    env->sd->nr_balance_failed > env->sd->cache_nice_tries) {
-		if (tsk_cache_hot == 1) {
-			schedstat_inc(env->sd->lb_hot_gained[env->idle]);
-			schedstat_inc(p->stats.nr_forced_migrations);
-		}
+		if (tsk_cache_hot == 1)
+			p->sched_task_hot = 1;
 		return 1;
 	}
 
@@ -8112,6 +8112,12 @@ static void detach_task(struct task_struct *p, struct lb_env *env)
 {
 	lockdep_assert_rq_held(env->src_rq);
 
+	if (p->sched_task_hot) {
+		p->sched_task_hot = 0;
+		schedstat_inc(env->sd->lb_hot_gained[env->idle]);
+		schedstat_inc(p->stats.nr_forced_migrations);
+	}
+
 	deactivate_task(env->src_rq, p, DEQUEUE_NOCLOCK);
 	set_task_cpu(p, env->dst_cpu);
 }
@@ -8274,6 +8280,9 @@ static int detach_tasks(struct lb_env *env)
 
 		continue;
 next:
+		if (p->sched_task_hot)
+			schedstat_inc(p->stats.nr_failed_migrations_hot);
+
 		list_move(&p->se.group_node, tasks);
 	}
 
Signature · 1 line
2.39.5
author maintainer
#19 lore raw

PATCH 19/620 drm/etnaviv: Fix page property being used for non writecombine buffers

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Sui Jingfeng <[email protected]>

[ Upstream commit 834f304192834d6f0941954f3277ae0ba11a9a86 ]

In the etnaviv_gem_vmap_impl() function, the driver vmap whatever buffers with write combine(WC) page property, this is incorrect. Cached buffers should be mapped with the cached page property and uncached buffers should be mapped with the uncached page property.

Fixes a0a5ab3e99b8 ("drm/etnaviv: call correct function when trying to vmap a DMABUF")
---
 drivers/gpu/drm/etnaviv/etnaviv_gem.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
drivers/gpu/drm/etnaviv/etnaviv_gem.c +14 -2
index 87da2278398ae..1d04232293e58 100644
@@ -340,6 +340,7 @@ void *etnaviv_gem_vmap(struct drm_gem_object *obj)
 static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)
 {
 	struct page **pages;
+	pgprot_t prot;
 
 	lockdep_assert_held(&obj->lock);
 
@@ -347,8 +348,19 @@ static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)
 	if (IS_ERR(pages))
 		return NULL;
 
-	return vmap(pages, obj->base.size >> PAGE_SHIFT,
-			VM_MAP, pgprot_writecombine(PAGE_KERNEL));
+	switch (obj->flags & ETNA_BO_CACHE_MASK) {
+	case ETNA_BO_CACHED:
+		prot = PAGE_KERNEL;
+		break;
+	case ETNA_BO_UNCACHED:
+		prot = pgprot_noncached(PAGE_KERNEL);
+		break;
+	case ETNA_BO_WC:
+	default:
+		prot = pgprot_writecombine(PAGE_KERNEL);
+	}
+
+	return vmap(pages, obj->base.size >> PAGE_SHIFT, VM_MAP, prot);
 }
 
 static inline enum dma_data_direction etnaviv_op_to_dma_dir(u32 op)
Signature · 1 line
2.39.5
author maintainer
#20 lore raw

PATCH 20/620 HID: core: Fix assumption that Resolution Multipliers must be in Logical Collections

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Alan Stern <[email protected]>

commit 64f2657b579343cf923aa933f08074e6258eb07b upstream.

A report in 2019 by the syzbot fuzzer was found to be connected to two errors in the HID core associated with Resolution Multipliers. One of the errors was fixed by commit ea427a222d8b ("HID: core: Fix deadloop in hid_apply_multiplier."), but the other has not been fixed.

This error arises because hid_apply_multipler() assumes that every Resolution Multiplier control is contained in a Logical Collection, i.e., there's no way the routine can ever set multiplier_collection to NULL. This is in spite of the fact that the function starts with a big comment saying:

* "The Resolution Multiplier control must be contained in the same
* Logical Collection as the control(s) to which it is to be applied.
...
* If no Logical Collection is
* defined, the Resolution Multiplier is associated with all
* controls in the report."
* HID Usage Table, v1.12, Section 4.3.1, p30
*
* Thus, search from the current collection upwards until we find a
* logical collection...

The comment and the code overlook the possibility that none of the collections found may be a Logical Collection.

The fix is to set the multiplier_collection pointer to NULL if the collection found isn't a Logical Collection.

Reported-by [email protected]
Cc Peter Hutterer <[email protected]>
Fixes 5a4abb36f312 ("HID: core: process the Resolution Multiplier")
---
 drivers/hid/hid-core.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/hid/hid-core.c +2 -0
@@ -1124,6 +1124,8 @@ static void hid_apply_multiplier(struct
 	while (multiplier_collection->parent_idx != -1 &&
 	       multiplier_collection->type != HID_COLLECTION_LOGICAL)
 		multiplier_collection = &hid->collection[multiplier_collection->parent_idx];
+	if (multiplier_collection->type != HID_COLLECTION_LOGICAL)
+		multiplier_collection = NULL;
 
 	effective_multiplier = hid_calculate_multiplier(hid, multiplier);
 
author maintainer
#21 lore raw

PATCH 21/620 drm/amdgpu: Fix potential NULL pointer dereference in atomctrl_get_smc_sclk_range_table

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Ivan Stepchenko <[email protected]>

[ Upstream commit 357445e28ff004d7f10967aa93ddb4bffa5c3688 ]

The function atomctrl_get_smc_sclk_range_table() does not check the return value of smu_atom_get_data_table(). If smu_atom_get_data_table() fails to retrieve SMU_Info table, it returns NULL which is later dereferenced.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

In practice this should never happen as this code only gets called on polaris chips and the vbios data table will always be present on those chips.

Fixes a23eefa2f461 ("drm/amd/powerplay: enable dpm for baffin.")
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c +2 -0
index cc3b62f733941..1fbd23922082a 100644
@@ -1420,6 +1420,8 @@ int atomctrl_get_smc_sclk_range_table(struct pp_hwmgr *hwmgr, struct pp_atom_ctr
 			GetIndexIntoMasterTable(DATA, SMU_Info),
 			&size, &frev, &crev);
 
+	if (!psmu_info)
+		return -EINVAL;
 
 	for (i = 0; i < psmu_info->ucSclkEntryNum; i++) {
 		table->entry[i].ucVco_setting = psmu_info->asSclkFcwRangeEntry[i].ucVco_setting;
Signature · 1 line
2.39.5
author maintainer
#22 lore raw

PATCH 22/620 genirq: Make handle_enforce_irqctx() unconditionally available

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thomas Gleixner <[email protected]>

[ Upstream commit 8d187a77f04c14fb459a5301d69f733a5a1396bc ]

Commit 1b57d91b969c ("irqchip/gic-v2, v3: Prevent SW resends entirely") sett the flag which enforces interrupt handling in interrupt context and prevents software base resends for ARM GIC v2/v3.

But it missed that the helper function which checks the flag was hidden behind CONFIG_GENERIC_PENDING_IRQ, which is not set by ARM[64].

Make the helper unconditionally available so that the enforcement actually works.

Fixes 1b57d91b969c ("irqchip/gic-v2, v3: Prevent SW resends entirely")
---
 kernel/irq/internals.h | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
kernel/irq/internals.h +3 -6
index f1d83a8b44171..da1f282d5a1d1 100644
@@ -429,10 +429,6 @@ static inline struct cpumask *irq_desc_get_pending_mask(struct irq_desc *desc)
 {
 	return desc->pending_mask;
 }
-static inline bool handle_enforce_irqctx(struct irq_data *data)
-{
-	return irqd_is_handle_enforce_irqctx(data);
-}
 bool irq_fixup_move_pending(struct irq_desc *desc, bool force_clear);
 #else /* CONFIG_GENERIC_PENDING_IRQ */
 static inline bool irq_can_move_pcntxt(struct irq_data *data)
@@ -459,11 +455,12 @@ static inline bool irq_fixup_move_pending(struct irq_desc *desc, bool fclear)
 {
 	return false;
 }
+#endif /* !CONFIG_GENERIC_PENDING_IRQ */
+
 static inline bool handle_enforce_irqctx(struct irq_data *data)
 {
-	return false;
+	return irqd_is_handle_enforce_irqctx(data);
 }
-#endif /* !CONFIG_GENERIC_PENDING_IRQ */
 
 #if !defined(CONFIG_IRQ_DOMAIN) || !defined(CONFIG_IRQ_DOMAIN_HIERARCHY)
 static inline int irq_domain_activate_irq(struct irq_data *data, bool reserve)
Signature · 1 line
2.39.5
author maintainer
#23 lore raw

PATCH 23/620 ipmi: ipmb: Add check devm_kasprintf() returned value

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Charles Han <[email protected]>

[ Upstream commit 2378bd0b264ad3a1f76bd957caf33ee0c7945351 ]

devm_kasprintf() can return a NULL pointer on failure but this returned value is not checked.

Fixes 51bd6f291583 ("Add support for IPMB driver")

Message-ID: <[email protected]>

---
 drivers/char/ipmi/ipmb_dev_int.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/char/ipmi/ipmb_dev_int.c +3 -0
index 49b8f22fdcf03..964bde656f0d3 100644
@@ -322,6 +322,9 @@ static int ipmb_probe(struct i2c_client *client,
 	ipmb_dev->miscdev.name = devm_kasprintf(&client->dev, GFP_KERNEL,
 						"%s%d", "ipmb-",
 						client->adapter->nr);
+	if (!ipmb_dev->miscdev.name)
+		return -ENOMEM;
+
 	ipmb_dev->miscdev.fops = &ipmb_fops;
 	ipmb_dev->miscdev.parent = &client->dev;
 	ret = misc_register(&ipmb_dev->miscdev);
Signature · 1 line
2.39.5
author maintainer
#24 lore raw

PATCH 24/620 wifi: rtlwifi: do not complete firmware loading needlessly

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thadeu Lima de Souza Cascardo <[email protected]>

[ Upstream commit e73e11d303940119e41850a0452a0deda2cc4eb5 ]

The only code waiting for completion is driver removal, which will not be called when probe returns a failure. So this completion is unnecessary.

---
 drivers/net/wireless/realtek/rtlwifi/pci.c | 1 -
 drivers/net/wireless/realtek/rtlwifi/usb.c | 1 -
 2 files changed, 2 deletions(-)
drivers/net/wireless/realtek/rtlwifi/pci.c +0 -1
index 6d9f2a6233a21..70f1cc906502b 100644
@@ -2274,7 +2274,6 @@ int rtl_pci_probe(struct pci_dev *pdev,
 		pci_iounmap(pdev, (void __iomem *)rtlpriv->io.pci_mem_start);
 
 	pci_release_regions(pdev);
-	complete(&rtlpriv->firmware_loading_complete);
 
 fail1:
 	if (hw)
drivers/net/wireless/realtek/rtlwifi/usb.c +0 -1
index a8eebafb9a7ee..c2a3c88ea1fcc 100644
@@ -1085,7 +1085,6 @@ int rtl_usb_probe(struct usb_interface *intf,
 error_out2:
 	_rtl_usb_io_handler_release(hw);
 	usb_put_dev(udev);
-	complete(&rtlpriv->firmware_loading_complete);
 	kfree(rtlpriv->usb_data);
 	ieee80211_free_hw(hw);
 	return -ENODEV;
Signature · 1 line
2.39.5
author maintainer
#25 lore raw

PATCH 25/620 wifi: rtlwifi: rtl8192se: rise completion of firmware loading as last step

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thadeu Lima de Souza Cascardo <[email protected]>

[ Upstream commit 8559a9e0c457729fe3edb3176bbf7c7874f482b0 ]

Just like in commit 4dfde294b979 ("rtlwifi: rise completion at the last step of firmware callback"), only signal completion once the function is finished. Otherwise, the module removal waiting for the completion could free the memory that the callback will still use before returning.

---
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c +4 -3
index 6d352a3161b8f..60d97e73ca28e 100644
@@ -67,22 +67,23 @@ static void rtl92se_fw_cb(const struct firmware *firmware, void *context)
 
 	rtl_dbg(rtlpriv, COMP_ERR, DBG_LOUD,
 		"Firmware callback routine entered!\n");
-	complete(&rtlpriv->firmware_loading_complete);
 	if (!firmware) {
 		pr_err("Firmware %s not available\n", fw_name);
 		rtlpriv->max_fw_size = 0;
-		return;
+		goto exit;
 	}
 	if (firmware->size > rtlpriv->max_fw_size) {
 		pr_err("Firmware is too big!\n");
 		rtlpriv->max_fw_size = 0;
 		release_firmware(firmware);
-		return;
+		goto exit;
 	}
 	pfirmware = (struct rt_firmware *)rtlpriv->rtlhal.pfirmware;
 	memcpy(pfirmware->sz_fw_tmpbuffer, firmware->data, firmware->size);
 	pfirmware->sz_fw_tmpbufferlen = firmware->size;
 	release_firmware(firmware);
+exit:
+	complete(&rtlpriv->firmware_loading_complete);
 }
 
 static int rtl92s_init_sw_vars(struct ieee80211_hw *hw)
Signature · 1 line
2.39.5
author maintainer
#26 lore raw

PATCH 26/620 wifi: rtlwifi: wait for firmware loading before releasing memory

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thadeu Lima de Souza Cascardo <[email protected]>

[ Upstream commit b4b26642b31ef282df6ff7ea8531985edfdef12a ]

At probe error path, the firmware loading work may have already been queued. In such a case, it will try to access memory allocated by the probe function, which is about to be released. In such paths, wait for the firmware worker to finish before releasing memory.

Fixes a7f7c15e945a ("rtlwifi: rtl8192cu: Free ieee80211_hw if probing fails")
---
 drivers/net/wireless/realtek/rtlwifi/usb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/realtek/rtlwifi/usb.c +3 -1
index c2a3c88ea1fcc..038d9bb652b64 100644
@@ -1073,13 +1073,15 @@ int rtl_usb_probe(struct usb_interface *intf,
 	err = ieee80211_register_hw(hw);
 	if (err) {
 		pr_err("Can't register mac80211 hw.\n");
-		goto error_out;
+		goto error_init_vars;
 	}
 	rtlpriv->mac80211.mac80211_registered = 1;
 
 	set_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status);
 	return 0;
 
+error_init_vars:
+	wait_for_completion(&rtlpriv->firmware_loading_complete);
 error_out:
 	rtl_deinit_core(hw);
 error_out2:
Signature · 1 line
2.39.5
author maintainer
#27 lore raw

PATCH 27/620 wifi: rtlwifi: fix init_sw_vars leak when probe fails

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thadeu Lima de Souza Cascardo <[email protected]>

[ Upstream commit 00260350aed80c002df270c805ca443ec9a719a6 ]

If ieee80211_register_hw fails, the memory allocated for the firmware will not be released. Call deinit_sw_vars as the function that undoes the allocationes done by init_sw_vars.

Fixes cefe3dfdb9f5 ("rtl8192cu: Call ieee80211_register_hw from rtl_usb_probe")
---
 drivers/net/wireless/realtek/rtlwifi/usb.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/realtek/rtlwifi/usb.c +1 -0
index 038d9bb652b64..1753eccbefdd9 100644
@@ -1082,6 +1082,7 @@ int rtl_usb_probe(struct usb_interface *intf,
 
 error_init_vars:
 	wait_for_completion(&rtlpriv->firmware_loading_complete);
+	rtlpriv->cfg->ops->deinit_sw_vars(hw);
 error_out:
 	rtl_deinit_core(hw);
 error_out2:
Signature · 1 line
2.39.5
author maintainer
#28 lore raw

PATCH 28/620 wifi: rtlwifi: usb: fix workqueue leak when probe fails

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thadeu Lima de Souza Cascardo <[email protected]>

[ Upstream commit f79bc5c67867c19ce2762e7934c20dbb835ed82c ]

rtl_init_core creates a workqueue that is then assigned to rtl_wq. rtl_deinit_core does not destroy it. It is left to rtl_usb_deinit, which must be called in the probe error path.

Fixes 2ca20f79e0d8 ("rtlwifi: Add usb driver")
Fixes 851639fdaeac ("rtlwifi: Modify some USB de-initialize code.")
---
 drivers/net/wireless/realtek/rtlwifi/usb.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/realtek/rtlwifi/usb.c +1 -0
index 1753eccbefdd9..04590d16874c4 100644
@@ -1084,6 +1084,7 @@ int rtl_usb_probe(struct usb_interface *intf,
 	wait_for_completion(&rtlpriv->firmware_loading_complete);
 	rtlpriv->cfg->ops->deinit_sw_vars(hw);
 error_out:
+	rtl_usb_deinit(hw);
 	rtl_deinit_core(hw);
 error_out2:
 	_rtl_usb_io_handler_release(hw);
Signature · 1 line
2.39.5
author maintainer
#29 lore raw

PATCH 29/620 spi: zynq-qspi: Add check for clk_enable()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Mingwei Zheng <[email protected]>

[ Upstream commit 8332e667099712e05ec87ba2058af394b51ebdc9 ]

Add check for the return value of clk_enable() to catch the potential error.

---
 drivers/spi/spi-zynq-qspi.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/spi/spi-zynq-qspi.c +11 -2
index 78f31b61a2aac..77ea6b5223483 100644
@@ -379,12 +379,21 @@ static int zynq_qspi_setup_op(struct spi_device *spi)
 {
 	struct spi_controller *ctlr = spi->master;
 	struct zynq_qspi *qspi = spi_controller_get_devdata(ctlr);
+	int ret;
 
 	if (ctlr->busy)
 		return -EBUSY;
 
-	clk_enable(qspi->refclk);
-	clk_enable(qspi->pclk);
+	ret = clk_enable(qspi->refclk);
+	if (ret)
+		return ret;
+
+	ret = clk_enable(qspi->pclk);
+	if (ret) {
+		clk_disable(qspi->refclk);
+		return ret;
+	}
+
 	zynq_qspi_write(qspi, ZYNQ_QSPI_ENABLE_OFFSET,
 			ZYNQ_QSPI_ENABLE_ENABLE_MASK);
 
Signature · 1 line
2.39.5
author maintainer
#30 lore raw

PATCH 30/620 dt-bindings: mmc: controller: clarify the address-cells description

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Neil Armstrong <[email protected]>

[ Upstream commit b2b8e93ec00b8110cb37cbde5400d5abfdaed6a7 ]

The term "slot ID" has nothing to do with the SDIO function number which is specified in the reg property of the subnodes, rephrase the description to be more accurate.

Fixes f9b7989859dd ("dt-bindings: mmc: Add YAML schemas for the generic MMC options")

Message-ID: <20241128-topic-amlogic-arm32-upstream-bindings-fixes-convert-meson-mx-sdio-v4-1-11d9f9200a59@linaro.org>

---
 Documentation/devicetree/bindings/mmc/mmc-controller.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/mmc/mmc-controller.yaml +1 -1
index 25ac8e2009708..093bdad8daf82 100644
@@ -25,7 +25,7 @@ properties:
   "#address-cells":
     const: 1
     description: |
-      The cell is the slot ID if a function subnode is used.
+      The cell is the SDIO function number if a function subnode is used.
 
   "#size-cells":
     const: 0
Signature · 1 line
2.39.5
author maintainer
#31 lore raw

PATCH 31/620 spi: dt-bindings: add schema listing peripheral-specific properties

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Pratyush Yadav <[email protected]>

[ Upstream commit 8762b07c95c18fbbe1c6b3eb1e8e686091c346b5 ]

Many SPI controllers need to add properties to peripheral devices. This could be the delay in clock or data lines, etc. These properties are controller specific but need to be defined in the peripheral node because they are per-peripheral and there can be multiple peripherals attached to a controller.

If these properties are not added to the peripheral binding, then the dtbs check emits a warning. But these properties do not make much sense in the peripheral binding because they are controller-specific and they will just pollute every peripheral binding. So this binding is added to collect all such properties from all such controllers. Peripheral bindings should simply refer to this binding and they should be rid of the warnings.

There are some limitations with this approach. Firstly, there is no way to specify required properties. The schema contains properties for all controllers and there is no way to know which controller is being used. Secondly, there is no way to restrict additional properties. Since this schema will be used with an allOf operator, additionalProperties needs to be true. In addition, the peripheral schema will have to set
unevaluatedProperties: false.

Despite these limitations, this appears to be the best solution to this problem that doesn't involve modifying existing tools or schema specs.

Stable-dep-of: 609bc99a4452 ("dt-bindings: leds: class-multicolor: Fix path to color definitions")

---
 .../bindings/spi/spi-controller.yaml          | 69 +--------------
 .../bindings/spi/spi-peripheral-props.yaml    | 87 +++++++++++++++++++
 2 files changed, 89 insertions(+), 67 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
Documentation/devicetree/bindings/spi/spi-controller.yaml +2 -67
index 8246891602e77..36b72518f5654 100644
@@ -94,73 +94,8 @@ patternProperties:
   "^.*@[0-9a-f]+$":
     type: object
 
-    properties:
-      compatible:
-        description:
-          Compatible of the SPI device.
-
-      reg:
-        minItems: 1
-        maxItems: 256
-        items:
-          minimum: 0
-          maximum: 256
-        description:
-          Chip select used by the device.
-
-      spi-3wire:
-        $ref: /schemas/types.yaml#/definitions/flag
-        description:
-          The device requires 3-wire mode.
-
-      spi-cpha:
-        $ref: /schemas/types.yaml#/definitions/flag
-        description:
-          The device requires shifted clock phase (CPHA) mode.
-
-      spi-cpol:
-        $ref: /schemas/types.yaml#/definitions/flag
-        description:
-          The device requires inverse clock polarity (CPOL) mode.
-
-      spi-cs-high:
-        $ref: /schemas/types.yaml#/definitions/flag
-        description:
-          The device requires the chip select active high.
-
-      spi-lsb-first:
-        $ref: /schemas/types.yaml#/definitions/flag
-        description:
-          The device requires the LSB first mode.
-
-      spi-max-frequency:
-        $ref: /schemas/types.yaml#/definitions/uint32
-        description:
-          Maximum SPI clocking speed of the device in Hz.
-
-      spi-rx-bus-width:
-        description:
-          Bus width to the SPI bus used for read transfers.
-          If 0 is provided, then no RX will be possible on this device.
-        $ref: /schemas/types.yaml#/definitions/uint32
-        enum: [0, 1, 2, 4, 8]
-        default: 1
-
-      spi-rx-delay-us:
-        description:
-          Delay, in microseconds, after a read transfer.
-
-      spi-tx-bus-width:
-        description:
-          Bus width to the SPI bus used for write transfers.
-          If 0 is provided, then no TX will be possible on this device.
-        $ref: /schemas/types.yaml#/definitions/uint32
-        enum: [0, 1, 2, 4, 8]
-        default: 1
-
-      spi-tx-delay-us:
-        description:
-          Delay, in microseconds, after a write transfer.
+    allOf:
+      - $ref: spi-peripheral-props.yaml
 
     required:
       - compatible
Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml new file +87 -0

87 lines not on this page · raw message

Signature · 1 line
2.39.5
author maintainer
#32 lore raw

PATCH 32/620 dt-bindings: Another pass removing cases of allOf containing a $ref

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Rob Herring <[email protected]>

[ Upstream commit dca669354e6ff494222dfc461bed1087264f3755 ]

Another pass at removing unnecessary use of 'allOf' with a '$ref'.

json-schema versions draft7 and earlier have a weird behavior in that any keywords combined with a '$ref' are ignored (silently). The correct form was to put a '$ref' under an 'allOf'. This behavior is now changed in the 2019-09 json-schema spec and '$ref' can be mixed with other keywords.

Stable-dep-of: 609bc99a4452 ("dt-bindings: leds: class-multicolor: Fix path to color definitions")

---
 .../bindings/connector/usb-connector.yaml         |  3 +--
 .../bindings/display/brcm,bcm2711-hdmi.yaml       |  3 +--
 .../bindings/display/bridge/adi,adv7511.yaml      |  5 ++---
 .../bindings/display/bridge/synopsys,dw-hdmi.yaml |  5 ++---
 .../bindings/display/panel/display-timings.yaml   |  3 +--
 .../devicetree/bindings/display/ste,mcde.yaml     |  4 ++--
 .../devicetree/bindings/input/adc-joystick.yaml   |  9 ++++-----
 .../bindings/leds/cznic,turris-omnia-leds.yaml    |  3 +--
 .../devicetree/bindings/leds/leds-lp50xx.yaml     |  3 +--
 .../devicetree/bindings/mfd/google,cros-ec.yaml   | 12 ++++--------
 .../bindings/mtd/rockchip,nand-controller.yaml    |  3 +--
 .../devicetree/bindings/net/ti,cpsw-switch.yaml   |  3 +--
 .../bindings/phy/phy-stm32-usbphyc.yaml           |  3 +--
 .../bindings/power/supply/sbs,sbs-manager.yaml    |  4 +---
 .../bindings/remoteproc/ti,k3-r5f-rproc.yaml      |  3 +--
 .../devicetree/bindings/soc/ti/ti,pruss.yaml      | 15 +++------------
 .../devicetree/bindings/sound/st,stm32-sai.yaml   |  3 +--
 .../devicetree/bindings/sound/tlv320adcx140.yaml  | 13 ++++++-------
 .../devicetree/bindings/spi/spi-controller.yaml   |  4 +---
 .../devicetree/bindings/usb/st,stusb160x.yaml     |  4 +---
 20 files changed, 36 insertions(+), 69 deletions(-)
Documentation/devicetree/bindings/connector/usb-connector.yaml +1 -2
index 7eb8659fa610f..0420fa5635322 100644
@@ -104,8 +104,7 @@ properties:
       - "1.5A" and "3.0A", 5V 1.5A and 5V 3.0A respectively, as defined in USB
         Type-C Cable and Connector specification, when Power Delivery is not
         supported.
-    allOf:
-      - $ref: /schemas/types.yaml#/definitions/string
+    $ref: /schemas/types.yaml#/definitions/string
     enum:
       - default
       - 1.5A
Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml +1 -2
index a1d5a32660e0d..a9d34dd7bbc53 100644
@@ -72,8 +72,7 @@ properties:
       - const: hpd-removed
 
   ddc:
-    allOf:
-      - $ref: /schemas/types.yaml#/definitions/phandle
+    $ref: /schemas/types.yaml#/definitions/phandle
     description: >
       Phandle of the I2C controller used for DDC EDID probing
 
Documentation/devicetree/bindings/display/bridge/adi,adv7511.yaml +2 -3
index d3dd7a79b9093..f08a01dfedf3f 100644
@@ -76,9 +76,8 @@ properties:
 
   adi,input-depth:
     description: Number of bits per color component at the input.
-    allOf:
-      - $ref: /schemas/types.yaml#/definitions/uint32
-      - enum: [ 8, 10, 12 ]
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [ 8, 10, 12 ]
 
   adi,input-colorspace:
     description: Input color space.
Documentation/devicetree/bindings/display/bridge/synopsys,dw-hdmi.yaml +2 -3
index 9be44a682e67a..b00246faea57c 100644
@@ -26,9 +26,8 @@ properties:
   reg-io-width:
     description:
       Width (in bytes) of the registers specified by the reg property.
-    allOf:
-      - $ref: /schemas/types.yaml#/definitions/uint32
-      - enum: [1, 4]
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [1, 4]
     default: 1
 
   clocks:
Documentation/devicetree/bindings/display/panel/display-timings.yaml +1 -2
index 56903ded005e5..6d30575819d3b 100644
@@ -31,8 +31,7 @@ properties:
 patternProperties:
   "^timing":
     type: object
-    allOf:
-      - $ref: panel-timing.yaml#
+    $ref: panel-timing.yaml#
 
 additionalProperties: false
 
Documentation/devicetree/bindings/display/ste,mcde.yaml +2 -2
index de0c678b3c294..564ea845c82e0 100644
@@ -58,8 +58,8 @@ patternProperties:
   "^dsi@[0-9a-f]+$":
     description: subnodes for the three DSI host adapters
     type: object
-    allOf:
-      - $ref: dsi-controller.yaml#
+    $ref: dsi-controller.yaml#
+
     properties:
       compatible:
         const: ste,mcde-dsi
Documentation/devicetree/bindings/input/adc-joystick.yaml +4 -5
index 721878d5b7af2..2ee04e03bc224 100644
@@ -61,11 +61,10 @@ patternProperties:
         description: EV_ABS specific event code generated by the axis.
 
       abs-range:
-        allOf:
-          - $ref: /schemas/types.yaml#/definitions/uint32-array
-          - items:
-              - description: minimum value
-              - description: maximum value
+        $ref: /schemas/types.yaml#/definitions/uint32-array
+        items:
+          - description: minimum value
+          - description: maximum value
         description: >
           Minimum and maximum values produced by the axis.
           For an ABS_X axis this will be the left-most and right-most
Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml +1 -2
index c7ed2871da06a..9362b1ef9e88a 100644
@@ -32,8 +32,7 @@ properties:
 patternProperties:
   "^multi-led@[0-9a-b]$":
     type: object
-    allOf:
-      - $ref: leds-class-multicolor.yaml#
+    $ref: leds-class-multicolor.yaml#
     description:
       This node represents one of the RGB LED devices on Turris Omnia.
       No subnodes need to be added for subchannels since this controller only
Documentation/devicetree/bindings/leds/leds-lp50xx.yaml +1 -2
index c192b5feadc76..f12fe5b53f30d 100644
@@ -55,8 +55,7 @@ properties:
 patternProperties:
   '^multi-led@[0-9a-f]$':
     type: object
-    allOf:
-      - $ref: leds-class-multicolor.yaml#
+    $ref: leds-class-multicolor.yaml#
     properties:
       reg:
         minItems: 1
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +4 -8
index d793dd0316b75..546746c2e406d 100644
@@ -39,18 +39,14 @@ properties:
     description:
       This property specifies the delay in usecs between the
       assertion of the CS and the first clock pulse.
-    allOf:
-      - $ref: /schemas/types.yaml#/definitions/uint32
-      - default: 0
-      - minimum: 0
+    $ref: /schemas/types.yaml#/definitions/uint32
+    default: 0
 
   google,cros-ec-spi-msg-delay:
     description:
       This property specifies the delay in usecs between messages.
-    allOf:
-      - $ref: /schemas/types.yaml#/definitions/uint32
-      - default: 0
-      - minimum: 0
+    $ref: /schemas/types.yaml#/definitions/uint32
+    default: 0
 
   google,has-vbc-nvram:
     description:
Documentation/devicetree/bindings/mtd/rockchip,nand-controller.yaml +1 -2
index 0922536b18114..d681a4676f069 100644
@@ -96,8 +96,7 @@ patternProperties:
 
       rockchip,boot-ecc-strength:
         enum: [16, 24, 40, 60, 70]
-        allOf:
-          - $ref: /schemas/types.yaml#/definitions/uint32
+        $ref: /schemas/types.yaml#/definitions/uint32
         description: |
           If specified it indicates that a different BCH/ECC setting is
           supported by the boot ROM.
Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml +1 -2
index 07a00f53adbf9..31bf825c65987 100644
@@ -88,8 +88,7 @@ properties:
         type: object
         description: CPSW external ports
 
-        allOf:
-          - $ref: ethernet-controller.yaml#
+        $ref: ethernet-controller.yaml#
 
         properties:
           reg:
Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml +1 -2
index 3329f1d33a4fe..3da0c4ee45cff 100644
@@ -76,8 +76,7 @@ patternProperties:
 
       connector:
         type: object
-        allOf:
-          - $ref: ../connector/usb-connector.yaml
+        $ref: /schemas/connector/usb-connector.yaml
         properties:
           vbus-supply: true
 
Documentation/devicetree/bindings/power/supply/sbs,sbs-manager.yaml +1 -3
index 72e8f274c791d..99f506d6b0a02 100644
@@ -46,9 +46,7 @@ additionalProperties: false
 patternProperties:
   "^i2c@[1-4]$":
     type: object
-
-    allOf:
-      - $ref: /schemas/i2c/i2c-controller.yaml#
+    $ref: /schemas/i2c/i2c-controller.yaml#
 
 examples:
   - |
Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +1 -2
index 130fbaacc4b15..3daa4b37f4f6d 100644
@@ -94,8 +94,7 @@ patternProperties:
       addresses. Cache and memory access settings are provided through a
       Memory Protection Unit (MPU), programmable only from the R5Fs.
 
-    allOf:
-      - $ref: /schemas/arm/keystone/ti,k3-sci-common.yaml#
+    $ref: /schemas/arm/keystone/ti,k3-sci-common.yaml#
 
     properties:
       compatible:
Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml +3 -12
index 9d128b9e7deb6..64461d4320048 100644
@@ -281,10 +281,7 @@ patternProperties:
       PRUSS INTC Node. Each PRUSS has a single interrupt controller instance
       that is common to all the PRU cores. This should be represented as an
       interrupt-controller node.
-
-    allOf:
-      - $ref: /schemas/interrupt-controller/ti,pruss-intc.yaml#
-
+    $ref: /schemas/interrupt-controller/ti,pruss-intc.yaml#
     type: object
 
   mdio@[a-f0-9]+$:
@@ -292,10 +289,7 @@ patternProperties:
       MDIO Node. Each PRUSS has an MDIO module that can be used to control
       external PHYs. The MDIO module used within the PRU-ICSS is an instance of
       the MDIO Controller used in TI Davinci SoCs.
-
-    allOf:
-      - $ref: /schemas/net/ti,davinci-mdio.yaml#
-
+    $ref: /schemas/net/ti,davinci-mdio.yaml#
     type: object
 
   "^(pru|rtu|txpru)@[0-9a-f]+$":
@@ -305,10 +299,7 @@ patternProperties:
       inactive by using the standard DT string property, "status". The ICSSG IP
       present on K3 SoCs have additional auxiliary PRU cores with slightly
       different IP integration.
-
-    allOf:
-      - $ref: /schemas/remoteproc/ti,pru-rproc.yaml#
-
+    $ref: /schemas/remoteproc/ti,pru-rproc.yaml#
     type: object
 
 required:
Documentation/devicetree/bindings/sound/st,stm32-sai.yaml +1 -2
index f97132400bb60..2c5e237db4995 100644
@@ -113,8 +113,7 @@ patternProperties:
           By default, custom protocol is assumed, meaning that protocol is
           configured according to protocol defined in related DAI link node,
           such as i2s, left justified, right justified, dsp and pdm protocols.
-        allOf:
-          - $ref: /schemas/types.yaml#/definitions/flag
+        $ref: /schemas/types.yaml#/definitions/flag
 
       "#clock-cells":
         description: Configure the SAI device as master clock provider.
Documentation/devicetree/bindings/sound/tlv320adcx140.yaml +6 -7
index d77c8283526d9..2ad17b361db0a 100644
@@ -176,13 +176,12 @@ patternProperties:
        4 - Drive weak low and active high
        5 - Drive Hi-Z and active high
 
-    allOf:
-      - $ref: /schemas/types.yaml#/definitions/uint32-array
-      - minItems: 2
-        maxItems: 2
-        items:
-          maximum: 15
-        default: [2, 2]
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    minItems: 2
+    maxItems: 2
+    items:
+      maximum: 15
+    default: [2, 2]
 
 required:
   - compatible
Documentation/devicetree/bindings/spi/spi-controller.yaml +1 -3
index 36b72518f5654..6d0511a8727f7 100644
@@ -93,9 +93,7 @@ properties:
 patternProperties:
   "^.*@[0-9a-f]+$":
     type: object
-
-    allOf:
-      - $ref: spi-peripheral-props.yaml
+    $ref: spi-peripheral-props.yaml
 
     required:
       - compatible
Documentation/devicetree/bindings/usb/st,stusb160x.yaml +1 -3
index 9a51efa9d101e..35477fc6d9f43 100644
@@ -32,9 +32,7 @@ properties:
 
   connector:
     type: object
-
-    allOf:
-      - $ref: ../connector/usb-connector.yaml
+    $ref: /schemas/connector/usb-connector.yaml#
 
     properties:
       compatible:
Signature · 1 line
2.39.5
author maintainer
#33 lore raw

PATCH 33/620 dt-bindings: leds: Add Qualcomm Light Pulse Generator binding

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Bjorn Andersson <[email protected]>

[ Upstream commit a8e53db46f19f67be6a26488aafb7d10c78e33bd ]

This adds the binding document describing the three hardware blocks related to the Light Pulse Generator found in a wide range of Qualcomm PMICs.

Stable-dep-of: 609bc99a4452 ("dt-bindings: leds: class-multicolor: Fix path to color definitions")

---
 .../bindings/leds/leds-qcom-lpg.yaml          | 173 ++++++++++++++++++
 1 file changed, 173 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml new file +173 -0
new file mode 100644
index 0000000000000..336bd8e10efd3
@@ -0,0 +1,173 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/leds-qcom-lpg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Light Pulse Generator
+
+maintainers:
+  - Bjorn Andersson <[email protected]>
+
+description: >
+  The Qualcomm Light Pulse Generator consists of three different hardware blocks;
+  a ramp generator with lookup table, the light pulse generator and a three
+  channel current sink. These blocks are found in a wide range of Qualcomm PMICs.
+
+properties:
+  compatible:
+    enum:
+      - qcom,pm8150b-lpg
+      - qcom,pm8150l-lpg
+      - qcom,pm8916-pwm
+      - qcom,pm8941-lpg
+      - qcom,pm8994-lpg
+      - qcom,pmc8180c-lpg
+      - qcom,pmi8994-lpg
+      - qcom,pmi8998-lpg
+
+  "#pwm-cells":
+    const: 2
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+  qcom,power-source:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      power-source used to drive the output, as defined in the datasheet.
+      Should be specified if the TRILED block is present
+    enum: [0, 1, 3]
+
+  qcom,dtest:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    description: >
+      A list of integer pairs, where each pair represent the dtest line the
+      particular channel should be connected to and the flags denoting how the
+      value should be outputed, as defined in the datasheet. The number of
+      pairs should be the same as the number of channels.
+    items:
+      items:
+        - description: dtest line to attach
+        - description: flags for the attachment
+
+  multi-led:
+    type: object
+    $ref: leds-class-multicolor.yaml#
+    properties:
+      "#address-cells":
+        const: 1
+
+      "#size-cells":
+        const: 0
+
+    patternProperties:
+      "^led@[0-9a-f]$":
+        type: object
+        $ref: common.yaml#
+
+patternProperties:
+  "^led@[0-9a-f]$":
+    type: object
+    $ref: common.yaml#
+
+    properties:
+      reg: true
+
+    required:
+      - reg
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/leds/common.h>
+
+    led-controller {
+      compatible = "qcom,pmi8994-lpg";
+
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      qcom,power-source = <1>;
+
+      qcom,dtest = <0 0>,
+                   <0 0>,
+                   <0 0>,
+                   <4 1>;
+
+      led@1 {
+        reg = <1>;
+        color = <LED_COLOR_ID_GREEN>;
+        function = LED_FUNCTION_INDICATOR;
+        function-enumerator = <1>;
+      };
+
+      led@2 {
+        reg = <2>;
+        color = <LED_COLOR_ID_GREEN>;
+        function = LED_FUNCTION_INDICATOR;
+        function-enumerator = <0>;
+        default-state = "on";
+      };
+
+      led@3 {
+        reg = <3>;
+        color = <LED_COLOR_ID_GREEN>;
+        function = LED_FUNCTION_INDICATOR;
+        function-enumerator = <2>;
+      };
+
+      led@4 {
+        reg = <4>;
+        color = <LED_COLOR_ID_GREEN>;
+        function = LED_FUNCTION_INDICATOR;
+        function-enumerator = <3>;
+      };
+    };
+  - |
+    #include <dt-bindings/leds/common.h>
+
+    led-controller {
+      compatible = "qcom,pmi8994-lpg";
+
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      qcom,power-source = <1>;
+
+      multi-led {
+        color = <LED_COLOR_ID_RGB>;
+        function = LED_FUNCTION_STATUS;
+
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        led@1 {
+          reg = <1>;
+          color = <LED_COLOR_ID_RED>;
+        };
+
+        led@2 {
+          reg = <2>;
+          color = <LED_COLOR_ID_GREEN>;
+        };
+
+        led@3 {
+          reg = <3>;
+          color = <LED_COLOR_ID_BLUE>;
+        };
+      };
+    };
+  - |
+    pwm-controller {
+      compatible = "qcom,pm8916-pwm";
+      #pwm-cells = <2>;
+    };
+...
Signature · 1 line
2.39.5
author maintainer
#34 lore raw

PATCH 34/620 dt-bindings: leds: Optional multi-led unit address

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Sven Schwermer <[email protected]>

[ Upstream commit 21c0d13e3dd64581bab0ef4b4d0fea7752cc236b ]

The unit address does not make sense in all cases the multi-led node is used, e.g. for the upcoming PWM multi-color LED driver.

Stable-dep-of: 609bc99a4452 ("dt-bindings: leds: class-multicolor: Fix path to color definitions")

---
 .../devicetree/bindings/leds/leds-class-multicolor.yaml         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml +1 -1
index 37445c68cdef9..f41d021ed6774 100644
@@ -20,7 +20,7 @@ description: |
   within this documentation directory.
 
 patternProperties:
-  "^multi-led@([0-9a-f])$":
+  "^multi-led(@[0-9a-f])?$":
     type: object
     description: Represents the LEDs that are to be grouped.
     properties:
Signature · 1 line
2.39.5
author maintainer
#35 lore raw

PATCH 35/620 dt-bindings: leds: Add multicolor PWM LED bindings

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Sven Schwermer <[email protected]>

[ Upstream commit ac123741b8f52311af118f8a052b1cbbed041291 ]

This allows to group multiple PWM-connected monochrome LEDs into multicolor LEDs, e.g. RGB LEDs.

Stable-dep-of: 609bc99a4452 ("dt-bindings: leds: class-multicolor: Fix path to color definitions")

---
 .../bindings/leds/leds-pwm-multicolor.yaml    | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml new file +79 -0
new file mode 100644
index 0000000000000..6625a528f7275
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/leds-pwm-multicolor.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Multi-color LEDs connected to PWM
+
+maintainers:
+  - Sven Schwermer <[email protected]>
+
+description: |
+  This driver combines several monochrome PWM LEDs into one multi-color
+  LED using the multicolor LED class.
+
+properties:
+  compatible:
+    const: pwm-leds-multicolor
+
+  multi-led:
+    type: object
+
+    patternProperties:
+      "^led-[0-9a-z]+$":
+        type: object
+        $ref: common.yaml#
+
+        additionalProperties: false
+
+        properties:
+          pwms:
+            maxItems: 1
+
+          pwm-names: true
+
+          color: true
+
+        required:
+          - pwms
+          - color
+
+required:
+  - compatible
+
+allOf:
+  - $ref: leds-class-multicolor.yaml#
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/leds/common.h>
+
+    led-controller {
+        compatible = "pwm-leds-multicolor";
+
+        multi-led {
+          color = <LED_COLOR_ID_RGB>;
+          function = LED_FUNCTION_INDICATOR;
+          max-brightness = <65535>;
+
+          led-red {
+              pwms = <&pwm1 0 1000000>;
+              color = <LED_COLOR_ID_RED>;
+          };
+
+          led-green {
+              pwms = <&pwm2 0 1000000>;
+              color = <LED_COLOR_ID_GREEN>;
+          };
+
+          led-blue {
+              pwms = <&pwm3 0 1000000>;
+              color = <LED_COLOR_ID_BLUE>;
+          };
+        };
+    };
+
+...
Signature · 1 line
2.39.5
author maintainer
#36 lore raw

PATCH 36/620 dt-bindings: leds: class-multicolor: reference class directly in multi-led node

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Krzysztof Kozlowski <[email protected]>

[ Upstream commit de40c8496ead3e25d1e989999eed0c3ecee8fc96 ]

The leds/common.yaml is referenced directly in each LED node, which leads to people doing the same with leds/leds-class-multicolor.yaml. This is not correct because leds-class-multicolor.yaml defined multi-led property and its children. Some schemas implemented this incorrect.

Rework this to match same behavior common.yaml, so expect the multi-led node to reference the leds-class-multicolor.yaml. Fixing allows to add unevaluatedProperties:false.

Stable-dep-of: 609bc99a4452 ("dt-bindings: leds: class-multicolor: Fix path to color definitions")

---
 .../leds/cznic,turris-omnia-leds.yaml         |  2 ++
 .../bindings/leds/leds-class-multicolor.yaml  | 32 +++++++++----------
 .../devicetree/bindings/leds/leds-lp50xx.yaml |  2 ++
 .../bindings/leds/leds-pwm-multicolor.yaml    |  5 ++-
 .../bindings/leds/leds-qcom-lpg.yaml          |  2 ++
 5 files changed, 24 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml +2 -0
index 9362b1ef9e88a..14bebe1ad8f8a 100644
@@ -33,6 +33,8 @@ patternProperties:
   "^multi-led@[0-9a-b]$":
     type: object
     $ref: leds-class-multicolor.yaml#
+    unevaluatedProperties: false
+
     description:
       This node represents one of the RGB LED devices on Turris Omnia.
       No subnodes need to be added for subchannels since this controller only
Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml +16 -16
index f41d021ed6774..12693483231f7 100644
@@ -19,22 +19,22 @@ description: |
   LED class.  Common LED nodes and properties are inherited from the common.yaml
   within this documentation directory.
 
-patternProperties:
-  "^multi-led(@[0-9a-f])?$":
-    type: object
-    description: Represents the LEDs that are to be grouped.
-    properties:
-      color:
-        description: |
-          For multicolor LED support this property should be defined as either
-          LED_COLOR_ID_RGB or LED_COLOR_ID_MULTI which can be found in
-          include/linux/leds/common.h.
-        enum: [ 8, 9 ]
-
-    $ref: "common.yaml#"
-
-    required:
-      - color
+properties:
+  $nodename:
+    pattern: "^multi-led(@[0-9a-f])?$"
+
+  color:
+    description: |
+      For multicolor LED support this property should be defined as either
+      LED_COLOR_ID_RGB or LED_COLOR_ID_MULTI which can be found in
+      include/linux/leds/common.h.
+    enum: [ 8, 9 ]
+
+required:
+  - color
+
+allOf:
+  - $ref: "common.yaml#"
 
 additionalProperties: true
 
Documentation/devicetree/bindings/leds/leds-lp50xx.yaml +2 -0
index f12fe5b53f30d..64d07fd20eab3 100644
@@ -56,6 +56,8 @@ patternProperties:
   '^multi-led@[0-9a-f]$':
     type: object
     $ref: leds-class-multicolor.yaml#
+    unevaluatedProperties: false
+
     properties:
       reg:
         minItems: 1
Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml +2 -3
index 6625a528f7275..03fc14d1601f3 100644
@@ -19,6 +19,8 @@ properties:
 
   multi-led:
     type: object
+    $ref: leds-class-multicolor.yaml#
+    unevaluatedProperties: false
 
     patternProperties:
       "^led-[0-9a-z]+$":
@@ -42,9 +44,6 @@ properties:
 required:
   - compatible
 
-allOf:
-  - $ref: leds-class-multicolor.yaml#
-
 additionalProperties: false
 
 examples:
Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml +2 -0
index 336bd8e10efd3..6df2838d5f5b3 100644
@@ -57,6 +57,8 @@ properties:
   multi-led:
     type: object
     $ref: leds-class-multicolor.yaml#
+    unevaluatedProperties: false
+
     properties:
       "#address-cells":
         const: 1
Signature · 1 line
2.39.5
author maintainer
#37 lore raw

PATCH 37/620 dt-bindings: leds: class-multicolor: Fix path to color definitions

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 609bc99a4452ffbce82d10f024a85d911c42e6cd ]

The LED color definitions have always been in
include/dt-bindings/leds/common.h in upstream.

---
 .../devicetree/bindings/leds/leds-class-multicolor.yaml         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml +1 -1
index 12693483231f7..71fcd10cb9bc0 100644
@@ -27,7 +27,7 @@ properties:
     description: |
       For multicolor LED support this property should be defined as either
       LED_COLOR_ID_RGB or LED_COLOR_ID_MULTI which can be found in
-      include/linux/leds/common.h.
+      include/dt-bindings/leds/common.h.
     enum: [ 8, 9 ]
 
 required:
Signature · 1 line
2.39.5
author maintainer
#38 lore raw

PATCH 38/620 rtlwifi: replace usage of found with dedicated list iterator variable

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Jakob Koschel <[email protected]>

[ Upstream commit a0ff2a87194a968b9547fd4d824a09092171d1ea ]

To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body.

To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boolean [1].

This removes the need to use a found variable and simply checking if the variable was set, can determine if the break/goto was hit.

Stable-dep-of: 2fdac64c3c35 ("wifi: rtlwifi: remove unused check_buddy_priv")

---
 drivers/net/wireless/realtek/rtlwifi/base.c | 13 ++++++-------
 drivers/net/wireless/realtek/rtlwifi/pci.c  | 15 +++++++--------
 2 files changed, 13 insertions(+), 15 deletions(-)
drivers/net/wireless/realtek/rtlwifi/base.c +6 -7
index ffd150ec181fa..a7ef84f559399 100644
@@ -1994,8 +1994,7 @@ void rtl_collect_scan_list(struct ieee80211_hw *hw, struct sk_buff *skb)
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	unsigned long flags;
 
-	struct rtl_bssid_entry *entry;
-	bool entry_found = false;
+	struct rtl_bssid_entry *entry = NULL, *iter;
 
 	/* check if it is scanning */
 	if (!mac->act_scanning)
@@ -2008,10 +2007,10 @@ void rtl_collect_scan_list(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	spin_lock_irqsave(&rtlpriv->locks.scan_list_lock, flags);
 
-	list_for_each_entry(entry, &rtlpriv->scan_list.list, list) {
-		if (memcmp(entry->bssid, hdr->addr3, ETH_ALEN) == 0) {
-			list_del_init(&entry->list);
-			entry_found = true;
+	list_for_each_entry(iter, &rtlpriv->scan_list.list, list) {
+		if (memcmp(iter->bssid, hdr->addr3, ETH_ALEN) == 0) {
+			list_del_init(&iter->list);
+			entry = iter;
 			rtl_dbg(rtlpriv, COMP_SCAN, DBG_LOUD,
 				"Update BSSID=%pM to scan list (total=%d)\n",
 				hdr->addr3, rtlpriv->scan_list.num);
@@ -2019,7 +2018,7 @@ void rtl_collect_scan_list(struct ieee80211_hw *hw, struct sk_buff *skb)
 		}
 	}
 
-	if (!entry_found) {
+	if (!entry) {
 		entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
 
 		if (!entry)
drivers/net/wireless/realtek/rtlwifi/pci.c +7 -8
index 70f1cc906502b..f17a365fba070 100644
@@ -300,14 +300,13 @@ static bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw,
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
-	bool find_buddy_priv = false;
-	struct rtl_priv *tpriv;
+	struct rtl_priv *tpriv = NULL, *iter;
 	struct rtl_pci_priv *tpcipriv = NULL;
 
 	if (!list_empty(&rtlpriv->glb_var->glb_priv_list)) {
-		list_for_each_entry(tpriv, &rtlpriv->glb_var->glb_priv_list,
+		list_for_each_entry(iter, &rtlpriv->glb_var->glb_priv_list,
 				    list) {
-			tpcipriv = (struct rtl_pci_priv *)tpriv->priv;
+			tpcipriv = (struct rtl_pci_priv *)iter->priv;
 			rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
 				"pcipriv->ndis_adapter.funcnumber %x\n",
 				pcipriv->ndis_adapter.funcnumber);
@@ -321,19 +320,19 @@ static bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw,
 			    tpcipriv->ndis_adapter.devnumber &&
 			    pcipriv->ndis_adapter.funcnumber !=
 			    tpcipriv->ndis_adapter.funcnumber) {
-				find_buddy_priv = true;
+				tpriv = iter;
 				break;
 			}
 		}
 	}
 
 	rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
-		"find_buddy_priv %d\n", find_buddy_priv);
+		"find_buddy_priv %d\n", tpriv != NULL);
 
-	if (find_buddy_priv)
+	if (tpriv)
 		*buddy_priv = tpriv;
 
-	return find_buddy_priv;
+	return tpriv != NULL;
 }
 
 static void rtl_pci_parse_configuration(struct pci_dev *pdev,
Signature · 1 line
2.39.5
author maintainer
#39 lore raw

PATCH 39/620 wifi: rtlwifi: remove unused timer and related code

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dmitry Antipov <[email protected]>

[ Upstream commit 358b94f0a7cadd2ec7824531d54dadaa8b71de04 ]

Drop unused 'dualmac_easyconcurrent_retrytimer' of 'struct rtl_works', corresponding 'rtl_easy_concurrent_retrytimer_callback()' handler, 'dualmac_easy_concurrent' function pointer of 'struct rtl_hal_ops' and related call to 'timer_setup()' in '_rtl_init_deferred_work()'.

Stable-dep-of: 2fdac64c3c35 ("wifi: rtlwifi: remove unused check_buddy_priv")

---
 drivers/net/wireless/realtek/rtlwifi/base.c | 16 +---------------
 drivers/net/wireless/realtek/rtlwifi/base.h |  1 -
 drivers/net/wireless/realtek/rtlwifi/wifi.h |  2 --
 3 files changed, 1 insertion(+), 18 deletions(-)
drivers/net/wireless/realtek/rtlwifi/base.c +1 -15
index a7ef84f559399..e2552bcdc6a02 100644
@@ -452,8 +452,7 @@ static int _rtl_init_deferred_work(struct ieee80211_hw *hw)
 	/* <1> timer */
 	timer_setup(&rtlpriv->works.watchdog_timer,
 		    rtl_watch_dog_timer_callback, 0);
-	timer_setup(&rtlpriv->works.dualmac_easyconcurrent_retrytimer,
-		    rtl_easy_concurrent_retrytimer_callback, 0);
+
 	/* <2> work queue */
 	rtlpriv->works.hw = hw;
 	rtlpriv->works.rtl_wq = wq;
@@ -2365,19 +2364,6 @@ static void rtl_c2hcmd_wq_callback(struct work_struct *work)
 	rtl_c2hcmd_launcher(hw, 1);
 }
 
-void rtl_easy_concurrent_retrytimer_callback(struct timer_list *t)
-{
-	struct rtl_priv *rtlpriv =
-		from_timer(rtlpriv, t, works.dualmac_easyconcurrent_retrytimer);
-	struct ieee80211_hw *hw = rtlpriv->hw;
-	struct rtl_priv *buddy_priv = rtlpriv->buddy_priv;
-
-	if (buddy_priv == NULL)
-		return;
-
-	rtlpriv->cfg->ops->dualmac_easy_concurrent(hw);
-}
-
 /*********************************************************
  *
  * frame process functions
drivers/net/wireless/realtek/rtlwifi/base.h +0 -1
index 0e4f8a8ae3a5f..f081a9a90563f 100644
@@ -124,7 +124,6 @@ int rtl_send_smps_action(struct ieee80211_hw *hw,
 u8 *rtl_find_ie(u8 *data, unsigned int len, u8 ie);
 void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len);
 u8 rtl_tid_to_ac(u8 tid);
-void rtl_easy_concurrent_retrytimer_callback(struct timer_list *t);
 extern struct rtl_global_var rtl_global_var;
 void rtl_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
 
drivers/net/wireless/realtek/rtlwifi/wifi.h +0 -2
index 0bac788ccd6e3..1991cffd3dd4a 100644
@@ -2300,7 +2300,6 @@ struct rtl_hal_ops {
 			  u32 regaddr, u32 bitmask, u32 data);
 	void (*linked_set_reg)(struct ieee80211_hw *hw);
 	void (*chk_switch_dmdp)(struct ieee80211_hw *hw);
-	void (*dualmac_easy_concurrent)(struct ieee80211_hw *hw);
 	void (*dualmac_switch_to_dmdp)(struct ieee80211_hw *hw);
 	bool (*phy_rf6052_config)(struct ieee80211_hw *hw);
 	void (*phy_rf6052_set_cck_txpower)(struct ieee80211_hw *hw,
@@ -2465,7 +2464,6 @@ struct rtl_works {
 
 	/*timer */
 	struct timer_list watchdog_timer;
-	struct timer_list dualmac_easyconcurrent_retrytimer;
 	struct timer_list fw_clockoff_timer;
 	struct timer_list fast_antenna_training_timer;
 	/*task */
Signature · 1 line
2.39.5
author maintainer
#40 lore raw

PATCH 40/620 wifi: rtlwifi: remove unused dualmac control leftovers

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dmitry Antipov <[email protected]>

[ Upstream commit 557123259200b30863e1b6a8f24a8c8060b6fc1d ]

Remove 'struct rtl_dualmac_easy_concurrent_ctl' of 'struct rtl_priv' and related code in '_rtl_pci_tx_chk_waitq()'.

Stable-dep-of: 2fdac64c3c35 ("wifi: rtlwifi: remove unused check_buddy_priv")

---
 drivers/net/wireless/realtek/rtlwifi/pci.c  | 5 -----
 drivers/net/wireless/realtek/rtlwifi/wifi.h | 9 ---------
 2 files changed, 14 deletions(-)
drivers/net/wireless/realtek/rtlwifi/pci.c +0 -5
index f17a365fba070..0dcf5350e0885 100644
@@ -443,11 +443,6 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
 	if (!rtlpriv->rtlhal.earlymode_enable)
 		return;
 
-	if (rtlpriv->dm.supp_phymode_switch &&
-	    (rtlpriv->easy_concurrent_ctl.switch_in_process ||
-	    (rtlpriv->buddy_priv &&
-	    rtlpriv->buddy_priv->easy_concurrent_ctl.switch_in_process)))
-		return;
 	/* we just use em for BE/BK/VI/VO */
 	for (tid = 7; tid >= 0; tid--) {
 		u8 hw_queue = ac_to_hwq[rtl_tid_to_ac(tid)];
drivers/net/wireless/realtek/rtlwifi/wifi.h +0 -9
index 1991cffd3dd4a..d461c22aa9ed7 100644
@@ -2496,14 +2496,6 @@ struct rtl_debug {
 #define MIMO_PS_DYNAMIC			1
 #define MIMO_PS_NOLIMIT			3
 
-struct rtl_dualmac_easy_concurrent_ctl {
-	enum band_type currentbandtype_backfordmdp;
-	bool close_bbandrf_for_dmsp;
-	bool change_to_dmdp;
-	bool change_to_dmsp;
-	bool switch_in_process;
-};
-
 struct rtl_dmsp_ctl {
 	bool activescan_for_slaveofdmsp;
 	bool scan_for_anothermac_fordmsp;
@@ -2744,7 +2736,6 @@ struct rtl_priv {
 	struct list_head list;
 	struct rtl_priv *buddy_priv;
 	struct rtl_global_var *glb_var;
-	struct rtl_dualmac_easy_concurrent_ctl easy_concurrent_ctl;
 	struct rtl_dmsp_ctl dmsp_ctl;
 	struct rtl_locks locks;
 	struct rtl_works works;
Signature · 1 line
2.39.5
author maintainer
#41 lore raw

PATCH 41/620 wifi: rtlwifi: remove unused check_buddy_priv

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thadeu Lima de Souza Cascardo <[email protected]>

[ Upstream commit 2fdac64c3c35858aa8ac5caa70b232e03456e120 ]

Commit 2461c7d60f9f ("rtlwifi: Update header file") introduced a global list of private data structures.

Later on, commit 26634c4b1868 ("rtlwifi Modify existing bits to match vendor version 2013.02.07") started adding the private data to that list at probe time and added a hook, check_buddy_priv to find the private data from a similar device.

However, that function was never used.

Besides, though there is a lock for that list, it is never used. And when the probe fails, the private data is never removed from the list. This would cause a second probe to access freed memory.

Remove the unused hook, structures and members, which will prevent the potential race condition on the list and its corruption during a second probe when probe fails.

Fixes 26634c4b1868 ("rtlwifi Modify existing bits to match vendor version 2013.02.07")
---
 drivers/net/wireless/realtek/rtlwifi/base.c |  7 ----
 drivers/net/wireless/realtek/rtlwifi/base.h |  1 -
 drivers/net/wireless/realtek/rtlwifi/pci.c  | 44 ---------------------
 drivers/net/wireless/realtek/rtlwifi/wifi.h | 12 ------
 4 files changed, 64 deletions(-)
drivers/net/wireless/realtek/rtlwifi/base.c +0 -7
index e2552bcdc6a02..f424d495305a8 100644
@@ -2709,9 +2709,6 @@ MODULE_AUTHOR("Larry Finger	<[email protected]>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek 802.11n PCI wireless core");
 
-struct rtl_global_var rtl_global_var = {};
-EXPORT_SYMBOL_GPL(rtl_global_var);
-
 static int __init rtl_core_module_init(void)
 {
 	BUILD_BUG_ON(TX_PWR_BY_RATE_NUM_RATE < TX_PWR_BY_RATE_NUM_SECTION);
@@ -2725,10 +2722,6 @@ static int __init rtl_core_module_init(void)
 	/* add debugfs */
 	rtl_debugfs_add_topdir();
 
-	/* init some global vars */
-	INIT_LIST_HEAD(&rtl_global_var.glb_priv_list);
-	spin_lock_init(&rtl_global_var.glb_list_lock);
-
 	return 0;
 }
 
drivers/net/wireless/realtek/rtlwifi/base.h +0 -1
index f081a9a90563f..f3a6a43a42eca 100644
@@ -124,7 +124,6 @@ int rtl_send_smps_action(struct ieee80211_hw *hw,
 u8 *rtl_find_ie(u8 *data, unsigned int len, u8 ie);
 void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len);
 u8 rtl_tid_to_ac(u8 tid);
-extern struct rtl_global_var rtl_global_var;
 void rtl_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
 
 #endif
drivers/net/wireless/realtek/rtlwifi/pci.c +0 -44

74 lines not on this page · raw message

drivers/net/wireless/realtek/rtlwifi/wifi.h +0 -12
index d461c22aa9ed7..a8b5db365a30e 100644
@@ -2335,8 +2335,6 @@ struct rtl_intf_ops {
 	void (*read_efuse_byte)(struct ieee80211_hw *hw, u16 _offset, u8 *pbuf);
 	int (*adapter_start)(struct ieee80211_hw *hw);
 	void (*adapter_stop)(struct ieee80211_hw *hw);
-	bool (*check_buddy_priv)(struct ieee80211_hw *hw,
-				 struct rtl_priv **buddy_priv);
 
 	int (*adapter_tx)(struct ieee80211_hw *hw,
 			  struct ieee80211_sta *sta,
@@ -2580,14 +2578,6 @@ struct dig_t {
 	u32 rssi_max;
 };
 
-struct rtl_global_var {
-	/* from this list we can get
-	 * other adapter's rtl_priv
-	 */
-	struct list_head glb_priv_list;
-	spinlock_t glb_list_lock;
-};
-
 #define IN_4WAY_TIMEOUT_TIME	(30 * MSEC_PER_SEC)	/* 30 seconds */
 
 struct rtl_btc_info {
@@ -2733,9 +2723,7 @@ struct rtl_scan_list {
 struct rtl_priv {
 	struct ieee80211_hw *hw;
 	struct completion firmware_loading_complete;
-	struct list_head list;
 	struct rtl_priv *buddy_priv;
-	struct rtl_global_var *glb_var;
 	struct rtl_dmsp_ctl dmsp_ctl;
 	struct rtl_locks locks;
 	struct rtl_works works;
Signature · 1 line
2.39.5
author maintainer
#42 lore raw

PATCH 42/620 wifi: rtlwifi: destroy workqueue at rtl_deinit_core

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thadeu Lima de Souza Cascardo <[email protected]>

[ Upstream commit d8ece6fc3694657e4886191b32ca1690af11adda ]

rtl_wq is allocated at rtl_init_core, so it makes more sense to destroy it at rtl_deinit_core. In the case of USB, where _rtl_usb_init does not require anything to be undone, that is fine. But for PCI, rtl_pci_init, which is called after rtl_init_core, needs to deallocate data, but only if it has been called.

That means that destroying the workqueue needs to be done whether rtl_pci_init has been called or not. And since rtl_pci_deinit was doing it, it has to be moved out of there.

It makes more sense to move it to rtl_deinit_core and have it done in both cases, USB and PCI.

Since this is a requirement for a followup memory leak fix, mark this as fixing such memory leak.

---
 drivers/net/wireless/realtek/rtlwifi/base.c | 6 ++++++
 drivers/net/wireless/realtek/rtlwifi/pci.c  | 2 --
 drivers/net/wireless/realtek/rtlwifi/usb.c  | 5 -----
 3 files changed, 6 insertions(+), 7 deletions(-)
drivers/net/wireless/realtek/rtlwifi/base.c +6 -0
index f424d495305a8..1d6f46f521539 100644
@@ -575,9 +575,15 @@ static void rtl_free_entries_from_ack_queue(struct ieee80211_hw *hw,
 
 void rtl_deinit_core(struct ieee80211_hw *hw)
 {
+	struct rtl_priv *rtlpriv = rtl_priv(hw);
+
 	rtl_c2hcmd_launcher(hw, 0);
 	rtl_free_entries_from_scan_list(hw);
 	rtl_free_entries_from_ack_queue(hw, false);
+	if (rtlpriv->works.rtl_wq) {
+		destroy_workqueue(rtlpriv->works.rtl_wq);
+		rtlpriv->works.rtl_wq = NULL;
+	}
 }
 EXPORT_SYMBOL_GPL(rtl_deinit_core);
 
drivers/net/wireless/realtek/rtlwifi/pci.c +0 -2
index c0a201f1b74e5..84f2669f201ab 100644
@@ -1657,8 +1657,6 @@ static void rtl_pci_deinit(struct ieee80211_hw *hw)
 	synchronize_irq(rtlpci->pdev->irq);
 	tasklet_kill(&rtlpriv->works.irq_tasklet);
 	cancel_work_sync(&rtlpriv->works.lps_change_work);
-
-	destroy_workqueue(rtlpriv->works.rtl_wq);
 }
 
 static int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev)
drivers/net/wireless/realtek/rtlwifi/usb.c +0 -5
index 04590d16874c4..68dc0e6af6b1b 100644
@@ -679,11 +679,6 @@ static void _rtl_usb_cleanup_rx(struct ieee80211_hw *hw)
 	tasklet_kill(&rtlusb->rx_work_tasklet);
 	cancel_work_sync(&rtlpriv->works.lps_change_work);
 
-	if (rtlpriv->works.rtl_wq) {
-		destroy_workqueue(rtlpriv->works.rtl_wq);
-		rtlpriv->works.rtl_wq = NULL;
-	}
-
 	skb_queue_purge(&rtlusb->rx_queue);
 
 	while ((urb = usb_get_from_anchor(&rtlusb->rx_cleanup_urbs))) {
Signature · 1 line
2.39.5
author maintainer
#43 lore raw

PATCH 43/620 wifi: rtlwifi: fix memory leaks and invalid access at probe error path

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thadeu Lima de Souza Cascardo <[email protected]>

[ Upstream commit e7ceefbfd8d447abc8aca8ab993a942803522c06 ]

Deinitialize at reverse order when probe fails.

When init_sw_vars fails, rtl_deinit_core should not be called, specially now that it destroys the rtl_wq workqueue.

And call rtl_pci_deinit and deinit_sw_vars, otherwise, memory will be leaked.

Remove pci_set_drvdata call as it will already be cleaned up by the core driver code and could lead to memory leaks too. cf. commit 8d450935ae7f ("wireless: rtlwifi: remove unnecessary pci_set_drvdata()") and commit 3d86b93064c7 ("rtlwifi: Fix PCI probe error path orphaned memory").

---
 drivers/net/wireless/realtek/rtlwifi/pci.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/net/wireless/realtek/rtlwifi/pci.c +8 -5
index 84f2669f201ab..5b0a5a22d06d2 100644
@@ -2167,7 +2167,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
 	if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
 		pr_err("Can't init_sw_vars\n");
 		err = -ENODEV;
-		goto fail3;
+		goto fail2;
 	}
 	rtlpriv->cfg->ops->init_sw_leds(hw);
 
@@ -2185,14 +2185,14 @@ int rtl_pci_probe(struct pci_dev *pdev,
 	err = rtl_pci_init(hw, pdev);
 	if (err) {
 		pr_err("Failed to init PCI\n");
-		goto fail3;
+		goto fail4;
 	}
 
 	err = ieee80211_register_hw(hw);
 	if (err) {
 		pr_err("Can't register mac80211 hw.\n");
 		err = -ENODEV;
-		goto fail3;
+		goto fail5;
 	}
 	rtlpriv->mac80211.mac80211_registered = 1;
 
@@ -2215,9 +2215,12 @@ int rtl_pci_probe(struct pci_dev *pdev,
 	set_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status);
 	return 0;
 
-fail3:
-	pci_set_drvdata(pdev, NULL);
+fail5:
+	rtl_pci_deinit(hw);
+fail4:
 	rtl_deinit_core(hw);
+fail3:
+	rtlpriv->cfg->ops->deinit_sw_vars(hw);
 
 fail2:
 	if (rtlpriv->io.pci_mem_start != 0)
Signature · 1 line
2.39.5
author maintainer
#44 lore raw

PATCH 44/620 wifi: rtlwifi: pci: wait for firmware loading before releasing memory

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thadeu Lima de Souza Cascardo <[email protected]>

[ Upstream commit b59b86c5d08be7d761c04affcbcec8184738c200 ]

At probe error path, the firmware loading work may have already been queued. In such a case, it will try to access memory allocated by the probe function, which is about to be released. In such paths, wait for the firmware worker to finish before releasing memory.

Fixes 3d86b93064c7 ("rtlwifi: Fix PCI probe error path orphaned memory")
---
 drivers/net/wireless/realtek/rtlwifi/pci.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/realtek/rtlwifi/pci.c +1 -0
index 5b0a5a22d06d2..925e4f807eb9f 100644
@@ -2220,6 +2220,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
 fail4:
 	rtl_deinit_core(hw);
 fail3:
+	wait_for_completion(&rtlpriv->firmware_loading_complete);
 	rtlpriv->cfg->ops->deinit_sw_vars(hw);
 
 fail2:
Signature · 1 line
2.39.5
author maintainer
#45 lore raw

PATCH 45/620 HID: multitouch: Add support for lenovo Y9000P Touchpad

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: He Lugang <[email protected]>

[ Upstream commit 251efae73bd46b097deec4f9986d926813aed744 ]

The 2024 Lenovo Y9000P which use GT7868Q chip also needs a fixup. The information of the chip is as follows:
I2C HID v1.00 Mouse [GXTP5100:00 27C6:01E0]

Stable-dep-of: 8ade5e05bd09 ("HID: multitouch: fix support for Goodix PID 0x01e9")

---
 drivers/hid/hid-ids.h        | 1 +
 drivers/hid/hid-multitouch.c | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
drivers/hid/hid-ids.h +1 -0
index 81db294dda408..291f8d3a3dd37 100644
@@ -484,6 +484,7 @@
 #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_E100 0xe100
 
 #define I2C_VENDOR_ID_GOODIX		0x27c6
+#define I2C_DEVICE_ID_GOODIX_01E0	0x01e0
 #define I2C_DEVICE_ID_GOODIX_01E8	0x01e8
 #define I2C_DEVICE_ID_GOODIX_01E9	0x01e9
 #define I2C_DEVICE_ID_GOODIX_01F0	0x01f0
drivers/hid/hid-multitouch.c +6 -2
index 57e4ff1ab275d..196ed532baa5d 100644
@@ -1447,7 +1447,8 @@ static __u8 *mt_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 {
 	if (hdev->vendor == I2C_VENDOR_ID_GOODIX &&
 	    (hdev->product == I2C_DEVICE_ID_GOODIX_01E8 ||
-	     hdev->product == I2C_DEVICE_ID_GOODIX_01E9)) {
+	     hdev->product == I2C_DEVICE_ID_GOODIX_01E9 ||
+		 hdev->product == I2C_DEVICE_ID_GOODIX_01E0)) {
 		if (rdesc[607] == 0x15) {
 			rdesc[607] = 0x25;
 			dev_info(
@@ -2070,7 +2071,10 @@ static const struct hid_device_id mt_devices[] = {
 		     I2C_DEVICE_ID_GOODIX_01E8) },
 	{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
 	  HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX,
-		     I2C_DEVICE_ID_GOODIX_01E8) },
+		     I2C_DEVICE_ID_GOODIX_01E9) },
+	{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
+	  HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX,
+		     I2C_DEVICE_ID_GOODIX_01E0) },
 
 	/* GoodTouch panels */
 	{ .driver_data = MT_CLS_NSMU,
Signature · 1 line
2.39.5
author maintainer
#46 lore raw

PATCH 46/620 Revert "HID: multitouch: Add support for lenovo Y9000P Touchpad"

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Jiri Kosina <[email protected]>

[ Upstream commit 3d88ba86ba6f35a0467f25a88c38aa5639190d04 ]

This reverts commit 251efae73bd46b097deec4f9986d926813aed744.

Quoting Wang Yuli:

"The 27C6:01E0 touchpad doesn't require the workaround and applying it would actually break functionality.

The initial report came from a BBS forum, but we suspect the information provided by the forum user may be incorrect which could happen sometimes. [1]

Further investigation showed that the Lenovo Y9000P 2024 doesn't even use a Goodix touchpad. [2]

For the broader issue of 27c6:01e0 being unusable on some devices, it just need to address it with a libinput quirk.

In conclusion, we should revert this commit, which is the best solution."

Stable-dep-of: 8ade5e05bd09 ("HID: multitouch: fix support for Goodix PID 0x01e9")

---
 drivers/hid/hid-ids.h        | 1 -
 drivers/hid/hid-multitouch.c | 8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/hid/hid-ids.h +0 -1
index 291f8d3a3dd37..81db294dda408 100644
@@ -484,7 +484,6 @@
 #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_E100 0xe100
 
 #define I2C_VENDOR_ID_GOODIX		0x27c6
-#define I2C_DEVICE_ID_GOODIX_01E0	0x01e0
 #define I2C_DEVICE_ID_GOODIX_01E8	0x01e8
 #define I2C_DEVICE_ID_GOODIX_01E9	0x01e9
 #define I2C_DEVICE_ID_GOODIX_01F0	0x01f0
drivers/hid/hid-multitouch.c +2 -6
index 196ed532baa5d..57e4ff1ab275d 100644
@@ -1447,8 +1447,7 @@ static __u8 *mt_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 {
 	if (hdev->vendor == I2C_VENDOR_ID_GOODIX &&
 	    (hdev->product == I2C_DEVICE_ID_GOODIX_01E8 ||
-	     hdev->product == I2C_DEVICE_ID_GOODIX_01E9 ||
-		 hdev->product == I2C_DEVICE_ID_GOODIX_01E0)) {
+	     hdev->product == I2C_DEVICE_ID_GOODIX_01E9)) {
 		if (rdesc[607] == 0x15) {
 			rdesc[607] = 0x25;
 			dev_info(
@@ -2071,10 +2070,7 @@ static const struct hid_device_id mt_devices[] = {
 		     I2C_DEVICE_ID_GOODIX_01E8) },
 	{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
 	  HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX,
-		     I2C_DEVICE_ID_GOODIX_01E9) },
-	{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
-	  HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX,
-		     I2C_DEVICE_ID_GOODIX_01E0) },
+		     I2C_DEVICE_ID_GOODIX_01E8) },
 
 	/* GoodTouch panels */
 	{ .driver_data = MT_CLS_NSMU,
Signature · 1 line
2.39.5
author maintainer
#47 lore raw

PATCH 47/620 HID: multitouch: fix support for Goodix PID 0x01e9

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Jiri Kosina <[email protected]>

[ Upstream commit 8ade5e05bd094485ce370fad66a6a3fb6f50bfbc ]

Commit c8000deb68365b ("HID: multitouch: Add support for GT7868Q") added support for 0x01e8 and 0x01e9, but the mt_device[] entries were added twice for 0x01e8 and there was none added for 0x01e9. Fix that.

Fixes c8000deb68365b ("HID: multitouch: Add support for GT7868Q")
---
 drivers/hid/hid-multitouch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-multitouch.c +1 -1
index 57e4ff1ab275d..df7b620fa23ee 100644
@@ -2070,7 +2070,7 @@ static const struct hid_device_id mt_devices[] = {
 		     I2C_DEVICE_ID_GOODIX_01E8) },
 	{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
 	  HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX,
-		     I2C_DEVICE_ID_GOODIX_01E8) },
+		     I2C_DEVICE_ID_GOODIX_01E9) },
 
 	/* GoodTouch panels */
 	{ .driver_data = MT_CLS_NSMU,
Signature · 1 line
2.39.5
author maintainer
#48 lore raw

PATCH 48/620 regulator: dt-bindings: mt6315: Drop regulator-compatible property

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chen-Yu Tsai <[email protected]>

[ Upstream commit 08242719a8af603db54a2a79234a8fe600680105 ]

The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It should not have been used for new submissions such as the MT6315.

Drop the property from the MT6315 regulator binding and its examples.

Fixes 977fb5b58469 ("regulator: document binding for MT6315 regulator")
Fixes 6d435a94ba5b ("regulator: mt6315: Enforce regulator-compatible, not name")
---
 .../devicetree/bindings/regulator/mt6315-regulator.yaml     | 6 ------
 1 file changed, 6 deletions(-)
Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml +0 -6
index 37402c370fbbc..eed0b3fa2d82c 100644
@@ -30,10 +30,6 @@ properties:
         type: object
         $ref: "regulator.yaml#"
 
-        properties:
-          regulator-compatible:
-            pattern: "^vbuck[1-4]$"
-
     additionalProperties: false
 
 required:
@@ -51,7 +47,6 @@ examples:
 
       regulators {
         vbuck1 {
-          regulator-compatible = "vbuck1";
           regulator-min-microvolt = <300000>;
           regulator-max-microvolt = <1193750>;
           regulator-enable-ramp-delay = <256>;
@@ -59,7 +54,6 @@ examples:
         };
 
         vbuck3 {
-          regulator-compatible = "vbuck3";
           regulator-min-microvolt = <300000>;
           regulator-max-microvolt = <1193750>;
           regulator-enable-ramp-delay = <256>;
Signature · 1 line
2.39.5
author maintainer
#49 lore raw

PATCH 49/620 ACPI: fan: cleanup resources in the error path of .probe()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Joe Hattori <[email protected]>

[ Upstream commit c759bc8e9046f9812238f506d70f07d3ea4206d4 ]

Call thermal_cooling_device_unregister() and sysfs_remove_link() in the error path of acpi_fan_probe() to fix possible memory leak.

This bug was found by an experimental static analysis tool that I am developing.

Fixes 05a83d972293 ("ACPI: register ACPI Fan as generic thermal cooling device")
---
 drivers/acpi/fan.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/acpi/fan.c +8 -2
index 5cd0ceb50bc8a..936429e81d8c8 100644
@@ -423,19 +423,25 @@ static int acpi_fan_probe(struct platform_device *pdev)
 	result = sysfs_create_link(&pdev->dev.kobj,
 				   &cdev->device.kobj,
 				   "thermal_cooling");
-	if (result)
+	if (result) {
 		dev_err(&pdev->dev, "Failed to create sysfs link 'thermal_cooling'\n");
+		goto err_unregister;
+	}
 
 	result = sysfs_create_link(&cdev->device.kobj,
 				   &pdev->dev.kobj,
 				   "device");
 	if (result) {
 		dev_err(&pdev->dev, "Failed to create sysfs link 'device'\n");
-		goto err_end;
+		goto err_remove_link;
 	}
 
 	return 0;
 
+err_remove_link:
+	sysfs_remove_link(&pdev->dev.kobj, "thermal_cooling");
+err_unregister:
+	thermal_cooling_device_unregister(cdev);
 err_end:
 	if (fan->acpi4) {
 		int i;
Signature · 1 line
2.39.5
author maintainer
#50 lore raw

PATCH 50/620 cpupower: fix TSC MHz calculation

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: He Rongguang <[email protected]>

[ Upstream commit 9d6c0e58514f8b57cd9c2c755e41623d6a966025 ]

Commit 'cpupower: Make TSC read per CPU for Mperf monitor' (c2adb1877b7) changes TSC counter reads per cpu, but left time diff global (from start of all cpus to end of all cpus), thus diff(time) is too large for a cpu's tsc counting, resulting in far less than acutal TSC_Mhz and thus cpupower monitor showing far less than actual cpu realtime frequency.

/proc/cpuinfo shows frequency:
cat /proc/cpuinfo | egrep -e 'processor' -e 'MHz'
...
processor : 171
cpu MHz : 4108.498
...

before fix (System 100% busy):

    | Mperf              || Idle_Stats
 CPU| C0   | Cx   | Freq  || POLL | C1   | C2
 171|  0.77| 99.23|  2279||  0.00|  0.00|  0.00

after fix (System 100% busy):

    | Mperf              || Idle_Stats
 CPU| C0   | Cx   | Freq  || POLL | C1   | C2
 171|  0.46| 99.54|  4095||  0.00|  0.00|  0.00
Fixes c2adb1877b76 ("cpupower: Make TSC read per CPU for Mperf monitor")
---
 .../cpupower/utils/idle_monitor/mperf_monitor.c   | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
tools/power/cpupower/utils/idle_monitor/mperf_monitor.c +9 -6
index ae6af354a81db..08a399b0be286 100644
@@ -33,7 +33,7 @@ static int mperf_get_count_percent(unsigned int self_id, double *percent,
 				   unsigned int cpu);
 static int mperf_get_count_freq(unsigned int id, unsigned long long *count,
 				unsigned int cpu);
-static struct timespec time_start, time_end;
+static struct timespec *time_start, *time_end;
 
 static cstate_t mperf_cstates[MPERF_CSTATE_COUNT] = {
 	{
@@ -174,7 +174,7 @@ static int mperf_get_count_percent(unsigned int id, double *percent,
 		dprint("%s: TSC Ref - mperf_diff: %llu, tsc_diff: %llu\n",
 		       mperf_cstates[id].name, mperf_diff, tsc_diff);
 	} else if (max_freq_mode == MAX_FREQ_SYSFS) {
-		timediff = max_frequency * timespec_diff_us(time_start, time_end);
+		timediff = max_frequency * timespec_diff_us(time_start[cpu], time_end[cpu]);
 		*percent = 100.0 * mperf_diff / timediff;
 		dprint("%s: MAXFREQ - mperf_diff: %llu, time_diff: %llu\n",
 		       mperf_cstates[id].name, mperf_diff, timediff);
@@ -207,7 +207,7 @@ static int mperf_get_count_freq(unsigned int id, unsigned long long *count,
 	if (max_freq_mode == MAX_FREQ_TSC_REF) {
 		/* Calculate max_freq from TSC count */
 		tsc_diff = tsc_at_measure_end[cpu] - tsc_at_measure_start[cpu];
-		time_diff = timespec_diff_us(time_start, time_end);
+		time_diff = timespec_diff_us(time_start[cpu], time_end[cpu]);
 		max_frequency = tsc_diff / time_diff;
 	}
 
@@ -226,9 +226,8 @@ static int mperf_start(void)
 {
 	int cpu;
 
-	clock_gettime(CLOCK_REALTIME, &time_start);
-
 	for (cpu = 0; cpu < cpu_count; cpu++) {
+		clock_gettime(CLOCK_REALTIME, &time_start[cpu]);
 		mperf_get_tsc(&tsc_at_measure_start[cpu]);
 		mperf_init_stats(cpu);
 	}
@@ -243,9 +242,9 @@ static int mperf_stop(void)
 	for (cpu = 0; cpu < cpu_count; cpu++) {
 		mperf_measure_stats(cpu);
 		mperf_get_tsc(&tsc_at_measure_end[cpu]);
+		clock_gettime(CLOCK_REALTIME, &time_end[cpu]);
 	}
 
-	clock_gettime(CLOCK_REALTIME, &time_end);
 	return 0;
 }
 
@@ -349,6 +348,8 @@ struct cpuidle_monitor *mperf_register(void)
 	aperf_current_count = calloc(cpu_count, sizeof(unsigned long long));
 	tsc_at_measure_start = calloc(cpu_count, sizeof(unsigned long long));
 	tsc_at_measure_end = calloc(cpu_count, sizeof(unsigned long long));
+	time_start = calloc(cpu_count, sizeof(struct timespec));
+	time_end = calloc(cpu_count, sizeof(struct timespec));
 	mperf_monitor.name_len = strlen(mperf_monitor.name);
 	return &mperf_monitor;
 }
@@ -361,6 +362,8 @@ void mperf_unregister(void)
 	free(aperf_current_count);
 	free(tsc_at_measure_start);
 	free(tsc_at_measure_end);
+	free(time_start);
+	free(time_end);
 	free(is_valid);
 }
 
Signature · 1 line
2.39.5
author maintainer
#51 lore raw

PATCH 51/620 dt-bindings: mfd: bd71815: Fix rsense and typos

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Matti Vaittinen <[email protected]>

[ Upstream commit 6856edf7ead8c54803216a38a7b227bcb3dadff7 ]

The sense resistor used for measuring currents is typically some tens of milli Ohms. It has accidentally been documented to be tens of mega Ohms. Fix the size of this resistor and a few copy-paste errors while at it.

Drop the unsuitable 'rohm,charger-sense-resistor-ohms' property (which can't represent resistors smaller than one Ohm), and introduce a new 'rohm,charger-sense-resistor-micro-ohms' property with appropriate minimum, maximum and default values instead.

---
 .../bindings/mfd/rohm,bd71815-pmic.yaml       | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml +10 -10
index fe265bcab50d9..91df60d566292 100644
@@ -50,15 +50,15 @@ properties:
     minimum: 0
     maximum: 1
 
-  rohm,charger-sense-resistor-ohms:
-    minimum: 10000000
-    maximum: 50000000
+  rohm,charger-sense-resistor-micro-ohms:
+    minimum: 10000
+    maximum: 50000
     description: |
-      BD71827 and BD71828 have SAR ADC for measuring charging currents.
-      External sense resistor (RSENSE in data sheet) should be used. If
-      something other but 30MOhm resistor is used the resistance value
-      should be given here in Ohms.
-    default: 30000000
+      BD71815 has SAR ADC for measuring charging currents. External sense
+      resistor (RSENSE in data sheet) should be used. If something other
+      but a 30 mOhm resistor is used the resistance value should be given
+      here in micro Ohms.
+    default: 30000
 
   regulators:
     $ref: ../regulator/rohm,bd71815-regulator.yaml
@@ -67,7 +67,7 @@ properties:
 
   gpio-reserved-ranges:
     description: |
-      Usage of BD71828 GPIO pins can be changed via OTP. This property can be
+      Usage of BD71815 GPIO pins can be changed via OTP. This property can be
       used to mark the pins which should not be configured for GPIO. Please see
       the ../gpio/gpio.txt for more information.
 
@@ -113,7 +113,7 @@ examples:
             gpio-controller;
             #gpio-cells = <2>;
 
-            rohm,charger-sense-resistor-ohms = <10000000>;
+            rohm,charger-sense-resistor-micro-ohms = <10000>;
 
             regulators {
                 buck1: buck1 {
Signature · 1 line
2.39.5
author maintainer
#52 lore raw

PATCH 52/620 leds: netxbig: Fix an OF node reference leak in netxbig_leds_get_of_pdata()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Joe Hattori <[email protected]>

[ Upstream commit 0508316be63bb735f59bdc8fe4527cadb62210ca ]

netxbig_leds_get_of_pdata() does not release the OF node obtained by of_parse_phandle() when of_find_device_by_node() fails. Add an of_node_put() call to fix the leak.

This bug was found by an experimental static analysis tool that I am developing.

Fixes 9af512e81964 ("leds: netxbig: Convert to use GPIO descriptors")
---
 drivers/leds/leds-netxbig.c | 1 +
 1 file changed, 1 insertion(+)
drivers/leds/leds-netxbig.c +1 -0
index 77213b79f84d9..6692de0af68f1 100644
@@ -440,6 +440,7 @@ static int netxbig_leds_get_of_pdata(struct device *dev,
 	}
 	gpio_ext_pdev = of_find_device_by_node(gpio_ext_np);
 	if (!gpio_ext_pdev) {
+		of_node_put(gpio_ext_np);
 		dev_err(dev, "Failed to find platform device for gpio-ext\n");
 		return -ENODEV;
 	}
Signature · 1 line
2.39.5
author maintainer
#53 lore raw

PATCH 53/620 cpufreq: schedutil: Fix superfluous updates caused by need_freq_update

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Sultan Alsawaf (unemployed) <[email protected]>

[ Upstream commit 8e461a1cb43d69d2fc8a97e61916dce571e6bb31 ]

A redundant frequency update is only truly needed when there is a policy limits change with a driver that specifies CPUFREQ_NEED_UPDATE_LIMITS.

In spite of that, drivers specifying CPUFREQ_NEED_UPDATE_LIMITS receive a frequency update _all the time_, not just for a policy limits change, because need_freq_update is never cleared.

Furthermore, ignore_dl_rate_limit()'s usage of need_freq_update also leads to a redundant frequency update, regardless of whether or not the driver specifies CPUFREQ_NEED_UPDATE_LIMITS, when the next chosen frequency is the same as the current one.

Fix the superfluous updates by only honoring CPUFREQ_NEED_UPDATE_LIMITS when there's a policy limits change, and clearing need_freq_update when a requisite redundant update occurs.

This is neatly achieved by moving up the CPUFREQ_NEED_UPDATE_LIMITS test and instead setting need_freq_update to false in sugov_update_next_freq().

Fixes 600f5badb78c ("cpufreq: schedutil: Don't skip freq update when limits change")
---
 kernel/sched/cpufreq_schedutil.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/cpufreq_schedutil.c +2 -2
index 7f6bb37d3a2f7..e23a0fc96a7d2 100644
@@ -91,7 +91,7 @@ static bool sugov_should_update_freq(struct sugov_policy *sg_policy, u64 time)
 
 	if (unlikely(sg_policy->limits_changed)) {
 		sg_policy->limits_changed = false;
-		sg_policy->need_freq_update = true;
+		sg_policy->need_freq_update = cpufreq_driver_test_flags(CPUFREQ_NEED_UPDATE_LIMITS);
 		return true;
 	}
 
@@ -104,7 +104,7 @@ static bool sugov_update_next_freq(struct sugov_policy *sg_policy, u64 time,
 				   unsigned int next_freq)
 {
 	if (sg_policy->need_freq_update)
-		sg_policy->need_freq_update = cpufreq_driver_test_flags(CPUFREQ_NEED_UPDATE_LIMITS);
+		sg_policy->need_freq_update = false;
 	else if (sg_policy->next_freq == next_freq)
 		return false;
 
Signature · 1 line
2.39.5
author maintainer
#54 lore raw

PATCH 54/620 clk: imx8mp: Fix clkout1/2 support

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Marek Vasut <[email protected]>

[ Upstream commit a9b7c84d22fb1687d63ca2a386773015cf59436b ]

The CLKOUTn may be fed from PLL1/2/3, but the PLL1/2/3 has to be enabled first by setting PLL_CLKE bit 11 in CCM_ANALOG_SYS_PLLn_GEN_CTRL register. The CCM_ANALOG_SYS_PLLn_GEN_CTRL bit 11 is modeled by plln_out clock. Fix the clock tree and place the clkout1/2 under plln_sel instead of plain plln to let the clock subsystem correctly control the bit 11 and enable the PLL in case the CLKOUTn is supplied by PLL1/2/3.

---
 drivers/clk/imx/clk-imx8mp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/clk/imx/clk-imx8mp.c +3 -2
index 8e980271b9dc6..0f9ec5e0f5f81 100644
@@ -398,8 +398,9 @@ static const char * const imx8mp_dram_core_sels[] = {"dram_pll_out", "dram_alt_r
 
 static const char * const imx8mp_clkout_sels[] = {"audio_pll1_out", "audio_pll2_out", "video_pll1_out",
 						  "dummy", "dummy", "gpu_pll_out", "vpu_pll_out",
-						  "arm_pll_out", "sys_pll1", "sys_pll2", "sys_pll3",
-						  "dummy", "dummy", "osc_24m", "dummy", "osc_32k"};
+						  "arm_pll_out", "sys_pll1_out", "sys_pll2_out",
+						  "sys_pll3_out", "dummy", "dummy", "osc_24m",
+						  "dummy", "osc_32k"};
 
 static struct clk_hw **hws;
 static struct clk_hw_onecell_data *clk_hw_data;
Signature · 1 line
2.39.5
author maintainer
#55 lore raw

PATCH 55/620 team: prevent adding a device which is already a team device lower

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Octavian Purdila <[email protected]>

[ Upstream commit 3fff5da4ca2164bb4d0f1e6cd33f6eb8a0e73e50 ]

Prevent adding a device which is already a team device lower, e.g. adding veth0 if vlan1 was already added and veth0 is a lower of vlan1.

This is not useful in practice and can lead to recursive locking:

$ ip link add veth0 type veth peer name veth1
$ ip link set veth0 up
$ ip link set veth1 up
$ ip link add link veth0 name veth0.1 type vlan protocol 802.1Q id 1
$ ip link add team0 type team
$ ip link set veth0.1 down
$ ip link set veth0.1 master team0
team0: Port device veth0.1 added
$ ip link set veth0 down
$ ip link set veth0 master team0

============================================
WARNING: possible recursive locking detected
6.13.0-rc2-virtme-00441-ga14a429069bb #46 Not tainted
--------------------------------------------
ip/7684 is trying to acquire lock:
ffff888016848e00 (team->team_lock_key){+.+.}-{4:4}, at: team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973)

but task is already holding lock:
ffff888016848e00 (team->team_lock_key){+.+.}-{4:4}, at: team_add_slave (drivers/net/team/team_core.c:1147 drivers/net/team/team_core.c:1977)

other info that might help us debug this:

Possible unsafe locking scenario:

CPU0
----
lock(team->team_lock_key);
lock(team->team_lock_key);

*** DEADLOCK ***

May be due to missing lock nesting notation

2 locks held by ip/7684:

stack backtrace:
CPU: 3 UID: 0 PID: 7684 Comm: ip Not tainted 6.13.0-rc2-virtme-00441-ga14a429069bb #46
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>

dump_stack_lvl (lib/dump_stack.c:122)
print_deadlock_bug.cold (kernel/locking/lockdep.c:3040) __lock_acquire (kernel/locking/lockdep.c:3893 kernel/locking/lockdep.c:5226) ? netlink_broadcast_filtered (net/netlink/af_netlink.c:1548)

lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851)
? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973)
? trace_lock_acquire (./include/trace/events/lock.h:24 (discriminator 2))
? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973)
? lock_acquire (kernel/locking/lockdep.c:5822)
? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973)
__mutex_lock (kernel/locking/mutex.c:587 kernel/locking/mutex.c:735)
? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973)
? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973)
? fib_sync_up (net/ipv4/fib_semantics.c:2167)
? team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973)
team_device_event (drivers/net/team/team_core.c:2928 drivers/net/team/team_core.c:2951 drivers/net/team/team_core.c:2973)

notifier_call_chain (kernel/notifier.c:85) call_netdevice_notifiers_info (net/core/dev.c:1996) __dev_notify_flags (net/core/dev.c:8993)
? __dev_change_flags (net/core/dev.c:8975) dev_change_flags (net/core/dev.c:9027) vlan_device_event (net/8021q/vlan.c:85 net/8021q/vlan.c:470) ? br_device_event (net/bridge/br.c:143) notifier_call_chain (kernel/notifier.c:85) call_netdevice_notifiers_info (net/core/dev.c:1996)

dev_open (net/core/dev.c:1519 net/core/dev.c:1505)
team_add_slave (drivers/net/team/team_core.c:1219 drivers/net/team/team_core.c:1977)

? __pfx_team_add_slave (drivers/net/team/team_core.c:1972) do_set_master (net/core/rtnetlink.c:2917) do_setlink.isra.0 (net/core/rtnetlink.c:3117)

---
 drivers/net/team/team.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/net/team/team.c +7 -0
index 5e5af71a85ac1..015151cd22220 100644
@@ -1166,6 +1166,13 @@ static int team_port_add(struct team *team, struct net_device *port_dev,
 		return -EBUSY;
 	}
 
+	if (netdev_has_upper_dev(port_dev, dev)) {
+		NL_SET_ERR_MSG(extack, "Device is already a lower device of the team interface");
+		netdev_err(dev, "Device %s is already a lower device of the team interface\n",
+			   portname);
+		return -EBUSY;
+	}
+
 	if (port_dev->features & NETIF_F_VLAN_CHALLENGED &&
 	    vlan_uses_dev(dev)) {
 		NL_SET_ERR_MSG(extack, "Device is VLAN challenged and team device has VLAN set up");
Signature · 1 line
2.39.5
author maintainer
#56 lore raw

PATCH 56/620 regulator: of: Implement the unwind path of of_regulator_match()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Joe Hattori <[email protected]>

[ Upstream commit dddca3b2fc676113c58b04aaefe84bfb958ac83e ]

of_regulator_match() does not release the OF node reference in the error path, resulting in an OF node leak. Therefore, call of_node_put() on the obtained nodes before returning the EINVAL error.

Since it is possible that some drivers call this function and do not exit on failure, such as s2mps11_pmic_driver, clear the init_data and of_node in the error path.

This was reported by an experimental verification tool that I am developing. As I do not have access to actual devices nor the QEMU board configuration to test drivers that call this function, no runtime test was able to be performed.

Fixes 1c8fa58f4750 ("regulator: Add generic DT parsing for regulators")
---
 drivers/regulator/of_regulator.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/regulator/of_regulator.c +13 -1
index e12b681c72e5e..a08905bab2797 100644
@@ -435,7 +435,7 @@ int of_regulator_match(struct device *dev, struct device_node *node,
 					"failed to parse DT for regulator %pOFn\n",
 					child);
 				of_node_put(child);
-				return -EINVAL;
+				goto err_put;
 			}
 			match->of_node = of_node_get(child);
 			count++;
@@ -444,6 +444,18 @@ int of_regulator_match(struct device *dev, struct device_node *node,
 	}
 
 	return count;
+
+err_put:
+	for (i = 0; i < num_matches; i++) {
+		struct of_regulator_match *match = &matches[i];
+
+		match->init_data = NULL;
+		if (match->of_node) {
+			of_node_put(match->of_node);
+			match->of_node = NULL;
+		}
+	}
+	return -EINVAL;
 }
 EXPORT_SYMBOL_GPL(of_regulator_match);
 
Signature · 1 line
2.39.5
author maintainer
#57 lore raw

PATCH 57/620 samples/landlock: Fix possible NULL dereference in parse_path()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Zichen Xie <[email protected]>

[ Upstream commit 078bf9438a31567e2c0587159ccefde835fb1ced ]

malloc() may return NULL, leading to NULL dereference. Add a NULL check.

Fixes ba84b0bf5a16 ("samples/landlock: Add a sandbox manager example")
[mic: Simplify fix]
---
 samples/landlock/sandboxer.c | 7 +++++++
 1 file changed, 7 insertions(+)
samples/landlock/sandboxer.c +7 -0
index c089e9cdaf328..1825a2935bd82 100644
@@ -65,6 +65,9 @@ static int parse_path(char *env_path, const char ***const path_list)
 		}
 	}
 	*path_list = malloc(num_paths * sizeof(**path_list));
+	if (!*path_list)
+		return -1;
+
 	for (i = 0; i < num_paths; i++)
 		(*path_list)[i] = strsep(&env_path, ENV_PATH_TOKEN);
 
@@ -99,6 +102,10 @@ static int populate_ruleset(const char *const env_var, const int ruleset_fd,
 	env_path_name = strdup(env_path_name);
 	unsetenv(env_var);
 	num_paths = parse_path(env_path_name, &path_list);
+	if (num_paths < 0) {
+		fprintf(stderr, "Failed to allocate memory\n");
+		goto out_free_name;
+	}
 	if (num_paths == 1 && path_list[0][0] == '\0') {
 		/*
 		 * Allows to not use all possible restrictions (e.g. use
Signature · 1 line
2.39.5
author maintainer
#58 lore raw

PATCH 58/620 wifi: wlcore: fix unbalanced pm_runtime calls

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Andreas Kemnade <[email protected]>

[ Upstream commit 996c934c8c196144af386c4385f61fcd5349af28 ]

If firmware boot failes, runtime pm is put too often:

[12092.708099] wlcore: ERROR firmware boot failed despite 3 retries
[12092.708099] wl18xx_driver wl18xx.1.auto: Runtime PM usage count underflow!

Fix that by redirecting all error gotos before runtime_get so that runtime is not put.

Fixes c40aad28a3cf ("wlcore: Make sure firmware is initialized in wl1271_op_add_interface()")
---
 drivers/net/wireless/ti/wlcore/main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/wireless/ti/wlcore/main.c +5 -5
index 5669f17b395f3..7d664380c4771 100644
@@ -2552,24 +2552,24 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
 	if (test_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags) ||
 	    test_bit(WLVIF_FLAG_INITIALIZED, &wlvif->flags)) {
 		ret = -EBUSY;
-		goto out;
+		goto out_unlock;
 	}
 
 
 	ret = wl12xx_init_vif_data(wl, vif);
 	if (ret < 0)
-		goto out;
+		goto out_unlock;
 
 	wlvif->wl = wl;
 	role_type = wl12xx_get_role_type(wl, wlvif);
 	if (role_type == WL12XX_INVALID_ROLE_TYPE) {
 		ret = -EINVAL;
-		goto out;
+		goto out_unlock;
 	}
 
 	ret = wlcore_allocate_hw_queue_base(wl, wlvif);
 	if (ret < 0)
-		goto out;
+		goto out_unlock;
 
 	/*
 	 * TODO: after the nvs issue will be solved, move this block
@@ -2584,7 +2584,7 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
 
 		ret = wl12xx_init_fw(wl);
 		if (ret < 0)
-			goto out;
+			goto out_unlock;
 	}
 
 	/*
Signature · 1 line
2.39.5
author maintainer
#59 lore raw

PATCH 59/620 net/smc: fix data error when recvmsg with MSG_PEEK flag

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Guangguan Wang <[email protected]>

[ Upstream commit a4b6539038c1aa1ae871aacf6e41b566c3613993 ]

When recvmsg with MSG_PEEK flag, the data will be copied to user's buffer without advancing consume cursor and without reducing the length of rx available data. Once the expected peek length is larger than the value of bytes_to_rcv, in the loop of do while in smc_rx_recvmsg, the first loop will copy bytes_to_rcv bytes of data from the position local_tx_ctrl.cons, the second loop will copy the min(bytes_to_rcv, read_remaining) bytes from the position local_tx_ctrl.cons again because of the lacking of process with advancing consume cursor and reducing the length of available data. So do the subsequent loops. The data copied in the second loop and the subsequent loops will result in data error, as it should not be copied if no more data arrives and it should be copied from the position advancing bytes_to_rcv bytes from the local_tx_ctrl.cons if more data arrives.

This issue can be reproduce by the following python script:
server.py:
import socket
import time
server_ip = '0.0.0.0'
server_port = 12346
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.bind((server_ip, server_port)) server_socket.listen(1)
print('Server is running and listening for connections...') conn, addr = server_socket.accept()
print('Connected by', addr)
while True:
data = conn.recv(1024)
if not data:
break
print('Received request:', data.decode()) conn.sendall(b'Hello, client!\n')
time.sleep(5)
conn.sendall(b'Hello, again!\n')
conn.close()

client.py:
import socket
server_ip = '<server ip>'
server_port = 12346
resp=b'Hello, client!\nHello, again!\n'
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client_socket.connect((server_ip, server_port))
request = 'Hello, server!' client_socket.sendall(request.encode())
peek_data = client_socket.recv(len(resp),
socket.MSG_PEEK | socket.MSG_WAITALL)
print('Peeked data:', peek_data.decode()) client_socket.close()

---
 net/smc/af_smc.c |  2 +-
 net/smc/smc_rx.c | 37 +++++++++++++++++++++----------------
 net/smc/smc_rx.h |  8 ++++----
 3 files changed, 26 insertions(+), 21 deletions(-)
net/smc/af_smc.c +1 -1
index ef0f264932e1f..2a642dfbc94a1 100644
@@ -2209,7 +2209,7 @@ static int smc_accept(struct socket *sock, struct socket *new_sock,
 			release_sock(clcsk);
 		} else if (!atomic_read(&smc_sk(nsk)->conn.bytes_to_rcv)) {
 			lock_sock(nsk);
-			smc_rx_wait(smc_sk(nsk), &timeo, smc_rx_data_available);
+			smc_rx_wait(smc_sk(nsk), &timeo, 0, smc_rx_data_available);
 			release_sock(nsk);
 		}
 	}
net/smc/smc_rx.c +21 -16
index 5b63c250ba604..81cf611eae750 100644
@@ -175,22 +175,23 @@ static int smc_rx_splice(struct pipe_inode_info *pipe, char *src, size_t len,
 	return bytes;
 }
 
-static int smc_rx_data_available_and_no_splice_pend(struct smc_connection *conn)
+static int smc_rx_data_available_and_no_splice_pend(struct smc_connection *conn, size_t peeked)
 {
-	return atomic_read(&conn->bytes_to_rcv) &&
+	return smc_rx_data_available(conn, peeked) &&
 	       !atomic_read(&conn->splice_pending);
 }
 
 /* blocks rcvbuf consumer until >=len bytes available or timeout or interrupted
  *   @smc    smc socket
  *   @timeo  pointer to max seconds to wait, pointer to value 0 for no timeout
+ *   @peeked  number of bytes already peeked
  *   @fcrit  add'l criterion to evaluate as function pointer
  * Returns:
  * 1 if at least 1 byte available in rcvbuf or if socket error/shutdown.
  * 0 otherwise (nothing in rcvbuf nor timeout, e.g. interrupted).
  */
-int smc_rx_wait(struct smc_sock *smc, long *timeo,
-		int (*fcrit)(struct smc_connection *conn))
+int smc_rx_wait(struct smc_sock *smc, long *timeo, size_t peeked,
+		int (*fcrit)(struct smc_connection *conn, size_t baseline))
 {
 	DEFINE_WAIT_FUNC(wait, woken_wake_function);
 	struct smc_connection *conn = &smc->conn;
@@ -199,7 +200,7 @@ int smc_rx_wait(struct smc_sock *smc, long *timeo,
 	struct sock *sk = &smc->sk;
 	int rc;
 
-	if (fcrit(conn))
+	if (fcrit(conn, peeked))
 		return 1;
 	sk_set_bit(SOCKWQ_ASYNC_WAITDATA, sk);
 	add_wait_queue(sk_sleep(sk), &wait);
@@ -208,7 +209,7 @@ int smc_rx_wait(struct smc_sock *smc, long *timeo,
 			   cflags->peer_conn_abort ||
 			   READ_ONCE(sk->sk_shutdown) & RCV_SHUTDOWN ||
 			   conn->killed ||
-			   fcrit(conn),
+			   fcrit(conn, peeked),
 			   &wait);
 	remove_wait_queue(sk_sleep(sk), &wait);
 	sk_clear_bit(SOCKWQ_ASYNC_WAITDATA, sk);
@@ -259,11 +260,11 @@ static int smc_rx_recv_urg(struct smc_sock *smc, struct msghdr *msg, int len,
 	return -EAGAIN;
 }
 
-static bool smc_rx_recvmsg_data_available(struct smc_sock *smc)
+static bool smc_rx_recvmsg_data_available(struct smc_sock *smc, size_t peeked)
 {
 	struct smc_connection *conn = &smc->conn;
 
-	if (smc_rx_data_available(conn))
+	if (smc_rx_data_available(conn, peeked))
 		return true;
 	else if (conn->urg_state == SMC_URG_VALID)
 		/* we received a single urgent Byte - skip */
@@ -281,10 +282,10 @@ static bool smc_rx_recvmsg_data_available(struct smc_sock *smc)
 int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg,
 		   struct pipe_inode_info *pipe, size_t len, int flags)
 {
-	size_t copylen, read_done = 0, read_remaining = len;
+	size_t copylen, read_done = 0, read_remaining = len, peeked_bytes = 0;
 	size_t chunk_len, chunk_off, chunk_len_sum;
 	struct smc_connection *conn = &smc->conn;
-	int (*func)(struct smc_connection *conn);
+	int (*func)(struct smc_connection *conn, size_t baseline);
 	union smc_host_cursor cons;
 	int readable, chunk;
 	char *rcvbuf_base;
@@ -321,14 +322,14 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg,
 		if (conn->killed)
 			break;
 
-		if (smc_rx_recvmsg_data_available(smc))
+		if (smc_rx_recvmsg_data_available(smc, peeked_bytes))
 			goto copy;
 
 		if (sk->sk_shutdown & RCV_SHUTDOWN) {
 			/* smc_cdc_msg_recv_action() could have run after
 			 * above smc_rx_recvmsg_data_available()
 			 */
-			if (smc_rx_recvmsg_data_available(smc))
+			if (smc_rx_recvmsg_data_available(smc, peeked_bytes))
 				goto copy;
 			break;
 		}
@@ -362,26 +363,28 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg,
 			}
 		}
 
-		if (!smc_rx_data_available(conn)) {
-			smc_rx_wait(smc, &timeo, smc_rx_data_available);
+		if (!smc_rx_data_available(conn, peeked_bytes)) {
+			smc_rx_wait(smc, &timeo, peeked_bytes, smc_rx_data_available);
 			continue;
 		}
 
 copy:
 		/* initialize variables for 1st iteration of subsequent loop */
 		/* could be just 1 byte, even after waiting on data above */
-		readable = atomic_read(&conn->bytes_to_rcv);
+		readable = smc_rx_data_available(conn, peeked_bytes);
 		splbytes = atomic_read(&conn->splice_pending);
 		if (!readable || (msg && splbytes)) {
 			if (splbytes)
 				func = smc_rx_data_available_and_no_splice_pend;
 			else
 				func = smc_rx_data_available;
-			smc_rx_wait(smc, &timeo, func);
+			smc_rx_wait(smc, &timeo, peeked_bytes, func);
 			continue;
 		}
 
 		smc_curs_copy(&cons, &conn->local_tx_ctrl.cons, conn);
+		if ((flags & MSG_PEEK) && peeked_bytes)
+			smc_curs_add(conn->rmb_desc->len, &cons, peeked_bytes);
 		/* subsequent splice() calls pick up where previous left */
 		if (splbytes)
 			smc_curs_add(conn->rmb_desc->len, &cons, splbytes);
@@ -418,6 +421,8 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg,
 			}
 			read_remaining -= chunk_len;
 			read_done += chunk_len;
+			if (flags & MSG_PEEK)
+				peeked_bytes += chunk_len;
 
 			if (chunk_len_sum == copylen)
 				break; /* either on 1st or 2nd iteration */
net/smc/smc_rx.h +4 -4
index db823c97d824e..994f5e42d1ba2 100644
@@ -21,11 +21,11 @@ void smc_rx_init(struct smc_sock *smc);
 
 int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg,
 		   struct pipe_inode_info *pipe, size_t len, int flags);
-int smc_rx_wait(struct smc_sock *smc, long *timeo,
-		int (*fcrit)(struct smc_connection *conn));
-static inline int smc_rx_data_available(struct smc_connection *conn)
+int smc_rx_wait(struct smc_sock *smc, long *timeo, size_t peeked,
+		int (*fcrit)(struct smc_connection *conn, size_t baseline));
+static inline int smc_rx_data_available(struct smc_connection *conn, size_t peeked)
 {
-	return atomic_read(&conn->bytes_to_rcv);
+	return atomic_read(&conn->bytes_to_rcv) - peeked;
 }
 
 #endif /* SMC_RX_H */
Signature · 1 line
2.39.5
author maintainer
#60 lore raw

PATCH 60/620 landlock: Move filesystem helpers and add a new one

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Mickaël Salaün <[email protected]>

[ Upstream commit 9da82b20fde95814af721a2a7b1796a5b4a3d78e ]

Move the SB_NOUSER and IS_PRIVATE dentry check to a standalone is_nouser_or_private() helper. This will be useful for a following commit.

Move get_mode_access() and maybe_remove() to make them usable by new code provided by a following commit.

Stable-dep-of: 49440290a093 ("landlock: Handle weird files")

---
 security/landlock/fs.c | 87 ++++++++++++++++++++++--------------------
 1 file changed, 46 insertions(+), 41 deletions(-)
security/landlock/fs.c +46 -41
index c5749301b37d6..7b7860039a08b 100644
@@ -261,6 +261,18 @@ unmask_layers(const struct landlock_rule *const rule,
 	return false;
 }
 
+/*
+ * Allows access to pseudo filesystems that will never be mountable (e.g.
+ * sockfs, pipefs), but can still be reachable through
+ * /proc/<pid>/fd/<file-descriptor>
+ */
+static inline bool is_nouser_or_private(const struct dentry *dentry)
+{
+	return (dentry->d_sb->s_flags & SB_NOUSER) ||
+	       (d_is_positive(dentry) &&
+		unlikely(IS_PRIVATE(d_backing_inode(dentry))));
+}
+
 static int check_access_path(const struct landlock_ruleset *const domain,
 			     const struct path *const path,
 			     const access_mask_t access_request)
@@ -274,14 +286,7 @@ static int check_access_path(const struct landlock_ruleset *const domain,
 		return 0;
 	if (WARN_ON_ONCE(!domain || !path))
 		return 0;
-	/*
-	 * Allows access to pseudo filesystems that will never be mountable
-	 * (e.g. sockfs, pipefs), but can still be reachable through
-	 * /proc/<pid>/fd/<file-descriptor> .
-	 */
-	if ((path->dentry->d_sb->s_flags & SB_NOUSER) ||
-	    (d_is_positive(path->dentry) &&
-	     unlikely(IS_PRIVATE(d_backing_inode(path->dentry)))))
+	if (is_nouser_or_private(path->dentry))
 		return 0;
 	if (WARN_ON_ONCE(domain->num_layers < 1))
 		return -EACCES;
@@ -360,6 +365,39 @@ static inline int current_check_access_path(const struct path *const path,
 	return check_access_path(dom, path, access_request);
 }
 
+static inline access_mask_t get_mode_access(const umode_t mode)
+{
+	switch (mode & S_IFMT) {
+	case S_IFLNK:
+		return LANDLOCK_ACCESS_FS_MAKE_SYM;
+	case 0:
+		/* A zero mode translates to S_IFREG. */
+	case S_IFREG:
+		return LANDLOCK_ACCESS_FS_MAKE_REG;
+	case S_IFDIR:
+		return LANDLOCK_ACCESS_FS_MAKE_DIR;
+	case S_IFCHR:
+		return LANDLOCK_ACCESS_FS_MAKE_CHAR;
+	case S_IFBLK:
+		return LANDLOCK_ACCESS_FS_MAKE_BLOCK;
+	case S_IFIFO:
+		return LANDLOCK_ACCESS_FS_MAKE_FIFO;
+	case S_IFSOCK:
+		return LANDLOCK_ACCESS_FS_MAKE_SOCK;
+	default:
+		WARN_ON_ONCE(1);
+		return 0;
+	}
+}
+
+static inline access_mask_t maybe_remove(const struct dentry *const dentry)
+{
+	if (d_is_negative(dentry))
+		return 0;
+	return d_is_dir(dentry) ? LANDLOCK_ACCESS_FS_REMOVE_DIR :
+				  LANDLOCK_ACCESS_FS_REMOVE_FILE;
+}
+
 /* Inode hooks */
 
 static void hook_inode_free_security(struct inode *const inode)
@@ -553,31 +591,6 @@ static int hook_sb_pivotroot(const struct path *const old_path,
 
 /* Path hooks */
 
-static inline access_mask_t get_mode_access(const umode_t mode)
-{
-	switch (mode & S_IFMT) {
-	case S_IFLNK:
-		return LANDLOCK_ACCESS_FS_MAKE_SYM;
-	case 0:
-		/* A zero mode translates to S_IFREG. */
-	case S_IFREG:
-		return LANDLOCK_ACCESS_FS_MAKE_REG;
-	case S_IFDIR:
-		return LANDLOCK_ACCESS_FS_MAKE_DIR;
-	case S_IFCHR:
-		return LANDLOCK_ACCESS_FS_MAKE_CHAR;
-	case S_IFBLK:
-		return LANDLOCK_ACCESS_FS_MAKE_BLOCK;
-	case S_IFIFO:
-		return LANDLOCK_ACCESS_FS_MAKE_FIFO;
-	case S_IFSOCK:
-		return LANDLOCK_ACCESS_FS_MAKE_SOCK;
-	default:
-		WARN_ON_ONCE(1);
-		return 0;
-	}
-}
-
 /*
  * Creating multiple links or renaming may lead to privilege escalations if not
  * handled properly.  Indeed, we must be sure that the source doesn't gain more
@@ -606,14 +619,6 @@ static int hook_path_link(struct dentry *const old_dentry,
 		get_mode_access(d_backing_inode(old_dentry)->i_mode));
 }
 
-static inline access_mask_t maybe_remove(const struct dentry *const dentry)
-{
-	if (d_is_negative(dentry))
-		return 0;
-	return d_is_dir(dentry) ? LANDLOCK_ACCESS_FS_REMOVE_DIR :
-				  LANDLOCK_ACCESS_FS_REMOVE_FILE;
-}
-
 static int hook_path_rename(const struct path *const old_dir,
 			    struct dentry *const old_dentry,
 			    const struct path *const new_dir,
Signature · 1 line
2.39.5
author maintainer
#61 lore raw

PATCH 61/620 landlock: Handle weird files

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Mickaël Salaün <[email protected]>

[ Upstream commit 49440290a0935f428a1e43a5ac8dc275a647ff80 ]

A corrupted filesystem (e.g. bcachefs) might return weird files. Instead of throwing a warning and allowing access to such file, treat them as regular files.

---
 security/landlock/fs.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
security/landlock/fs.c +5 -6
index 7b7860039a08b..a3d99bba5f1e7 100644
@@ -370,10 +370,6 @@ static inline access_mask_t get_mode_access(const umode_t mode)
 	switch (mode & S_IFMT) {
 	case S_IFLNK:
 		return LANDLOCK_ACCESS_FS_MAKE_SYM;
-	case 0:
-		/* A zero mode translates to S_IFREG. */
-	case S_IFREG:
-		return LANDLOCK_ACCESS_FS_MAKE_REG;
 	case S_IFDIR:
 		return LANDLOCK_ACCESS_FS_MAKE_DIR;
 	case S_IFCHR:
@@ -384,9 +380,12 @@ static inline access_mask_t get_mode_access(const umode_t mode)
 		return LANDLOCK_ACCESS_FS_MAKE_FIFO;
 	case S_IFSOCK:
 		return LANDLOCK_ACCESS_FS_MAKE_SOCK;
+	case S_IFREG:
+	case 0:
+		/* A zero mode translates to S_IFREG. */
 	default:
-		WARN_ON_ONCE(1);
-		return 0;
+		/* Treats weird files as regular files. */
+		return LANDLOCK_ACCESS_FS_MAKE_REG;
 	}
 }
 
Signature · 1 line
2.39.5
author maintainer
#62 lore raw

PATCH 62/620 wifi: mt76: mt76u_vendor_request: Do not print error messages when -EPROTO

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: WangYuli <[email protected]>

[ Upstream commit f1b1e133a770fcdbd89551651232b034d2f7a27a ]

When initializing the network card, unplugging the device will trigger an -EPROTO error, resulting in a flood of error messages being printed frantically.

The exception is printed as follows:

         mt76x2u 2-2.4:1.0: vendor request req:47 off:9018 failed:-71
         mt76x2u 2-2.4:1.0: vendor request req:47 off:9018 failed:-71
         ...

It will continue to print more than 2000 times for about 5 minutes, causing the usb device to be unable to be disconnected. During this period, the usb port cannot recognize the new device because the old device has not disconnected.

There may be other operating methods that cause -EPROTO, but -EPROTO is a low-level hardware error. It is unwise to repeat vendor requests expecting to read correct data. It is a better choice to treat -EPROTO and -ENODEV the same way.

Similar to commit 9b0f100c1970 ("mt76: usb: process URBs with status EPROTO properly") do no schedule rx_worker for urb marked with status set -EPROTO. I also reproduced this situation when plugging and unplugging the device, and this patch is effective.

Just do not vendor request again for urb marked with status set -EPROTO.

---
 drivers/net/wireless/mediatek/mt76/usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/usb.c +2 -2
index 392632c3f1b1d..e40569fc7edea 100644
@@ -34,9 +34,9 @@ static int __mt76u_vendor_request(struct mt76_dev *dev, u8 req,
 
 		ret = usb_control_msg(udev, pipe, req, req_type, val,
 				      offset, buf, len, MT_VEND_REQ_TOUT_MS);
-		if (ret == -ENODEV)
+		if (ret == -ENODEV || ret == -EPROTO)
 			set_bit(MT76_REMOVED, &dev->phy.state);
-		if (ret >= 0 || ret == -ENODEV)
+		if (ret >= 0 || ret == -ENODEV || ret == -EPROTO)
 			return ret;
 		usleep_range(5000, 10000);
 	}
Signature · 1 line
2.39.5
author maintainer
#63 lore raw

PATCH 63/620 cpufreq: ACPI: Fix max-frequency computation

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Gautham R. Shenoy <[email protected]>

[ Upstream commit 0834667545962ef1c5e8684ed32b45d9c574acd3 ]

Commit 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to cover boost frequencies") introduced an assumption in acpi_cpufreq_cpu_init() that the first entry in the P-state table was the nominal frequency. This assumption is incorrect. The frequency corresponding to the P0 P-State need not be the same as the nominal frequency advertised via CPPC.

Since the driver is using the CPPC.highest_perf and CPPC.nominal_perf to compute the boost-ratio, it makes sense to use CPPC.nominal_freq to compute the max-frequency. CPPC.nominal_freq is advertised on platforms supporting CPPC revisions 3 or higher.

Hence, fallback to using the first entry in the P-State table only on platforms that do not advertise CPPC.nominal_freq.

Fixes 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to cover boost frequencies")
[ rjw: Retain reverse X-mas tree ordering of local variable declarations ]
[ rjw: Subject and changelog edits ]
---
 drivers/cpufreq/acpi-cpufreq.c | 36 +++++++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 9 deletions(-)
drivers/cpufreq/acpi-cpufreq.c +27 -9
index 28467d83c7452..4a31bd90406c9 100644
@@ -630,7 +630,14 @@ static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c)
 #endif
 
 #ifdef CONFIG_ACPI_CPPC_LIB
-static u64 get_max_boost_ratio(unsigned int cpu)
+/*
+ * get_max_boost_ratio: Computes the max_boost_ratio as the ratio
+ * between the highest_perf and the nominal_perf.
+ *
+ * Returns the max_boost_ratio for @cpu. Returns the CPPC nominal
+ * frequency via @nominal_freq if it is non-NULL pointer.
+ */
+static u64 get_max_boost_ratio(unsigned int cpu, u64 *nominal_freq)
 {
 	struct cppc_perf_caps perf_caps;
 	u64 highest_perf, nominal_perf;
@@ -653,6 +660,9 @@ static u64 get_max_boost_ratio(unsigned int cpu)
 
 	nominal_perf = perf_caps.nominal_perf;
 
+	if (nominal_freq)
+		*nominal_freq = perf_caps.nominal_freq;
+
 	if (!highest_perf || !nominal_perf) {
 		pr_debug("CPU%d: highest or nominal performance missing\n", cpu);
 		return 0;
@@ -665,8 +675,12 @@ static u64 get_max_boost_ratio(unsigned int cpu)
 
 	return div_u64(highest_perf << SCHED_CAPACITY_SHIFT, nominal_perf);
 }
+
 #else
-static inline u64 get_max_boost_ratio(unsigned int cpu) { return 0; }
+static inline u64 get_max_boost_ratio(unsigned int cpu, u64 *nominal_freq)
+{
+	return 0;
+}
 #endif
 
 static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
@@ -676,9 +690,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
 	struct acpi_cpufreq_data *data;
 	unsigned int cpu = policy->cpu;
 	struct cpuinfo_x86 *c = &cpu_data(cpu);
+	u64 max_boost_ratio, nominal_freq = 0;
 	unsigned int valid_states = 0;
 	unsigned int result = 0;
-	u64 max_boost_ratio;
 	unsigned int i;
 #ifdef CONFIG_SMP
 	static int blacklisted;
@@ -828,16 +842,20 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
 	}
 	freq_table[valid_states].frequency = CPUFREQ_TABLE_END;
 
-	max_boost_ratio = get_max_boost_ratio(cpu);
+	max_boost_ratio = get_max_boost_ratio(cpu, &nominal_freq);
 	if (max_boost_ratio) {
-		unsigned int freq = freq_table[0].frequency;
+		unsigned int freq = nominal_freq;
 
 		/*
-		 * Because the loop above sorts the freq_table entries in the
-		 * descending order, freq is the maximum frequency in the table.
-		 * Assume that it corresponds to the CPPC nominal frequency and
-		 * use it to set cpuinfo.max_freq.
+		 * The loop above sorts the freq_table entries in the
+		 * descending order. If ACPI CPPC has not advertised
+		 * the nominal frequency (this is possible in CPPC
+		 * revisions prior to 3), then use the first entry in
+		 * the pstate table as a proxy for nominal frequency.
 		 */
+		if (!freq)
+			freq = freq_table[0].frequency;
+
 		policy->cpuinfo.max_freq = freq * max_boost_ratio >> SCHED_CAPACITY_SHIFT;
 	} else {
 		/*
Signature · 1 line
2.39.5
author maintainer
#64 lore raw

PATCH 64/620 selftests: harness: fix printing of mismatch values in __EXPECT()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dmitry V. Levin <[email protected]>

[ Upstream commit 02bc220dc6dc7c56edc4859bc5dd2c08b95d5fb5 ]

intptr_t and uintptr_t are not big enough types on 32-bit architectures when printing 64-bit values, resulting to the following incorrect diagnostic output:

# get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (3134324433)

Replace intptr_t and uintptr_t with intmax_t and uintmax_t, respectively. With this fix, the same test produces more usable diagnostic output:

# get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (18446744072548908753)

Fixes b5bb6d3068ea ("selftests/seccomp: fix 32-bit build warnings")
---
 tools/testing/selftests/kselftest_harness.h | 24 ++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)
tools/testing/selftests/kselftest_harness.h +12 -12
index a6ea2bd63a831..af65a83d1422a 100644
@@ -701,33 +701,33 @@
 		/* Report with actual signedness to avoid weird output. */ \
 		switch (is_signed_type(__exp) * 2 + is_signed_type(__seen)) { \
 		case 0: { \
-			unsigned long long __exp_print = (uintptr_t)__exp; \
-			unsigned long long __seen_print = (uintptr_t)__seen; \
-			__TH_LOG("Expected %s (%llu) %s %s (%llu)", \
+			uintmax_t __exp_print = (uintmax_t)__exp; \
+			uintmax_t __seen_print = (uintmax_t)__seen; \
+			__TH_LOG("Expected %s (%ju) %s %s (%ju)", \
 				 _expected_str, __exp_print, #_t, \
 				 _seen_str, __seen_print); \
 			break; \
 			} \
 		case 1: { \
-			unsigned long long __exp_print = (uintptr_t)__exp; \
-			long long __seen_print = (intptr_t)__seen; \
-			__TH_LOG("Expected %s (%llu) %s %s (%lld)", \
+			uintmax_t __exp_print = (uintmax_t)__exp; \
+			intmax_t  __seen_print = (intmax_t)__seen; \
+			__TH_LOG("Expected %s (%ju) %s %s (%jd)", \
 				 _expected_str, __exp_print, #_t, \
 				 _seen_str, __seen_print); \
 			break; \
 			} \
 		case 2: { \
-			long long __exp_print = (intptr_t)__exp; \
-			unsigned long long __seen_print = (uintptr_t)__seen; \
-			__TH_LOG("Expected %s (%lld) %s %s (%llu)", \
+			intmax_t  __exp_print = (intmax_t)__exp; \
+			uintmax_t __seen_print = (uintmax_t)__seen; \
+			__TH_LOG("Expected %s (%jd) %s %s (%ju)", \
 				 _expected_str, __exp_print, #_t, \
 				 _seen_str, __seen_print); \
 			break; \
 			} \
 		case 3: { \
-			long long __exp_print = (intptr_t)__exp; \
-			long long __seen_print = (intptr_t)__seen; \
-			__TH_LOG("Expected %s (%lld) %s %s (%lld)", \
+			intmax_t  __exp_print = (intmax_t)__exp; \
+			intmax_t  __seen_print = (intmax_t)__seen; \
+			__TH_LOG("Expected %s (%jd) %s %s (%jd)", \
 				 _expected_str, __exp_print, #_t, \
 				 _seen_str, __seen_print); \
 			break; \
Signature · 1 line
2.39.5
author maintainer
#65 lore raw

PATCH 65/620 wifi: cfg80211: Handle specific BSSID in 6GHz scanning

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Ilan Peer <[email protected]>

[ Upstream commit 0fca7784b7a14d4ede64f479662afb98876ec7f8 ]

When the scan parameters for a 6GHz scan specify a unicast BSSID address, and the corresponding AP is found in the scan list, add a corresponding entry in the collocated AP list, so this AP would be directly probed even if it was not advertised as a collocated AP.

This is needed for handling a scan request that is intended for a ML probe flow, where user space can requests a scan to retrieve information for other links in the AP MLD.

Stable-dep-of: 1a0d24775cde ("wifi: cfg80211: adjust allocation of colocated AP data")

---
 net/wireless/scan.c | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
net/wireless/scan.c +37 -0
index dc41b31073e75..ad857cd1e6f0e 100644
@@ -796,10 +796,47 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
 		list_for_each_entry(intbss, &rdev->bss_list, list) {
 			struct cfg80211_bss *res = &intbss->pub;
 			const struct cfg80211_bss_ies *ies;
+			const struct element *ssid_elem;
+			struct cfg80211_colocated_ap *entry;
+			u32 s_ssid_tmp;
+			int ret;
 
 			ies = rcu_access_pointer(res->ies);
 			count += cfg80211_parse_colocated_ap(ies,
 							     &coloc_ap_list);
+
+			/* In case the scan request specified a specific BSSID
+			 * and the BSS is found and operating on 6GHz band then
+			 * add this AP to the collocated APs list.
+			 * This is relevant for ML probe requests when the lower
+			 * band APs have not been discovered.
+			 */
+			if (is_broadcast_ether_addr(rdev_req->bssid) ||
+			    !ether_addr_equal(rdev_req->bssid, res->bssid) ||
+			    res->channel->band != NL80211_BAND_6GHZ)
+				continue;
+
+			ret = cfg80211_calc_short_ssid(ies, &ssid_elem,
+						       &s_ssid_tmp);
+			if (ret)
+				continue;
+
+			entry = kzalloc(sizeof(*entry) + IEEE80211_MAX_SSID_LEN,
+					GFP_ATOMIC);
+
+			if (!entry)
+				continue;
+
+			memcpy(entry->bssid, res->bssid, ETH_ALEN);
+			entry->short_ssid = s_ssid_tmp;
+			memcpy(entry->ssid, ssid_elem->data,
+			       ssid_elem->datalen);
+			entry->ssid_len = ssid_elem->datalen;
+			entry->short_ssid_valid = true;
+			entry->center_freq = res->channel->center_freq;
+
+			list_add_tail(&entry->list, &coloc_ap_list);
+			count++;
 		}
 		spin_unlock_bh(&rdev->bss_lock);
 	}
Signature · 1 line
2.39.5
author maintainer
#66 lore raw

PATCH 66/620 wifi: cfg80211: adjust allocation of colocated AP data

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dmitry Antipov <[email protected]>

[ Upstream commit 1a0d24775cdee2b8dc14bfa4f4418c930ab1ac57 ]

In 'cfg80211_scan_6ghz()', an instances of 'struct cfg80211_colocated_ap' are allocated as if they would have 'ssid' as trailing VLA member. Since this is not so, extra IEEE80211_MAX_SSID_LEN bytes are not needed. Briefly tested with KUnit.

Fixes c8cb5b854b40 ("nl80211/cfg80211: support 6 GHz scanning")
---
 net/wireless/scan.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
net/wireless/scan.c +1 -3
index ad857cd1e6f0e..d977d7a7675e1 100644
@@ -821,9 +821,7 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)
 			if (ret)
 				continue;
 
-			entry = kzalloc(sizeof(*entry) + IEEE80211_MAX_SSID_LEN,
-					GFP_ATOMIC);
-
+			entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
 			if (!entry)
 				continue;
 
Signature · 1 line
2.39.5
author maintainer
#67 lore raw

PATCH 67/620 clk: analogbits: Fix incorrect calculation of vco rate delta

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Bo Gan <[email protected]>

[ Upstream commit d7f12857f095ef38523399d47e68787b357232f6 ]

In wrpll_configure_for_rate() we try to determine the best PLL configuration for a target rate. However, in the loop where we try values of R, we should compare the derived vco with target_vco_rate. However, we were in fact comparing it with target_rate, which is actually after Q shift. This is incorrect, and sometimes can result in suboptimal clock rates. Fix it.

Fixes 7b9487a9a5c4 ("clk: analogbits: add Wide-Range PLL library")
---
 drivers/clk/analogbits/wrpll-cln28hpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/analogbits/wrpll-cln28hpc.c +1 -1
index 09ca823563993..d8ae392959969 100644
@@ -291,7 +291,7 @@ int wrpll_configure_for_rate(struct wrpll_cfg *c, u32 target_rate,
 			vco = vco_pre * f;
 		}
 
-		delta = abs(target_rate - vco);
+		delta = abs(target_vco_rate - vco);
 		if (delta < best_delta) {
 			best_delta = delta;
 			best_r = r;
Signature · 1 line
2.39.5
author maintainer
#68 lore raw

PATCH 68/620 selftests/landlock: Fix error message

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Mickaël Salaün <[email protected]>

[ Upstream commit 2107c35128ad751b201eb92fe91443450d9e5c37 ]

The global variable errno may not be set in test_execute(). Do not use it in related error message.

Cc Günther Noack <[email protected]>
Fixes e1199815b47b ("selftests/landlock: Add user space tests")
---
 tools/testing/selftests/landlock/fs_test.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/testing/selftests/landlock/fs_test.c +1 -2
index ea988b3d6b2ed..47fc4392f412e 100644
@@ -1767,8 +1767,7 @@ static void test_execute(struct __test_metadata *const _metadata, const int err,
 	ASSERT_EQ(1, WIFEXITED(status));
 	ASSERT_EQ(err ? 2 : 0, WEXITSTATUS(status))
 	{
-		TH_LOG("Unexpected return code for \"%s\": %s", path,
-		       strerror(errno));
+		TH_LOG("Unexpected return code for \"%s\"", path);
 	};
 }
 
Signature · 1 line
2.39.5
author maintainer
#69 lore raw

PATCH 69/620 net: let net.core.dev_weight always be non-zero

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Liu Jian <[email protected]>

[ Upstream commit d1f9f79fa2af8e3b45cffdeef66e05833480148a ]

The following problem was encountered during stability test:

(NULL net_device): NAPI poll function process_backlog+0x0/0x530 \
returned 1, exceeding its budget of 0.

------------[ cut here ]------------
list_add double add: new=ffff88905f746f48, prev=ffff88905f746f48, \
	next=ffff88905f746e40.
WARNING: CPU: 18 PID: 5462 at lib/list_debug.c:35 \
	__list_add_valid_or_report+0xf3/0x130
CPU: 18 UID: 0 PID: 5462 Comm: ping Kdump: loaded Not tainted 6.13.0-rc7+
RIP: 0010:__list_add_valid_or_report+0xf3/0x130
Call Trace:
? __warn+0xcd/0x250
? __list_add_valid_or_report+0xf3/0x130
enqueue_to_backlog+0x923/0x1070
netif_rx_internal+0x92/0x2b0
__netif_rx+0x15/0x170
loopback_xmit+0x2ef/0x450
dev_hard_start_xmit+0x103/0x490
__dev_queue_xmit+0xeac/0x1950
ip_finish_output2+0x6cc/0x1620
ip_output+0x161/0x270
ip_push_pending_frames+0x155/0x1a0
raw_sendmsg+0xe13/0x1550
__sys_sendto+0x3bf/0x4e0
__x64_sys_sendto+0xdc/0x1b0
do_syscall_64+0x5b/0x170
entry_SYSCALL_64_after_hwframe+0x76/0x7e

The reproduction command is as follows:
sysctl -w net.core.dev_weight=0
ping 127.0.0.1

This is because when the napi's weight is set to 0, process_backlog() may return 0 and clear the NAPI_STATE_SCHED bit of napi->state, causing this napi to be re-polled in net_rx_action() until __do_softirq() times out. Since the NAPI_STATE_SCHED bit has been cleared, napi_schedule_rps() can be retriggered in enqueue_to_backlog(), causing this issue.

Making the napi's weight always non-zero solves this problem.

Triggering this issue requires system-wide admin (setting is not namespaced).

Fixes e38766054509 ("[NET]: Fix sysctl net.core.dev_weight")
Fixes 3d48b53fb2ae ("net: dev_weight: TX/RX orthogonality")
---
 net/core/sysctl_net_core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
net/core/sysctl_net_core.c +4 -1
index ed20cbdd19315..60ea97aaea7d9 100644
@@ -240,7 +240,7 @@ static int proc_do_dev_weight(struct ctl_table *table, int write,
 	int ret, weight;
 
 	mutex_lock(&dev_weight_mutex);
-	ret = proc_dointvec(table, write, buffer, lenp, ppos);
+	ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
 	if (!ret && write) {
 		weight = READ_ONCE(weight_p);
 		WRITE_ONCE(dev_rx_weight, weight * dev_weight_rx_bias);
@@ -351,6 +351,7 @@ static struct ctl_table net_core_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_do_dev_weight,
+		.extra1         = SYSCTL_ONE,
 	},
 	{
 		.procname	= "dev_weight_rx_bias",
@@ -358,6 +359,7 @@ static struct ctl_table net_core_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_do_dev_weight,
+		.extra1         = SYSCTL_ONE,
 	},
 	{
 		.procname	= "dev_weight_tx_bias",
@@ -365,6 +367,7 @@ static struct ctl_table net_core_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_do_dev_weight,
+		.extra1         = SYSCTL_ONE,
 	},
 	{
 		.procname	= "netdev_max_backlog",
Signature · 1 line
2.39.5
author maintainer
#70 lore raw

PATCH 70/620 net/mlxfw: Drop hard coded max FW flash image size

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Maher Sanalla <[email protected]>

[ Upstream commit 70d81f25cc92cc4e914516c9935ae752f27d78ad ]

Currently, mlxfw kernel module limits FW flash image size to be 10MB at most, preventing the ability to burn recent BlueField-3 FW that exceeds the said size limit.

Thus, drop the hard coded limit. Instead, rely on FW's max_component_size threshold that is reported in MCQI register as the size limit for FW image.

---
 drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c +0 -2
index 46245e0b24623..43c84900369a3 100644
@@ -14,7 +14,6 @@
 #define MLXFW_FSM_STATE_WAIT_TIMEOUT_MS 30000
 #define MLXFW_FSM_STATE_WAIT_ROUNDS \
 	(MLXFW_FSM_STATE_WAIT_TIMEOUT_MS / MLXFW_FSM_STATE_WAIT_CYCLE_MS)
-#define MLXFW_FSM_MAX_COMPONENT_SIZE (10 * (1 << 20))
 
 static const int mlxfw_fsm_state_errno[] = {
 	[MLXFW_FSM_STATE_ERR_ERROR] = -EIO,
@@ -229,7 +228,6 @@ static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev,
 		return err;
 	}
 
-	comp_max_size = min_t(u32, comp_max_size, MLXFW_FSM_MAX_COMPONENT_SIZE);
 	if (comp->data_size > comp_max_size) {
 		MLXFW_ERR_MSG(mlxfw_dev, extack,
 			      "Component size is bigger than limit", -EINVAL);
Signature · 1 line
2.39.5
author maintainer
#71 lore raw

PATCH 71/620 net: avoid race between device unregistration and ethnl ops

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Antoine Tenart <[email protected]>

[ Upstream commit 12e070eb6964b341b41677fd260af5a305316a1f ]

The following trace can be seen if a device is being unregistered while its number of channels are being modified.

DEBUG_LOCKS_WARN_ON(lock->magic != lock)

  WARNING: CPU: 3 PID: 3754 at kernel/locking/mutex.c:564 __mutex_lock+0xc8a/0x1120
  CPU: 3 UID: 0 PID: 3754 Comm: ethtool Not tainted 6.13.0-rc6+ #771
  RIP: 0010:__mutex_lock+0xc8a/0x1120
  Call Trace:
   <TASK>
   ethtool_check_max_channel+0x1ea/0x880
   ethnl_set_channels+0x3c3/0xb10
   ethnl_default_set_doit+0x306/0x650
   genl_family_rcv_msg_doit+0x1e3/0x2c0
   genl_rcv_msg+0x432/0x6f0
   netlink_rcv_skb+0x13d/0x3b0
   genl_rcv+0x28/0x40
   netlink_unicast+0x42e/0x720
   netlink_sendmsg+0x765/0xc20
   __sys_sendto+0x3ac/0x420
   __x64_sys_sendto+0xe0/0x1c0
   do_syscall_64+0x95/0x180
   entry_SYSCALL_64_after_hwframe+0x76/0x7e

This is because unregister_netdevice_many_notify might run before the rtnl lock section of ethnl operations, eg. set_channels in the above example. In this example the rss lock would be destroyed by the device unregistration path before being used again, but in general running ethnl operations while dismantle has started is not a good idea.

Fix this by denying any operation on devices being unregistered. A check was already there in ethnl_ops_begin, but not wide enough.

Note that the same issue cannot be seen on the ioctl version (__dev_ethtool) because the device reference is retrieved from within the rtnl lock section there. Once dismantle started, the net device is unlisted and no reference will be found.

Fixes dde91ccfa25f ("ethtool: do not perform operations on net devices being unregistered")
---
 net/ethtool/netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ethtool/netlink.c +1 -1
index b3729bdafb602..0ffcd0e873b60 100644
@@ -41,7 +41,7 @@ int ethnl_ops_begin(struct net_device *dev)
 		pm_runtime_get_sync(dev->dev.parent);
 
 	if (!netif_device_present(dev) ||
-	    dev->reg_state == NETREG_UNREGISTERING) {
+	    dev->reg_state >= NETREG_UNREGISTERING) {
 		ret = -ENODEV;
 		goto err;
 	}
Signature · 1 line
2.39.5
author maintainer
#72 lore raw

PATCH 72/620 net: sched: Disallow replacing of child qdisc from one parent to another

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Jamal Hadi Salim <[email protected]>

[ Upstream commit bc50835e83f60f56e9bec2b392fb5544f250fb6f ]

Lion Ackermann was able to create a UAF which can be abused for privilege escalation with the following script

Step 1. create root qdisc
tc qdisc add dev lo root handle 1:0 drr

step2. a class for packet aggregation do demonstrate uaf tc class add dev lo classid 1:1 drr

step3. a class for nesting
tc class add dev lo classid 1:2 drr

step4. a class to graft qdisc to
tc class add dev lo classid 1:3 drr

step5.
tc qdisc add dev lo parent 1:1 handle 2:0 plug limit 1024

step6.
tc qdisc add dev lo parent 1:2 handle 3:0 drr

step7.
tc class add dev lo classid 3:1 drr

step 8.
tc qdisc add dev lo parent 3:1 handle 4:0 pfifo

step 9. Display the class/qdisc layout

tc class ls dev lo
class drr 1:1 root leaf 2: quantum 64Kb
class drr 1:2 root leaf 3: quantum 64Kb
class drr 3:1 root leaf 4: quantum 64Kb

tc qdisc ls
qdisc drr 1: dev lo root refcnt 2
qdisc plug 2: dev lo parent 1:1
qdisc pfifo 4: dev lo parent 3:1 limit 1000p
qdisc drr 3: dev lo parent 1:2

step10. trigger the bug <=== prevented by this patch tc qdisc replace dev lo parent 1:3 handle 4:0

step 11. Redisplay again the qdiscs/classes

tc class ls dev lo
class drr 1:1 root leaf 2: quantum 64Kb
class drr 1:2 root leaf 3: quantum 64Kb
class drr 1:3 root leaf 4: quantum 64Kb
class drr 3:1 root leaf 4: quantum 64Kb

tc qdisc ls
qdisc drr 1: dev lo root refcnt 2
qdisc plug 2: dev lo parent 1:1
qdisc pfifo 4: dev lo parent 3:1 refcnt 2 limit 1000p qdisc drr 3: dev lo parent 1:2

Observe that a) parent for 4:0 does not change despite the replace request. There can only be one parent. b) refcount has gone up by two for 4:0 and
c) both class 1:3 and 3:1 are pointing to it.

Step 12. send one packet to plug
echo "" | socat -u STDIN UDP4-DATAGRAM:127.0.0.1:8888,priority=$((0x10001)) step13. send one packet to the grafted fifo
echo "" | socat -u STDIN UDP4-DATAGRAM:127.0.0.1:8888,priority=$((0x10003))

step14. lets trigger the uaf
tc class delete dev lo classid 1:3
tc class delete dev lo classid 1:1

The semantics of "replace" is for a del/add _on the same node_ and not a delete from one node(3:1) and add to another node (1:3) as in step10. While we could "fix" with a more complex approach there could be consequences to expectations so the patch takes the preventive approach of "disallow such config".

Joint work with Lion Ackermann <[email protected]>

---
 net/sched/sch_api.c | 4 ++++
 1 file changed, 4 insertions(+)
net/sched/sch_api.c +4 -0
index bf8af9f3f3dce..516874d943cd9 100644
@@ -1603,6 +1603,10 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n,
 				q = qdisc_lookup(dev, tcm->tcm_handle);
 				if (!q)
 					goto create_n_graft;
+				if (q->parent != tcm->tcm_parent) {
+					NL_SET_ERR_MSG(extack, "Cannot move an existing qdisc to a different parent");
+					return -EINVAL;
+				}
 				if (n->nlmsg_flags & NLM_F_EXCL) {
 					NL_SET_ERR_MSG(extack, "Exclusivity flag on, cannot override");
 					return -EEXIST;
Signature · 1 line
2.39.5
author maintainer
#73 lore raw

PATCH 73/620 netfilter: nft_flow_offload: update tcp state flags under lock

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Florian Westphal <[email protected]>

[ Upstream commit 7a4b61406395291ffb7220a10e8951a9a8684819 ]

The conntrack entry is already public, there is a small chance that another CPU is handling a packet in reply direction and racing with the tcp state update.

Move this under ct spinlock.

This is done once, when ct is about to be offloaded, so this should not result in a noticeable performance hit.

Fixes 8437a6209f76 ("netfilter: nft_flow_offload: set liberal tracking mode for tcp")
---
 net/netfilter/nft_flow_offload.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
net/netfilter/nft_flow_offload.c +11 -5
index fbb9f3a6c8444..41d04fa12f67d 100644
@@ -278,6 +278,15 @@ static bool nft_flow_offload_skip(struct sk_buff *skb, int family)
 	return false;
 }
 
+static void flow_offload_ct_tcp(struct nf_conn *ct)
+{
+	/* conntrack will not see all packets, disable tcp window validation. */
+	spin_lock_bh(&ct->lock);
+	ct->proto.tcp.seen[0].flags |= IP_CT_TCP_FLAG_BE_LIBERAL;
+	ct->proto.tcp.seen[1].flags |= IP_CT_TCP_FLAG_BE_LIBERAL;
+	spin_unlock_bh(&ct->lock);
+}
+
 static void nft_flow_offload_eval(const struct nft_expr *expr,
 				  struct nft_regs *regs,
 				  const struct nft_pktinfo *pkt)
@@ -332,11 +341,8 @@ static void nft_flow_offload_eval(const struct nft_expr *expr,
 		goto err_flow_alloc;
 
 	flow_offload_route_init(flow, &route);
-
-	if (tcph) {
-		ct->proto.tcp.seen[0].flags |= IP_CT_TCP_FLAG_BE_LIBERAL;
-		ct->proto.tcp.seen[1].flags |= IP_CT_TCP_FLAG_BE_LIBERAL;
-	}
+	if (tcph)
+		flow_offload_ct_tcp(ct);
 
 	ret = flow_offload_add(flowtable, flow);
 	if (ret < 0)
Signature · 1 line
2.39.5
author maintainer
#74 lore raw

PATCH 74/620 net: ethernet: ti: am65-cpsw: fix freeing IRQ in am65_cpsw_nuss_remove_tx_chns()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Roger Quadros <[email protected]>

[ Upstream commit 4395a44acb15850e492dd1de9ec4b6479d96bc80 ]

When getting the IRQ we use k3_udma_glue_tx_get_irq() which returns negative error value on error. So not NULL check is not sufficient to deteremine if IRQ is valid. Check that IRQ is greater then zero to ensure it is valid.

There is no issue at probe time but at runtime user can invoke .set_channels which results in the following call chain. am65_cpsw_set_channels()
am65_cpsw_nuss_update_tx_rx_chns()
am65_cpsw_nuss_remove_tx_chns() am65_cpsw_nuss_init_tx_chns()

At this point if am65_cpsw_nuss_init_tx_chns() fails due to k3_udma_glue_tx_get_irq() then tx_chn->irq will be set to a negative value.

Then, at subsequent .set_channels with higher channel count we will attempt to free an invalid IRQ in am65_cpsw_nuss_remove_tx_chns() leading to a kernel warning.

The issue is present in the original commit that introduced this driver, although there, am65_cpsw_nuss_update_tx_rx_chns() existed as am65_cpsw_nuss_update_tx_chns().

Fixes 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ti/am65-cpsw-nuss.c +1 -1
index 4bd57b79a023b..c2700fcfc10e2 100644
@@ -1546,7 +1546,7 @@ void am65_cpsw_nuss_remove_tx_chns(struct am65_cpsw_common *common)
 	for (i = 0; i < common->tx_ch_num; i++) {
 		struct am65_cpsw_tx_chn *tx_chn = &common->tx_chns[i];
 
-		if (tx_chn->irq)
+		if (tx_chn->irq > 0)
 			devm_free_irq(dev, tx_chn->irq, tx_chn);
 
 		netif_napi_del(&tx_chn->napi_tx);
Signature · 1 line
2.39.5
author maintainer
#75 lore raw

PATCH 75/620 tcp_cubic: fix incorrect HyStart round start detection

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Mahdi Arghavani <[email protected]>

[ Upstream commit 25c1a9ca53db5780757e7f53e688b8f916821baa ]

I noticed that HyStart incorrectly marks the start of rounds, leading to inaccurate measurements of ACK train lengths and resetting the ca->sample_cnt variable. This inaccuracy can impact HyStart's functionality in terminating exponential cwnd growth during Slow-Start, potentially degrading TCP performance.

The issue arises because the changes introduced in commit 4e1fddc98d25 ("tcp_cubic: fix spurious Hystart ACK train detections for not-cwnd-limited flows") moved the caller of the bictcp_hystart_reset function inside the hystart_update function. This modification added an additional condition for triggering the caller, requiring that (tcp_snd_cwnd(tp) >= hystart_low_window) must also
be satisfied before invoking bictcp_hystart_reset.

This fix ensures that bictcp_hystart_reset is correctly called at the start of a new round, regardless of the congestion window size. This is achieved by moving the condition
(tcp_snd_cwnd(tp) >= hystart_low_window)
from before calling bictcp_hystart_reset to after it.

I tested with a client and a server connected through two Linux software routers. In this setup, the minimum RTT was 150 ms, the bottleneck bandwidth was 50 Mbps, and the bottleneck buffer size was 1 BDP, calculated as (50M / 1514 / 8) * 0.150 = 619 packets. I conducted the test twice, transferring data from the server to the client for 1.5 seconds. Before the patch was applied, HYSTART-DELAY stopped the exponential growth of cwnd when cwnd = 516, and the bottleneck link was not yet saturated (516 < 619).
After the patch was applied, HYSTART-ACK-TRAIN stopped the exponential growth of cwnd when cwnd = 632, and the bottleneck link was saturated (632 > 619).
In this test, applying the patch resulted in 300 KB more data delivered.

Fixes 4e1fddc98d25 ("tcp_cubic: fix spurious Hystart ACK train detections for not-cwnd-limited flows")
Cc Neal Cardwell <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Haibo Zhang <[email protected]>
Cc David Eyers <[email protected]>
Cc Abbas Arghavani <[email protected]>
---
 net/ipv4/tcp_cubic.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
net/ipv4/tcp_cubic.c +5 -3
index af4fc067f2a19..741a15799ab35 100644
@@ -390,6 +390,10 @@ static void hystart_update(struct sock *sk, u32 delay)
 	if (after(tp->snd_una, ca->end_seq))
 		bictcp_hystart_reset(sk);
 
+	/* hystart triggers when cwnd is larger than some threshold */
+	if (tcp_snd_cwnd(tp) < hystart_low_window)
+		return;
+
 	if (hystart_detect & HYSTART_ACK_TRAIN) {
 		u32 now = bictcp_clock_us(sk);
 
@@ -465,9 +469,7 @@ static void cubictcp_acked(struct sock *sk, const struct ack_sample *sample)
 	if (ca->delay_min == 0 || ca->delay_min > delay)
 		ca->delay_min = delay;
 
-	/* hystart triggers when cwnd is larger than some threshold */
-	if (!ca->found && tcp_in_slow_start(tp) && hystart &&
-	    tcp_snd_cwnd(tp) >= hystart_low_window)
+	if (!ca->found && tcp_in_slow_start(tp) && hystart)
 		hystart_update(sk, delay);
 }
 
Signature · 1 line
2.39.5
author maintainer
#76 lore raw

PATCH 76/620 net/rose: prevent integer overflows in rose_setsockopt()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Nikita Zhandarovich <[email protected]>

[ Upstream commit d640627663bfe7d8963c7615316d7d4ef60f3b0b ]

In case of possible unpredictably large arguments passed to rose_setsockopt() and multiplied by extra values on top of that, integer overflows may occur.

Do the safest minimum and fix these issues by checking the contents of 'opt' and returning -EINVAL if they are too large. Also, switch to unsigned int and remove useless check for negative 'opt' in ROSE_IDLE case.

---
 net/rose/af_rose.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
net/rose/af_rose.c +8 -8
index 1d95ff34b13c9..65fd5b99f9dea 100644
@@ -396,15 +396,15 @@ static int rose_setsockopt(struct socket *sock, int level, int optname,
 {
 	struct sock *sk = sock->sk;
 	struct rose_sock *rose = rose_sk(sk);
-	int opt;
+	unsigned int opt;
 
 	if (level != SOL_ROSE)
 		return -ENOPROTOOPT;
 
-	if (optlen < sizeof(int))
+	if (optlen < sizeof(unsigned int))
 		return -EINVAL;
 
-	if (copy_from_sockptr(&opt, optval, sizeof(int)))
+	if (copy_from_sockptr(&opt, optval, sizeof(unsigned int)))
 		return -EFAULT;
 
 	switch (optname) {
@@ -413,31 +413,31 @@ static int rose_setsockopt(struct socket *sock, int level, int optname,
 		return 0;
 
 	case ROSE_T1:
-		if (opt < 1)
+		if (opt < 1 || opt > UINT_MAX / HZ)
 			return -EINVAL;
 		rose->t1 = opt * HZ;
 		return 0;
 
 	case ROSE_T2:
-		if (opt < 1)
+		if (opt < 1 || opt > UINT_MAX / HZ)
 			return -EINVAL;
 		rose->t2 = opt * HZ;
 		return 0;
 
 	case ROSE_T3:
-		if (opt < 1)
+		if (opt < 1 || opt > UINT_MAX / HZ)
 			return -EINVAL;
 		rose->t3 = opt * HZ;
 		return 0;
 
 	case ROSE_HOLDBACK:
-		if (opt < 1)
+		if (opt < 1 || opt > UINT_MAX / HZ)
 			return -EINVAL;
 		rose->hb = opt * HZ;
 		return 0;
 
 	case ROSE_IDLE:
-		if (opt < 0)
+		if (opt > UINT_MAX / (60 * HZ))
 			return -EINVAL;
 		rose->idle = opt * 60 * HZ;
 		return 0;
Signature · 1 line
2.39.5
author maintainer
#77 lore raw

PATCH 77/620 tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Marco Leogrande <[email protected]>

[ Upstream commit e2f0791124a1b6ca8d570110cbd487969d9d41ef ]

Commit f803bcf9208a ("selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh") added code that waits for the netcat server to start before the netcat client attempts to connect to it. However, not all calls to 'server_listen' were guarded.

This patch adds the existing 'wait_for_port' guard after the remaining call to 'server_listen'.

Fixes f803bcf9208a ("selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh")
---
 tools/testing/selftests/bpf/test_tc_tunnel.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/bpf/test_tc_tunnel.sh +1 -0
index 38c6e9f16f41e..88488779792ff 100755
@@ -295,6 +295,7 @@ else
 	client_connect
 	verify_data
 	server_listen
+	wait_for_port ${port} ${netcat_opt}
 fi
 
 # bpf_skb_net_shrink does not take tunnel flags yet, cannot update L3.
Signature · 1 line
2.39.5
author maintainer
#78 lore raw

PATCH 78/620 libbpf: Fix segfault due to libelf functions not setting errno

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Quentin Monnet <[email protected]>

[ Upstream commit e10500b69c3f3378f3dcfc8c2fe4cdb74fc844f5 ]

Libelf functions do not set errno on failure. Instead, it relies on its internal _elf_errno value, that can be retrieved via elf_errno (or the corresponding message via elf_errmsg()). From "man libelf":

If a libelf function encounters an error it will set an internal error code that can be retrieved with elf_errno. Each thread maintains its own separate error code. The meaning of each error code can be determined with elf_errmsg, which returns a string describing the error.

As a consequence, libbpf should not return -errno when a function from libelf fails, because an empty value will not be interpreted as an error and won't prevent the program to stop. This is visible in bpf_linker__add_file(), for example, where we call a succession of functions that rely on libelf:

    err = err ?: linker_load_obj_file(linker, filename, opts, &obj);
    err = err ?: linker_append_sec_data(linker, &obj);
    err = err ?: linker_append_elf_syms(linker, &obj);
    err = err ?: linker_append_elf_relos(linker, &obj);
    err = err ?: linker_append_btf(linker, &obj);
    err = err ?: linker_append_btf_ext(linker, &obj);

If the object file that we try to process is not, in fact, a correct object file, linker_load_obj_file() may fail with errno not being set, and return 0. In this case we attempt to run linker_append_elf_sysms() and may segfault.

This can happen (and was discovered) with bpftool:

    $ bpftool gen object output.o sample_ret0.bpf.c
    libbpf: failed to get ELF header for sample_ret0.bpf.c: invalid `Elf' handle
    zsh: segmentation fault (core dumped)  bpftool gen object output.o sample_ret0.bpf.c

Fix the issue by returning a non-null error code (-EINVAL) when libelf functions fail.

---
 tools/lib/bpf/linker.c | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)
tools/lib/bpf/linker.c +8 -14
index 8907d4238818c..2adf55f487430 100644
@@ -568,17 +568,15 @@ static int linker_load_obj_file(struct bpf_linker *linker, const char *filename,
 	}
 	obj->elf = elf_begin(obj->fd, ELF_C_READ_MMAP, NULL);
 	if (!obj->elf) {
-		err = -errno;
 		pr_warn_elf("failed to parse ELF file '%s'", filename);
-		return err;
+		return -EINVAL;
 	}
 
 	/* Sanity check ELF file high-level properties */
 	ehdr = elf64_getehdr(obj->elf);
 	if (!ehdr) {
-		err = -errno;
 		pr_warn_elf("failed to get ELF header for %s", filename);
-		return err;
+		return -EINVAL;
 	}
 	if (ehdr->e_ident[EI_DATA] != host_endianness) {
 		err = -EOPNOTSUPP;
@@ -594,9 +592,8 @@ static int linker_load_obj_file(struct bpf_linker *linker, const char *filename,
 	}
 
 	if (elf_getshdrstrndx(obj->elf, &obj->shstrs_sec_idx)) {
-		err = -errno;
 		pr_warn_elf("failed to get SHSTRTAB section index for %s", filename);
-		return err;
+		return -EINVAL;
 	}
 
 	scn = NULL;
@@ -606,26 +603,23 @@ static int linker_load_obj_file(struct bpf_linker *linker, const char *filename,
 
 		shdr = elf64_getshdr(scn);
 		if (!shdr) {
-			err = -errno;
 			pr_warn_elf("failed to get section #%zu header for %s",
 				    sec_idx, filename);
-			return err;
+			return -EINVAL;
 		}
 
 		sec_name = elf_strptr(obj->elf, obj->shstrs_sec_idx, shdr->sh_name);
 		if (!sec_name) {
-			err = -errno;
 			pr_warn_elf("failed to get section #%zu name for %s",
 				    sec_idx, filename);
-			return err;
+			return -EINVAL;
 		}
 
 		data = elf_getdata(scn, 0);
 		if (!data) {
-			err = -errno;
 			pr_warn_elf("failed to get section #%zu (%s) data from %s",
 				    sec_idx, sec_name, filename);
-			return err;
+			return -EINVAL;
 		}
 
 		sec = add_src_sec(obj, sec_name);
@@ -2601,14 +2595,14 @@ int bpf_linker__finalize(struct bpf_linker *linker)
 
 	/* Finalize ELF layout */
 	if (elf_update(linker->elf, ELF_C_NULL) < 0) {
-		err = -errno;
+		err = -EINVAL;
 		pr_warn_elf("failed to finalize ELF layout");
 		return libbpf_err(err);
 	}
 
 	/* Write out final ELF contents */
 	if (elf_update(linker->elf, ELF_C_WRITE) < 0) {
-		err = -errno;
+		err = -EINVAL;
 		pr_warn_elf("failed to write ELF contents");
 		return libbpf_err(err);
 	}
Signature · 1 line
2.39.5
author maintainer
#79 lore raw

PATCH 79/620 ASoC: sun4i-spdif: Add clock multiplier settings

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: George Lander <[email protected]>

[ Upstream commit 0a2319308de88b9e819c0b43d0fccd857123eb31 ]

There have been intermittent issues with the SPDIF output on H3 and H2+ devices which has been fixed by setting the s_clk to 4 times the audio pll.
Add a quirk for the clock multiplier as not every supported SoC requires it. Without the multiplier, the audio at normal sampling rates was distorted and did not play at higher sampling rates.

Fixes 1bd92af877ab ("ASoC: sun4i-spdif: Add support for the H3 SoC")
---
 sound/soc/sunxi/sun4i-spdif.c | 7 +++++++
 1 file changed, 7 insertions(+)
sound/soc/sunxi/sun4i-spdif.c +7 -0
index dd8d13f3fd121..e885af039b92f 100644
@@ -175,6 +175,7 @@ struct sun4i_spdif_quirks {
 	unsigned int reg_dac_txdata;
 	bool has_reset;
 	unsigned int val_fctl_ftx;
+	unsigned int mclk_multiplier;
 };
 
 struct sun4i_spdif_dev {
@@ -311,6 +312,7 @@ static int sun4i_spdif_hw_params(struct snd_pcm_substream *substream,
 	default:
 		return -EINVAL;
 	}
+	mclk *= host->quirks->mclk_multiplier;
 
 	ret = clk_set_rate(host->spdif_clk, mclk);
 	if (ret < 0) {
@@ -345,6 +347,7 @@ static int sun4i_spdif_hw_params(struct snd_pcm_substream *substream,
 	default:
 		return -EINVAL;
 	}
+	mclk_div *= host->quirks->mclk_multiplier;
 
 	reg_val = 0;
 	reg_val |= SUN4I_SPDIF_TXCFG_ASS;
@@ -427,24 +430,28 @@ static struct snd_soc_dai_driver sun4i_spdif_dai = {
 static const struct sun4i_spdif_quirks sun4i_a10_spdif_quirks = {
 	.reg_dac_txdata	= SUN4I_SPDIF_TXFIFO,
 	.val_fctl_ftx   = SUN4I_SPDIF_FCTL_FTX,
+	.mclk_multiplier = 1,
 };
 
 static const struct sun4i_spdif_quirks sun6i_a31_spdif_quirks = {
 	.reg_dac_txdata	= SUN4I_SPDIF_TXFIFO,
 	.val_fctl_ftx   = SUN4I_SPDIF_FCTL_FTX,
 	.has_reset	= true,
+	.mclk_multiplier = 1,
 };
 
 static const struct sun4i_spdif_quirks sun8i_h3_spdif_quirks = {
 	.reg_dac_txdata	= SUN8I_SPDIF_TXFIFO,
 	.val_fctl_ftx   = SUN4I_SPDIF_FCTL_FTX,
 	.has_reset	= true,
+	.mclk_multiplier = 4,
 };
 
 static const struct sun4i_spdif_quirks sun50i_h6_spdif_quirks = {
 	.reg_dac_txdata = SUN8I_SPDIF_TXFIFO,
 	.val_fctl_ftx   = SUN50I_H6_SPDIF_FCTL_FTX,
 	.has_reset      = true,
+	.mclk_multiplier = 1,
 };
 
 static const struct of_device_id sun4i_spdif_of_match[] = {
Signature · 1 line
2.39.5
author maintainer
#80 lore raw

PATCH 80/620 perf header: Fix one memory leakage in process_bpf_btf()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Zhongqiu Han <[email protected]>

[ Upstream commit 875d22980a062521beed7b5df71fb13a1af15d83 ]

If __perf_env__insert_btf() returns false due to a duplicate btf node insertion, the temporary node will leak. Add a check to ensure the memory is freed if the function returns false.

Fixes a70a1123174ab592 ("perf bpf: Save BTF information as headers to perf.data")
Cc Adrian Hunter <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Ian Rogers <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Song Liu <[email protected]>
Cc Yicong Yang <[email protected]>
---
 tools/perf/util/header.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/header.c +2 -1
index 8b0a8ac7afefd..7937ff460c446 100644
@@ -3120,7 +3120,8 @@ static int process_bpf_btf(struct feat_fd *ff, void *data __maybe_unused)
 		if (__do_read(ff, node->data, data_size))
 			goto out;
 
-		__perf_env__insert_btf(env, node);
+		if (!__perf_env__insert_btf(env, node))
+			free(node);
 		node = NULL;
 	}
 
Signature · 1 line
2.39.5
author maintainer
#81 lore raw

PATCH 81/620 perf header: Fix one memory leakage in process_bpf_prog_info()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Zhongqiu Han <[email protected]>

[ Upstream commit a7da6c7030e1aec32f0a41c7b4fa70ec96042019 ]

Function __perf_env__insert_bpf_prog_info() will return without inserting bpf prog info node into perf env again due to a duplicate bpf prog info node insertion, causing the temporary info_linear and info_node memory to leak. Modify the return type of this function to bool and add a check to ensure the memory is freed if the function returns false.

Fixes 606f972b1361f477 ("perf bpf: Save bpf_prog_info information as headers to perf.data")
Cc Adrian Hunter <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Ian Rogers <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Song Liu <[email protected]>
Cc Yicong Yang <[email protected]>
---
 tools/perf/util/env.c    | 5 +++--
 tools/perf/util/env.h    | 2 +-
 tools/perf/util/header.c | 5 ++++-
 3 files changed, 8 insertions(+), 4 deletions(-)
tools/perf/util/env.c +3 -2
index d3d67ce70f556..e6f8d3b0ef8a6 100644
@@ -26,7 +26,7 @@ void perf_env__insert_bpf_prog_info(struct perf_env *env,
 	up_write(&env->bpf_progs.lock);
 }
 
-void __perf_env__insert_bpf_prog_info(struct perf_env *env, struct bpf_prog_info_node *info_node)
+bool __perf_env__insert_bpf_prog_info(struct perf_env *env, struct bpf_prog_info_node *info_node)
 {
 	__u32 prog_id = info_node->info_linear->info.id;
 	struct bpf_prog_info_node *node;
@@ -44,13 +44,14 @@ void __perf_env__insert_bpf_prog_info(struct perf_env *env, struct bpf_prog_info
 			p = &(*p)->rb_right;
 		} else {
 			pr_debug("duplicated bpf prog info %u\n", prog_id);
-			return;
+			return false;
 		}
 	}
 
 	rb_link_node(&info_node->rb_node, parent, p);
 	rb_insert_color(&info_node->rb_node, &env->bpf_progs.infos);
 	env->bpf_progs.infos_cnt++;
+	return true;
 }
 
 struct bpf_prog_info_node *perf_env__find_bpf_prog_info(struct perf_env *env,
tools/perf/util/env.h +1 -1
index 192318054e12f..e098ee49237c4 100644
@@ -163,7 +163,7 @@ const char *perf_env__raw_arch(struct perf_env *env);
 int perf_env__nr_cpus_avail(struct perf_env *env);
 
 void perf_env__init(struct perf_env *env);
-void __perf_env__insert_bpf_prog_info(struct perf_env *env,
+bool __perf_env__insert_bpf_prog_info(struct perf_env *env,
 				      struct bpf_prog_info_node *info_node);
 void perf_env__insert_bpf_prog_info(struct perf_env *env,
 				    struct bpf_prog_info_node *info_node);
tools/perf/util/header.c +4 -1
index 7937ff460c446..3e18acb719324 100644
@@ -3073,7 +3073,10 @@ static int process_bpf_prog_info(struct feat_fd *ff, void *data __maybe_unused)
 		/* after reading from file, translate offset to address */
 		bpf_program__bpil_offs_to_addr(info_linear);
 		info_node->info_linear = info_linear;
-		__perf_env__insert_bpf_prog_info(env, info_node);
+		if (!__perf_env__insert_bpf_prog_info(env, info_node)) {
+			free(info_linear);
+			free(info_node);
+		}
 	}
 
 	up_write(&env->bpf_progs.lock);
Signature · 1 line
2.39.5
author maintainer
#82 lore raw

PATCH 82/620 perf bpf: Fix two memory leakages when calling perf_env__insert_bpf_prog_info()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Zhongqiu Han <[email protected]>

[ Upstream commit 03edb7020bb920f1935c3f30acad0bb27fdb99af ]

If perf_env__insert_bpf_prog_info() returns false due to a duplicate bpf prog info node insertion, the temporary info_node and info_linear memory will leak. Add a check to ensure the memory is freed if the function returns false.

Fixes d56354dc49091e33 ("perf tools: Save bpf_prog_info and BTF of new BPF programs")
Cc Adrian Hunter <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Ian Rogers <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Song Liu <[email protected]>
Cc Yicong Yang <[email protected]>
---
 tools/perf/util/bpf-event.c | 10 ++++++++--
 tools/perf/util/env.c       |  8 ++++++--
 tools/perf/util/env.h       |  2 +-
 3 files changed, 15 insertions(+), 5 deletions(-)
tools/perf/util/bpf-event.c +8 -2
index ce74bc367e9c4..41b889ab4d6ab 100644
@@ -300,7 +300,10 @@ static int perf_event__synthesize_one_bpf_prog(struct perf_session *session,
 		}
 
 		info_node->info_linear = info_linear;
-		perf_env__insert_bpf_prog_info(env, info_node);
+		if (!perf_env__insert_bpf_prog_info(env, info_node)) {
+			free(info_linear);
+			free(info_node);
+		}
 		info_linear = NULL;
 
 		/*
@@ -488,7 +491,10 @@ static void perf_env__add_bpf_info(struct perf_env *env, u32 id)
 	info_node = malloc(sizeof(struct bpf_prog_info_node));
 	if (info_node) {
 		info_node->info_linear = info_linear;
-		perf_env__insert_bpf_prog_info(env, info_node);
+		if (!perf_env__insert_bpf_prog_info(env, info_node)) {
+			free(info_linear);
+			free(info_node);
+		}
 	} else
 		free(info_linear);
 
tools/perf/util/env.c +6 -2
index e6f8d3b0ef8a6..6903accf3a5c4 100644
@@ -18,12 +18,16 @@ struct perf_env perf_env;
 #include "bpf-event.h"
 #include <bpf/libbpf.h>
 
-void perf_env__insert_bpf_prog_info(struct perf_env *env,
+bool perf_env__insert_bpf_prog_info(struct perf_env *env,
 				    struct bpf_prog_info_node *info_node)
 {
+	bool ret;
+
 	down_write(&env->bpf_progs.lock);
-	__perf_env__insert_bpf_prog_info(env, info_node);
+	ret = __perf_env__insert_bpf_prog_info(env, info_node);
 	up_write(&env->bpf_progs.lock);
+
+	return ret;
 }
 
 bool __perf_env__insert_bpf_prog_info(struct perf_env *env, struct bpf_prog_info_node *info_node)
tools/perf/util/env.h +1 -1
index e098ee49237c4..5385104ca989a 100644
@@ -165,7 +165,7 @@ int perf_env__nr_cpus_avail(struct perf_env *env);
 void perf_env__init(struct perf_env *env);
 bool __perf_env__insert_bpf_prog_info(struct perf_env *env,
 				      struct bpf_prog_info_node *info_node);
-void perf_env__insert_bpf_prog_info(struct perf_env *env,
+bool perf_env__insert_bpf_prog_info(struct perf_env *env,
 				    struct bpf_prog_info_node *info_node);
 struct bpf_prog_info_node *perf_env__find_bpf_prog_info(struct perf_env *env,
 							__u32 prog_id);
Signature · 1 line
2.39.5
author maintainer
#83 lore raw

PATCH 83/620 ASoC: renesas: rz-ssi: Use only the proper amount of dividers

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Claudiu Beznea <[email protected]>

[ Upstream commit 55c209cd4318c701e6e88e0b2512a0f12dd02a7d ]

There is no need to populate the ckdv[] with invalid dividers as that part will not be indexed anyway. The ssi->audio_mck/bclk_rate should always be >= 0. While at it, change the ckdv type as u8, as the divider 128 was previously using the s8 sign bit.

---
 sound/soc/sh/rz-ssi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/sh/rz-ssi.c +1 -2
index 2e33a1fa0a6f4..9ef7d0a12d985 100644
@@ -243,8 +243,7 @@ static void rz_ssi_stream_quit(struct rz_ssi_priv *ssi,
 static int rz_ssi_clk_setup(struct rz_ssi_priv *ssi, unsigned int rate,
 			    unsigned int channels)
 {
-	static s8 ckdv[16] = { 1,  2,  4,  8, 16, 32, 64, 128,
-			       6, 12, 24, 48, 96, -1, -1, -1 };
+	static u8 ckdv[] = { 1,  2,  4,  8, 16, 32, 64, 128, 6, 12, 24, 48, 96 };
 	unsigned int channel_bits = 32;	/* System Word Length */
 	unsigned long bclk_rate = rate * channels * channel_bits;
 	unsigned int div;
Signature · 1 line
2.39.5
author maintainer
#84 lore raw

PATCH 84/620 ktest.pl: Remove unused declarations in run_bisect_test function

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Ba Jing <[email protected]>

[ Upstream commit 776735b954f49f85fd19e1198efa421fae2ad77c ]

Since $output and $ret are not used in the subsequent code, the declarations should be removed.

Fixes a75fececff3c ("ktest: Added sample.conf, new %default option format")
---
 tools/testing/ktest/ktest.pl | 2 --
 1 file changed, 2 deletions(-)
tools/testing/ktest/ktest.pl +0 -2
index 99e17a0a13649..f7f371a91ed97 100755
@@ -2939,8 +2939,6 @@ sub run_bisect_test {
 
     my $failed = 0;
     my $result;
-    my $output;
-    my $ret;
 
     $in_bisect = 1;
 
Signature · 1 line
2.39.5
author maintainer
#85 lore raw

PATCH 85/620 crypto: hisilicon/sec - add some comments for soft fallback

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Kai Ye <[email protected]>

[ Upstream commit e764d81d58070e66e61fb1b972c81eb9d2ea971e ]

Modify the print of information that might lead to user misunderstanding. Currently only XTS mode need the fallback tfm when using 192bit key. Others algs not need soft fallback tfm. So others algs can return directly.

Stable-dep-of: fd337f852b26 ("crypto: hisilicon/sec2 - fix for aead icv error")

---
 drivers/crypto/hisilicon/sec2/sec_crypto.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/hisilicon/sec2/sec_crypto.c +6 -6
index 28c167e1be426..c8fa964238e7d 100644
@@ -643,13 +643,15 @@ static int sec_skcipher_fbtfm_init(struct crypto_skcipher *tfm)
 	struct sec_cipher_ctx *c_ctx = &ctx->c_ctx;
 
 	c_ctx->fallback = false;
+
+	/* Currently, only XTS mode need fallback tfm when using 192bit key */
 	if (likely(strncmp(alg, "xts", SEC_XTS_NAME_SZ)))
 		return 0;
 
 	c_ctx->fbtfm = crypto_alloc_sync_skcipher(alg, 0,
 						  CRYPTO_ALG_NEED_FALLBACK);
 	if (IS_ERR(c_ctx->fbtfm)) {
-		pr_err("failed to alloc fallback tfm!\n");
+		pr_err("failed to alloc xts mode fallback tfm!\n");
 		return PTR_ERR(c_ctx->fbtfm);
 	}
 
@@ -810,7 +812,7 @@ static int sec_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key,
 	}
 
 	memcpy(c_ctx->c_key, key, keylen);
-	if (c_ctx->fallback) {
+	if (c_ctx->fallback && c_ctx->fbtfm) {
 		ret = crypto_sync_skcipher_setkey(c_ctx->fbtfm, key, keylen);
 		if (ret) {
 			dev_err(dev, "failed to set fallback skcipher key!\n");
@@ -2034,13 +2036,12 @@ static int sec_skcipher_soft_crypto(struct sec_ctx *ctx,
 				    struct skcipher_request *sreq, bool encrypt)
 {
 	struct sec_cipher_ctx *c_ctx = &ctx->c_ctx;
+	SYNC_SKCIPHER_REQUEST_ON_STACK(subreq, c_ctx->fbtfm);
 	struct device *dev = ctx->dev;
 	int ret;
 
-	SYNC_SKCIPHER_REQUEST_ON_STACK(subreq, c_ctx->fbtfm);
-
 	if (!c_ctx->fbtfm) {
-		dev_err(dev, "failed to check fallback tfm\n");
+		dev_err_ratelimited(dev, "the soft tfm isn't supported in the current system.\n");
 		return -EINVAL;
 	}
 
@@ -2258,7 +2259,6 @@ static int sec_aead_param_check(struct sec_ctx *ctx, struct sec_req *sreq)
 	if (ctx->sec->qm.ver == QM_HW_V2) {
 		if (unlikely(!req->cryptlen || (!sreq->c_req.encrypt &&
 		    req->cryptlen <= authsize))) {
-			dev_err(dev, "Kunpeng920 not support 0 length!\n");
 			ctx->a_ctx.fallback = true;
 			return -EINVAL;
 		}
Signature · 1 line
2.39.5
author maintainer
#86 lore raw

PATCH 86/620 crypto: hisilicon/sec - delete redundant blank lines

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Kai Ye <[email protected]>

[ Upstream commit 0413623c27a380d0da7240717f9435d24776b985 ]

Some coding style fixes in sec crypto file.

Stable-dep-of: fd337f852b26 ("crypto: hisilicon/sec2 - fix for aead icv error")

---
 drivers/crypto/hisilicon/sec2/sec_crypto.c | 2 --
 1 file changed, 2 deletions(-)
drivers/crypto/hisilicon/sec2/sec_crypto.c +0 -2
index c8fa964238e7d..72e26a4bfb8e6 100644
@@ -1674,7 +1674,6 @@ static void sec_aead_callback(struct sec_ctx *c, struct sec_req *req, int err)
 					  aead_req->out_mac,
 					  authsize, a_req->cryptlen +
 					  a_req->assoclen);
-
 		if (unlikely(sz != authsize)) {
 			dev_err(c->dev, "copy out mac err!\n");
 			err = -EINVAL;
@@ -1961,7 +1960,6 @@ static int sec_aead_sha512_ctx_init(struct crypto_aead *tfm)
 	return sec_aead_ctx_init(tfm, "sha512");
 }
 
-
 static int sec_skcipher_cryptlen_ckeck(struct sec_ctx *ctx,
 	struct sec_req *sreq)
 {
Signature · 1 line
2.39.5
author maintainer
#87 lore raw

PATCH 87/620 crypto: hisilicon/sec2 - optimize the error return process

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chenghai Huang <[email protected]>

[ Upstream commit 1bed82257b1881b689ee41f14ecb4c20a273cac0 ]

Add the printf of an error message and optimized the handling process of ret.

Stable-dep-of: fd337f852b26 ("crypto: hisilicon/sec2 - fix for aead icv error")

---
 drivers/crypto/hisilicon/sec2/sec_crypto.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/crypto/hisilicon/sec2/sec_crypto.c +5 -2
index 72e26a4bfb8e6..dedcc7f743039 100644
@@ -803,6 +803,7 @@ static int sec_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key,
 		ret = sec_skcipher_aes_sm4_setkey(c_ctx, keylen, c_mode);
 		break;
 	default:
+		dev_err(dev, "sec c_alg err!\n");
 		return -EINVAL;
 	}
 
@@ -1128,7 +1129,8 @@ static int sec_aead_setkey(struct crypto_aead *tfm, const u8 *key,
 		return 0;
 	}
 
-	if (crypto_authenc_extractkeys(&keys, key, keylen))
+	ret = crypto_authenc_extractkeys(&keys, key, keylen);
+	if (ret)
 		goto bad_key;
 
 	ret = sec_aead_aes_set_key(c_ctx, &keys);
@@ -1145,6 +1147,7 @@ static int sec_aead_setkey(struct crypto_aead *tfm, const u8 *key,
 
 	if ((ctx->a_ctx.mac_len & SEC_SQE_LEN_RATE_MASK)  ||
 	    (ctx->a_ctx.a_key_len & SEC_SQE_LEN_RATE_MASK)) {
+		ret = -EINVAL;
 		dev_err(dev, "MAC or AUTH key length error!\n");
 		goto bad_key;
 	}
@@ -1153,7 +1156,7 @@ static int sec_aead_setkey(struct crypto_aead *tfm, const u8 *key,
 
 bad_key:
 	memzero_explicit(&keys, sizeof(struct crypto_authenc_keys));
-	return -EINVAL;
+	return ret;
 }
 
 
Signature · 1 line
2.39.5
author maintainer
#88 lore raw

PATCH 88/620 crypto: hisilicon/sec2 - fix for aead icv error

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Wenkai Lin <[email protected]>

[ Upstream commit fd337f852b2677b53d0859a47b58e6e6bd189f30 ]

When the AEAD algorithm is used for encryption or decryption, the input authentication length varies, the hardware needs to obtain the input length to pass the integrity check verification. Currently, the driver uses a fixed authentication length,which causes decryption failure, so the length configuration is modified. In addition, the step of setting the auth length is unnecessary, so it was deleted from the setkey function.

Fixes 2f072d75d1ab ("crypto: hisilicon - Add aead support on SEC2")
---
 drivers/crypto/hisilicon/sec2/sec.h        |   1 -
 drivers/crypto/hisilicon/sec2/sec_crypto.c | 101 +++++++++------------
 drivers/crypto/hisilicon/sec2/sec_crypto.h |  11 ---
 3 files changed, 44 insertions(+), 69 deletions(-)
drivers/crypto/hisilicon/sec2/sec.h +0 -1
index cff00fd297652..2dcb4f4c0629a 100644
@@ -89,7 +89,6 @@ struct sec_auth_ctx {
 	dma_addr_t a_key_dma;
 	u8 *a_key;
 	u8 a_key_len;
-	u8 mac_len;
 	u8 a_alg;
 	bool fallback;
 	struct crypto_shash *hash_tfm;
drivers/crypto/hisilicon/sec2/sec_crypto.c +44 -57

233 lines not on this page · raw message

drivers/crypto/hisilicon/sec2/sec_crypto.h +0 -11
index ee2edaf5058df..4d7f917fbaf1c 100644
@@ -23,17 +23,6 @@ enum sec_hash_alg {
 	SEC_A_HMAC_SHA512 = 0x15,
 };
 
-enum sec_mac_len {
-	SEC_HMAC_CCM_MAC   = 16,
-	SEC_HMAC_GCM_MAC   = 16,
-	SEC_SM3_MAC        = 32,
-	SEC_HMAC_SM3_MAC   = 32,
-	SEC_HMAC_MD5_MAC   = 16,
-	SEC_HMAC_SHA1_MAC   = 20,
-	SEC_HMAC_SHA256_MAC = 32,
-	SEC_HMAC_SHA512_MAC = 64,
-};
-
 enum sec_cmode {
 	SEC_CMODE_ECB    = 0x0,
 	SEC_CMODE_CBC    = 0x1,
Signature · 1 line
2.39.5
author maintainer
#89 lore raw

PATCH 89/620 crypto: hisilicon/sec2 - fix for aead invalid authsize

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Wenkai Lin <[email protected]>

[ Upstream commit a5a9d959936499a3106a1bf3b9070875d0d3dec4 ]

When the digest alg is HMAC-SHAx or another, the authsize may be less than 4 bytes and mac_len of the BD is set to zero, the hardware considers it a BD configuration error and reports a ras error, so the sec driver needs to switch to software calculation in this case, this patch add a check for it and remove unnecessary check that has been done by crypto.

Fixes 2f072d75d1ab ("crypto: hisilicon - Add aead support on SEC2")
---
 drivers/crypto/hisilicon/sec2/sec.h        |  2 +-
 drivers/crypto/hisilicon/sec2/sec_crypto.c | 64 +++++++++++-----------
 2 files changed, 34 insertions(+), 32 deletions(-)
drivers/crypto/hisilicon/sec2/sec.h +1 -1
index 2dcb4f4c0629a..d3515d1ea5c27 100644
@@ -36,6 +36,7 @@ struct sec_aead_req {
 	u8 *a_ivin;
 	dma_addr_t a_ivin_dma;
 	struct aead_request *aead_req;
+	bool fallback;
 };
 
 /* SEC request of Crypto */
@@ -90,7 +91,6 @@ struct sec_auth_ctx {
 	u8 *a_key;
 	u8 a_key_len;
 	u8 a_alg;
-	bool fallback;
 	struct crypto_shash *hash_tfm;
 	struct crypto_aead *fallback_aead_tfm;
 };
drivers/crypto/hisilicon/sec2/sec_crypto.c +33 -31

142 lines not on this page · raw message

Signature · 1 line
2.39.5
author maintainer
#90 lore raw

PATCH 90/620 crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Joe Hattori <[email protected]>

[ Upstream commit 472a989029aac2b78ef2f0b18b27c568bf76d104 ]

init_ixp_crypto() calls of_parse_phandle_with_fixed_args() multiple times, but does not release all the obtained refcounts. Fix it by adding of_node_put() calls.

This bug was found by an experimental static analysis tool that I am developing.

Fixes 76f24b4f46b8 ("crypto: ixp4xx - Add device tree support")
---
 drivers/crypto/ixp4xx_crypto.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/crypto/ixp4xx_crypto.c +3 -0
index 98730aab287c3..2bf315554f02a 100644
@@ -470,6 +470,7 @@ static int init_ixp_crypto(struct device *dev)
 			return -ENODEV;
 		}
 		npe_id = npe_spec.args[0];
+		of_node_put(npe_spec.np);
 
 		ret = of_parse_phandle_with_fixed_args(np, "queue-rx", 1, 0,
 						       &queue_spec);
@@ -478,6 +479,7 @@ static int init_ixp_crypto(struct device *dev)
 			return -ENODEV;
 		}
 		recv_qid = queue_spec.args[0];
+		of_node_put(queue_spec.np);
 
 		ret = of_parse_phandle_with_fixed_args(np, "queue-txready", 1, 0,
 						       &queue_spec);
@@ -486,6 +488,7 @@ static int init_ixp_crypto(struct device *dev)
 			return -ENODEV;
 		}
 		send_qid = queue_spec.args[0];
+		of_node_put(queue_spec.np);
 	} else {
 		/*
 		 * Hardcoded engine when using platform data, this goes away
Signature · 1 line
2.39.5
author maintainer
#91 lore raw

PATCH 91/620 padata: fix sysfs store callback check

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Thomas Weißschuh <[email protected]>

[ Upstream commit 9ff6e943bce67d125781fe4780a5d6f072dc44c0 ]

padata_sysfs_store() was copied from padata_sysfs_show() but this check was not adapted. Today there is no attribute which can fail this check, but if there is one it may as well be correct.

Fixes 5e017dc3f8bc ("padata: Added sysfs primitives to padata subsystem")
---
 kernel/padata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/padata.c +1 -1
index 39faea30d76a5..a5699c5ba58da 100644
@@ -959,7 +959,7 @@ static ssize_t padata_sysfs_store(struct kobject *kobj, struct attribute *attr,
 
 	pinst = kobj2pinst(kobj);
 	pentry = attr2pentry(attr);
-	if (pentry->show)
+	if (pentry->store)
 		ret = pentry->store(pinst, attr, buf, count);
 
 	return ret;
Signature · 1 line
2.39.5
author maintainer
#92 lore raw

PATCH 92/620 perf top: Dont complain about lack of vmlinux when not resolving some kernel samples

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Arnaldo Carvalho de Melo <[email protected]>

[ Upstream commit 058b38ccd2af9e5c95590b018e8425fa148d7aca ]

Recently we got a case where a kernel sample wasn't being resolved due to a bug that was not setting the end address on kernel functions implemented in assembly (see Link: tag), and then those were not being found by machine__resolve() -> map__find_symbol().

So we ended up with:

  # perf top --stdio
  PerfTop: 0 irqs/s  kernel: 0%  exact: 0% lost: 0/0 drop: 0/0 [cycles/P]
  -----------------------------------------------------------------------

Warning:
A vmlinux file was not found.
Kernel samples will not be resolved.
^Z
[1]+ Stopped perf top --stdio
#

But then resolving all other kernel symbols.

So just fixup the logic to only print that warning when there are no symbols in the kernel map.

Fixes d88205db9caa0e9d ("perf dso: Add dso__has_symbols() method")
Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
---
 tools/perf/builtin-top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-top.c +1 -1
index 6fdd401ec9c56..b318ce937e629 100644
@@ -807,7 +807,7 @@ static void perf_event__process_sample(struct perf_tool *tool,
 		 * invalid --vmlinux ;-)
 		 */
 		if (!machine->kptr_restrict_warned && !top->vmlinux_warned &&
-		    __map__is_kernel(al.map) && map__has_symbols(al.map)) {
+		    __map__is_kernel(al.map) && !map__has_symbols(al.map)) {
 			if (symbol_conf.vmlinux_name) {
 				char serr[256];
 				dso__strerror_load(al.map->dso, serr, sizeof(serr));
Signature · 1 line
2.39.5
author maintainer
#93 lore raw

PATCH 93/620 perf report: Fix misleading help message about --demangle

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Jiachen Zhang <[email protected]>

[ Upstream commit ac0ac75189a4d6a29a2765a7adbb62bc6cc650c7 ]

The wrong help message may mislead users. This commit fixes it.

Fixes 328ccdace8855289 ("perf report: Add --no-demangle option")
Cc Adrian Hunter <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Ian Rogers <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/builtin-report.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-report.c +1 -1
index 6583ad9cc7deb..c52b321e22ccf 100644
@@ -1308,7 +1308,7 @@ int cmd_report(int argc, const char **argv)
 	OPT_STRING(0, "objdump", &report.annotation_opts.objdump_path, "path",
 		   "objdump binary to use for disassembly and annotations"),
 	OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle,
-		    "Disable symbol demangling"),
+		    "Symbol demangling. Enabled by default, use --no-demangle to disable."),
 	OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel,
 		    "Enable kernel symbol demangling"),
 	OPT_BOOLEAN(0, "mem-mode", &report.mem_mode, "mem access profile"),
Signature · 1 line
2.39.5
author maintainer
#94 lore raw

PATCH 94/620 bpf: Send signals asynchronously if !preemptible

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Puranjay Mohan <[email protected]>

[ Upstream commit 87c544108b612512b254c8f79aa5c0a8546e2cc4 ]

BPF programs can execute in all kinds of contexts and when a program running in a non-preemptible context uses the bpf_send_signal() kfunc, it will cause issues because this kfunc can sleep.
Change irqs_disabled() to !preemptible().

---
 kernel/trace/bpf_trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/bpf_trace.c +1 -1
index 126754b61edc0..60acc3c76316f 100644
@@ -799,7 +799,7 @@ static int bpf_send_signal_common(u32 sig, enum pid_type type)
 	if (unlikely(is_global_init(current)))
 		return -EPERM;
 
-	if (irqs_disabled()) {
+	if (!preemptible()) {
 		/* Do an early check on signal validity. Otherwise,
 		 * the error is lost in deferred irq_work.
 		 */
Signature · 1 line
2.39.5
author maintainer
#95 lore raw

PATCH 95/620 padata: fix UAF in padata_reorder

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chen Ridong <[email protected]>

[ Upstream commit e01780ea4661172734118d2a5f41bc9720765668 ]

A bug was found when run ltp test:

BUG: KASAN: slab-use-after-free in padata_find_next+0x29/0x1a0
Read of size 4 at addr ffff88bbfe003524 by task kworker/u113:2/3039206

CPU: 0 PID: 3039206 Comm: kworker/u113:2 Kdump: loaded Not tainted 6.6.0+
Workqueue: pdecrypt_parallel padata_parallel_worker
Call Trace:
<TASK>
dump_stack_lvl+0x32/0x50
print_address_description.constprop.0+0x6b/0x3d0
print_report+0xdd/0x2c0
kasan_report+0xa5/0xd0
padata_find_next+0x29/0x1a0
padata_reorder+0x131/0x220
padata_parallel_worker+0x3d/0xc0
process_one_work+0x2ec/0x5a0

If 'mdelay(10)' is added before calling 'padata_find_next' in the 'padata_reorder' function, this issue could be reproduced easily with ltp test (pcrypt_aead01).

This can be explained as bellow:

pcrypt_aead_encrypt
...
padata_do_parallel
refcount_inc(&pd->refcnt); // add refcnt
...
padata_do_serial
padata_reorder // pd
while (1) {
padata_find_next(pd, true); // using pd
queue_work_on
...
padata_serial_worker crypto_del_alg
padata_put_pd_cnt // sub refcnt

						padata_free_shell
						padata_put_pd(ps->pd);
						// pd is freed

// loop again, but pd is freed
// call padata_find_next, UAF
}

In the padata_reorder function, when it loops in 'while', if the alg is deleted, the refcnt may be decreased to 0 before entering 'padata_find_next', which leads to UAF.

As mentioned in [1], do_serial is supposed to be called with BHs disabled and always happen under RCU protection, to address this issue, add synchronize_rcu() in 'padata_free_shell' wait for all _do_serial calls to finish.

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/linux-kernel/jfjz5d7zwbytztackem7ibzalm5lnxldi2eofeiczqmqs2m7o6@fq426cwnjtkm/

Fixes b128a3040935 ("padata: allocate workqueue internally")
---
 kernel/padata.c | 6 ++++++
 1 file changed, 6 insertions(+)
kernel/padata.c +6 -0
index a5699c5ba58da..9608a269f66f2 100644
@@ -1110,6 +1110,12 @@ void padata_free_shell(struct padata_shell *ps)
 	if (!ps)
 		return;
 
+	/*
+	 * Wait for all _do_serial calls to finish to avoid touching
+	 * freed pd's and ps's.
+	 */
+	synchronize_rcu();
+
 	mutex_lock(&ps->pinst->lock);
 	list_del(&ps->list);
 	pd = rcu_dereference_protected(ps->pd, 1);
Signature · 1 line
2.39.5
author maintainer
#96 lore raw

PATCH 96/620 padata: add pd get/put refcnt helper

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chen Ridong <[email protected]>

[ Upstream commit ae154202cc6a189b035359f3c4e143d5c24d5352 ]

Add helpers for pd to get/put refcnt to make code consice.

Stable-dep-of: dd7d37ccf6b1 ("padata: avoid UAF for reorder_work")

---
 kernel/padata.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)
kernel/padata.c +20 -7
index 9608a269f66f2..b5a1a31ce6c11 100644
@@ -47,6 +47,22 @@ struct padata_mt_job_state {
 static void padata_free_pd(struct parallel_data *pd);
 static void __init padata_mt_helper(struct work_struct *work);
 
+static inline void padata_get_pd(struct parallel_data *pd)
+{
+	refcount_inc(&pd->refcnt);
+}
+
+static inline void padata_put_pd_cnt(struct parallel_data *pd, int cnt)
+{
+	if (refcount_sub_and_test(cnt, &pd->refcnt))
+		padata_free_pd(pd);
+}
+
+static inline void padata_put_pd(struct parallel_data *pd)
+{
+	padata_put_pd_cnt(pd, 1);
+}
+
 static int padata_index_to_cpu(struct parallel_data *pd, int cpu_index)
 {
 	int cpu, target_cpu;
@@ -198,7 +214,7 @@ int padata_do_parallel(struct padata_shell *ps,
 	if ((pinst->flags & PADATA_RESET))
 		goto out;
 
-	refcount_inc(&pd->refcnt);
+	padata_get_pd(pd);
 	padata->pd = pd;
 	padata->cb_cpu = *cb_cpu;
 
@@ -372,8 +388,7 @@ static void padata_serial_worker(struct work_struct *serial_work)
 	}
 	local_bh_enable();
 
-	if (refcount_sub_and_test(cnt, &pd->refcnt))
-		padata_free_pd(pd);
+	padata_put_pd_cnt(pd, cnt);
 }
 
 /**
@@ -670,8 +685,7 @@ static int padata_replace(struct padata_instance *pinst)
 	synchronize_rcu();
 
 	list_for_each_entry_continue_reverse(ps, &pinst->pslist, list)
-		if (refcount_dec_and_test(&ps->opd->refcnt))
-			padata_free_pd(ps->opd);
+		padata_put_pd(ps->opd);
 
 	pinst->flags &= ~PADATA_RESET;
 
@@ -1119,8 +1133,7 @@ void padata_free_shell(struct padata_shell *ps)
 	mutex_lock(&ps->pinst->lock);
 	list_del(&ps->list);
 	pd = rcu_dereference_protected(ps->pd, 1);
-	if (refcount_dec_and_test(&pd->refcnt))
-		padata_free_pd(pd);
+	padata_put_pd(pd);
 	mutex_unlock(&ps->pinst->lock);
 
 	kfree(ps);
Signature · 1 line
2.39.5
author maintainer
#97 lore raw

PATCH 97/620 padata: avoid UAF for reorder_work

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chen Ridong <[email protected]>

[ Upstream commit dd7d37ccf6b11f3d95e797ebe4e9e886d0332600 ]

Although the previous patch can avoid ps and ps UAF for _do_serial, it can not avoid potential UAF issue for reorder_work. This issue can happen just as below:

crypto_request crypto_request crypto_del_alg
padata_do_serial
...
padata_reorder

    // processes all remaining
    // requests then breaks
    while (1) {
      if (!padata)
        break;
      ...
    }

				padata_do_serial
				  // new request added
				  list_add
    // sees the new request
    queue_work(reorder_work)
				  padata_reorder
				    queue_work_on(squeue->work)

...

				<kworker context>
				padata_serial_worker
				// completes new request,
				// no more outstanding
				// requests

							crypto_del_alg
							  // free pd

<kworker context>
invoke_padata_reorder
// UAF of pd

To avoid UAF for 'reorder_work', get 'pd' ref before put 'reorder_work' into the 'serial_wq' and put 'pd' ref until the 'serial_wq' finish.

Fixes bbefa1dd6a6d ("crypto: pcrypt - Avoid deadlock by using per-instance padata queues")
---
 kernel/padata.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
kernel/padata.c +9 -1
index b5a1a31ce6c11..db45af7728cb2 100644
@@ -344,8 +344,14 @@ static void padata_reorder(struct parallel_data *pd)
 	smp_mb();
 
 	reorder = per_cpu_ptr(pd->reorder_list, pd->cpu);
-	if (!list_empty(&reorder->list) && padata_find_next(pd, false))
+	if (!list_empty(&reorder->list) && padata_find_next(pd, false)) {
+		/*
+		 * Other context(eg. the padata_serial_worker) can finish the request.
+		 * To avoid UAF issue, add pd ref here, and put pd ref after reorder_work finish.
+		 */
+		padata_get_pd(pd);
 		queue_work(pinst->serial_wq, &pd->reorder_work);
+	}
 }
 
 static void invoke_padata_reorder(struct work_struct *work)
@@ -356,6 +362,8 @@ static void invoke_padata_reorder(struct work_struct *work)
 	pd = container_of(work, struct parallel_data, reorder_work);
 	padata_reorder(pd);
 	local_bh_enable();
+	/* Pairs with putting the reorder_work in the serial_wq */
+	padata_put_pd(pd);
 }
 
 static void padata_serial_worker(struct work_struct *serial_work)
Signature · 1 line
2.39.5
author maintainer
#98 lore raw

PATCH 98/620 ARM: at91: pm: change BU Power Switch to automatic mode

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Nicolas Ferre <[email protected]>

[ Upstream commit 6fc5bdfa872b7da51b5507a1327a17c3db2fcf95 ]

Change how the Backup Unit Power is configured and force the automatic/hardware mode.
This change eliminates the need for software management of the power switch, ensuring it transitions to the backup power source before entering low power modes.

This is done in the only location where this switch was configured. It's usually done in the bootloader.

Previously, the loss of the VDDANA (or VDDIN33) power source was not automatically compensated by an alternative power source. This resulted in the loss of Backup Unit content, including Backup Self-refresh low power mode information, OTP emulation configuration, and boot configuration, for instance.

Fixes ac809e7879b1 ("ARM: at91: pm: switch backup area to vbat in backup mode")
---
 arch/arm/mach-at91/pm.c | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)
arch/arm/mach-at91/pm.c +20 -11
index c8cc993ca8ca1..91efc3d4de61d 100644
@@ -403,7 +403,21 @@ static int at91_suspend_finish(unsigned long val)
 	return 0;
 }
 
-static void at91_pm_switch_ba_to_vbat(void)
+/**
+ * at91_pm_switch_ba_to_auto() - Configure Backup Unit Power Switch
+ * to automatic/hardware mode.
+ *
+ * The Backup Unit Power Switch can be managed either by software or hardware.
+ * Enabling hardware mode allows the automatic transition of power between
+ * VDDANA (or VDDIN33) and VDDBU (or VBAT, respectively), based on the
+ * availability of these power sources.
+ *
+ * If the Backup Unit Power Switch is already in automatic mode, no action is
+ * required. If it is in software-controlled mode, it is switched to automatic
+ * mode to enhance safety and eliminate the need for toggling between power
+ * sources.
+ */
+static void at91_pm_switch_ba_to_auto(void)
 {
 	unsigned int offset = offsetof(struct at91_pm_sfrbu_regs, pswbu);
 	unsigned int val;
@@ -414,24 +428,19 @@ static void at91_pm_switch_ba_to_vbat(void)
 
 	val = readl(soc_pm.data.sfrbu + offset);
 
-	/* Already on VBAT. */
-	if (!(val & soc_pm.sfrbu_regs.pswbu.state))
+	/* Already on auto/hardware. */
+	if (!(val & soc_pm.sfrbu_regs.pswbu.ctrl))
 		return;
 
-	val &= ~soc_pm.sfrbu_regs.pswbu.softsw;
-	val |= soc_pm.sfrbu_regs.pswbu.key | soc_pm.sfrbu_regs.pswbu.ctrl;
+	val &= ~soc_pm.sfrbu_regs.pswbu.ctrl;
+	val |= soc_pm.sfrbu_regs.pswbu.key;
 	writel(val, soc_pm.data.sfrbu + offset);
-
-	/* Wait for update. */
-	val = readl(soc_pm.data.sfrbu + offset);
-	while (val & soc_pm.sfrbu_regs.pswbu.state)
-		val = readl(soc_pm.data.sfrbu + offset);
 }
 
 static void at91_pm_suspend(suspend_state_t state)
 {
 	if (soc_pm.data.mode == AT91_PM_BACKUP) {
-		at91_pm_switch_ba_to_vbat();
+		at91_pm_switch_ba_to_auto();
 
 		cpu_suspend(0, at91_suspend_finish);
 
Signature · 1 line
2.39.5
author maintainer
#99 lore raw

PATCH 99/620 arm64: dts: mt8183: set DMIC one-wire mode on Damu

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Hsin-Yi Wang <[email protected]>

[ Upstream commit 6c379e8b984815fc8f876e4bc78c4d563f13ddae ]

Sets DMIC one-wire mode on Damu.

---
 arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dts +4 -0
index 8e0cba4d23726..9a35c65779962 100644
@@ -25,6 +25,10 @@
 	hid-descr-addr = <0x0001>;
 };
 
+&mt6358codec {
+	mediatek,dmic-mode = <1>; /* one-wire */
+};
+
 &qca_wifi {
 	qcom,ath10k-calibration-variant = "GO_DAMU";
 };
Signature · 1 line
2.39.5
author maintainer
#100 lore raw

PATCH 100/620 arm64: dts: mediatek: mt8516: fix GICv2 range

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Val Packett <[email protected]>

[ Upstream commit e3ee31e4409f051c021a30122f3c470f093a7386 ]

On the MT8167 which is based on the MT8516 DTS, the following error was appearing on boot, breaking interrupt operation:

GICv2 detected, but range too small and irqchip.gicv2_force_probe not set

Similar to what's been proposed for MT7622 which has the same issue, fix by using the range reported by force_probe.

---
 arch/arm64/boot/dts/mediatek/mt8516.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8516.dtsi +1 -1
index bbe5a1419effc..198a6c747a296 100644
@@ -269,7 +269,7 @@
 			interrupt-parent = <&gic>;
 			interrupt-controller;
 			reg = <0 0x10310000 0 0x1000>,
-			      <0 0x10320000 0 0x1000>,
+			      <0 0x1032f000 0 0x2000>,
 			      <0 0x10340000 0 0x2000>,
 			      <0 0x10360000 0 0x2000>;
 			interrupts = <GIC_PPI 9
Signature · 1 line
2.39.5
author maintainer
#101 lore raw

PATCH 101/620 arm64: dts: mediatek: mt8516: fix wdt irq type

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Val Packett <[email protected]>

[ Upstream commit 03a80442030e7147391738fb6cbe5fa0b3b91bb1 ]

The GICv2 does not support EDGE_FALLING interrupts, so the watchdog would refuse to attach due to a failing check coming from the GIC driver.

---
 arch/arm64/boot/dts/mediatek/mt8516.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8516.dtsi +1 -1
index 198a6c747a296..4d6c22e84540b 100644
@@ -206,7 +206,7 @@
 			compatible = "mediatek,mt8516-wdt",
 				     "mediatek,mt6589-wdt";
 			reg = <0 0x10007000 0 0x1000>;
-			interrupts = <GIC_SPI 198 IRQ_TYPE_EDGE_FALLING>;
+			interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
 			#reset-cells = <1>;
 		};
 
Signature · 1 line
2.39.5
author maintainer
#102 lore raw

PATCH 102/620 arm64: dts: mediatek: mt8516: remove 2 invalid i2c clocks

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Fabien Parent <[email protected]>

[ Upstream commit 9cf6a26ae352a6a150662c0c4ddff87664cc6e3c ]

The two clocks "main-source" and "main-sel" are not present in the driver and not defined in the binding documentation. Remove them as they are not used and not described in the documentation.

Stable-dep-of: eb72341fd92b ("arm64: dts: mediatek: mt8516: add i2c clock-div property")

---
 arch/arm64/boot/dts/mediatek/mt8516.dtsi | 27 ++++++------------------
 1 file changed, 6 insertions(+), 21 deletions(-)
arch/arm64/boot/dts/mediatek/mt8516.dtsi +6 -21
index 4d6c22e84540b..558f7e744113d 100644
@@ -345,14 +345,9 @@
 			reg = <0 0x11009000 0 0x90>,
 			      <0 0x11000180 0 0x80>;
 			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
-			clocks = <&topckgen CLK_TOP_AHB_INFRA_D2>,
-				 <&infracfg CLK_IFR_I2C0_SEL>,
-				 <&topckgen CLK_TOP_I2C0>,
+			clocks = <&topckgen CLK_TOP_I2C0>,
 				 <&topckgen CLK_TOP_APDMA>;
-			clock-names = "main-source",
-				      "main-sel",
-				      "main",
-				      "dma";
+			clock-names = "main", "dma";
 			#address-cells = <1>;
 			#size-cells = <0>;
 			status = "disabled";
@@ -364,14 +359,9 @@
 			reg = <0 0x1100a000 0 0x90>,
 			      <0 0x11000200 0 0x80>;
 			interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_LOW>;
-			clocks = <&topckgen CLK_TOP_AHB_INFRA_D2>,
-				 <&infracfg CLK_IFR_I2C1_SEL>,
-				 <&topckgen CLK_TOP_I2C1>,
+			clocks = <&topckgen CLK_TOP_I2C1>,
 				 <&topckgen CLK_TOP_APDMA>;
-			clock-names = "main-source",
-				      "main-sel",
-				      "main",
-				      "dma";
+			clock-names = "main", "dma";
 			#address-cells = <1>;
 			#size-cells = <0>;
 			status = "disabled";
@@ -383,14 +373,9 @@
 			reg = <0 0x1100b000 0 0x90>,
 			      <0 0x11000280 0 0x80>;
 			interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_LOW>;
-			clocks = <&topckgen CLK_TOP_AHB_INFRA_D2>,
-				 <&infracfg CLK_IFR_I2C2_SEL>,
-				 <&topckgen CLK_TOP_I2C2>,
+			clocks = <&topckgen CLK_TOP_I2C2>,
 				 <&topckgen CLK_TOP_APDMA>;
-			clock-names = "main-source",
-				      "main-sel",
-				      "main",
-				      "dma";
+			clock-names = "main", "dma";
 			#address-cells = <1>;
 			#size-cells = <0>;
 			status = "disabled";
Signature · 1 line
2.39.5
author maintainer
#103 lore raw

PATCH 103/620 arm64: dts: mediatek: mt8516: add i2c clock-div property

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Val Packett <[email protected]>

[ Upstream commit eb72341fd92b7af510d236e5a8554d855ed38d3c ]

Move the clock-div property from the pumpkin board dtsi to the SoC's since it belongs to the SoC itself and is required on other devices.

---
 arch/arm64/boot/dts/mediatek/mt8516.dtsi         | 3 +++
 arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8516.dtsi +3 -0
index 558f7e744113d..0b86863381cf3 100644
@@ -345,6 +345,7 @@
 			reg = <0 0x11009000 0 0x90>,
 			      <0 0x11000180 0 0x80>;
 			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
+			clock-div = <2>;
 			clocks = <&topckgen CLK_TOP_I2C0>,
 				 <&topckgen CLK_TOP_APDMA>;
 			clock-names = "main", "dma";
@@ -359,6 +360,7 @@
 			reg = <0 0x1100a000 0 0x90>,
 			      <0 0x11000200 0 0x80>;
 			interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_LOW>;
+			clock-div = <2>;
 			clocks = <&topckgen CLK_TOP_I2C1>,
 				 <&topckgen CLK_TOP_APDMA>;
 			clock-names = "main", "dma";
@@ -373,6 +375,7 @@
 			reg = <0 0x1100b000 0 0x90>,
 			      <0 0x11000280 0 0x80>;
 			interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_LOW>;
+			clock-div = <2>;
 			clocks = <&topckgen CLK_TOP_I2C2>,
 				 <&topckgen CLK_TOP_APDMA>;
 			clock-names = "main", "dma";
arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi +0 -2
index 54514d62398f2..8696da3de4cbe 100644
@@ -48,7 +48,6 @@
 };
 
 &i2c0 {
-	clock-div = <2>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
@@ -157,7 +156,6 @@
 };
 
 &i2c2 {
-	clock-div = <2>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c2_pins_a>;
 	status = "okay";
Signature · 1 line
2.39.5
author maintainer
#104 lore raw

PATCH 104/620 arm64: dts: mediatek: mt8516: reserve 192 KiB for TF-A

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Val Packett <[email protected]>

[ Upstream commit 2561c7d5d497b988deccc36fe5eac7fd50b937f8 ]

The Android DTB for the related MT8167 reserves 0x30000. This is likely correct for MT8516 Android devices as well, and there's never any harm in reserving 64KiB more.

---
 arch/arm64/boot/dts/mediatek/mt8516.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8516.dtsi +2 -2
index 0b86863381cf3..5655f12723f14 100644
@@ -144,10 +144,10 @@
 		#size-cells = <2>;
 		ranges;
 
-		/* 128 KiB reserved for ARM Trusted Firmware (BL31) */
+		/* 192 KiB reserved for ARM Trusted Firmware (BL31) */
 		bl31_secmon_reserved: secmon@43000000 {
 			no-map;
-			reg = <0 0x43000000 0 0x20000>;
+			reg = <0 0x43000000 0 0x30000>;
 		};
 	};
 
Signature · 1 line
2.39.5
author maintainer
#105 lore raw

PATCH 105/620 RDMA/mlx4: Avoid false error about access to uninitialized gids array

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Leon Romanovsky <[email protected]>

[ Upstream commit 1f53d88cbb0dcc7df235bf6611ae632b254fccd8 ]

Smatch generates the following false error report:
drivers/infiniband/hw/mlx4/main.c:393 mlx4_ib_del_gid() error: uninitialized symbol 'gids'.

Traditionally, we are not changing kernel code and asking people to fix the tools. However in this case, the fix can be done by simply rearranging the code to be more clear.

---
 drivers/infiniband/hw/mlx4/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/infiniband/hw/mlx4/main.c +3 -3
index 53d83212cda81..67a1ef0260b24 100644
@@ -392,10 +392,10 @@ static int mlx4_ib_del_gid(const struct ib_gid_attr *attr, void **context)
 	}
 	spin_unlock_bh(&iboe->lock);
 
-	if (!ret && hw_update) {
+	if (gids)
 		ret = mlx4_ib_update_gids(gids, ibdev, attr->port_num);
-		kfree(gids);
-	}
+
+	kfree(gids);
 	return ret;
 }
 
Signature · 1 line
2.39.5
author maintainer
#106 lore raw

PATCH 106/620 rdma/cxgb4: Prevent potential integer overflow on 32bit

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dan Carpenter <[email protected]>

[ Upstream commit bd96a3935e89486304461a21752f824fc25e0f0b ]

The "gl->tot_len" variable is controlled by the user. It comes from process_responses(). On 32bit systems, the "gl->tot_len + sizeof(struct cpl_pass_accept_req) + sizeof(struct rss_header)" addition could have an integer wrapping bug. Use size_add() to prevent this.

Fixes 1cab775c3e75 ("RDMA/cxgb4: Fix LE hash collision bug for passive open connection")
---
 drivers/infiniband/hw/cxgb4/device.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/infiniband/hw/cxgb4/device.c +4 -2
index 541dbcf22d0eb..13e4b2c40d835 100644
@@ -1114,8 +1114,10 @@ static inline struct sk_buff *copy_gl_to_skb_pkt(const struct pkt_gl *gl,
 	 * The math here assumes sizeof cpl_pass_accept_req >= sizeof
 	 * cpl_rx_pkt.
 	 */
-	skb = alloc_skb(gl->tot_len + sizeof(struct cpl_pass_accept_req) +
-			sizeof(struct rss_header) - pktshift, GFP_ATOMIC);
+	skb = alloc_skb(size_add(gl->tot_len,
+				 sizeof(struct cpl_pass_accept_req) +
+				 sizeof(struct rss_header)) - pktshift,
+			GFP_ATOMIC);
 	if (unlikely(!skb))
 		return NULL;
 
Signature · 1 line
2.39.5
author maintainer
#107 lore raw

PATCH 107/620 arm64: dts: mediatek: mt8173-evb: Drop regulator-compatible property

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chen-Yu Tsai <[email protected]>

[ Upstream commit a6d5983e40f5d5b219337569cdd269727f5a3e2e ]

The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It is also not listed in the MT6397 regulator bindings. Having them present produces a whole bunch of validation errors:

Unevaluated properties are not allowed ('regulator-compatible' was unexpected)

Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work.

---
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 23 ---------------------
 1 file changed, 23 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +0 -23
index 4e0c3aa264a5c..cd52926190470 100644
@@ -311,7 +311,6 @@
 			compatible = "mediatek,mt6397-regulator";
 
 			mt6397_vpca15_reg: buck_vpca15 {
-				regulator-compatible = "buck_vpca15";
 				regulator-name = "vpca15";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -320,7 +319,6 @@
 			};
 
 			mt6397_vpca7_reg: buck_vpca7 {
-				regulator-compatible = "buck_vpca7";
 				regulator-name = "vpca7";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -329,7 +327,6 @@
 			};
 
 			mt6397_vsramca15_reg: buck_vsramca15 {
-				regulator-compatible = "buck_vsramca15";
 				regulator-name = "vsramca15";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -338,7 +335,6 @@
 			};
 
 			mt6397_vsramca7_reg: buck_vsramca7 {
-				regulator-compatible = "buck_vsramca7";
 				regulator-name = "vsramca7";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -347,7 +343,6 @@
 			};
 
 			mt6397_vcore_reg: buck_vcore {
-				regulator-compatible = "buck_vcore";
 				regulator-name = "vcore";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -356,7 +351,6 @@
 			};
 
 			mt6397_vgpu_reg: buck_vgpu {
-				regulator-compatible = "buck_vgpu";
 				regulator-name = "vgpu";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -365,7 +359,6 @@
 			};
 
 			mt6397_vdrm_reg: buck_vdrm {
-				regulator-compatible = "buck_vdrm";
 				regulator-name = "vdrm";
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <1400000>;
@@ -374,7 +367,6 @@
 			};
 
 			mt6397_vio18_reg: buck_vio18 {
-				regulator-compatible = "buck_vio18";
 				regulator-name = "vio18";
 				regulator-min-microvolt = <1620000>;
 				regulator-max-microvolt = <1980000>;
@@ -383,19 +375,16 @@
 			};
 
 			mt6397_vtcxo_reg: ldo_vtcxo {
-				regulator-compatible = "ldo_vtcxo";
 				regulator-name = "vtcxo";
 				regulator-always-on;
 			};
 
 			mt6397_va28_reg: ldo_va28 {
-				regulator-compatible = "ldo_va28";
 				regulator-name = "va28";
 				regulator-always-on;
 			};
 
 			mt6397_vcama_reg: ldo_vcama {
-				regulator-compatible = "ldo_vcama";
 				regulator-name = "vcama";
 				regulator-min-microvolt = <1500000>;
 				regulator-max-microvolt = <2800000>;
@@ -403,18 +392,15 @@
 			};
 
 			mt6397_vio28_reg: ldo_vio28 {
-				regulator-compatible = "ldo_vio28";
 				regulator-name = "vio28";
 				regulator-always-on;
 			};
 
 			mt6397_vusb_reg: ldo_vusb {
-				regulator-compatible = "ldo_vusb";
 				regulator-name = "vusb";
 			};
 
 			mt6397_vmc_reg: ldo_vmc {
-				regulator-compatible = "ldo_vmc";
 				regulator-name = "vmc";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <3300000>;
@@ -422,7 +408,6 @@
 			};
 
 			mt6397_vmch_reg: ldo_vmch {
-				regulator-compatible = "ldo_vmch";
 				regulator-name = "vmch";
 				regulator-min-microvolt = <3000000>;
 				regulator-max-microvolt = <3300000>;
@@ -430,7 +415,6 @@
 			};
 
 			mt6397_vemc_3v3_reg: ldo_vemc3v3 {
-				regulator-compatible = "ldo_vemc3v3";
 				regulator-name = "vemc_3v3";
 				regulator-min-microvolt = <3000000>;
 				regulator-max-microvolt = <3300000>;
@@ -438,7 +422,6 @@
 			};
 
 			mt6397_vgp1_reg: ldo_vgp1 {
-				regulator-compatible = "ldo_vgp1";
 				regulator-name = "vcamd";
 				regulator-min-microvolt = <1220000>;
 				regulator-max-microvolt = <3300000>;
@@ -446,7 +429,6 @@
 			};
 
 			mt6397_vgp2_reg: ldo_vgp2 {
-				regulator-compatible = "ldo_vgp2";
 				regulator-name = "vcamio";
 				regulator-min-microvolt = <1000000>;
 				regulator-max-microvolt = <3300000>;
@@ -454,7 +436,6 @@
 			};
 
 			mt6397_vgp3_reg: ldo_vgp3 {
-				regulator-compatible = "ldo_vgp3";
 				regulator-name = "vcamaf";
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <3300000>;
@@ -462,7 +443,6 @@
 			};
 
 			mt6397_vgp4_reg: ldo_vgp4 {
-				regulator-compatible = "ldo_vgp4";
 				regulator-name = "vgp4";
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <3300000>;
@@ -470,7 +450,6 @@
 			};
 
 			mt6397_vgp5_reg: ldo_vgp5 {
-				regulator-compatible = "ldo_vgp5";
 				regulator-name = "vgp5";
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <3000000>;
@@ -478,7 +457,6 @@
 			};
 
 			mt6397_vgp6_reg: ldo_vgp6 {
-				regulator-compatible = "ldo_vgp6";
 				regulator-name = "vgp6";
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <3300000>;
@@ -486,7 +464,6 @@
 			};
 
 			mt6397_vibr_reg: ldo_vibr {
-				regulator-compatible = "ldo_vibr";
 				regulator-name = "vibr";
 				regulator-min-microvolt = <1300000>;
 				regulator-max-microvolt = <3300000>;
Signature · 1 line
2.39.5
author maintainer
#108 lore raw

PATCH 108/620 arm64: dts: mediatek: mt8173-elm: Drop regulator-compatible property

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chen-Yu Tsai <[email protected]>

[ Upstream commit 4b907b3ea5fba240808136cc5599d14b52230b39 ]

The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It is also not listed in the MT6397 regulator bindings. Having them present produces a whole bunch of validation errors:

Unevaluated properties are not allowed ('regulator-compatible' was unexpected)

Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work.

---
 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 23 --------------------
 1 file changed, 23 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +0 -23
index e666ebb28980a..ed82a3feb789b 100644
@@ -930,7 +930,6 @@
 			compatible = "mediatek,mt6397-regulator";
 
 			mt6397_vpca15_reg: buck_vpca15 {
-				regulator-compatible = "buck_vpca15";
 				regulator-name = "vpca15";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -940,7 +939,6 @@
 			};
 
 			mt6397_vpca7_reg: buck_vpca7 {
-				regulator-compatible = "buck_vpca7";
 				regulator-name = "vpca7";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -950,7 +948,6 @@
 			};
 
 			mt6397_vsramca15_reg: buck_vsramca15 {
-				regulator-compatible = "buck_vsramca15";
 				regulator-name = "vsramca15";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -959,7 +956,6 @@
 			};
 
 			mt6397_vsramca7_reg: buck_vsramca7 {
-				regulator-compatible = "buck_vsramca7";
 				regulator-name = "vsramca7";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -968,7 +964,6 @@
 			};
 
 			mt6397_vcore_reg: buck_vcore {
-				regulator-compatible = "buck_vcore";
 				regulator-name = "vcore";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -977,7 +972,6 @@
 			};
 
 			mt6397_vgpu_reg: buck_vgpu {
-				regulator-compatible = "buck_vgpu";
 				regulator-name = "vgpu";
 				regulator-min-microvolt = < 700000>;
 				regulator-max-microvolt = <1350000>;
@@ -986,7 +980,6 @@
 			};
 
 			mt6397_vdrm_reg: buck_vdrm {
-				regulator-compatible = "buck_vdrm";
 				regulator-name = "vdrm";
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <1400000>;
@@ -995,7 +988,6 @@
 			};
 
 			mt6397_vio18_reg: buck_vio18 {
-				regulator-compatible = "buck_vio18";
 				regulator-name = "vio18";
 				regulator-min-microvolt = <1620000>;
 				regulator-max-microvolt = <1980000>;
@@ -1004,18 +996,15 @@
 			};
 
 			mt6397_vtcxo_reg: ldo_vtcxo {
-				regulator-compatible = "ldo_vtcxo";
 				regulator-name = "vtcxo";
 				regulator-always-on;
 			};
 
 			mt6397_va28_reg: ldo_va28 {
-				regulator-compatible = "ldo_va28";
 				regulator-name = "va28";
 			};
 
 			mt6397_vcama_reg: ldo_vcama {
-				regulator-compatible = "ldo_vcama";
 				regulator-name = "vcama";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
@@ -1023,18 +1012,15 @@
 			};
 
 			mt6397_vio28_reg: ldo_vio28 {
-				regulator-compatible = "ldo_vio28";
 				regulator-name = "vio28";
 				regulator-always-on;
 			};
 
 			mt6397_vusb_reg: ldo_vusb {
-				regulator-compatible = "ldo_vusb";
 				regulator-name = "vusb";
 			};
 
 			mt6397_vmc_reg: ldo_vmc {
-				regulator-compatible = "ldo_vmc";
 				regulator-name = "vmc";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <3300000>;
@@ -1042,7 +1028,6 @@
 			};
 
 			mt6397_vmch_reg: ldo_vmch {
-				regulator-compatible = "ldo_vmch";
 				regulator-name = "vmch";
 				regulator-min-microvolt = <3000000>;
 				regulator-max-microvolt = <3300000>;
@@ -1050,7 +1035,6 @@
 			};
 
 			mt6397_vemc_3v3_reg: ldo_vemc3v3 {
-				regulator-compatible = "ldo_vemc3v3";
 				regulator-name = "vemc_3v3";
 				regulator-min-microvolt = <3000000>;
 				regulator-max-microvolt = <3300000>;
@@ -1058,7 +1042,6 @@
 			};
 
 			mt6397_vgp1_reg: ldo_vgp1 {
-				regulator-compatible = "ldo_vgp1";
 				regulator-name = "vcamd";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
@@ -1066,7 +1049,6 @@
 			};
 
 			mt6397_vgp2_reg: ldo_vgp2 {
-				regulator-compatible = "ldo_vgp2";
 				regulator-name = "vcamio";
 				regulator-min-microvolt = <3300000>;
 				regulator-max-microvolt = <3300000>;
@@ -1074,7 +1056,6 @@
 			};
 
 			mt6397_vgp3_reg: ldo_vgp3 {
-				regulator-compatible = "ldo_vgp3";
 				regulator-name = "vcamaf";
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <1800000>;
@@ -1082,7 +1063,6 @@
 			};
 
 			mt6397_vgp4_reg: ldo_vgp4 {
-				regulator-compatible = "ldo_vgp4";
 				regulator-name = "vgp4";
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <3300000>;
@@ -1090,7 +1070,6 @@
 			};
 
 			mt6397_vgp5_reg: ldo_vgp5 {
-				regulator-compatible = "ldo_vgp5";
 				regulator-name = "vgp5";
 				regulator-min-microvolt = <1200000>;
 				regulator-max-microvolt = <3000000>;
@@ -1098,7 +1077,6 @@
 			};
 
 			mt6397_vgp6_reg: ldo_vgp6 {
-				regulator-compatible = "ldo_vgp6";
 				regulator-name = "vgp6";
 				regulator-min-microvolt = <3300000>;
 				regulator-max-microvolt = <3300000>;
@@ -1107,7 +1085,6 @@
 			};
 
 			mt6397_vibr_reg: ldo_vibr {
-				regulator-compatible = "ldo_vibr";
 				regulator-name = "vibr";
 				regulator-min-microvolt = <1300000>;
 				regulator-max-microvolt = <3300000>;
Signature · 1 line
2.39.5
author maintainer
#109 lore raw

PATCH 109/620 arm64: dts: mediatek: mt8173-elm: Fix MT6397 PMIC sub-node names

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chen-Yu Tsai <[email protected]>

[ Upstream commit beb06b727194f68b0a4b5183e50c88265ce185af ]

The MT6397 PMIC bindings specify exact names for its sub-nodes. The names used in the current dts don't match, causing a validation error.

Fix up the names. Also drop the label for the regulators node, since any reference should be against the individual regulator sub-nodes.

Fixes 689b937bedde ("arm64: dts: mediatek: add mt8173 elm and hana board")
---
 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +3 -3
index ed82a3feb789b..7d15be690894c 100644
@@ -914,7 +914,7 @@
 		interrupt-controller;
 		#interrupt-cells = <2>;
 
-		clock: mt6397clock {
+		clock: clocks {
 			compatible = "mediatek,mt6397-clk";
 			#clock-cells = <1>;
 		};
@@ -926,7 +926,7 @@
 			#gpio-cells = <2>;
 		};
 
-		regulator: mt6397regulator {
+		regulators {
 			compatible = "mediatek,mt6397-regulator";
 
 			mt6397_vpca15_reg: buck_vpca15 {
@@ -1092,7 +1092,7 @@
 			};
 		};
 
-		rtc: mt6397rtc {
+		rtc: rtc {
 			compatible = "mediatek,mt6397-rtc";
 		};
 
Signature · 1 line
2.39.5
author maintainer
#110 lore raw

PATCH 110/620 arm64: dts: mediatek: mt8173-evb: Fix MT6397 PMIC sub-node names

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chen-Yu Tsai <[email protected]>

[ Upstream commit 9545ba142865b9099d43c972b9ebcf463606499a ]

The MT6397 PMIC bindings specify exact names for its sub-nodes. The names used in the current dts don't match, causing a validation error.

Fix up the names. Also drop the label for the regulators node, since any reference should be against the individual regulator sub-nodes.

Fixes 16ea61fc5614 ("arm64: dts: mt8173-evb: Add PMIC support")
---
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +1 -1
index cd52926190470..52b56069c51d6 100644
@@ -307,7 +307,7 @@
 		interrupt-controller;
 		#interrupt-cells = <2>;
 
-		mt6397regulator: mt6397regulator {
+		regulators {
 			compatible = "mediatek,mt6397-regulator";
 
 			mt6397_vpca15_reg: buck_vpca15 {
Signature · 1 line
2.39.5
author maintainer
#111 lore raw

PATCH 111/620 arm64: dts: mediatek: mt8183: kenzo: Support second source touchscreen

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Hsin-Te Yuan <[email protected]>

[ Upstream commit 5ec5dc73c5ac0c6e06803dc3b5aea4493e856568 ]

Some kenzo devices use second source touchscreen.

Fixes 0a9cefe21aec ("arm64: dts: mt8183: Add kukui-jacuzzi-kenzo board")
---
 .../dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dts   | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dts +15 -0
index 6f1aa692753ad..a477e2cce2048 100644
@@ -10,3 +10,18 @@
 	model = "Google kenzo sku17 board";
 	compatible = "google,juniper-sku17", "google,juniper", "mediatek,mt8183";
 };
+
+&i2c0 {
+	touchscreen@40 {
+		compatible = "hid-over-i2c";
+		reg = <0x40>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&touchscreen_pins>;
+
+		interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
+
+		post-power-on-delay-ms = <70>;
+		hid-descr-addr = <0x0001>;
+	};
+};
Signature · 1 line
2.39.5
author maintainer
#112 lore raw

PATCH 112/620 arm64: dts: mediatek: mt8183: willow: Support second source touchscreen

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Hsin-Te Yuan <[email protected]>

[ Upstream commit 9594935260d76bffe200bea6cfab6ba0752e70d9 ]

Some willow devices use second source touchscreen.

Fixes f006bcf1c972 ("arm64: dts: mt8183: Add kukui-jacuzzi-willow board")
---
 .../dts/mediatek/mt8183-kukui-jacuzzi-willow.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow.dtsi +15 -0
index 76d33540166f9..c942e461a177e 100644
@@ -6,6 +6,21 @@
 /dts-v1/;
 #include "mt8183-kukui-jacuzzi.dtsi"
 
+&i2c0 {
+	touchscreen@40 {
+		compatible = "hid-over-i2c";
+		reg = <0x40>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&touchscreen_pins>;
+
+		interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
+
+		post-power-on-delay-ms = <70>;
+		hid-descr-addr = <0x0001>;
+	};
+};
+
 &i2c2 {
 	trackpad@2c {
 		compatible = "hid-over-i2c";
Signature · 1 line
2.39.5
author maintainer
#113 lore raw

PATCH 113/620 memory: Add LPDDR2-info helpers

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dmitry Osipenko <[email protected]>

[ Upstream commit 38322cf423f69b89b6e0eaad4017ab41cfe45b45 ]

Add common helpers for reading and parsing standard LPDDR2 configuration properties.

Stable-dep-of: b9784e5cde1f ("memory: tegra20-emc: fix an OF node reference bug in tegra_emc_find_node_by_ram_code()")

---
 drivers/memory/jedec_ddr.h      | 47 ++++++++++++++++++
 drivers/memory/jedec_ddr_data.c | 41 ++++++++++++++++
 drivers/memory/of_memory.c      | 87 +++++++++++++++++++++++++++++++++
 drivers/memory/of_memory.h      |  9 ++++
 4 files changed, 184 insertions(+)
drivers/memory/jedec_ddr.h +47 -0
index e59ccbd982d02..6cd508478b146 100644
@@ -112,6 +112,26 @@
 #define NUM_DDR_ADDR_TABLE_ENTRIES			11
 #define NUM_DDR_TIMING_TABLE_ENTRIES			4
 
+#define LPDDR2_MANID_SAMSUNG				1
+#define LPDDR2_MANID_QIMONDA				2
+#define LPDDR2_MANID_ELPIDA				3
+#define LPDDR2_MANID_ETRON				4
+#define LPDDR2_MANID_NANYA				5
+#define LPDDR2_MANID_HYNIX				6
+#define LPDDR2_MANID_MOSEL				7
+#define LPDDR2_MANID_WINBOND				8
+#define LPDDR2_MANID_ESMT				9
+#define LPDDR2_MANID_SPANSION				11
+#define LPDDR2_MANID_SST				12
+#define LPDDR2_MANID_ZMOS				13
+#define LPDDR2_MANID_INTEL				14
+#define LPDDR2_MANID_NUMONYX				254
+#define LPDDR2_MANID_MICRON				255
+
+#define LPDDR2_TYPE_S4					0
+#define LPDDR2_TYPE_S2					1
+#define LPDDR2_TYPE_NVM					2
+
 /* Structure for DDR addressing info from the JEDEC spec */
 struct lpddr2_addressing {
 	u32 num_banks;
@@ -170,6 +190,33 @@ extern const struct lpddr2_timings
 	lpddr2_jedec_timings[NUM_DDR_TIMING_TABLE_ENTRIES];
 extern const struct lpddr2_min_tck lpddr2_jedec_min_tck;
 
+/* Structure of MR8 */
+union lpddr2_basic_config4 {
+	u32 value;
+
+	struct {
+		unsigned int arch_type : 2;
+		unsigned int density : 4;
+		unsigned int io_width : 2;
+	} __packed;
+};
+
+/*
+ * Structure for information about LPDDR2 chip. All parameters are
+ * matching raw values of standard mode register bitfields or set to
+ * -ENOENT if info unavailable.
+ */
+struct lpddr2_info {
+	int arch_type;
+	int density;
+	int io_width;
+	int manufacturer_id;
+	int revision_id1;
+	int revision_id2;
+};
+
+const char *lpddr2_jedec_manufacturer(unsigned int manufacturer_id);
+
 /*
  * Structure for timings for LPDDR3 based on LPDDR2 plus additional fields.
  * All parameters are in pico seconds(ps) excluding max_freq, min_freq which
drivers/memory/jedec_ddr_data.c +41 -0

44 lines not on this page · raw message

drivers/memory/of_memory.c +87 -0

90 lines not on this page · raw message

drivers/memory/of_memory.h +9 -0
index 4a99b232ab0a8..1c4e47fede8ae 100644
@@ -20,6 +20,9 @@ const struct lpddr3_min_tck *of_lpddr3_get_min_tck(struct device_node *np,
 const struct lpddr3_timings *
 of_lpddr3_get_ddr_timings(struct device_node *np_ddr,
 			  struct device *dev, u32 device_type, u32 *nr_frequencies);
+
+const struct lpddr2_info *of_lpddr2_get_info(struct device_node *np,
+					     struct device *dev);
 #else
 static inline const struct lpddr2_min_tck
 	*of_get_min_tck(struct device_node *np, struct device *dev)
@@ -46,6 +49,12 @@ static inline const struct lpddr3_timings
 {
 	return NULL;
 }
+
+static inline const struct lpddr2_info
+	*of_lpddr2_get_info(struct device_node *np, struct device *dev)
+{
+	return NULL;
+}
 #endif /* CONFIG_OF && CONFIG_DDR */
 
 #endif /* __LINUX_MEMORY_OF_REG_ */
Signature · 1 line
2.39.5
author maintainer
#114 lore raw

PATCH 114/620 memory: tegra20-emc: Support matching timings by LPDDR2 configuration

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dmitry Osipenko <[email protected]>

[ Upstream commit 131dd9a436d8f6dbaf3d9597803765d271b2fc19 ]

ASUS Transformer TF101 doesn't provide RAM code and in this case memory timings should be selected based on identity information read out from SDRAM chip. Support matching timings by LPDDR2 configuration.

Stable-dep-of: b9784e5cde1f ("memory: tegra20-emc: fix an OF node reference bug in tegra_emc_find_node_by_ram_code()")

---
 drivers/memory/tegra/Kconfig       |   1 +
 drivers/memory/tegra/tegra20-emc.c | 199 +++++++++++++++++++++++++++--
 2 files changed, 186 insertions(+), 14 deletions(-)
drivers/memory/tegra/Kconfig +1 -0
index f9bae36c03a39..7951764b4efec 100644
@@ -16,6 +16,7 @@ config TEGRA20_EMC
 	depends on ARCH_TEGRA_2x_SOC || COMPILE_TEST
 	select DEVFREQ_GOV_SIMPLE_ONDEMAND
 	select PM_DEVFREQ
+	select DDR
 	help
 	  This driver is for the External Memory Controller (EMC) found on
 	  Tegra20 chips. The EMC controls the external DRAM on the board.
drivers/memory/tegra/tegra20-emc.c +185 -14

303 lines not on this page · raw message

Signature · 1 line
2.39.5
author maintainer
#115 lore raw

PATCH 115/620 memory: tegra20-emc: fix an OF node reference bug in tegra_emc_find_node_by_ram_code()

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Joe Hattori <[email protected]>

[ Upstream commit b9784e5cde1f9fb83661a70e580e381ae1264d12 ]

As of_find_node_by_name() release the reference of the argument device node, tegra_emc_find_node_by_ram_code() releases some device nodes while still in use, resulting in possible UAFs. According to the bindings and the in-tree DTS files, the "emc-tables" node is always device's child node with the property "nvidia,use-ram-code", and the "lpddr2" node is a child of the "emc-tables" node. Thus utilize the for_each_child_of_node() macro and of_get_child_by_name() instead of of_find_node_by_name() to simplify the code.

This bug was found by an experimental verification tool that I am developing.

Fixes 96e5da7c8424 ("memory: tegra: Introduce Tegra20 EMC driver")
[krzysztof: applied v1, adjust the commit msg to incorporate v2 parts]
---
 drivers/memory/tegra/tegra20-emc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/memory/tegra/tegra20-emc.c +4 -4
index 497b6edbf3ca1..2ac074b96f859 100644
@@ -477,14 +477,15 @@ tegra_emc_find_node_by_ram_code(struct tegra_emc *emc)
 
 	ram_code = tegra_read_ram_code();
 
-	for (np = of_find_node_by_name(dev->of_node, "emc-tables"); np;
-	     np = of_find_node_by_name(np, "emc-tables")) {
+	for_each_child_of_node(dev->of_node, np) {
+		if (!of_node_name_eq(np, "emc-tables"))
+			continue;
 		err = of_property_read_u32(np, "nvidia,ram-code", &value);
 		if (err || value != ram_code) {
 			struct device_node *lpddr2_np;
 			bool cfg_mismatches = false;
 
-			lpddr2_np = of_find_node_by_name(np, "lpddr2");
+			lpddr2_np = of_get_child_by_name(np, "lpddr2");
 			if (lpddr2_np) {
 				const struct lpddr2_info *info;
 
@@ -521,7 +522,6 @@ tegra_emc_find_node_by_ram_code(struct tegra_emc *emc)
 			}
 
 			if (cfg_mismatches) {
-				of_node_put(np);
 				continue;
 			}
 		}
Signature · 1 line
2.39.5
author maintainer
#116 lore raw

PATCH 116/620 arm64: dts: mediatek: mt8183-kukui-jacuzzi: Drop pp3300_panel voltage settings

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Chen-Yu Tsai <[email protected]>

[ Upstream commit 0b5b1c881a909f17c05ef4b1ccb421e077f6e466 ]

The pp3300_panel fixed regulator is just a load switch. It does not have any regulating capabilities. Thus having voltage constraints on it is wrong.

Remove the voltage constraints.

Fixes cabc71b08eb5 ("arm64: dts: mt8183: Add kukui-jacuzzi-damu board")
---
 arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi +0 -2
index f19bf2834b390..3fa491dc52021 100644
@@ -39,8 +39,6 @@
 	pp3300_panel: pp3300-panel {
 		compatible = "regulator-fixed";
 		regulator-name = "pp3300_panel";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pp3300_panel_pins>;
 
Signature · 1 line
2.39.5
author maintainer
#117 lore raw

PATCH 117/620 arm64: dts: qcom: msm8996: Fix up USB3 interrupts

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Konrad Dybcio <[email protected]>

[ Upstream commit 9cb9c9f4e1380da317a056afd26d66a835c5796c ]

Add the missing interrupt lines and fix qusb2_phy being an impostor of hs_phy_irq.

This happens to also fix warnings such as:

usb@6af8800: interrupt-names: ['hs_phy_irq', 'ss_phy_irq'] is too short

---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/msm8996.dtsi +7 -2
index 9ee8eebfcdb51..ec0f067a6a5d5 100644
@@ -2608,9 +2608,14 @@
 			#size-cells = <1>;
 			ranges;
 
-			interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+			interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>;
-			interrupt-names = "hs_phy_irq", "ss_phy_irq";
+			interrupt-names = "pwr_event",
+					  "qusb2_phy",
+					  "hs_phy_irq",
+					  "ss_phy_irq";
 
 			clocks = <&gcc GCC_SYS_NOC_USB3_AXI_CLK>,
 				<&gcc GCC_USB30_MASTER_CLK>,
Signature · 1 line
2.39.5
author maintainer
#118 lore raw

PATCH 118/620 arm64: dts: qcom: msm8994: Describe USB interrupts

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Konrad Dybcio <[email protected]>

[ Upstream commit c910544d2234709660d60f80345c285616e73b1c ]

Previously the interrupt lanes were not described, fix that.

---
 arch/arm64/boot/dts/qcom/msm8994.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/msm8994.dtsi +9 -0
index 4447ed146b3ac..fafeb790c5c59 100644
@@ -419,6 +419,15 @@
 			#size-cells = <1>;
 			ranges;
 
+			interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "pwr_event",
+					  "qusb2_phy",
+					  "hs_phy_irq",
+					  "ss_phy_irq";
+
 			clocks = <&gcc GCC_USB30_MASTER_CLK>,
 				 <&gcc GCC_SYS_NOC_USB3_AXI_CLK>,
 				 <&gcc GCC_USB30_SLEEP_CLK>,
Signature · 1 line
2.39.5
author maintainer
#119 lore raw

PATCH 119/620 arm64: dts: qcom: msm8916: correct sleep clock frequency

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit f088b921890cef28862913e5627bb2e2b5f82125 ]

The MSM8916 platform uses PM8916 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.

Fixes f4fb6aeafaaa ("arm64: dts: qcom: msm8916: Add fixed rate on-board oscillators")
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8916.dtsi +1 -1
index 668674059d485..79d5f1433800f 100644
@@ -105,7 +105,7 @@
 		sleep_clk: sleep-clk {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
-			clock-frequency = <32768>;
+			clock-frequency = <32764>;
 		};
 	};
 
Signature · 1 line
2.39.5
author maintainer
#120 lore raw

PATCH 120/620 arm64: dts: qcom: msm8994: correct sleep clock frequency

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit a4148d869d47d8c86da0291dd95d411a5ebe90c8 ]

The MSM8994 platform uses PM8994/6 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.

Fixes feeaf56ac78d ("arm64: dts: msm8994 SoC and Huawei Angler (Nexus 6P) support")
---
 arch/arm64/boot/dts/qcom/msm8994.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8994.dtsi +1 -1
index fafeb790c5c59..1ae2fbef90582 100644
@@ -25,7 +25,7 @@
 		sleep_clk: sleep-clk {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
-			clock-frequency = <32768>;
+			clock-frequency = <32764>;
 			clock-output-names = "sleep_clk";
 		};
 	};
Signature · 1 line
2.39.5
author maintainer
#121 lore raw

PATCH 121/620 arm64: dts: qcom: sc7280: correct sleep clock frequency

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit f6ccdca14eac545320ab03d6ca91ca343e7372e5 ]

The SC7280 platform uses PMK8350 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.

Fixes 7a1f4e7f740d ("arm64: dts: qcom: sc7280: Add basic dts/dtsi files for sc7280 soc")
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +1 -1
index 929fc0667e985..c65f3c9a6673f 100644
@@ -39,7 +39,7 @@
 
 		sleep_clk: sleep-clk {
 			compatible = "fixed-clock";
-			clock-frequency = <32000>;
+			clock-frequency = <32764>;
 			#clock-cells = <0>;
 		};
 	};
Signature · 1 line
2.39.5
author maintainer
#122 lore raw

PATCH 122/620 arm64: dts: qcom: sm6125: correct sleep clock frequency

In reply to Greg Kroah-Hartman

5.15-stable review patch. If anyone has any objections, please let me know.

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

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit b3c547e1507862f0e4d46432b665c5c6e61e14d6 ]

The SM6125 platform uses PM6125 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.

Fixes cff4bbaf2a2d ("arm64: dts: qcom: Add support for SM6125")
---
 arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6125.dtsi +1 -1
index 2e4fe2bc1e0a8..0f6a9a5cbe178 100644
@@ -27,7 +27,7 @@
 		sleep_clk: sleep-clk {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
-			clock-frequency = <32000>;
+			clock-frequency = <32764>;
 			clock-output-names = "sleep_clk";
 		};
 	};
Signature · 1 line
2.39.5