6.15.4-rc1 review
Subsystems (5)
Greg Kroah-Hartman
maintainercover 6.15.4-rc1 review
This is the start of the stable review cycle for the 6.15.4 release. There are 592 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, 25 Jun 2025 13:05:55 +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/v6.x/stable-review/patch-6.15.4-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-6.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.15.4-rc1
Gao Xiang <[email protected]>
erofs: remove a superfluous check for encoded extents
Gao Xiang <[email protected]>
erofs: refuse crafted out-of-file-range encoded extents
Pali Rohár <[email protected]>
cifs: Remove duplicate fattr->cf_dtype assignment from wsl_to_fattr() function
Lukas Wunner <[email protected]>
PCI: pciehp: Ignore belated Presence Detect Changed caused by DPC
David Thompson <[email protected]>
gpio: mlxbf3: only get IRQ for device instance 0
Miquel Raynal <[email protected]>
mtd: spinand: winbond: Prevent unsupported frequencies on dual/quad I/O variants
Miquel Raynal <[email protected]>
mtd: spinand: Use more specific naming for the (quad IO) read from cache ops
Miquel Raynal <[email protected]>
mtd: spinand: Use more specific naming for the (quad output) read from cache ops
Miquel Raynal <[email protected]>
mtd: spinand: Use more specific naming for the (dual IO) read from cache ops
Miquel Raynal <[email protected]>
mtd: spinand: Use more specific naming for the (dual output) read from cache ops
Miquel Raynal <[email protected]>
mtd: spinand: Use more specific naming for the (single) read from cache ops
Rik van Riel <[email protected]>
x86/mm: Fix early boot use of INVPLGB
Ian Rogers <[email protected]>
perf test: Directory file descriptor leak
Ian Rogers <[email protected]>
perf evsel: Missed close() when probing hybrid core PMUs
Sascha Hauer <[email protected]>
gpio: pca953x: fix wrong error probe return value
Anup Patel <[email protected]>
RISC-V: KVM: Don't treat SBI HFENCE calls as NOPs
Anup Patel <[email protected]>
RISC-V: KVM: Fix the size parameter check in SBI SFENCE calls
Vitaliy Shevtsov <[email protected]>
scsi: elx: efct: Fix memory leak in efct_hw_parse_filter()
Tengda Wu <[email protected]>
arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth()
Luo Gengkun <[email protected]>
perf/core: Fix WARN in perf_cgroup_switch()
Peter Zijlstra <[email protected]>
perf: Fix cgroup state vs ERROR
Peter Zijlstra <[email protected]>
perf: Fix sample vs do_exit()
Bagas Sanjaya <[email protected]>
Documentation: nouveau: Update GSP message queue kernel-doc reference
Steven Rostedt <[email protected]>
tracing: Do not free "head" on error path of filter_free_subsystem_filters()
Benjamin Marzinski <[email protected]>
dm-table: check BLK_FEAT_ATOMIC_WRITES inside limits_lock
Miguel Ojeda <[email protected]>
rust: devres: fix doctest build under !CONFIG_PCI
Lukas Bulwahn <[email protected]>
x86/its: Fix an ifdef typo in its_alloc()
Qiuxu Zhuo <[email protected]>
EDAC/igen6: Fix NULL pointer dereference
Stefan Metzmacher <[email protected]>
smb: client: fix max_sge overflow in smb_extract_folioq_to_rdma()
zhangjian <[email protected]>
smb: client: fix first command failure during re-negotiation
Alex Elder <[email protected]>
i2c: k1: check for transfer error
Paul Aurich <[email protected]>
smb: Log an error when close_all_cached_dirs fails
Kan Liang <[email protected]>
perf/x86/intel: Fix crash in icl_update_topdown_event()
Akhil R <[email protected]>
dt-bindings: i2c: nvidia,tegra20-i2c: Specify the required properties
Avadhut Naik <[email protected]>
EDAC/amd64: Correct number of UMCs for family 19h models 70h-7fh
Dave Hansen <[email protected]>
x86/mm: Disable INVLPGB when PTI is enabled
Mark Rutland <[email protected]>
KVM: arm64: VHE: Synchronize restore of host debug registers
Jakub Kicinski <[email protected]>
tools: ynl: fix mixing ops and notifications on one socket
Donald Hunter <[email protected]>
tools: ynl: parse extack for sub-messages
Eric Dumazet <[email protected]>
net: atm: fix /proc/net/atm/lec handling
Eric Dumazet <[email protected]>
net: atm: add lec_mutex
David Thompson <[email protected]>
mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available
Kuniyuki Iwashima <[email protected]>
calipso: Fix null-ptr-deref in calipso_req_{set,del}attr().
Vinay Belgaumkar <[email protected]>
drm/xe/bmg: Update Wa_16023588340
Ronnie Sahlberg <[email protected]>
ublk: santizize the arguments from userspace when adding a device
Alexey Kodanev <[email protected]>
net: lan743x: fix potential out-of-bounds write in lan743x_ptp_io_event_clock_get()
Jakub Kicinski <[email protected]>
eth: fbnic: avoid double free when failing to DMA-map FW msg
David Wei <[email protected]>
tcp: fix passive TFO socket having invalid NAPI ID
Haixia Qu <[email protected]>
tipc: fix null-ptr-deref when acquiring remote ip of ethernet bearer
Hariprasad Kelam <[email protected]>
Octeontx2-pf: Fix Backpresure configuration
Jesse.Zhang <[email protected]>
drm/amdkfd: move SDMA queue reset capability check to node_show
Penglei Jiang <[email protected]>
io_uring: fix potential page leak in io_sqe_buffer_register()
Neal Cardwell <[email protected]>
tcp: fix tcp_packet_delayed() for tcp_is_non_sack_preventing_reopen() behavior
Kuniyuki Iwashima <[email protected]>
atm: atmtcp: Free invalid length skb in atmtcp_c_send().
Kuniyuki Iwashima <[email protected]>
mpls: Use rcu_dereference_rtnl() in mpls_route_input_rcu().
Dmitry Antipov <[email protected]>
wifi: carl9170: do not ping device which has failed to load firmware
Vladimir Oltean <[email protected]>
ptp: allow reading of currently dialed frequency to succeed on free-running clocks
Vladimir Oltean <[email protected]>
ptp: fix breakage after ptp_vclock_in_use() rework
Pavan Chebbi <[email protected]>
bnxt_en: Update MRU and RSS table of RSS contexts on queue reset
Pavan Chebbi <[email protected]>
bnxt_en: Add a helper function to configure MRU and RSS
Kalesh AP <[email protected]>
bnxt_en: Fix double invocation of bnxt_ulp_stop()/bnxt_ulp_start()
Mina Almasry <[email protected]>
net: netmem: fix skb_ensure_writable with unreadable skbs
Meghana Malladi <[email protected]>
net: ti: icssg-prueth: Fix packet handling for XDP_TX
Namjae Jeon <[email protected]>
ksmbd: add free_transport ops in ksmbd connection
Chuyi Zhou <[email protected]>
workqueue: Initialize wq_isolated_cpumask in workqueue_init_early()
Vitaly Lifshits <[email protected]>
e1000e: set fixed clock frequency indication for Nahum 11 and Nahum 13
Grzegorz Nitka <[email protected]>
ice: fix eswitch code memory leak in reset scenario
Krishna Kumar <[email protected]>
net: ice: Perform accurate aRFS flow match
Jens Axboe <[email protected]>
io_uring/sqpoll: don't put task_struct on tctx setup failure
Justin Sanders <[email protected]>
aoe: clean device rq_list in aoedev_downdev()
Simon Horman <[email protected]>
pldmfw: Select CRC32 when PLDMFW is selected
Nuno Sá <[email protected]>
hwmon: (ltc4282) avoid repeated register write
Arnd Bergmann <[email protected]>
hwmon: (occ) fix unaligned accesses
Arnd Bergmann <[email protected]>
hwmon: (occ) Rework attribute registration for stack usage
Tzung-Bi Shih <[email protected]>
drm/i915/pmu: Fix build error with GCOV and AutoFDO enabled
Danilo Krummrich <[email protected]>
rust: devres: do not dereference to the internal Revocable
Danilo Krummrich <[email protected]>
rust: devres: implement Devres::access()
Danilo Krummrich <[email protected]>
rust: devres: fix race in Devres::drop()
Jacob Keller <[email protected]>
drm/nouveau/bl: increase buffer size to avoid truncate warning
Zhi Wang <[email protected]>
drm/nouveau: fix a use-after-free in r535_gsp_rpc_push()
Ben Skeggs <[email protected]>
drm/nouveau/gsp: split rpc handling out on its own
Brett Creeley <[email protected]>
ionic: Prevent driver/fw getting out of sync on devcmd(s)
John Keeping <[email protected]>
drm/ssd130x: fix ssd132x_clear_screen() columns
Connor Abbott <[email protected]>
drm/msm/a7xx: Call CP_RESET_CONTEXT_STATE
Connor Abbott <[email protected]>
drm/msm: Fix CP_RESET_CONTEXT_STATE bitfield names
Krzysztof Kozlowski <[email protected]>
drm/msm/dsi/dsi_phy_10nm: Fix missing initial VCO rate
James A. MacInnes <[email protected]>
drm/msm/disp: Correct porch timing for SDM845
James A. MacInnes <[email protected]>
drm/msm/dp: Disable wide bus support for SDM845
Bharath SM <[email protected]>
smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels
Maíra Canal <[email protected]>
drm/v3d: Avoid NULL pointer dereference in v3d_job_update_stats()
Maarten Lankhorst <[email protected]>
drm/xe/svm: Fix regression disallowing 64K SVM migration
Jens Axboe <[email protected]>
io_uring/net: always use current transfer count for buffer put
Jeff Layton <[email protected]>
sunrpc: handle SVC_GARBAGE during svc auth processing as auth error
Jeff Layton <[email protected]>
nfsd: use threads array as-is in netlink interface
Gao Xiang <[email protected]>
erofs: remove unused trace event erofs_destroy_inode
SeongJae Park <[email protected]>
mm/madvise: handle madvise_lock() failure during race unwinding
Aditya Garg <[email protected]>
drm/appletbdrm: Make appletbdrm depend on X86
Richard Fitzgerald <[email protected]>
ALSA: hda/realtek: Add quirk for Asus GU605C
Chris Chiu <[email protected]>
ALSA: hda/realtek: Fix built-in mic on ASUS VivoBook X513EA
Jonathan Lane <[email protected]>
ALSA: hda/realtek: enable headset mic on Latitude 5420 Rugged
Edip Hazuri <[email protected]>
ALSA: hda/realtek - Add mute LED support for HP Victus 16-s1xxx and HP Victus 15-fa1xxx
Takashi Iwai <[email protected]>
ALSA: hda/intel: Add Thinkpad E15 to PM deny list
wangdicheng <[email protected]>
ALSA: usb-audio: Rename ALSA kcontrol PCM and PCM1 for the KTMicro sound card
Dev Jain <[email protected]>
arm64: Restrict pagetable teardown to avoid false warning
Binbin Zhou <[email protected]>
gpio: loongson-64bit: Correct Loongson-7A2000 ACPI GPIO access mode
Zhi Wang <[email protected]>
drm/nouveau/nvkm: introduce new GSP reply policy NVKM_GSP_RPC_REPLY_POLL
Zhi Wang <[email protected]>
drm/nouveau/nvkm: factor out current GSP RPC command policies
Kuniyuki Iwashima <[email protected]>
atm: Revert atm_account_tx() if copy_from_iter_full() fails.
Tejun Heo <[email protected]>
sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group()
Srinivas Pandruvada <[email protected]>
platform/x86/intel-uncore-freq: Fail module load when plat_info is NULL
Stephen Smalley <[email protected]>
selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len
Kurt Borja <[email protected]>
Revert "platform/x86: alienware-wmi-wmax: Add G-Mode support to Alienware m16 R1"
Rong Zhang <[email protected]>
platform/x86: ideapad-laptop: use usleep_range() for EC polling
Steven Rostedt <[email protected]>
fgraph: Do not enable function_graph tracer when setting funcgraph-args
Namjae Jeon <[email protected]>
ksmbd: fix null pointer dereference in destroy_previous_session
Xin Li (Intel) <[email protected]>
selftests/x86: Add a test to detect infinite SIGTRAP handler loop
Kai Huang <[email protected]>
x86/virt/tdx: Avoid indirect calls to TDX assembly functions
Mike Rapoport (Microsoft) <[email protected]>
Revert "mm/execmem: Unify early execmem_cache behaviour"
Peter Zijlstra (Intel) <[email protected]>
x86/its: explicitly manage permissions for ITS pages
Mike Rapoport (Microsoft) <[email protected]>
x86/its: move its_pages array to struct mod_arch_specific
Mike Rapoport (Microsoft) <[email protected]>
x86/Kconfig: only enable ROX cache in execmem when STRICT_MODULE_RWX is set
Juergen Gross <[email protected]>
x86/mm/pat: don't collapse pages without PSE set
Lorenzo Stoakes <[email protected]>
mm/vma: reset VMA iterator on commit_merge() OOM failure
Marek Szyprowski <[email protected]>
udmabuf: use sgtable-based scatterlist wrappers
Ryan Roberts <[email protected]>
mm: close theoretical race where stale TLB entries could linger
Jakub Kicinski <[email protected]>
net: clear the dst when changing skb protocol
Eric Dumazet <[email protected]>
net_sched: sch_sfq: reject invalid perturb period
Jens Axboe <[email protected]>
nvme: always punt polled uring_cmd end_io work to task_work
Peter Oberparleiter <[email protected]>
scsi: s390: zfcp: Ensure synchronous unit_add
Dexuan Cui <[email protected]>
scsi: storvsc: Increase the timeouts to storvsc_timeout
Bharath SM <[email protected]>
smb: improve directory cache reuse for readdir operations
Steven Rostedt <[email protected]>
tracing: Fix regression of filter waiting a long time on RCU synchronization
Shyam Prasad N <[email protected]>
cifs: do not disable interface polling on failure
Shyam Prasad N <[email protected]>
cifs: serialize other channels when query server interfaces is pending
Shyam Prasad N <[email protected]>
cifs: deal with the channel loading lag while picking channels
Fedor Pchelkin <[email protected]>
jffs2: check jffs2_prealloc_raw_node_refs() result in few other places
Artem Sadovnikov <[email protected]>
jffs2: check that raw node were preallocated before writing summary
Jaroslav Kysela <[email protected]>
firmware: cs_dsp: Fix OOB memory read access in KUnit test (wmfw info)
Jaroslav Kysela <[email protected]>
firmware: cs_dsp: Fix OOB memory read access in KUnit test (ctl cache)
Tianyang Zhang <[email protected]>
LoongArch: Fix panic caused by NULL-PMD in huge_pte_offset()
Huacai Chen <[email protected]>
LoongArch: Avoid using $r0/$r1 as "mask" for csrxchg
Thomas Weißschuh <[email protected]>
LoongArch: vDSO: Correctly use asm parameters in syscall wrappers
Yao Zi <[email protected]>
platform/loongarch: laptop: Add backlight power control support
Yao Zi <[email protected]>
platform/loongarch: laptop: Unregister generic_sub_drivers on exit
Yao Zi <[email protected]>
platform/loongarch: laptop: Get brightness setting from EC on probe
Andrew Morton <[email protected]>
drivers/rapidio/rio_cm.c: prevent possible heap overwrite
Penglei Jiang <[email protected]>
io_uring: fix task leak issue in io_wq_create()
Jens Axboe <[email protected]>
io_uring/rsrc: validate buffer count with offset for cloning
Jens Axboe <[email protected]>
io_uring/kbuf: don't truncate end buffer for multiple buffer peeks
Luis Henriques <[email protected]>
fs: drop assert in file_seek_cur_needs_f_lock
Narayana Murty N <[email protected]>
powerpc/eeh: Fix missing PE bridge reconfiguration during VFIO EEH recovery
Christophe Leroy <[email protected]>
powerpc/vdso: Fix build of VDSO32 with pcrel
Amir Goldstein <[email protected]>
ovl: fix debug print in case of mkdir error
Stuart Hayes <[email protected]>
platform/x86: dell_rbu: Stop overwriting data buffer
Stuart Hayes <[email protected]>
platform/x86: dell_rbu: Fix list usage
Mario Limonciello <[email protected]>
platform/x86/amd: pmf: Prevent amd_pmf_tee_deinit() from running twice
Mario Limonciello <[email protected]>
platform/x86/amd: pmf: Use device managed allocations
Mario Limonciello <[email protected]>
platform/x86/amd: pmc: Clear metrics table at start of cycle
Stephen Smalley <[email protected]>
fs/xattr.c: fix simple_xattr_list()
Alexander Sverdlin <[email protected]>
Revert "bus: ti-sysc: Probe for l4_wkup and l4_cfg interconnect devices first"
Jann Horn <[email protected]>
tee: Prevent size calculation wraparound on 32-bit kernels
Sukrut Bellary <[email protected]>
ARM: OMAP2+: Fix l4ls clk domain handling in STANDBY
Laurentiu Tudor <[email protected]>
bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
Jarkko Nikula <[email protected]>
i3c: mipi-i3c-hci: Fix handling status of i3c_hci_irq_handler()
Krzysztof Kozlowski <[email protected]>
watchdog: stm32: Fix wakeup source leaks on device unbind
Marcus Folkesson <[email protected]>
watchdog: da9052_wdt: respect TWDMIN
Kees Cook <[email protected]>
wifi: iwlwifi: mld: Work around Clang loop unrolling bug
Kees Cook <[email protected]>
fbcon: Make sure modelist not set on unregistered console
Vlad Dogaru <[email protected]>
net/mlx5: HWS, Harden IP version definer checks
Suraj P Kizhakkethil <[email protected]>
wifi: ath12k: Pass correct values of center freq1 and center freq2 for 160 MHz
Balamurugan S <[email protected]>
wifi: ath12k: fix incorrect CE addresses
Hari Chandrakanthan <[email protected]>
wifi: ath12k: fix link valid field initialization in the monitor Rx
Baochen Qiang <[email protected]>
wifi: ath11k: determine PM policy based on machine model
Sidhanta Sahu <[email protected]>
wifi: ath12k: Fix memory leak due to multiple rx_stats allocation
Sriram R <[email protected]>
wifi: ath12k: Fix the enabling of REO queue lookup table feature
Pradeep Kumar Chitrapu <[email protected]>
wifi: ath12k: Fix incorrect rates sent to firmware
Bitterblue Smith <[email protected]>
wifi: rtw88: Set AMPDU factor to hardware for RTL8814A
Wentao Liang <[email protected]>
octeontx2-pf: Add error log forcn10k_map_unmap_rq_policer()
Linus Walleij <[email protected]>
net: ethernet: cortina: Use TOE/TSO on all TCP
Jiayuan Chen <[email protected]>
bpf, sockmap: Fix data lost during EAGAIN retries
Chao Yu <[email protected]>
f2fs: fix to set atomic write status more clear
Krzysztof Hałasa <[email protected]>
usbnet: asix AX88772: leave the carrier control to phylink
Mateusz Pacuszka <[email protected]>
ice: fix check for existing switch rule
Chen Linxuan <[email protected]>
RDMA/hns: initialize db in update_srq_db()
Rand Deeb <[email protected]>
ixgbe: Fix unreachable retry logic in combined and byte I2C write functions
Kyungwook Boo <[email protected]>
i40e: fix MMIO write access to an invalid page in i40e_clear_hw
Zijun Hu <[email protected]>
sock: Correct error checking condition for (assign|release)_proto_idx()
Daniel Wagner <[email protected]>
scsi: lpfc: Use memcpy() for BIOS version
Aditya Kumar Singh <[email protected]>
wifi: ath12k: fix failed to set mhi state error during reboot with hardware grouping
Mike Looijmans <[email protected]>
pinctrl: mcp23s08: Reset all pins to input at probe
Jonas 'Sortie' Termansen <[email protected]>
isofs: fix Y2038 and Y2156 issues in Rock Ridge TF entry
Baochen Qiang <[email protected]>
wifi: ath12k: make assoc link associate first
Zijun Hu <[email protected]>
software node: Correct a OOB check in software_node_get_reference_args()
Michael Walle <[email protected]>
net: ethernet: ti: am65-cpsw: handle -EPROBE_DEFER
Sarika Sharma <[email protected]>
wifi: ath12k: using msdu end descriptor to check for rx multicast packets
Sarika Sharma <[email protected]>
wifi: ath12k: correctly handle mcast packets for clients
Ido Schimmel <[email protected]>
vxlan: Add RCU read-side critical sections in the Tx path
Kalesh AP <[email protected]>
bnxt_en: Remove unused field "ref_count" in struct bnxt_ulp
Ido Schimmel <[email protected]>
vxlan: Do not treat dst cache initialization errors as fatal
Yong Wang <[email protected]>
net: bridge: mcast: re-implement br_multicast_{enable, disable}_port functions
Yong Wang <[email protected]>
net: bridge: mcast: update multicast contex when vlan state is changed
Víctor Gonzalo <[email protected]>
wifi: iwlwifi: Add missing MODULE_FIRMWARE for Qu-c0-jf-b0
Toke Høiland-Jørgensen <[email protected]>
Revert "mac80211: Dynamically set CoDel parameters per station"
Muna Sinada <[email protected]>
wifi: mac80211: VLAN traffic in multicast path
Shung-Hsi Yu <[email protected]>
bpf: Use proper type to calculate bpf_raw_tp_null_args.mask index
Vlad Dogaru <[email protected]>
net/mlx5: HWS, Fix IP version decision
Joe Damato <[email protected]>
netdevsim: Mark NAPI ID on skb in nsim_rcv
Edward Adam Davis <[email protected]>
wifi: mac80211_hwsim: Prevent tsf from setting if beacon is disabled
Kuan-Chung Chen <[email protected]>
wifi: rtw89: 8922a: fix TX fail with wrong VCO setting
Miri Korenblit <[email protected]>
wifi: iwlwifi: pcie: make sure to lock rxq->read
Sean Christopherson <[email protected]>
iommu/amd: Ensure GA log notifier callbacks finish running before module unload
David Strahan <[email protected]>
scsi: smartpqi: Add new PCI IDs
Justin Tee <[email protected]>
scsi: lpfc: Fix lpfc_check_sli_ndlp() handling for GEN_REQUEST64 commands
Alan Maguire <[email protected]>
libbpf: Add identical pointer detection to btf_dedup_is_equiv()
Pablo Neira Ayuso <[email protected]>
netfilter: nft_set_pipapo: clamp maximum map bucket size to INT_MAX
Steven Rostedt <[email protected]>
tracing: Only return an adjusted address if it matches the kernel address
Chao Yu <[email protected]>
f2fs: fix to bail out in get_new_segment()
Miri Korenblit <[email protected]>
wifi: iwlwifi: mld: check for NULL before referencing a pointer
Johannes Berg <[email protected]>
wifi: iwlwifi: dvm: pair transport op-mode enter/leave
Johannes Berg <[email protected]>
wifi: iwlwifi: mvm: fix beacon CCK flag
Tiezhu Yang <[email protected]>
rtla: Define __NR_sched_setattr for LoongArch
Corey Minyard <[email protected]>
ipmi:ssif: Fix a shutdown race
Luke D. Jones <[email protected]>
hid-asus: check ROG Ally MCU version and warn
Heiko Stuebner <[email protected]>
clk: rockchip: rk3036: mark ddrphy as critical
Martin KaFai Lau <[email protected]>
bpftool: Fix cgroup command to only show cgroup bpf programs
Benjamin Berg <[email protected]>
wifi: mac80211: do not offer a mesh path if forwarding is disabled
Salah Triki <[email protected]>
wireless: purelifi: plfxlc: fix memory leak in plfxlc_usb_wreq_asyn()
Benjamin Berg <[email protected]>
wifi: iwlwifi: mld: call thermal exit without wiphy lock held
Yuuki NAGAO <[email protected]>
wifi: rtw88: rtw8822bu VID/PID for BUFFALO WI-U2-866DM
Stefan Wahren <[email protected]>
net: vertexcom: mse102x: Return code for mse102x_rx_pkt_spi
Jason Xing <[email protected]>
net: mlx4: add SOF_TIMESTAMPING_TX_SOFTWARE flag when getting ts info
Yevgeny Kliteynik <[email protected]>
net/mlx5: HWS, fix counting of rules in the matcher
Gabor Juhos <[email protected]>
pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get()
Mykyta Yatsenko <[email protected]>
libbpf: Check bpf_map_skeleton link for NULL
Gabor Juhos <[email protected]>
pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()
Jason Xing <[email protected]>
net: stmmac: generate software timestamp just before the doorbell
Ilya Leoshkevich <[email protected]>
bpf: Pass the same orig_call value to trampoline functions
Gabor Juhos <[email protected]>
pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction()
Gabor Juhos <[email protected]>
pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name()
Jason Xing <[email protected]>
net: atlantic: generate software timestamp just before the doorbell
Dimitri Fedrau <[email protected]>
net: phy: marvell-88q2xxx: Enable temperature measurement in probe again
Leon Romanovsky <[email protected]>
xfrm: validate assignment of maximal possible SEQ number
Sebastian Andrzej Siewior <[email protected]>
net: page_pool: Don't recycle into cache on PREEMPT_RT
Sebastian Andrzej Siewior <[email protected]>
ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT
Andrew Zaborowski <[email protected]>
x86/sgx: Prevent attempts to reclaim poisoned pages
Eric Dumazet <[email protected]>
tcp: add receive queue awareness in tcp_rcv_space_adjust()
Eric Dumazet <[email protected]>
tcp: fix initial tp->rcvq_space.space value for passive TS enabled flows
Eric Dumazet <[email protected]>
tcp: remove zero TCP TS samples for autotuning
Eric Dumazet <[email protected]>
tcp: always seek for minimal rtt in tcp_rcv_rtt_update()
Dian-Syuan Yang <[email protected]>
wifi: rtw89: leave idle mode when setting WEP encryption for AP mode
Mario Limonciello <[email protected]>
iommu/amd: Allow matching ACPI HID devices without matching UIDs
Muhammad Usama Anjum <[email protected]>
wifi: ath11k: Fix QMI memory reuse logic
Baochen Qiang <[email protected]>
wifi: ath12k: fix a possible dead lock caused by ab->base_lock
Kang Yang <[email protected]>
wifi: ath12k: fix macro definition HAL_RX_MSDU_PKT_LENGTH_GET
Frank Wunderlich <[email protected]>
net: phy: mediatek: do not require syscon compatible for pio property
Moon Yeounsu <[email protected]>
net: dlink: add synchronization for stats update
Taniya Das <[email protected]>
clk: qcom: gcc: Set FORCE_MEM_CORE_ON for gcc_ufs_axi_clk for 8650/8750
Taniya Das <[email protected]>
clk: qcom: gcc-x1e80100: Set FORCE MEM CORE for UFS clocks
Tali Perry <[email protected]>
i2c: npcm: Add clock toggle recovery
Hector Martin <[email protected]>
i2c: pasemi: Enable the unjam machine
Akhil R <[email protected]>
i2c: tegra: check msg length in SMBUS block read
Mike Tipton <[email protected]>
cpufreq: scmi: Skip SCMI devices that aren't used by the CPUs
Alan Maguire <[email protected]>
libbpf/btf: Fix string handling to support multi-split BTF
Petr Malat <[email protected]>
sctp: Do not wake readers in __sctp_write_space()
Aditya Kumar Singh <[email protected]>
wifi: mac80211: validate SCAN_FLAG_AP in scan request during MLO
Leon Yen <[email protected]>
wifi: mt76: mt7925: introduce thermal protection
Samuel Williams <[email protected]>
wifi: mt76: mt7921: add 160 MHz AP for mt7922 device
Henk Vergonet <[email protected]>
wifi: mt76: mt76x2: Add support for LiteOn WN4516R,WN4519R
sunliming <[email protected]>
wifi: mt76: mt7996: fix uninitialized symbol warning
Krzysztof Kozlowski <[email protected]>
Bluetooth: btmtksdio: Fix wakeup source leaks on device unbind
Krzysztof Kozlowski <[email protected]>
Bluetooth: btmrvl_sdio: Fix wakeup source leaks on device unbind
WangYuli <[email protected]>
Bluetooth: btusb: Add RTL8851BE device 0x0bda:0xb850
Jiande Lu <[email protected]>
Bluetooth: btusb: Add new VID/PID 13d3/3630 for MT7925
Alok Tiwari <[email protected]>
emulex/benet: correct command version selection in be_cmd_get_stats()
Benjamin Lin <[email protected]>
wifi: mt76: mt7996: drop fragments with multicast or broadcast RA
Tan En De <[email protected]>
i2c: designware: Invoke runtime suspend on quick slave re-registration
Liwei Sun <[email protected]>
Bluetooth: btusb: Add new VID/PID 13d3/3584 for MT7922
Hou Tao <[email protected]>
bpf: Check rcu_read_lock_trace_held() in bpf_map_lookup_percpu_elem()
Chao Yu <[email protected]>
f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx
Zilin Guan <[email protected]>
tipc: use kfree_sensitive() for aead cleanup
Rengarajan S <[email protected]>
net: lan743x: Modify the EEPROM and OTP size for PCI1xxxx devices
Sergio Perez Gonzalez <[email protected]>
net: macb: Check return value of dma_set_mask_and_coherent()
Antonin Godard <[email protected]>
drm/panel: simple: Add POWERTIP PH128800T004-ZZA01 panel entry
Nas Chung <[email protected]>
media: qcom: venus: Fix uninitialized variable warning
Lucas De Marchi <[email protected]>
drm/xe/uc: Remove static from loop variable
Victor Skvortsov <[email protected]>
drm/amdgpu: Add indirect L1_TLB_CNTL reg programming for VFs
Andy Yan <[email protected]>
drm/rockchip: vop2: Make overlay layer select register configuration take effect by vsync
Niklas Söderlund <[email protected]>
media: rcar-vin: Fix stride setting for RAW8 formats
Simon Schuster <[email protected]>
nios2: force update_mmu_cache on spurious tlb-permission--related pagefaults
Shravan Chippa <[email protected]>
media: i2c: imx334: update mode_3840x2160_regs array
Wentao Liang <[email protected]>
media: platform: exynos4-is: Add hardware sync wait to fimc_is_hw_change_mode()
Hans Verkuil <[email protected]>
media: tc358743: ignore video while HPD is low
Amber Lin <[email protected]>
drm/amdkfd: Set SDMA_RLCx_IB_CNTL/SWITCH_INSIDE_IB
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: don't select single flush for active CTL blocks
Laurent Pinchart <[email protected]>
media: renesas: vsp1: Fix media bus code setup on RWPF source pad
Mario Limonciello <[email protected]>
drm/amd/display: Restructure DMI quirks
TungYu Lu <[email protected]>
drm/amd/display: Correct prefetch calculation
Lijo Lazar <[email protected]>
drm/amd/pm: Reset SMU v13.0.x custom settings
Dylan Wolff <[email protected]>
jfs: Fix null-ptr-deref in jfs_ioc_trim
Dillon Varone <[email protected]>
drm/amd/display: Fix VUpdate offset calculations for dcn401
Alex Deucher <[email protected]>
drm/amdgpu/gfx9: fix CSIB handling
Samson Tam <[email protected]>
drm/amd/display: disable EASF narrow filter sharpening
Alex Deucher <[email protected]>
drm/amdgpu/gfx8: fix CSIB handling
Zhang Yi <[email protected]>
ext4: prevent stale extent cache entries caused by concurrent get es_cache
Long Li <[email protected]>
sunrpc: fix race in cache cleanup causing stale nextcheck time
Lijo Lazar <[email protected]>
drm/amdgpu: Disallow partition query during reset
Arvind Yadav <[email protected]>
drm/amdgpu: fix MES GFX mask
Nicolas Dufresne <[email protected]>
media: rkvdec: Initialize the m2m context before the controls
Hans Verkuil <[email protected]>
media: cec: extron-da-hd-4k-plus: Fix Wformat-truncation
Dillon Varone <[email protected]>
drm/amd/display: Fix Vertical Interrupt definitions for dcn32, dcn401
Kevin Gao <[email protected]>
drm/amd/display: Correct SSC enable detection for DCN351
Ovidiu Bunea <[email protected]>
drm/amd/display: Update IPS sequential_ono requirement checks
Daniele Ceraolo Spurio <[email protected]>
drm/xe/vf: Fix guc_info debugfs for VFs
Tomi Valkeinen <[email protected]>
media: ti: cal: Fix wrong goto on error path
Aditya Dutt <[email protected]>
jfs: fix array-index-out-of-bounds read in add_missing_indices
Zhang Yi <[email protected]>
ext4: ext4: unify EXT4_EX_NOCACHE|NOFAIL flags in ext4_ext_remove_space()
Harish Chegondi <[email protected]>
drm/xe: Use copy_from_user() instead of __copy_from_user()
Alex Deucher <[email protected]>
drm/amdgpu/gfx7: fix CSIB handling
Qasim Ijaz <[email protected]>
drm/ttm/tests: fix incorrect assert in ttm_bo_unreserve_bulk()
Charlene Liu <[email protected]>
drm/amd/display: fix zero value for APU watermark_c
Nas Chung <[email protected]>
media: uapi: v4l: Change V4L2_TYPE_IS_CAPTURE condition
Sakari Ailus <[email protected]>
media: ccs-pll: Better validate VT PLL branch
Vicki Pfau <[email protected]>
drm: panel-orientation-quirks: Add ZOTAC Gaming Zone
Alex Deucher <[email protected]>
drm/amdgpu/gfx10: fix CSIB handling
Tarang Raval <[email protected]>
media: i2c: imx334: Fix runtime PM handling in remove function
Fangzhi Zuo <[email protected]>
drm/amd/display: Do Not Consider DSC if Valid Config Not Found
Akhil P Oommen <[email protected]>
drm/msm/a6xx: Increase HFI response timeout
Alexander Aring <[email protected]>
dlm: use SHUT_RDWR for SCTP shutdown
Lijo Lazar <[email protected]>
drm/amdgpu: Add basic validation for RAS header
Paul Hsieh <[email protected]>
drm/amd/display: Skip to enable dsc if it has been off
Nicolas Dufresne <[email protected]>
media: verisilicon: Enable wide 4K in AV1 decoder
Srinivasan Shanmugam <[email protected]>
drm/amd/display: Add NULL pointer checks in dm_force_atomic_commit()
Nas Chung <[email protected]>
media: uapi: v4l: Fix V4L2_TYPE_IS_OUTPUT condition
Dmitry Baryshkov <[email protected]>
drm/msm/hdmi: add runtime PM calls to DDC transfer function
Ben Skeggs <[email protected]>
drm/nouveau/gsp: fix rm shutdown wait condition
Mario Limonciello <[email protected]>
drm/amd/display: Avoid divide by zero by initializing dummy pitch to 1
Tarang Raval <[email protected]>
media: i2c: imx334: Enable runtime PM before sub-device registration
Christoph Rudorff <[email protected]>
drm/nouveau: fix hibernate on disabled GPU
Michael Chang <[email protected]>
media: nuvoton: npcm-video: Fix stuck due to no video signal error
Alex Deucher <[email protected]>
drm/amdgpu/gfx11: fix CSIB handling
Apurv Mishra <[email protected]>
drm/amdkfd: Drop workaround for GC v9.4.3 revID 0
Yuezhang Mo <[email protected]>
exfat: do not clear volume dirty flag during sync
Ayushi Makhija <[email protected]>
drm/bridge: anx7625: change the gpiod_set_value API
Boris Brezillon <[email protected]>
drm/panthor: Don't update MMU_INT_MASK in panthor_mmu_irq_handler()
Ayushi Makhija <[email protected]>
drm/bridge: anx7625: enable HPD interrupts
Namjae Jeon <[email protected]>
exfat: fix double free in delayed_free
Anusha Srivatsa <[email protected]>
drm/panel/sharp-ls043t1le01: Use _multi variants
Jiayuan Chen <[email protected]>
workqueue: Fix race condition in wq->stats incrementation
Damon Ding <[email protected]>
drm/bridge: analogix_dp: Add irq flag IRQF_NO_AUTOEN instead of calling disable_irq()
Jeevaka Prabu Badrappan <[email protected]>
drm/xe: Fix CFI violation when accessing sysfs files
Yihan Zhu <[email protected]>
drm/amd/display: DCN32 null data check
Jesse.Zhang <[email protected]>
drm/amdgpu: Fix API status offset for MES queue reset
Long Li <[email protected]>
sunrpc: update nextcheck time when adding new cache entries
Dave Airlie <[email protected]>
drm/dp: add option to disable zero sized address only transactions.
Andy Yan <[email protected]>
drm/rockchip: inno-hdmi: Fix video timing HSYNC/VSYNC polarity setting for rk3036
Ming Qian <[email protected]>
media: imx-jpeg: Check decoding is ongoing for motion-jpeg
Alex Deucher <[email protected]>
drm/amdgpu/gfx6: fix CSIB handling
Dmitry Baryshkov <[email protected]>
drm/bridge: select DRM_KMS_HELPER for AUX_BRIDGE
Charlene Liu <[email protected]>
drm/amd/display: disable DPP RCG before DPP CLK enable
Peter Marheine <[email protected]>
ACPI: battery: negate current when discharging
Svyatoslav Ryhel <[email protected]>
power: supply: max17040: adjust thermal channel scaling
Charan Teja Kalla <[email protected]>
PM: runtime: fix denying of auto suspend in pm_suspend_timer_fn()
Peng Fan <[email protected]>
gpiolib: of: Add polarity quirk for s5m8767
Linus Torvalds <[email protected]>
Make 'cc-option' work correctly for the -Wno-xyzzy pattern
Yuanjun Gong <[email protected]>
ASoC: tegra210_ahub: Add check to of_device_get_match_data()
Frank Li <[email protected]>
platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all()
gldrk <[email protected]>
ACPICA: utilities: Fix overflow check in vsnprintf()
Ulf Hansson <[email protected]>
pmdomain: core: Reset genpd->states to avoid freeing invalid data
Kuninori Morimoto <[email protected]>
ASoC: simple-card-utils: fixup dlc->xxx handling for error case
Jerry Lv <[email protected]>
power: supply: bq27xxx: Retrieve again when busy
Stefan Binding <[email protected]>
ALSA: hda: cs35l41: Fix swapped l/r audio channels for Acer Helios laptops
Tamir Duberstein <[email protected]>
ACPICA: Apply pack(1) to union aml_resource
Seunghun Han <[email protected]>
ACPICA: fix acpi parse and parseext cache leaks
Mario Limonciello <[email protected]>
ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case
Stefan Binding <[email protected]>
ALSA: hda/realtek: Add support for Acer Helios Laptops using CS35L41 HDA
Armin Wolf <[email protected]>
ACPI: bus: Bail out if acpi_kobj registration fails
I Hsin Cheng <[email protected]>
ASoC: intel/sdw_utils: Assign initial value in asoc_sdw_rt_amp_spk_rtd_init()
Hector Martin <[email protected]>
ASoC: tas2770: Power cycle amp on ISENSE/VSENSE change
Qiuxu Zhuo <[email protected]>
EDAC/igen6: Skip absent memory controllers
Luke Wang <[email protected]>
mmc: sdhci-esdhc-imx: Save tuning value when card stays powered in suspend
Ahmed Salem <[email protected]>
ACPICA: Avoid sequence overread in call to strncmp()
Erick Shepherd <[email protected]>
mmc: Add quirk to disable DDR50 tuning
Krzysztof Kozlowski <[email protected]>
power: supply: collie: Fix wakeup source leaks on device unbind
Krzysztof Kozlowski <[email protected]>
power: supply: gpio-charger: Fix wakeup source leaks on device unbind
Guilherme G. Piccoli <[email protected]>
clocksource: Fix the CPUs' choice in the watchdog per CPU verification
Talhah Peerbhai <[email protected]>
ASoC: amd: yc: Add quirk for Lenovo Yoga Pro 7 14ASP9
Seunghun Han <[email protected]>
ACPICA: fix acpi operand cache leak in dswstate.c
David Lechner <[email protected]>
iio: adc: ad7606: fix raw read for 18-bit chips
David Lechner <[email protected]>
iio: adc: ad7173: fix compiling without gpiolib
David Lechner <[email protected]>
iio: adc: ad7606_spi: fix reg write value mask
Arthur-Prince <[email protected]>
iio: adc: ti-ads1298: Kconfig: add kfifo dependency to fix module build
David Lechner <[email protected]>
iio: adc: ad7944: mask high bits on direct read
Sean Nyekjaer <[email protected]>
iio: imu: inv_icm42600: Fix temperature calculation
Jann Horn <[email protected]>
mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race
Jann Horn <[email protected]>
mm/hugetlb: unshare page tables during VMA split, not before
Pu Lehui <[email protected]>
mm: fix uprobe pte be overwritten when expanding vma
Thomas Zimmermann <[email protected]>
dummycon: Trigger redraw when switching consoles with deferred takeover
Jens Axboe <[email protected]>
io_uring/net: only consider msg_inq if larger than 1
Jacek Lawrynowicz <[email protected]>
accel/ivpu: Fix warning in ivpu_gem_bo_free()
Jacek Lawrynowicz <[email protected]>
accel/ivpu: Use dma_resv_lock() instead of a custom mutex
Karol Wachowski <[email protected]>
accel/ivpu: Trigger device recovery on engine reset/resume failure
Jacek Lawrynowicz <[email protected]>
accel/ivpu: Use firmware names from upstream repo
Jacek Lawrynowicz <[email protected]>
accel/ivpu: Improve buffer object logging
Sean Nyekjaer <[email protected]>
iio: accel: fxls8962af: Fix temperature calculation
Sean Nyekjaer <[email protected]>
iio: accel: fxls8962af: Fix temperature scan element sign
Saurabh Sengar <[email protected]>
hv_netvsc: fix potential deadlock in netvsc_vf_setxdp()
Diederik de Haas <[email protected]>
PCI: dw-rockchip: Fix PHY function call sequence in rockchip_pcie_phy_deinit()
Janne Grunau <[email protected]>
PCI: apple: Set only available ports up
Shawn Lin <[email protected]>
PCI: dw-rockchip: Remove PCIE_L0S_ENTRY check from rockchip_pcie_link_up()
Ilpo Järvinen <[email protected]>
PCI: Fix lock symmetry in pci_slot_unlock()
Huacai Chen <[email protected]>
PCI: Add ACS quirk for Loongson PCIe
Niklas Cassel <[email protected]>
PCI: dwc: ep: Correct PBA offset in .set_msix() callback
Niklas Cassel <[email protected]>
PCI: cadence-ep: Correct PBA offset in .set_msix() callback
Long Li <[email protected]>
uio_hv_generic: Align ring size to system page
Long Li <[email protected]>
uio_hv_generic: Use correct size for interrupt and monitor pages
Long Li <[email protected]>
Drivers: hv: Allocate interrupt and monitor pages aligned to system page boundary
Ruben Devos <[email protected]>
smb: client: add NULL check in automount_fullpath
Shyam Prasad N <[email protected]>
cifs: dns resolution is needed only for primary channel
Shyam Prasad N <[email protected]>
cifs: update dstaddr whenever channel iface is updated
Shyam Prasad N <[email protected]>
cifs: reset connections for all channels when reconnect requested
Beleswar Padhi <[email protected]>
remoteproc: k3-m4: Don't assert reset in detach routine
Xiaolei Wang <[email protected]>
remoteproc: core: Release rproc->clean_table after rproc_attach() fails
Xiaolei Wang <[email protected]>
remoteproc: core: Cleanup acquired resources when rproc_handle_resources() fails in rproc_attach()
Wentao Liang <[email protected]>
regulator: max14577: Add error check for max14577_read_reg()
André Almeida <[email protected]>
ovl: Fix nested backing file paths
Khem Raj <[email protected]>
mips: Add -std= flag specified in KBUILD_CFLAGS to vdso CFLAGS
Gabriel Shahrouzi <[email protected]>
staging: iio: ad5933: Correct settling cycles encoding per datasheet
David Lechner <[email protected]>
pwm: axi-pwmgen: fix missing separate external clock
Shin'ichiro Kawasaki <[email protected]>
nvme-tcp: remove tag set when second admin queue config fails
Thomas Zimmermann <[email protected]>
video: screen_info: Relocate framebuffers behind PCI bridges
Thomas Zimmermann <[email protected]>
sysfb: Fix screen_info type check for VGA
Lorenzo Stoakes <[email protected]>
KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY
Qasim Ijaz <[email protected]>
net: ch9200: fix uninitialised access during mii_nway_restart
Xu Yang <[email protected]>
phy: fsl-imx8mq-usb: fix phy_tx_vboost_level_from_property()
John Garry <[email protected]>
dm-table: Set BLK_FEAT_ATOMIC_WRITES for target queue limits
Mikulas Patocka <[email protected]>
dm: lock limits when reading them
Ye Bin <[email protected]>
ftrace: Fix UAF when lookup kallsym after ftrace disabled
Md Sadre Alam <[email protected]>
mtd: rawnand: qcom: Fix read len for onfi param page
Md Sadre Alam <[email protected]>
mtd: rawnand: qcom: Fix last codeword read in qcom_param_page_type_exec()
Md Sadre Alam <[email protected]>
mtd: rawnand: qcom: Pass 18 bit offset from NANDc base to BAM base
Mikulas Patocka <[email protected]>
dm-verity: fix a memory leak if some arguments are specified multiple times
Mikulas Patocka <[email protected]>
dm-mirror: fix a tiny race condition
Chao Gao <[email protected]>
KVM: VMX: Flush shadow VMCS on emergency reboot
Yosry Ahmed <[email protected]>
KVM: SVM: Clear current_vmcb during vCPU free for all *possible* CPUs
Wentao Liang <[email protected]>
mtd: nand: sunxi: Add randomizer configuration before randomizer enable
Wentao Liang <[email protected]>
mtd: rawnand: sunxi: Add randomizer configuration in sunxi_nfc_hw_ecc_write_chunk
Lu Baolu <[email protected]>
iommu: Allow attaching static domains in iommu_attach_device_pasid()
Sibi Sankar <[email protected]>
firmware: arm_scmi: Ensure that the message-id supports fastchannel
Kendall Willis <[email protected]>
firmware: ti_sci: Convert CPU latency constraint from us to ms
Dan Williams <[email protected]>
configfs-tsm-report: Fix NULL dereference of tsm_ops
Johan Hovold <[email protected]>
soc: qcom: pmic_glink_altmode: fix spurious DP hotplug events
Jinliang Zheng <[email protected]>
mm: fix ratelimit_pages update error in dirty_ratio_handler()
Shin'ichiro Kawasaki <[email protected]>
RDMA/iwcm: Fix use-after-free of work objects after cm_id destruction
Luo Gengkun <[email protected]>
watchdog: fix watchdog may detect false positive of softlockup
Jeongjun Park <[email protected]>
ipc: fix to protect IPCS lookups using RCU
Da Xue <[email protected]>
clk: meson-g12a: add missing fclk_div2 to spicc
Arnd Bergmann <[email protected]>
parisc: fix building with gcc-15
GONG Ruiqi <[email protected]>
vgacon: Add check for vc_origin address range in vgacon_scroll()
Helge Deller <[email protected]>
parisc/unaligned: Fix hex output to show 8 hex chars
Murad Masimov <[email protected]>
fbdev: Fix fb_set_var to prevent null-ptr-deref in fb_videomode_to_var
Niravkumar L Rabara <[email protected]>
EDAC/altera: Use correct write width with the INTTEST register
Murad Masimov <[email protected]>
fbdev: Fix do_register_framebuffer to prevent null-ptr-deref in fb_videomode_to_var
Lu Baolu <[email protected]>
iommu/vt-d: Restore context entry setup order for aliased devices
Heiner Kallweit <[email protected]>
net: ftgmac100: select FIXED_PHY
Hyunwoo Kim <[email protected]>
net/sched: fix use-after-free in taprio_dev_notifier
Krzysztof Kozlowski <[email protected]>
NFC: nci: uart: Set tty->disc_data only in success path
Gui-Dong Han <[email protected]>
hwmon: (ftsteutates) Fix TOCTOU race in fts_read()
Chao Yu <[email protected]>
f2fs: fix to return correct error number in f2fs_sync_node_pages()
Chao Yu <[email protected]>
f2fs: fix to do sanity check on sit_bitmap_size
Jaegeuk Kim <[email protected]>
f2fs: prevent kernel warning due to negative i_nlink from corrupted image
Chao Yu <[email protected]>
f2fs: fix to do sanity check on ino and xnid
Gatien Chevallier <[email protected]>
Input: gpio-keys - fix possible concurrent access in gpio_keys_irq_timer()
Dan Carpenter <[email protected]>
Input: ims-pcu - check record size in ims_pcu_flash_firmware()
Fabrice Gasnier <[email protected]>
Input: gpio-keys - fix a sleep while atomic with PREEMPT_RT
Brian Foster <[email protected]>
ext4: only dirty folios when data journaling regular files
Zhang Yi <[email protected]>
ext4: ensure i_size is smaller than maxbytes
Zhang Yi <[email protected]>
ext4: factor out ext4_get_maxbytes()
Zhang Yi <[email protected]>
ext4: fix incorrect punch max_end
Zhang Yi <[email protected]>
ext4: fix out of bounds punch offset
Jan Kara <[email protected]>
ext4: fix calculation of credits for extent tree modification
Thadeu Lima de Souza Cascardo <[email protected]>
ext4: inline: fix len overflow in ext4_prepare_inline_data
Wan Junjie <[email protected]>
bus: fsl-mc: fix GET/SET_TAILDROP command ids
Ioana Ciornei <[email protected]>
bus: fsl-mc: do not add a device-link for the UAPI used DPMCP device
Mikko Korhonen <[email protected]>
ata: ahci: Disallow LPM for Asus B550-F motherboard
Niklas Cassel <[email protected]>
ata: ahci: Disallow LPM for ASUSPRO-D840SA motherboard
Tasos Sahanidis <[email protected]>
ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
Krzysztof Kozlowski <[email protected]>
bus: firewall: Fix missing static inline annotations for stubs
Chen Ridong <[email protected]>
cgroup,freezer: fix incomplete freezing when attaching tasks
Dennis Marttinen <[email protected]>
ceph: set superblock s_magic for IMA fsmagic matching
Viacheslav Dubeyko <[email protected]>
ceph: avoid kernel BUG for encrypted inode with unaligned file size
Brett Werling <[email protected]>
can: tcan4x5x: fix power regulator retrieval during probe
Fedor Pchelkin <[email protected]>
can: kvaser_pciefd: refine error prone echo_skb_max handling logic
Jeff Hugo <[email protected]>
bus: mhi: host: Fix conflict between power_up and SYSERR
Sumit Kumar <[email protected]>
bus: mhi: ep: Update read pointer only after buffer is written
Damien Le Moal <[email protected]>
block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion
Jens Axboe <[email protected]>
block: use plug request list tail for one-shot backmerge attempt
Krzysztof Kozlowski <[email protected]>
ASoC: codecs: wcd937x: Drop unused buck_supply
Krzysztof Kozlowski <[email protected]>
ASoC: codecs: wcd9375: Fix double free of regulator supplies
Andreas Kemnade <[email protected]>
ARM: omap: pmic-cpcap: do not mess around without CPCAP or OMAP4
Ross Stutterheim <[email protected]>
ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap()
Ryan Roberts <[email protected]>
arm64/mm: Close theoretical race where stale TLB entry remains valid
Ricardo Ribalda <[email protected]>
media: uvcvideo: Fix deferred probing error
Ricardo Ribalda <[email protected]>
media: uvcvideo: Send control events for partial succeeds
Ricardo Ribalda <[email protected]>
media: uvcvideo: Return the number of processed controls
Ming Qian <[email protected]>
media: imx-jpeg: Cleanup after an allocation error
Ming Qian <[email protected]>
media: imx-jpeg: Reset slot data pointers when freed
Ming Qian <[email protected]>
media: imx-jpeg: Move mxc_jpeg_free_slot_data() ahead
Ming Qian <[email protected]>
media: imx-jpeg: Drop the first error frames
Denis Arefev <[email protected]>
media: vivid: Change the siize of the composing
Edward Adam Davis <[email protected]>
media: vidtv: Terminating the subsequent process of initialization failure
Marek Szyprowski <[email protected]>
media: videobuf2: use sgtable-based scatterlist wrappers
Loic Poulain <[email protected]>
media: venus: Fix probe error handling
Ma Ke <[email protected]>
media: v4l2-dev: fix error handling in __video_register_device()
Tomi Valkeinen <[email protected]>
media: rcar-vin: Fix RAW10
Johan Hovold <[email protected]>
media: qcom: camss: vfe: suppress VFE version log spam
Johan Hovold <[email protected]>
media: qcom: camss: csid: suppress CSID log spam
Hans de Goede <[email protected]>
media: ov08x40: Extend sleep after reset to 5 ms
Marek Szyprowski <[email protected]>
media: omap3isp: use sgtable-based scatterlist wrappers
Fei Shao <[email protected]>
media: mediatek: vcodec: Correct vsi_core framebuffer size
Dan Carpenter <[email protected]>
media: iris: fix error code in iris_load_fw_to_memory()
Hao Yao <[email protected]>
media: ipu6: Remove workaround for Meteor Lake ES2
Stanislaw Gruszka <[email protected]>
media: intel/ipu6: Fix dma mask for non-secure mode
Haoxiang Li <[email protected]>
media: imagination: fix a potential memory leak in e5010_probe()
Kieran Bingham <[email protected]>
media: i2c: imx335: Fix frame size enumeration
Wentao Liang <[email protected]>
media: gspca: Add error handling for stv06xx_read_sensor()
Dmitry Nikiforov <[email protected]>
media: davinci: vpif: Fix memory leak in probe error path
Edward Adam Davis <[email protected]>
media: cxusb: no longer judge rbuf when the write fails
Sakari Ailus <[email protected]>
media: ccs-pll: Check for too high VT PLL multiplier in dual PLL case
Sakari Ailus <[email protected]>
media: ccs-pll: Correct the upper limit of maximum op_pre_pll_clk_div
Sakari Ailus <[email protected]>
media: ccs-pll: Start OP pre-PLL multiplier search from correct value
Hans de Goede <[email protected]>
media: ov2740: Move pm-runtime cleanup on probe-errors to proper place
Sakari Ailus <[email protected]>
media: ccs-pll: Start VT pre-PLL multiplier search from correct value
Tomi Valkeinen <[email protected]>
media: i2c: ds90ub913: Fix returned fmt from .set_fmt()
Laurentiu Palcu <[email protected]>
media: nxp: imx8-isi: better handle the m2m usage_count
Umang Jain <[email protected]>
media: imx335: Use correct register width for HNUM
Dongcheng Yan <[email protected]>
media: i2c: change lt6911uxe irq_gpio name to "hpd"
Johan Hovold <[email protected]>
media: ov5675: suppress probe deferral errors
Johan Hovold <[email protected]>
media: ov8856: suppress probe deferral errors
Vasiliy Kovalev <[email protected]>
jfs: validate AG parameters in dbMount() to prevent crashes
Mingcong Bai <[email protected]>
wifi: rtlwifi: disable ASPM for RTL8723BE with subsystem ID 11ad:1723
Bitterblue Smith <[email protected]>
wifi: rtw88: usb: Reduce control message timeout to 500 ms
Chuck Lever <[email protected]>
svcrdma: Unregister the device if svc_rdma_accept() fails
Jeongjun Park <[email protected]>
jbd2: fix data-race and null-ptr-deref in jbd2_journal_dirty_metadata()
Johan Hovold <[email protected]>
wifi: ath12k: fix ring-buffer corruption
Max Kellermann <[email protected]>
fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio()
Scott Mayhew <[email protected]>
NFSv4: Don't check for OPEN feature support in v4.1
Mike Snitzer <[email protected]>
NFS: always probe for LOCALIO support asynchronously
Chuck Lever <[email protected]>
SUNRPC: Prevent hang on NFS mount with xprtsec=[m]tls
Li Lingfeng <[email protected]>
nfsd: Initialize ssc before laundromat_work to prevent NULL dereference
NeilBrown <[email protected]>
nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request
Olga Kornievskaia <[email protected]>
nfsd: fix access checking for NLM under XPRTSEC policies
Chuck Lever <[email protected]>
NFSD: Implement FATTR4_CLONE_BLKSIZE attribute
Maninder Singh <[email protected]>
NFSD: fix race between nfsd registration and exports_proc
Maninder Singh <[email protected]>
NFSD: unregister filesystem in case genl_register_family() fails
Johan Hovold <[email protected]>
wifi: ath11k: fix ring-buffer corruption
Bitterblue Smith <[email protected]>
wifi: rtw88: usb: Upload the firmware in bigger chunks
Johan Hovold <[email protected]>
wifi: ath11k: fix rx completion meta data corruption
Christian Brauner <[email protected]>
anon_inode: raise SB_I_NODEV and SB_I_NOEXEC
Christian Brauner <[email protected]>
anon_inode: explicitly block ->setattr()
Christian Brauner <[email protected]>
anon_inode: use a proper mode internally
Michael Lo <[email protected]>
wifi: mt76: mt7925: fix host interrupt register initialization
Christian Lamparter <[email protected]>
wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback()
Wentao Liang <[email protected]>
net/mlx5: Add error handling in mlx5_query_nic_vport_node_guid()
Wentao Liang <[email protected]>
net/mlx5_core: Add error handling inmlx5_query_nic_vport_qkey_viol_cntr()
João Paulo Gonçalves <[email protected]>
regulator: max20086: Change enable gpio to optional
João Paulo Gonçalves <[email protected]>
regulator: max20086: Fix MAX200086 chip id
Niklas Schnelle <[email protected]>
s390/pci: Serialize device addition and removal
Niklas Schnelle <[email protected]>
s390/pci: Allow re-add of a reserved but not yet removed device
Niklas Schnelle <[email protected]>
s390/pci: Prevent self deletion in disable_slot()
Niklas Schnelle <[email protected]>
s390/pci: Remove redundant bus removal and disable from zpci_release_device()
Heiko Carstens <[email protected]>
s390/pci: Fix __pcilg_mio_inuser() inline assembly
Hari Bathini <[email protected]>
powerpc/bpf: fix JIT code size calculation of bpf trampoline
Hari Bathini <[email protected]>
powerpc64/ftrace: fix clobbered r15 during livepatching
Gautam Menghani <[email protected]>
powerpc/pseries/msi: Avoid reading PCI device registers in reduced power states
Pavel Begunkov <[email protected]>
io_uring/kbuf: account ring io_buffer_list memory
Pavel Begunkov <[email protected]>
io_uring: account drain memory to cgroup
Vijendar Mukunda <[email protected]>
ASoC: amd: sof_amd_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
Vijendar Mukunda <[email protected]>
ASoC: amd: amd_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
Martin Blumenstingl <[email protected]>
ASoC: meson: meson-card-utils: use of_property_present() for DT parsing
Jaroslav Kysela <[email protected]>
firmware: cs_dsp: Fix OOB memory read access in KUnit test
Wentao Liang <[email protected]>
ASoC: qcom: sdm845: Add error handling in sdm845_slim_snd_hw_params()
Giovanni Cabiddu <[email protected]>
crypto: qat - add shutdown handler to qat_dh895xcc
Giovanni Cabiddu <[email protected]>
crypto: qat - add shutdown handler to qat_c62x
Giovanni Cabiddu <[email protected]>
crypto: qat - add shutdown handler to qat_4xxx
Giovanni Cabiddu <[email protected]>
crypto: qat - add shutdown handler to qat_420xx
Giovanni Cabiddu <[email protected]>
crypto: qat - add shutdown handler to qat_c3xxx
Peter Zijlstra <[email protected]>
sched/fair: Adhere to place_entity() constraints
Harshit Agarwal <[email protected]>
sched/rt: Fix race in push_rt_task
Alexander Aring <[email protected]>
gfs2: move msleep to sleepable context
Herbert Xu <[email protected]>
crypto: marvell/cesa - Do not chain submitted requests
Zijun Hu <[email protected]>
configfs: Do not override creating attribute file failure in populate_attrs()
Suren Baghdasaryan <[email protected]>
alloc_tag: handle module codetag load errors as module load failures
-------------
Diffstat:
.../bindings/i2c/nvidia,tegra20-i2c.yaml | 24 +- Documentation/gpu/nouveau.rst | 5 +- Makefile | 4 +- arch/arm/mach-omap2/clockdomain.h | 1 + arch/arm/mach-omap2/clockdomains33xx_data.c | 2 +- arch/arm/mach-omap2/cm33xx.c | 14 +- arch/arm/mach-omap2/pmic-cpcap.c | 6 +- arch/arm/mm/ioremap.c | 4 +- arch/arm64/include/asm/tlbflush.h | 9 +- arch/arm64/kernel/ptrace.c | 2 +- arch/arm64/kvm/hyp/include/hyp/debug-sr.h | 3 + arch/arm64/mm/mmu.c | 3 +- arch/loongarch/include/asm/irqflags.h | 16 +- arch/loongarch/include/asm/vdso/getrandom.h | 2 +- arch/loongarch/include/asm/vdso/gettimeofday.h | 6 +- arch/loongarch/mm/hugetlbpage.c | 3 +- arch/mips/vdso/Makefile | 1 + arch/nios2/include/asm/pgtable.h | 16 + arch/parisc/boot/compressed/Makefile | 1 + arch/parisc/kernel/unaligned.c | 2 +- arch/powerpc/include/asm/ppc_asm.h | 2 +- arch/powerpc/kernel/eeh.c | 2 + arch/powerpc/kernel/trace/ftrace_entry.S | 2 +- arch/powerpc/kernel/vdso/Makefile | 2 +- arch/powerpc/net/bpf_jit.h | 20 +- arch/powerpc/net/bpf_jit_comp.c | 33 +- arch/powerpc/net/bpf_jit_comp32.c | 6 - arch/powerpc/net/bpf_jit_comp64.c | 15 +- arch/powerpc/platforms/pseries/msi.c | 7 +- arch/riscv/kvm/vcpu_sbi_replace.c | 8 +- arch/s390/kvm/gaccess.c | 8 +- arch/s390/pci/pci.c | 45 +- arch/s390/pci/pci_bus.h | 7 +- arch/s390/pci/pci_event.c | 22 +- arch/s390/pci/pci_mmio.c | 2 +- arch/x86/Kconfig | 2 +- arch/x86/events/intel/core.c | 2 +- arch/x86/include/asm/module.h | 8 + arch/x86/include/asm/tdx.h | 2 +- arch/x86/kernel/alternative.c | 79 ++- arch/x86/kernel/cpu/amd.c | 2 +- arch/x86/kernel/cpu/sgx/main.c | 2 + arch/x86/kvm/svm/svm.c | 2 +- arch/x86/kvm/vmx/vmx.c | 5 +- arch/x86/mm/init_32.c | 3 - arch/x86/mm/init_64.c | 3 - arch/x86/mm/pat/set_memory.c | 3 + arch/x86/mm/pti.c | 5 + arch/x86/virt/vmx/tdx/tdx.c | 5 +- block/blk-merge.c | 26 +- block/blk-zoned.c | 1 + drivers/accel/ivpu/ivpu_fw.c | 12 +- drivers/accel/ivpu/ivpu_gem.c | 91 +-- drivers/accel/ivpu/ivpu_gem.h | 2 +- drivers/accel/ivpu/ivpu_job.c | 6 +- drivers/accel/ivpu/ivpu_jsm_msg.c | 9 +- drivers/acpi/acpica/amlresrc.h | 8 +- drivers/acpi/acpica/dsutils.c | 9 +- drivers/acpi/acpica/psobject.c | 52 +- drivers/acpi/acpica/rsaddr.c | 13 +- drivers/acpi/acpica/rscalc.c | 22 +- drivers/acpi/acpica/rslist.c | 12 +- drivers/acpi/acpica/utprint.c | 7 +- drivers/acpi/acpica/utresrc.c | 14 +- drivers/acpi/battery.c | 19 +- drivers/acpi/bus.c | 6 +- drivers/ata/ahci.c | 35 +- drivers/ata/pata_via.c | 3 +- drivers/atm/atmtcp.c | 4 +- drivers/base/platform-msi.c | 1 + drivers/base/power/runtime.c | 2 +- drivers/base/swnode.c | 2 +- drivers/block/aoe/aoedev.c | 8 + drivers/block/ublk_drv.c | 3 + drivers/bluetooth/btmrvl_sdio.c | 4 +- drivers/bluetooth/btmtksdio.c | 2 +- drivers/bluetooth/btusb.c | 5 + drivers/bus/fsl-mc/fsl-mc-uapi.c | 4 +- drivers/bus/fsl-mc/mc-io.c | 19 +- drivers/bus/fsl-mc/mc-sys.c | 2 +- drivers/bus/mhi/ep/ring.c | 16 +- drivers/bus/mhi/host/pm.c | 18 +- drivers/bus/ti-sysc.c | 49 -- drivers/char/ipmi/ipmi_ssif.c | 6 +- drivers/clk/meson/g12a.c | 1 + drivers/clk/qcom/gcc-sm8650.c | 2 + drivers/clk/qcom/gcc-sm8750.c | 3 +- drivers/clk/qcom/gcc-x1e80100.c | 4 + drivers/clk/rockchip/clk-rk3036.c | 1 + drivers/cpufreq/scmi-cpufreq.c | 36 +- drivers/crypto/intel/qat/qat_420xx/adf_drv.c | 8 + drivers/crypto/intel/qat/qat_4xxx/adf_drv.c | 8 + drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c | 8 + drivers/crypto/intel/qat/qat_c62x/adf_drv.c | 8 + drivers/crypto/intel/qat/qat_dh895xcc/adf_drv.c | 8 + drivers/crypto/marvell/cesa/cesa.c | 2 +- drivers/crypto/marvell/cesa/cesa.h | 9 +- drivers/crypto/marvell/cesa/tdma.c | 53 +- drivers/dma-buf/udmabuf.c | 5 +- drivers/edac/altera_edac.c | 6 +- drivers/edac/amd64_edac.c | 1 + drivers/edac/igen6_edac.c | 100 ++- drivers/firmware/arm_scmi/driver.c | 76 ++- drivers/firmware/arm_scmi/protocols.h | 2 + drivers/firmware/cirrus/test/cs_dsp_mock_bin.c | 3 +- drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c | 3 +- .../cirrus/test/cs_dsp_test_control_cache.c | 1 - drivers/firmware/sysfb.c | 26 +- drivers/firmware/ti_sci.c | 14 +- drivers/gpio/gpio-loongson-64bit.c | 2 +- drivers/gpio/gpio-mlxbf3.c | 52 +- drivers/gpio/gpio-pca953x.c | 2 +- drivers/gpio/gpiolib-of.c | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 10 + drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 4 + drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 3 - drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 10 + drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 22 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 12 +- drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h | 9 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 - drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 - drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 - drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 - drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 - drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 - drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 +- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 17 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 17 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 63 +- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 20 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 - drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 4 + drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 3 +- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 6 +- drivers/gpu/drm/amd/display/amdgpu_dm/Makefile | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 170 +---- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 9 + .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 15 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_quirks.c | 178 ++++++ .../amd/display/dc/clk_mgr/dcn35/dcn351_clk_mgr.c | 1 + .../amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 8 +- .../gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c | 38 +- .../amd/display/dc/dml/dcn30/display_mode_vba_30.c | 1 + .../amd/display/dc/dml/dcn31/display_mode_vba_31.c | 1 + .../display/dc/dml/dcn314/display_mode_vba_314.c | 1 + .../amd/display/dc/dml2/dml2_translation_helper.c | 2 +- drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c | 5 +- .../gpu/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c | 2 +- .../drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 14 + .../drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 21 +- .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 44 ++ .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 1 + .../drm/amd/display/dc/hwss/dcn401/dcn401_init.c | 2 +- .../drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 3 +- .../amd/display/dc/irq/dcn32/irq_service_dcn32.c | 61 +- .../amd/display/dc/irq/dcn401/irq_service_dcn401.c | 60 +- drivers/gpu/drm/amd/display/dc/irq_types.h | 9 + .../gpu/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c | 418 ++++++------ .../amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +- .../amd/display/dc/resource/dcn36/dcn36_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c | 4 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 13 +- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 10 + .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 4 +- drivers/gpu/drm/bridge/Kconfig | 1 + drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 +- drivers/gpu/drm/bridge/analogix/anx7625.c | 26 +- drivers/gpu/drm/display/drm_dp_helper.c | 39 +- drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 + drivers/gpu/drm/i915/i915_pmu.c | 4 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 14 + drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 2 +- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 17 +- drivers/gpu/drm/msm/dp/dp_display.c | 7 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 7 + drivers/gpu/drm/msm/hdmi/hdmi_i2c.c | 14 +- .../gpu/drm/msm/registers/adreno/adreno_pm4.xml | 3 +- drivers/gpu/drm/nouveau/Kbuild | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 45 +- drivers/gpu/drm/nouveau/nouveau_backlight.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 8 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/r535.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 673 +------------------- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/Kbuild | 5 + .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/Kbuild | 6 + .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rm.c | 10 + .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c | 699 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h | 20 + drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rpc.h | 18 + drivers/gpu/drm/nouveau/nvkm/subdev/instmem/r535.c | 2 +- drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 41 +- drivers/gpu/drm/panel/panel-simple.c | 29 + drivers/gpu/drm/panthor/panthor_mmu.c | 1 - drivers/gpu/drm/rockchip/inno_hdmi.c | 36 +- drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 1 + drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 5 +- drivers/gpu/drm/solomon/ssd130x.c | 2 +- drivers/gpu/drm/tiny/Kconfig | 1 + drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 2 +- drivers/gpu/drm/v3d/v3d_sched.c | 8 +- drivers/gpu/drm/xe/xe_bo.c | 4 +- drivers/gpu/drm/xe/xe_eu_stall.c | 4 +- drivers/gpu/drm/xe/xe_exec.c | 4 +- drivers/gpu/drm/xe/xe_exec_queue.c | 9 +- drivers/gpu/drm/xe/xe_gt.c | 2 +- drivers/gpu/drm/xe/xe_gt_freq.c | 82 +-- drivers/gpu/drm/xe/xe_gt_idle.c | 28 +- drivers/gpu/drm/xe/xe_gt_throttle.c | 90 +-- drivers/gpu/drm/xe/xe_guc.c | 40 +- drivers/gpu/drm/xe/xe_oa.c | 6 +- drivers/gpu/drm/xe/xe_svm.c | 2 +- drivers/gpu/drm/xe/xe_uc_fw.c | 2 +- drivers/gpu/drm/xe/xe_vm.c | 6 +- drivers/hid/hid-asus.c | 107 +++- drivers/hv/connection.c | 23 +- drivers/hwmon/ftsteutates.c | 9 +- drivers/hwmon/ltc4282.c | 7 - drivers/hwmon/occ/common.c | 238 +++---- drivers/i2c/busses/i2c-designware-slave.c | 2 +- drivers/i2c/busses/i2c-k1.c | 2 +- drivers/i2c/busses/i2c-npcm7xx.c | 12 +- drivers/i2c/busses/i2c-pasemi-core.c | 2 +- drivers/i2c/busses/i2c-tegra.c | 5 + drivers/i3c/master/mipi-i3c-hci/core.c | 6 +- drivers/iio/accel/fxls8962af-core.c | 15 +- drivers/iio/adc/Kconfig | 6 +- drivers/iio/adc/ad7173.c | 15 +- drivers/iio/adc/ad7606.c | 21 +- drivers/iio/adc/ad7606_spi.c | 2 +- drivers/iio/adc/ad7944.c | 2 + drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c | 8 +- drivers/infiniband/core/iwcm.c | 29 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- drivers/input/keyboard/gpio_keys.c | 6 +- drivers/input/misc/ims-pcu.c | 6 + drivers/iommu/amd/iommu.c | 41 +- drivers/iommu/intel/iommu.c | 11 + drivers/iommu/intel/iommu.h | 1 + drivers/iommu/intel/nested.c | 4 +- drivers/iommu/iommu.c | 21 +- drivers/md/dm-raid1.c | 5 +- drivers/md/dm-table.c | 14 +- drivers/md/dm-verity-fec.c | 4 + drivers/md/dm-verity-target.c | 8 +- drivers/md/dm-verity-verify-sig.c | 17 +- .../extron-da-hd-4k-plus/extron-da-hd-4k-plus.c | 4 +- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 4 +- drivers/media/i2c/ccs-pll.c | 23 +- drivers/media/i2c/ds90ub913.c | 4 +- drivers/media/i2c/imx334.c | 18 +- drivers/media/i2c/imx335.c | 5 +- drivers/media/i2c/lt6911uxe.c | 4 +- drivers/media/i2c/ov08x40.c | 2 +- drivers/media/i2c/ov2740.c | 4 +- drivers/media/i2c/ov5675.c | 5 +- drivers/media/i2c/ov8856.c | 9 +- drivers/media/i2c/tc358743.c | 4 + drivers/media/pci/intel/ipu6/ipu6-dma.c | 4 +- drivers/media/pci/intel/ipu6/ipu6.c | 5 - .../media/platform/imagination/e5010-jpeg-enc.c | 9 +- .../vcodec/decoder/vdec/vdec_hevc_req_multi_if.c | 2 +- drivers/media/platform/nuvoton/npcm-video.c | 15 +- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h | 1 + drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 90 ++- drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c | 14 +- drivers/media/platform/qcom/camss/camss-csid.c | 4 +- drivers/media/platform/qcom/camss/camss-vfe.c | 4 +- drivers/media/platform/qcom/iris/iris_firmware.c | 4 +- drivers/media/platform/qcom/venus/core.c | 16 +- drivers/media/platform/qcom/venus/vdec.c | 4 +- drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 18 +- .../media/platform/renesas/rcar-vin/rcar-v4l2.c | 8 +- drivers/media/platform/renesas/vsp1/vsp1_rwpf.c | 13 +- .../platform/samsung/exynos4-is/fimc-is-regs.c | 1 + drivers/media/platform/ti/cal/cal-video.c | 4 +- drivers/media/platform/ti/davinci/vpif.c | 4 +- drivers/media/platform/ti/omap3isp/ispccdc.c | 8 +- drivers/media/platform/ti/omap3isp/ispstat.c | 6 +- .../media/platform/verisilicon/rockchip_vpu_hw.c | 20 +- drivers/media/test-drivers/vidtv/vidtv_channel.c | 2 +- drivers/media/test-drivers/vivid/vivid-vid-cap.c | 2 +- drivers/media/usb/dvb-usb/cxusb.c | 3 +- drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c | 7 +- drivers/media/usb/uvc/uvc_ctrl.c | 23 +- drivers/media/usb/uvc/uvc_driver.c | 27 +- drivers/media/v4l2-core/v4l2-dev.c | 14 +- drivers/mmc/core/card.h | 6 + drivers/mmc/core/quirks.h | 10 + drivers/mmc/core/sd.c | 32 +- drivers/mmc/host/sdhci-esdhc-imx.c | 88 ++- drivers/mtd/nand/qpic_common.c | 8 +- drivers/mtd/nand/raw/qcom_nandc.c | 18 +- drivers/mtd/nand/raw/sunxi_nand.c | 2 + drivers/mtd/nand/spi/alliancememory.c | 12 +- drivers/mtd/nand/spi/ato.c | 6 +- drivers/mtd/nand/spi/esmt.c | 8 +- drivers/mtd/nand/spi/foresee.c | 8 +- drivers/mtd/nand/spi/gigadevice.c | 48 +- drivers/mtd/nand/spi/macronix.c | 8 +- drivers/mtd/nand/spi/micron.c | 20 +- drivers/mtd/nand/spi/paragon.c | 12 +- drivers/mtd/nand/spi/skyhigh.c | 12 +- drivers/mtd/nand/spi/toshiba.c | 8 +- drivers/mtd/nand/spi/winbond.c | 34 +- drivers/mtd/nand/spi/xtx.c | 12 +- drivers/net/can/kvaser_pciefd.c | 3 +- drivers/net/can/m_can/tcan4x5x-core.c | 9 +- drivers/net/ethernet/aquantia/atlantic/aq_main.c | 1 - drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 87 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 29 +- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 1 - drivers/net/ethernet/cadence/macb_main.c | 6 +- drivers/net/ethernet/cortina/gemini.c | 37 +- drivers/net/ethernet/dlink/dl2k.c | 14 +- drivers/net/ethernet/dlink/dl2k.h | 2 + drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +- drivers/net/ethernet/faraday/Kconfig | 1 + drivers/net/ethernet/intel/e1000e/netdev.c | 14 +- drivers/net/ethernet/intel/e1000e/ptp.c | 8 +- drivers/net/ethernet/intel/i40e/i40e_common.c | 7 +- drivers/net/ethernet/intel/ice/ice_arfs.c | 48 ++ drivers/net/ethernet/intel/ice/ice_eswitch.c | 6 +- drivers/net/ethernet/intel/ice/ice_switch.c | 4 +- drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 +- drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c | 9 +- .../ethernet/marvell/octeontx2/nic/otx2_common.c | 4 +- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 1 + .../ethernet/mellanox/mlx5/core/steering/hws/bwc.c | 10 +- .../mellanox/mlx5/core/steering/hws/definer.c | 78 ++- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 18 +- .../ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 6 +- drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 5 +- drivers/net/ethernet/microchip/lan743x_ethtool.c | 18 +- drivers/net/ethernet/microchip/lan743x_ptp.h | 4 +- drivers/net/ethernet/pensando/ionic/ionic_main.c | 3 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 +- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 24 +- drivers/net/ethernet/ti/icssg/icssg_common.c | 19 +- drivers/net/ethernet/vertexcom/mse102x.c | 15 +- drivers/net/hyperv/netvsc_bpf.c | 2 +- drivers/net/hyperv/netvsc_drv.c | 4 +- drivers/net/netdevsim/netdev.c | 2 + drivers/net/phy/marvell-88q2xxx.c | 103 +-- drivers/net/phy/mediatek/mtk-ge-soc.c | 10 +- drivers/net/usb/asix.h | 1 - drivers/net/usb/asix_common.c | 22 - drivers/net/usb/asix_devices.c | 17 +- drivers/net/usb/ch9200.c | 7 +- drivers/net/vxlan/vxlan_core.c | 22 +- drivers/net/wireless/ath/ath11k/ce.c | 11 +- drivers/net/wireless/ath/ath11k/core.c | 55 ++ drivers/net/wireless/ath/ath11k/core.h | 7 + drivers/net/wireless/ath/ath11k/dp_rx.c | 25 +- drivers/net/wireless/ath/ath11k/hal.c | 4 +- drivers/net/wireless/ath/ath11k/qmi.c | 9 + drivers/net/wireless/ath/ath12k/ce.c | 11 +- drivers/net/wireless/ath/ath12k/ce.h | 6 +- drivers/net/wireless/ath/ath12k/dp.c | 77 ++- drivers/net/wireless/ath/ath12k/dp.h | 5 +- drivers/net/wireless/ath/ath12k/dp_mon.c | 2 + drivers/net/wireless/ath/ath12k/dp_rx.c | 15 +- drivers/net/wireless/ath/ath12k/hal.c | 12 +- drivers/net/wireless/ath/ath12k/hal.h | 6 + drivers/net/wireless/ath/ath12k/hal_desc.h | 2 +- drivers/net/wireless/ath/ath12k/hw.c | 2 + drivers/net/wireless/ath/ath12k/hw.h | 3 + drivers/net/wireless/ath/ath12k/mac.c | 55 +- drivers/net/wireless/ath/ath12k/pci.c | 3 + drivers/net/wireless/ath/ath12k/peer.c | 5 +- drivers/net/wireless/ath/ath12k/peer.h | 3 +- drivers/net/wireless/ath/ath12k/wmi.c | 28 +- drivers/net/wireless/ath/ath12k/wmi.h | 1 + drivers/net/wireless/ath/carl9170/usb.c | 19 +- drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 3 + drivers/net/wireless/intel/iwlwifi/dvm/main.c | 6 +- drivers/net/wireless/intel/iwlwifi/mld/d3.c | 2 +- drivers/net/wireless/intel/iwlwifi/mld/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mld/mld.c | 3 +- drivers/net/wireless/intel/iwlwifi/mld/thermal.c | 4 + drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 + drivers/net/wireless/intersil/p54/fwio.c | 2 + drivers/net/wireless/intersil/p54/p54.h | 1 + drivers/net/wireless/intersil/p54/txrx.c | 13 +- drivers/net/wireless/mediatek/mt76/mt76x2/usb.c | 2 + .../net/wireless/mediatek/mt76/mt76x2/usb_init.c | 13 +- drivers/net/wireless/mediatek/mt76/mt7921/main.c | 5 + drivers/net/wireless/mediatek/mt76/mt7925/init.c | 6 + drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 20 +- drivers/net/wireless/mediatek/mt76/mt7925/mcu.h | 1 + drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 3 - drivers/net/wireless/mediatek/mt76/mt7925/regs.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 8 + drivers/net/wireless/mediatek/mt76/mt7996/main.c | 4 +- drivers/net/wireless/purelifi/plfxlc/usb.c | 4 +- drivers/net/wireless/realtek/rtlwifi/pci.c | 10 + drivers/net/wireless/realtek/rtw88/hci.h | 8 + drivers/net/wireless/realtek/rtw88/mac.c | 11 +- drivers/net/wireless/realtek/rtw88/mac.h | 2 + drivers/net/wireless/realtek/rtw88/mac80211.c | 2 + drivers/net/wireless/realtek/rtw88/main.c | 32 + drivers/net/wireless/realtek/rtw88/main.h | 3 + drivers/net/wireless/realtek/rtw88/pci.c | 2 + drivers/net/wireless/realtek/rtw88/rtw8703b.c | 1 + drivers/net/wireless/realtek/rtw88/rtw8723d.c | 1 + drivers/net/wireless/realtek/rtw88/rtw8812a.c | 1 + drivers/net/wireless/realtek/rtw88/rtw8814a.c | 11 + drivers/net/wireless/realtek/rtw88/rtw8821a.c | 1 + drivers/net/wireless/realtek/rtw88/rtw8821c.c | 1 + drivers/net/wireless/realtek/rtw88/rtw8822b.c | 1 + drivers/net/wireless/realtek/rtw88/rtw8822bu.c | 2 + drivers/net/wireless/realtek/rtw88/rtw8822c.c | 1 + drivers/net/wireless/realtek/rtw88/sdio.c | 2 + drivers/net/wireless/realtek/rtw88/usb.c | 57 +- drivers/net/wireless/realtek/rtw89/cam.c | 3 + drivers/net/wireless/realtek/rtw89/rtw8922a_rfk.c | 5 - drivers/net/wireless/virtual/mac80211_hwsim.c | 5 + drivers/nvme/host/ioctl.c | 21 +- drivers/nvme/host/tcp.c | 2 +- drivers/pci/controller/cadence/pcie-cadence-ep.c | 5 +- drivers/pci/controller/dwc/pcie-designware-ep.c | 5 +- drivers/pci/controller/dwc/pcie-dw-rockchip.c | 6 +- drivers/pci/controller/pcie-apple.c | 2 +- drivers/pci/hotplug/pciehp_hpc.c | 2 +- drivers/pci/hotplug/s390_pci_hpc.c | 2 +- drivers/pci/pci.c | 3 +- drivers/pci/quirks.c | 23 + drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 10 +- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 21 +- drivers/pinctrl/pinctrl-mcp23s08.c | 8 + drivers/platform/loongarch/loongson-laptop.c | 87 +-- drivers/platform/x86/amd/pmc/pmc.c | 2 + drivers/platform/x86/amd/pmf/core.c | 3 +- drivers/platform/x86/amd/pmf/tee-if.c | 67 +- drivers/platform/x86/dell/alienware-wmi-wmax.c | 2 +- drivers/platform/x86/dell/dell_rbu.c | 6 +- drivers/platform/x86/ideapad-laptop.c | 19 +- .../intel/uncore-frequency/uncore-frequency-tpmi.c | 9 +- drivers/pmdomain/core.c | 4 +- drivers/power/supply/bq27xxx_battery.c | 2 +- drivers/power/supply/bq27xxx_battery_i2c.c | 13 +- drivers/power/supply/collie_battery.c | 1 + drivers/power/supply/gpio-charger.c | 4 +- drivers/power/supply/max17040_battery.c | 5 +- drivers/ptp/ptp_clock.c | 3 +- drivers/ptp/ptp_private.h | 22 +- drivers/pwm/pwm-axi-pwmgen.c | 23 +- drivers/rapidio/rio_cm.c | 3 + drivers/regulator/max14577-regulator.c | 5 +- drivers/regulator/max20086-regulator.c | 4 +- drivers/remoteproc/remoteproc_core.c | 6 +- drivers/remoteproc/ti_k3_m4_remoteproc.c | 2 +- drivers/s390/scsi/zfcp_sysfs.c | 2 + drivers/scsi/elx/efct/efct_hw.c | 5 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 2 +- drivers/scsi/lpfc/lpfc_sli.c | 4 +- drivers/scsi/smartpqi/smartpqi_init.c | 84 +++ drivers/scsi/storvsc_drv.c | 10 +- drivers/soc/qcom/pmic_glink_altmode.c | 30 +- drivers/spi/spi-qpic-snand.c | 1 + drivers/staging/iio/impedance-analyzer/ad5933.c | 2 +- drivers/staging/media/rkvdec/rkvdec.c | 14 +- drivers/tee/tee_core.c | 11 +- drivers/uio/uio_hv_generic.c | 7 +- drivers/video/console/dummycon.c | 18 +- drivers/video/console/vgacon.c | 2 +- drivers/video/fbdev/core/fbcon.c | 7 +- drivers/video/fbdev/core/fbmem.c | 22 +- drivers/video/screen_info_pci.c | 75 ++- drivers/virt/coco/tsm.c | 31 +- drivers/watchdog/da9052_wdt.c | 1 + drivers/watchdog/stm32_iwdg.c | 2 +- fs/anon_inodes.c | 45 ++ fs/ceph/addr.c | 9 + fs/ceph/super.c | 1 + fs/configfs/dir.c | 2 +- fs/dlm/lowcomms.c | 5 +- fs/erofs/zmap.c | 10 +- fs/exfat/nls.c | 1 + fs/exfat/super.c | 30 +- fs/ext4/ext4.h | 7 + fs/ext4/extents.c | 39 +- fs/ext4/file.c | 7 +- fs/ext4/inline.c | 2 +- fs/ext4/inode.c | 24 +- fs/ext4/ioctl.c | 8 +- fs/f2fs/compress.c | 23 +- fs/f2fs/f2fs.h | 5 + fs/f2fs/inode.c | 10 +- fs/f2fs/namei.c | 9 + fs/f2fs/node.c | 8 +- fs/f2fs/segment.c | 12 +- fs/f2fs/super.c | 12 +- fs/file.c | 8 +- fs/gfs2/lock_dlm.c | 3 +- fs/internal.h | 5 + fs/isofs/inode.c | 7 +- fs/isofs/isofs.h | 4 +- fs/isofs/rock.c | 40 +- fs/isofs/rock.h | 6 +- fs/isofs/util.c | 51 +- fs/jbd2/transaction.c | 5 +- fs/jffs2/erase.c | 4 +- fs/jffs2/scan.c | 4 +- fs/jffs2/summary.c | 7 +- fs/jfs/jfs_discard.c | 3 +- fs/jfs/jfs_dmap.c | 6 +- fs/jfs/jfs_dtree.c | 18 +- fs/libfs.c | 8 +- fs/nfs/client.c | 2 +- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +- fs/nfs/internal.h | 1 - fs/nfs/localio.c | 6 +- fs/nfs/nfs4proc.c | 5 +- fs/nfs/read.c | 3 +- fs/nfsd/export.c | 3 +- fs/nfsd/nfs4proc.c | 3 +- fs/nfsd/nfs4xdr.c | 19 +- fs/nfsd/nfsctl.c | 26 +- fs/nfsd/nfssvc.c | 6 +- fs/overlayfs/file.c | 4 +- fs/overlayfs/overlayfs.h | 8 +- fs/smb/client/cached_dir.c | 14 +- fs/smb/client/cached_dir.h | 8 +- fs/smb/client/cifsglob.h | 1 + fs/smb/client/connect.c | 17 +- fs/smb/client/namespace.c | 3 + fs/smb/client/readdir.c | 28 +- fs/smb/client/reparse.c | 1 - fs/smb/client/sess.c | 7 +- fs/smb/client/smb2pdu.c | 33 +- fs/smb/client/smbdirect.c | 5 +- fs/smb/client/transport.c | 14 +- fs/smb/server/connection.c | 2 +- fs/smb/server/connection.h | 1 + fs/smb/server/smb2pdu.c | 11 +- fs/smb/server/transport_rdma.c | 10 +- fs/smb/server/transport_tcp.c | 3 +- fs/xattr.c | 1 + include/acpi/actypes.h | 2 +- include/drm/display/drm_dp_helper.h | 5 + include/linux/acpi.h | 9 +- include/linux/atmdev.h | 6 + include/linux/bus/stm32_firewall_device.h | 15 +- include/linux/codetag.h | 8 +- include/linux/execmem.h | 8 +- include/linux/f2fs_fs.h | 1 + include/linux/hugetlb.h | 3 + include/linux/mmc/card.h | 1 + include/linux/module.h | 5 - include/linux/mtd/nand-qpic-common.h | 4 +- include/linux/mtd/spinand.h | 74 +-- include/linux/tcp.h | 2 +- include/net/mac80211.h | 16 - include/trace/events/erofs.h | 18 - include/uapi/linux/videodev2.h | 12 +- io_uring/io-wq.c | 4 +- io_uring/io_uring.c | 2 +- io_uring/kbuf.c | 7 +- io_uring/net.c | 6 +- io_uring/rsrc.c | 8 +- io_uring/sqpoll.c | 5 +- ipc/shm.c | 5 +- kernel/bpf/bpf_struct_ops.c | 2 +- kernel/bpf/btf.c | 4 +- kernel/bpf/helpers.c | 3 +- kernel/cgroup/legacy_freezer.c | 3 +- kernel/events/core.c | 80 ++- kernel/exit.c | 17 +- kernel/module/main.c | 5 +- kernel/sched/core.c | 4 +- kernel/sched/ext.c | 5 + kernel/sched/ext.h | 2 + kernel/sched/fair.c | 4 +- kernel/sched/rt.c | 54 +- kernel/time/clocksource.c | 2 +- kernel/trace/ftrace.c | 10 +- kernel/trace/trace.c | 5 +- kernel/trace/trace_events_filter.c | 184 ++++-- kernel/trace/trace_functions_graph.c | 6 + kernel/watchdog.c | 41 +- kernel/workqueue.c | 7 +- lib/Kconfig | 1 + lib/alloc_tag.c | 12 +- lib/codetag.c | 34 +- mm/execmem.c | 40 +- mm/hugetlb.c | 67 +- mm/madvise.c | 7 +- mm/page-writeback.c | 2 +- mm/vma.c | 49 +- mm/vma.h | 7 + net/atm/common.c | 1 + net/atm/lec.c | 12 +- net/atm/raw.c | 2 +- net/bridge/br_mst.c | 4 +- net/bridge/br_multicast.c | 103 ++- net/bridge/br_private.h | 11 +- net/core/dev.c | 1 + net/core/filter.c | 19 +- net/core/page_pool.c | 4 + net/core/skbuff.c | 3 - net/core/skmsg.c | 3 +- net/core/sock.c | 4 +- net/ipv4/route.c | 4 + net/ipv4/tcp_fastopen.c | 3 + net/ipv4/tcp_input.c | 79 +-- net/ipv6/calipso.c | 8 + net/mac80211/cfg.c | 2 +- net/mac80211/debugfs_sta.c | 6 - net/mac80211/mesh_hwmp.c | 6 +- net/mac80211/rate.c | 2 - net/mac80211/sta_info.c | 28 - net/mac80211/sta_info.h | 11 - net/mac80211/tx.c | 15 +- net/mpls/af_mpls.c | 4 +- net/netfilter/nft_set_pipapo.c | 6 + net/nfc/nci/uart.c | 8 +- net/sched/sch_sfq.c | 10 +- net/sched/sch_taprio.c | 6 +- net/sctp/socket.c | 3 +- net/sunrpc/cache.c | 17 +- net/sunrpc/svc.c | 11 +- net/sunrpc/xprtrdma/svc_rdma_transport.c | 1 + net/sunrpc/xprtsock.c | 5 + net/tipc/crypto.c | 2 +- net/tipc/udp_media.c | 4 +- net/xfrm/xfrm_user.c | 52 +- rust/kernel/devres.rs | 97 ++- scripts/Makefile.compiler | 4 +- security/selinux/xfrm.c | 2 +- sound/pci/hda/cs35l41_hda_property.c | 6 + sound/pci/hda/hda_intel.c | 2 + sound/pci/hda/patch_realtek.c | 15 + sound/soc/amd/acp/acp-sdw-legacy-mach.c | 2 +- sound/soc/amd/acp/acp-sdw-sof-mach.c | 2 +- sound/soc/amd/yc/acp6x-mach.c | 9 +- sound/soc/codecs/tas2770.c | 30 +- sound/soc/codecs/wcd937x.c | 7 +- sound/soc/generic/simple-card-utils.c | 23 +- sound/soc/meson/meson-card-utils.c | 2 +- sound/soc/qcom/sdm845.c | 4 + sound/soc/sdw_utils/soc_sdw_rt_amp.c | 2 +- sound/soc/tegra/tegra210_ahub.c | 2 + sound/usb/mixer_maps.c | 12 + tools/bpf/bpftool/cgroup.c | 12 +- tools/lib/bpf/btf.c | 18 +- tools/lib/bpf/libbpf.c | 6 + tools/net/ynl/pyynl/lib/ynl.py | 67 +- tools/perf/tests/tests-scripts.c | 1 + tools/perf/util/print-events.c | 1 + tools/testing/selftests/x86/Makefile | 2 +- tools/testing/selftests/x86/sigtrap_loop.c | 101 +++ tools/testing/vma/vma_internal.h | 2 + tools/tracing/rtla/src/utils.c | 2 + 661 files changed, 6942 insertions(+), 3782 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/592 alloc_tag: handle module codetag load errors as module load failures
6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Suren Baghdasaryan <[email protected]>
commit 044d2aee6c575231ed4a24fb3d119bad0937488b upstream.
Failures inside codetag_load_module() are currently ignored. As a result an error there would not cause a module load failure and freeing of the associated resources. Correct this behavior by propagating the error code to the caller and handling possible errors. With this change, error to allocate percpu counters, which happens at this stage, will not be ignored and will cause a module load failure and freeing of resources. With this change we also do not need to disable memory allocation profiling when this error happens, instead we fail to load the module.
--- include/linux/codetag.h | 8 ++++---- kernel/module/main.c | 5 +++-- lib/alloc_tag.c | 12 +++++++----- lib/codetag.c | 34 +++++++++++++++++++++++++--------- 4 files changed, 39 insertions(+), 20 deletions(-)
include/linux/codetag.h +4 -4
@@ -36,8 +36,8 @@ union codetag_ref {struct codetag_type_desc {const char *section;size_t tag_size; -void (*module_load)(struct module *mod, -struct codetag *start,struct codetag *end); +int (*module_load)(struct module *mod, +struct codetag *start,struct codetag *end);void (*module_unload)(struct module *mod,struct codetag *start,struct codetag *end);#ifdef CONFIG_MODULES
@@ -89,7 +89,7 @@ void *codetag_alloc_module_section(struc unsigned long align);void codetag_free_module_sections (struct module *mod);void codetag_module_replaced (struct module *mod,struct module *new_mod); -void codetag_load_module (struct module *mod); +int codetag_load_module (struct module *mod);void codetag_unload_module (struct module *mod);#else /* defined(CONFIG_CODE_TAGGING) && defined(CONFIG_MODULES) */
@@ -103,7 +103,7 @@ codetag_alloc_module_section(struct modu unsigned long align) { return NULL; }static inline void codetag_free_module_sections (struct module *mod) {}static inline void codetag_module_replaced (struct module *mod,struct module *new_mod) {} -static inline void codetag_load_module (struct module *mod) {} +static inline int codetag_load_module (struct module *mod) {return 0 ; }static inline void codetag_unload_module (struct module *mod) {}#endif /* defined(CONFIG_CODE_TAGGING) && defined(CONFIG_MODULES) */
kernel/module/main.c +3 -2
@@ -3399,11 +3399,12 @@ static int load_module(struct load_info goto sysfs_cleanup; } +if (codetag_load_module (mod)) + goto sysfs_cleanup; +/* Get rid of temporary copy. */ free_copy (info, flags); -codetag_load_module (mod); -/* Done! */ trace_module_load (mod);
lib/alloc_tag.c +7 -5
@@ -618,15 +618,16 @@ out:mas_unlock (&mas); } -static void load_module (struct module *mod,struct codetag *start,struct codetag *stop) +static int load_module (struct module *mod,struct codetag *start,struct codetag *stop) {/* Allocate module alloc_tag percpu counters */ struct alloc_tag *start_tag;struct alloc_tag *stop_tag;struct alloc_tag *tag; +/* percpu counters for core allocations are already statically allocated */ if (!mod) -return ; +return 0 ; start_tag =ct_to_alloc_tag (start); stop_tag =ct_to_alloc_tag (stop);
@@ -638,12 +639,13 @@ static void load_module(struct module *mfree_percpu (tag->counters); tag->counters =NULL ; } -shutdown_mem_profiling (true); -pr_err ("Failed to allocate memory for allocation tag percpu counters in the module %s. Memory allocation profiling is disabled!\n" , +pr_err ("Failed to allocate memory for allocation tag percpu counters in the module %s\n" , mod->name); -break ; +return -ENOMEM ; } } + +return 0 ; }static void replace_module (struct module *mod,struct module *new_mod)
lib/codetag.c +25 -9
@@ -167,6 +167,7 @@ static int codetag_module_init(struct co {struct codetag_range range;struct codetag_module *cmod; +int mod_id;int err; range =get_section_range (mod, cttype->desc.section);
@@ -190,11 +191,20 @@ static int codetag_module_init(struct co cmod->range = range;down_write (&cttype->mod_lock); - err =idr_alloc (&cttype->mod_idr, cmod,0 ,0 ,GFP_KERNEL ); -if (err >=0 ) { - cttype->count +=range_size (cttype, &range); -if (cttype->desc.module_load) - cttype->desc.module_load (mod, range.start, range.stop); + mod_id =idr_alloc (&cttype->mod_idr, cmod,0 ,0 ,GFP_KERNEL ); +if (mod_id >=0 ) { +if (cttype->desc.module_load) { + err = cttype->desc.module_load (mod, range.start, range.stop); +if (!err) + cttype->count +=range_size (cttype, &range); +else +idr_remove (&cttype->mod_idr, mod_id); + }else { + cttype->count +=range_size (cttype, &range); + err =0 ; + } + }else { + err = mod_id; }up_write (&cttype->mod_lock);
@@ -295,17 +305,23 @@ void codetag_module_replaced(struct modumutex_unlock (&codetag_lock); } -void codetag_load_module (struct module *mod) +int codetag_load_module (struct module *mod) {struct codetag_type *cttype; +int ret =0 ;if (!mod) -return ; +return 0 ;mutex_lock (&codetag_lock); -list_for_each_entry (cttype, &codetag_types, link) -codetag_module_init (cttype, mod); +list_for_each_entry (cttype, &codetag_types, link) { + ret =codetag_module_init (cttype, mod); +if (ret) +break ; + }mutex_unlock (&codetag_lock); + +return ret; }void codetag_unload_module (struct module *mod)
Greg Kroah-Hartman
maintainerPATCH 2/592 configfs: Do not override creating attribute file failure in populate_attrs()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zijun Hu <[email protected]>
commit f830edbae247b89228c3e09294151b21e0dc849c upstream.
populate_attrs() may override failure for creating attribute files by success for creating subsequent bin attribute files, and have wrong return value.
Fix by creating bin attribute files under successfully creating attribute files.
--- fs/configfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/configfs/dir.c +1 -1
@@ -619,7 +619,7 @@ static int populate_attrs(struct config_break ; } } -if (t->ct_bin_attrs) { +if (!error && t->ct_bin_attrs) {for (i =0 ; (bin_attr = t->ct_bin_attrs[i]) !=NULL ; i++) {if (ops && ops->is_bin_visible && !ops->is_bin_visible (item, bin_attr, i))continue ;
Greg Kroah-Hartman
maintainerPATCH 4/592 gfs2: move msleep to sleepable context
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Aring <[email protected]>
commit ac5ee087d31ed93b6e45d2968a66828c6f621d8c upstream.
This patch moves the msleep_interruptible() out of the non-sleepable context by moving the ls->ls_recover_spin spinlock around so msleep_interruptible() will be called in a sleepable context.
--- fs/gfs2/lock_dlm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/gfs2/lock_dlm.c +2 -1
@@ -996,14 +996,15 @@ locks_done:if (sdp->sd_args.ar_spectator) {fs_info (sdp,"Recovery is required. Waiting for a " "non-spectator to mount.\n" ); +spin_unlock (&ls->ls_recover_spin);msleep_interruptible (1000 ); }else {fs_info (sdp,"control_mount wait1 block %u start %u " "mount %u lvb %u flags %lx\n" , block_gen, start_gen, mount_gen, lvb_gen, ls->ls_recover_flags); +spin_unlock (&ls->ls_recover_spin); } -spin_unlock (&ls->ls_recover_spin); goto restart; }
Greg Kroah-Hartman
maintainerPATCH 13/592 firmware: cs_dsp: Fix OOB memory read access in KUnit test
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jaroslav Kysela <[email protected]>
commit fe6446215bfad11cf3b446f38b28dc7708973c25 upstream.
KASAN reported out of bounds access - cs_dsp_mock_bin_add_name_or_info(), because the source string length was rounded up to the allocation size.
--- drivers/firmware/cirrus/test/cs_dsp_mock_bin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/firmware/cirrus/test/cs_dsp_mock_bin.c +2 -1
@@ -96,10 +96,11 @@ static void cs_dsp_mock_bin_add_name_or_if (info_len %4 ) {/* Create a padded string with length a multiple of 4 */ +size_t copy_len = info_len; info_len =round_up (info_len,4 ); tmp =kunit_kzalloc (builder->test_priv->test, info_len,GFP_KERNEL );KUNIT_ASSERT_NOT_ERR_OR_NULL (builder->test_priv->test, tmp); -memcpy (tmp, info, info_len); +memcpy (tmp, info, copy_len); info = tmp; }
Greg Kroah-Hartman
maintainerPATCH 14/592 ASoC: meson: meson-card-utils: use of_property_present() for DT parsing
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Blumenstingl <[email protected]>
commit 171eb6f71e9e3ba6a7410a1d93f3ac213f39dae2 upstream.
Commit c141ecc3cecd ("of: Warn when of_property_read_bool() is used on non-boolean properties") added a warning when trying to parse a property with a value (boolean properties are defined as: absent = false, present without any value = true). This causes a warning from meson-card-utils.
meson-card-utils needs to know about the existence of the "audio-routing" and/or "audio-widgets" properties in order to properly parse them. Switch to of_property_present() in order to silence the following warning messages during boot:
OF: /sound: Read of boolean property 'audio-routing' with a value.
OF: /sound: Read of boolean property 'audio-widgets' with a value.
--- sound/soc/meson/meson-card-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/meson/meson-card-utils.c +1 -1
@@ -231,7 +231,7 @@ static int meson_card_parse_of_optional( const char *p)) {/* If property is not provided, don't fail ... */ -if (!of_property_read_bool (card->dev->of_node, propname)) +if (!of_property_present (card->dev->of_node, propname))return 0 ;/* ... but do fail if it is provided and the parsing fails */
Greg Kroah-Hartman
maintainerPATCH 15/592 ASoC: amd: amd_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vijendar Mukunda <[email protected]>
commit 4d87ae7508cb7ff58fd0bcecc6e9491f42f987f8 upstream.
Initialize current_be_id to 0 in AMD legacy stack(NO DSP enabled) SoundWire generic machine driver code to handle the unlikely case when there are no devices connected to a DAI.
In this case create_sdw_dailink() would return without touching the passed pointer to current_be_id.
Found by gcc -fanalyzer
--- sound/soc/amd/acp/acp-sdw-legacy-mach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/amd/acp/acp-sdw-legacy-mach.c +1 -1
@@ -272,7 +272,7 @@ static int create_sdw_dailinks(struct sn/* generate DAI links by each sdw link */ while (soc_dais->initialised) { -int current_be_id; +int current_be_id =0 ; ret =create_sdw_dailink (card, soc_dais, dai_links, ¤t_be_id, codec_conf, sdw_platform_component);
Greg Kroah-Hartman
maintainerPATCH 16/592 ASoC: amd: sof_amd_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vijendar Mukunda <[email protected]>
commit 6b83ba4bc3ecb915476d688c9f00f3be57b49a0c upstream.
Initialize current_be_id to 0 in SOF based AMD generic SoundWire machine driver to handle the unlikely case when there are no devices connected to a DAI.
In this case create_sdw_dailink() would return without touching the passed pointer to current_be_id.
Found by gcc -fanalyzer
--- sound/soc/amd/acp/acp-sdw-sof-mach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/amd/acp/acp-sdw-sof-mach.c +1 -1
@@ -219,7 +219,7 @@ static int create_sdw_dailinks(struct sn/* generate DAI links by each sdw link */ while (sof_dais->initialised) { -int current_be_id; +int current_be_id =0 ; ret =create_sdw_dailink (card, sof_dais, dai_links, ¤t_be_id, codec_conf);
Greg Kroah-Hartman
maintainerPATCH 17/592 io_uring: account drain memory to cgroup
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Begunkov <[email protected]>
commit f979c20547e72568e3c793bc92c7522bc3166246 upstream.
Account drain allocations against memcg. It's not a big problem as each such allocation is paired with a request, which is accounted, but it's nicer to follow the limits more closely.
--- io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/io_uring.c +1 -1
@@ -1689,7 +1689,7 @@ queue:spin_unlock (&ctx->completion_lock);io_prep_async_link (req); - de =kmalloc (sizeof (*de),GFP_KERNEL ); + de =kmalloc (sizeof (*de),GFP_KERNEL_ACCOUNT );if (!de) { ret = -ENOMEM ;io_req_defer_failed (req, ret);
Greg Kroah-Hartman
maintainerPATCH 18/592 io_uring/kbuf: account ring io_buffer_list memory
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Begunkov <[email protected]>
commit 475a8d30371604a6363da8e304a608a5959afc40 upstream.
Follow the non-ringed pbuf struct io_buffer_list allocations and account it against the memcg. There is low chance of that being an actual problem as ring provided buffer should either pin user memory or allocate it, which is already accounted.
--- io_uring/kbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/kbuf.c +1 -1
@@ -624,7 +624,7 @@ int io_register_pbuf_ring(struct io_ringio_destroy_bl (ctx, bl); } - free_bl = bl =kzalloc (sizeof (*bl),GFP_KERNEL ); + free_bl = bl =kzalloc (sizeof (*bl),GFP_KERNEL_ACCOUNT );if (!bl)return -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 19/592 powerpc/pseries/msi: Avoid reading PCI device registers in reduced power states
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gautam Menghani <[email protected]>
commit 9cc0eafd28c7faef300822992bb08d79cab2a36c upstream.
When a system is being suspended to RAM, the PCI devices are also suspended and the PPC code ends up calling pseries_msi_compose_msg() and this triggers the BUG_ON() in __pci_read_msi_msg() because the device at this point is in reduced power state. In reduced power state, the memory mapped registers of the PCI device are not accessible.
To replicate the bug:
1. Make sure deep sleep is selected
# cat /sys/power/mem_sleep s2idle [deep]
2. Make sure console is not suspended (so that dmesg logs are visible) echo N > /sys/module/printk/parameters/console_suspend
3. Suspend the system
echo mem > /sys/power/state
To fix this behaviour, read the cached msi message of the device when the device is not in PCI_D0 power state instead of touching the hardware.
--- arch/powerpc/platforms/pseries/msi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/msi.c +6 -1
@@ -525,7 +525,12 @@ static struct msi_domain_info pseries_msstatic void pseries_msi_compose_msg (struct irq_data *data,struct msi_msg *msg) { -__pci_read_msi_msg (irq_data_get_msi_desc (data), msg); +struct pci_dev *dev =msi_desc_to_pci_dev (irq_data_get_msi_desc (data)); + +if (dev->current_state ==PCI_D0 ) +__pci_read_msi_msg (irq_data_get_msi_desc (data), msg); +else +get_cached_msi_msg (data->irq, msg); }static struct irq_chip pseries_msi_irq_chip = {
Greg Kroah-Hartman
maintainerPATCH 20/592 powerpc64/ftrace: fix clobbered r15 during livepatching
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hari Bathini <[email protected]>
commit cb5b691f8273432297611863ac142e17119279e0 upstream.
While r15 is clobbered always with PPC_FTRACE_OUT_OF_LINE, it is not restored in livepatch sequence leading to not so obvious fails like below:
BUG: Unable to handle kernel data access on write at 0xc0000000000f9078
Faulting instruction address: 0xc0000000018ff958
Oops: Kernel access of bad area, sig: 11 [#1]
...
NIP: c0000000018ff958 LR: c0000000018ff930 CTR: c0000000009c0790
REGS: c00000005f2e7790 TRAP: 0300 Tainted: G K (6.14.0+)
MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 2822880b XER: 20040000
CFAR: c0000000008addc0 DAR: c0000000000f9078 DSISR: 0a000000 IRQMASK: 1
GPR00: c0000000018f2584 c00000005f2e7a30 c00000000280a900 c000000017ffa488
GPR04: 0000000000000008 0000000000000000 c0000000018f24fc 000000000000000d
GPR08: fffffffffffe0000 000000000000000d 0000000000000000 0000000000008000
GPR12: c0000000009c0790 c000000017ffa480 c00000005f2e7c78 c0000000000f9070
GPR16: c00000005f2e7c90 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 c00000005f3efa80 c00000005f2e7c60 c00000005f2e7c88
GPR24: c00000005f2e7c60 0000000000000001 c0000000000f9078 0000000000000000
GPR28: 00007fff97960000 c000000017ffa480 0000000000000000 c0000000000f9078
...
Call Trace:
check_heap_object+0x34/0x390 (unreliable)
__mutex_unlock_slowpath.isra.0+0xe4/0x230
seq_read_iter+0x430/0xa90
proc_reg_read_iter+0xa4/0x200
vfs_read+0x41c/0x510
ksys_read+0xa4/0x190
system_call_exception+0x1d0/0x440
system_call_vectored_common+0x15c/0x2ecFix it by restoring r15 always.
--- arch/powerpc/kernel/trace/ftrace_entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/trace/ftrace_entry.S +1 -1
@@ -212,10 +212,10 @@ bne- 1f mr r3, r15 +1: mtlr r3 .if \allregs == 0 REST_GPR(15, r1) .endif -1: mtlr r3 #endif /* Restore gprs */
Greg Kroah-Hartman
maintainerPATCH 21/592 powerpc/bpf: fix JIT code size calculation of bpf trampoline
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hari Bathini <[email protected]>
commit 59ba025948be2a92e8bc9ae1cbdaf197660bd508 upstream.
arch_bpf_trampoline_size() provides JIT size of the BPF trampoline before the buffer for JIT'ing it is allocated. The total number of instructions emitted for BPF trampoline JIT code depends on where the final image is located. So, the size arrived at with the dummy pass in arch_bpf_trampoline_size() can vary from the actual size needed in arch_prepare_bpf_trampoline(). When the instructions accounted in arch_bpf_trampoline_size() is less than the number of instructions emitted during the actual JIT compile of the trampoline, the below warning is produced:
WARNING: CPU: 8 PID: 204190 at arch/powerpc/net/bpf_jit_comp.c:981 __arch_prepare_bpf_trampoline.isra.0+0xd2c/0xdcc
which is:
/* Make sure the trampoline generation logic doesn't overflow */
if (image && WARN_ON_ONCE(&image[ctx->idx] >
(u32 *)rw_image_end - BPF_INSN_SAFETY)) {So, during the dummy pass, instead of providing some arbitrary image location, account for maximum possible instructions if and when there is a dependency with image location for JIT'ing.
--- arch/powerpc/net/bpf_jit.h | 20 +++++++++++++++++--- arch/powerpc/net/bpf_jit_comp.c | 33 ++++++++++----------------------- arch/powerpc/net/bpf_jit_comp32.c | 6 ------ arch/powerpc/net/bpf_jit_comp64.c | 15 ++++++++------- 4 files changed, 35 insertions(+), 39 deletions(-)
arch/powerpc/net/bpf_jit.h +17 -3
@@ -51,8 +51,16 @@EMIT (PPC_INST_BRANCH_COND | (((cond) &0x3ff ) <<16 ) | (offset &0xfffc )); \ }while (0 ) -/* Sign-extended 32-bit immediate load */ +/* +* Sign-extended 32-bit immediate load +* +* If this is a dummy pass (!image), account for +* maximum possible instructions. + */#define PPC_LI32 (d, i) do { \ + if (!image) \ + ctx->idx += 2; \ + else { \ if ((int)(uintptr_t)(i) >= -32768 && \ (int)(uintptr_t)(i) < 32768) \ EMIT(PPC_RAW_LI(d, i)); \
@@ -60,10 +68,15 @@EMIT (PPC_RAW_LIS (d,IMM_H (i))); \if (IMM_L (i)) \EMIT (PPC_RAW_ORI (d, d,IMM_L (i))); \ - } } while(0) + } \ + } } while (0)#ifdef CONFIG_PPC64 +/* If dummy pass (!image), account for maximum possible instructions */ #define PPC_LI64 (d, i) do { \ + if (!image) \ + ctx->idx += 5; \ + else { \ if ((long)(i) >= -2147483648 && \ (long)(i) < 2147483648) \ PPC_LI32(d, i); \
@@ -84,7 +97,8 @@if ((uintptr_t )(i) &0x000000000000ffffULL ) \EMIT (PPC_RAW_ORI (d, d, (uintptr_t )(i) & \0xffff )); \ - } } while (0) + } \ + } } while (0)#define PPC_LI_ADDR PPC_LI64#ifndef CONFIG_PPC_KERNEL_PCREL
arch/powerpc/net/bpf_jit_comp.c +10 -23
@@ -504,10 +504,11 @@ static int invoke_bpf_prog(u32 *image, uEMIT (PPC_RAW_ADDI (_R3, _R1, regs_off));if (!p->jited)PPC_LI_ADDR (_R4, (unsigned long )p->insnsi); -if (!create_branch (&branch_insn, (u32 *)&ro_image[ctx->idx], (unsigned long )p->bpf_func, -BRANCH_SET_LINK )) { -if (image) - image[ctx->idx] =ppc_inst_val (branch_insn); +/* Account for max possible instructions during dummy pass for size calculation */ +if (image && !create_branch (&branch_insn, (u32 *)&ro_image[ctx->idx], + (unsigned long )p->bpf_func, +BRANCH_SET_LINK )) { + image[ctx->idx] =ppc_inst_val (branch_insn); ctx->idx++; }else {EMIT (PPC_RAW_LL (_R12, _R25, offsetof(struct bpf_prog , bpf_func)));
@@ -889,7 +890,8 @@ static int __arch_prepare_bpf_trampolinebpf_trampoline_restore_tail_call_cnt (image, ctx, func_frame_offset, r4_off);/* Reserve space to patch branch instruction to skip fexit progs */ - im->ip_after_call = &((u32 *)ro_image)[ctx->idx]; +if (ro_image)/* image is NULL for dummy pass */ + im->ip_after_call = &((u32 *)ro_image)[ctx->idx];EMIT (PPC_RAW_NOP ()); }
@@ -912,7 +914,8 @@ static int __arch_prepare_bpf_trampoline }if (flags &BPF_TRAMP_F_CALL_ORIG ) { - im->ip_epilogue = &((u32 *)ro_image)[ctx->idx]; +if (ro_image)/* image is NULL for dummy pass */ + im->ip_epilogue = &((u32 *)ro_image)[ctx->idx];PPC_LI_ADDR (_R3, im); ret =bpf_jit_emit_func_call_rel (image, ro_image, ctx, (unsigned long )__bpf_tramp_exit);
@@ -973,25 +976,9 @@ int arch_bpf_trampoline_size(const struc struct bpf_tramp_links *tlinks, void *func_addr) { struct bpf_tramp_image im; -void *image;int ret; -/* -* Allocate a temporary buffer for __arch_prepare_bpf_trampoline(). -* This will NOT cause fragmentation in direct map, as we do not -* call set_memory_*() on this buffer. -* -* We cannot use kvmalloc here, because we need image to be in -* module memory range. -*/ - image =bpf_jit_alloc_exec (PAGE_SIZE ); -if (!image) -return -ENOMEM ; - - ret =__arch_prepare_bpf_trampoline (&im, image, image +PAGE_SIZE , image, - m, flags, tlinks, func_addr); -bpf_jit_free_exec (image); - + ret =__arch_prepare_bpf_trampoline (&im,NULL ,NULL ,NULL , m, flags, tlinks, func_addr);return ret; }
arch/powerpc/net/bpf_jit_comp32.c +0 -6
@@ -313,7 +313,6 @@ int bpf_jit_build_body(struct bpf_prog *u64 func_addr;u32 true_cond;u32 tmp_idx; -int j; if (i && (BPF_CLASS(code) == BPF_ALU64 || BPF_CLASS(code) == BPF_ALU) && (BPF_CLASS(prevcode) == BPF_ALU64 || BPF_CLASS(prevcode) == BPF_ALU) &&
@@ -1099,13 +1098,8 @@ int bpf_jit_build_body(struct bpf_prog ** 16 byte instruction that uses two 'struct bpf_insn' */ case BPF_LD |BPF_IMM |BPF_DW :/* dst = (u64) imm */ - tmp_idx = ctx->idx;PPC_LI32 (dst_reg_h, (u32 )insn[i +1 ].imm);PPC_LI32 (dst_reg, (u32 )insn[i].imm); -/* padding to allow full 4 instructions for later patching */ -if (!image) -for (j = ctx->idx - tmp_idx; j <4 ; j++) -EMIT (PPC_RAW_NOP ());/* Adjust for two bpf instructions */ addrs[++i] = ctx->idx *4 ;break ;
arch/powerpc/net/bpf_jit_comp64.c +8 -7
@@ -227,7 +227,14 @@ int bpf_jit_emit_func_call_rel(u32 *imag#ifdef CONFIG_PPC_KERNEL_PCREL reladdr = func_addr - local_paca->kernelbase; -if (reladdr < (long )SZ_8G && reladdr >= -(long )SZ_8G ) { +/* +* If fimage is NULL (the initial pass to find image size), +* account for the maximum no. of instructions possible. +*/ +if (!fimage) { + ctx->idx +=7 ; +return 0 ; + }else if (reladdr < (long )SZ_8G && reladdr >= -(long )SZ_8G ) {EMIT (PPC_RAW_LD (_R12, _R13, offsetof(struct paca_struct , kernelbase)));/* Align for subsequent prefix instruction */ if (!IS_ALIGNED ((unsigned long )fimage +CTX_NIA (ctx),8 ))
@@ -412,7 +419,6 @@ int bpf_jit_build_body(struct bpf_prog *u64 imm64;u32 true_cond;u32 tmp_idx; -int j;/* * addrs[] maps a BPF bytecode address into a real offset from
@@ -1046,12 +1052,7 @@ emit_clear:case BPF_LD |BPF_IMM |BPF_DW :/* dst = (u64) imm */ imm64 = ((u64 )(u32 ) insn[i].imm) | (((u64 )(u32 ) insn[i+1 ].imm) <<32 ); - tmp_idx = ctx->idx;PPC_LI64 (dst_reg, imm64); -/* padding to allow full 5 instructions for later patching */ -if (!image) -for (j = ctx->idx - tmp_idx; j <5 ; j++) -EMIT (PPC_RAW_NOP ());/* Adjust for two bpf instructions */ addrs[++i] = ctx->idx *4 ;break ;
Greg Kroah-Hartman
maintainerPATCH 22/592 s390/pci: Fix __pcilg_mio_inuser() inline assembly
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <[email protected]>
commit c4abe6234246c75cdc43326415d9cff88b7cf06c upstream.
Use "a" constraint for the shift operand of the __pcilg_mio_inuser() inline assembly. The used "d" constraint allows the compiler to use any general purpose register for the shift operand, including register zero.
If register zero is used this my result in incorrect code generation:
8f6: a7 0a ff f8 ahi %r0,-8 8fa: eb 32 00 00 00 0c srlg %r3,%r2,0 <----
If register zero is selected to contain the shift value, the srlg instruction ignores the contents of the register and always shifts zero bits. Therefore use the "a" constraint which does not permit to select register zero.
--- arch/s390/pci/pci_mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/pci/pci_mmio.c +1 -1
@@ -236,7 +236,7 @@ static inline int __pcilg_mio_inuser( : [ioaddr_len] "+&d" (ioaddr_len.pair), [exc] "+d" (exception), CC_OUT(cc, cc), [val] "=d" (val), [dst] "+a" (dst), [cnt] "+d" (cnt), [tmp] "=d" (tmp), - [shift] "+d" (shift) + [shift] "+a" (shift) : : CC_CLOBBER_LIST("memory"));
Greg Kroah-Hartman
maintainerPATCH 5/592 sched/rt: Fix race in push_rt_task
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Harshit Agarwal <[email protected]>
commit 690e47d1403e90b7f2366f03b52ed3304194c793 upstream.
Overview
========
When a CPU chooses to call push_rt_task and picks a task to push to another CPU's runqueue then it will call find_lock_lowest_rq method which would take a double lock on both CPUs' runqueues. If one of the locks aren't readily available, it may lead to dropping the current runqueue lock and reacquiring both the locks at once. During this window it is possible that the task is already migrated and is running on some other CPU. These cases are already handled. However, if the task is migrated and has already been executed and another CPU is now trying to wake it up (ttwu) such that it is queued again on the runqeue (on_rq is 1) and also if the task was run by the same CPU, then the current checks will pass even though the task was migrated out and is no longer in the pushable tasks list.
Crashes
=======
This bug resulted in quite a few flavors of crashes triggering kernel panics with various crash signatures such as assert failures, page faults, null pointer dereferences, and queue corruption errors all coming from scheduler itself.
Some of the crashes:
-> kernel BUG at kernel/sched/rt.c:1616! BUG_ON(idx >= MAX_RT_PRIO)
Call Trace: ? __die_body+0x1a/0x60 ? die+0x2a/0x50 ? do_trap+0x85/0x100 ? pick_next_task_rt+0x6e/0x1d0 ? do_error_trap+0x64/0xa0 ? pick_next_task_rt+0x6e/0x1d0 ? exc_invalid_op+0x4c/0x60 ? pick_next_task_rt+0x6e/0x1d0 ? asm_exc_invalid_op+0x12/0x20 ? pick_next_task_rt+0x6e/0x1d0 __schedule+0x5cb/0x790 ? update_ts_time_stats+0x55/0x70 schedule_idle+0x1e/0x40 do_idle+0x15e/0x200 cpu_startup_entry+0x19/0x20 start_secondary+0x117/0x160 secondary_startup_64_no_verify+0xb0/0xbb
-> BUG: kernel NULL pointer dereference, address: 00000000000000c0
Call Trace: ? __die_body+0x1a/0x60 ? no_context+0x183/0x350 ? __warn+0x8a/0xe0 ? exc_page_fault+0x3d6/0x520 ? asm_exc_page_fault+0x1e/0x30 ? pick_next_task_rt+0xb5/0x1d0 ? pick_next_task_rt+0x8c/0x1d0 __schedule+0x583/0x7e0 ? update_ts_time_stats+0x55/0x70 schedule_idle+0x1e/0x40 do_idle+0x15e/0x200 cpu_startup_entry+0x19/0x20 start_secondary+0x117/0x160 secondary_startup_64_no_verify+0xb0/0xbb
-> BUG: unable to handle page fault for address: ffff9464daea5900
kernel BUG at kernel/sched/rt.c:1861! BUG_ON(rq->cpu != task_cpu(p))
-> kernel BUG at kernel/sched/rt.c:1055! BUG_ON(!rq->nr_running)
Call Trace: ? __die_body+0x1a/0x60 ? die+0x2a/0x50 ? do_trap+0x85/0x100 ? dequeue_top_rt_rq+0xa2/0xb0 ? do_error_trap+0x64/0xa0 ? dequeue_top_rt_rq+0xa2/0xb0 ? exc_invalid_op+0x4c/0x60 ? dequeue_top_rt_rq+0xa2/0xb0 ? asm_exc_invalid_op+0x12/0x20 ? dequeue_top_rt_rq+0xa2/0xb0 dequeue_rt_entity+0x1f/0x70 dequeue_task_rt+0x2d/0x70 __schedule+0x1a8/0x7e0 ? blk_finish_plug+0x25/0x40 schedule+0x3c/0xb0 futex_wait_queue_me+0xb6/0x120 futex_wait+0xd9/0x240 do_futex+0x344/0xa90 ? get_mm_exe_file+0x30/0x60 ? audit_exe_compare+0x58/0x70 ? audit_filter_rules.constprop.26+0x65e/0x1220 __x64_sys_futex+0x148/0x1f0 do_syscall_64+0x30/0x80 entry_SYSCALL_64_after_hwframe+0x62/0xc7
-> BUG: unable to handle page fault for address: ffff8cf3608bc2c0
Call Trace: ? __die_body+0x1a/0x60 ? no_context+0x183/0x350 ? spurious_kernel_fault+0x171/0x1c0 ? exc_page_fault+0x3b6/0x520 ? plist_check_list+0x15/0x40 ? plist_check_list+0x2e/0x40 ? asm_exc_page_fault+0x1e/0x30 ? _cond_resched+0x15/0x30 ? futex_wait_queue_me+0xc8/0x120 ? futex_wait+0xd9/0x240 ? try_to_wake_up+0x1b8/0x490 ? futex_wake+0x78/0x160 ? do_futex+0xcd/0xa90 ? plist_check_list+0x15/0x40 ? plist_check_list+0x2e/0x40 ? plist_del+0x6a/0xd0 ? plist_check_list+0x15/0x40 ? plist_check_list+0x2e/0x40 ? dequeue_pushable_task+0x20/0x70 ? __schedule+0x382/0x7e0 ? asm_sysvec_reschedule_ipi+0xa/0x20 ? schedule+0x3c/0xb0 ? exit_to_user_mode_prepare+0x9e/0x150 ? irqentry_exit_to_user_mode+0x5/0x30 ? asm_sysvec_reschedule_ipi+0x12/0x20
Above are some of the common examples of the crashes that were observed due to this issue.
Details
=======
Let's look at the following scenario to understand this race.
1) CPU A enters push_rt_task
a) CPU A has chosen next_task = task p.
b) CPU A calls find_lock_lowest_rq(Task p, CPU Z’s rq).
c) CPU A identifies CPU X as a destination CPU (X < Z).
d) CPU A enters double_lock_balance(CPU Z’s rq, CPU X’s rq).
e) Since X is lower than Z, CPU A unlocks CPU Z’s rq. Someone else has locked CPU X’s rq, and thus, CPU A must wait.
2) At CPU Z
a) Previous task has completed execution and thus, CPU Z enters schedule, locks its own rq after CPU A releases it.
b) CPU Z dequeues previous task and begins executing task p.
c) CPU Z unlocks its rq.
d) Task p yields the CPU (ex. by doing IO or waiting to acquire a lock) which triggers the schedule function on CPU Z.
e) CPU Z enters schedule again, locks its own rq, and dequeues task p.
f) As part of dequeue, it sets p.on_rq = 0 and unlocks its rq.
3) At CPU B
a) CPU B enters try_to_wake_up with input task p.
b) Since CPU Z dequeued task p, p.on_rq = 0, and CPU B updates B.state = WAKING.
c) CPU B via select_task_rq determines CPU Y as the target CPU.
4) The race
a) CPU A acquires CPU X’s lock and relocks CPU Z.
b) CPU A reads task p.cpu = Z and incorrectly concludes task p is still on CPU Z.
c) CPU A failed to notice task p had been dequeued from CPU Z while CPU A was waiting for locks in double_lock_balance. If CPU A knew that task p had been dequeued, it would return NULL forcing push_rt_task to give up the task p's migration.
d) CPU B updates task p.cpu = Y and calls ttwu_queue.
e) CPU B locks Ys rq. CPU B enqueues task p onto Y and sets task
p.on_rq = 1.
f) CPU B unlocks CPU Y, triggering memory synchronization.
g) CPU A reads task p.on_rq = 1, cementing its assumption that task p has not migrated.
h) CPU A decides to migrate p to CPU X.
This leads to A dequeuing p from Y's queue and various crashes down the line.
Solution
========
The solution here is fairly simple. After obtaining the lock (at 4a), the check is enhanced to make sure that the task is still at the head of the pushable tasks list. If not, then it is anyway not suitable for being pushed out.
Testing
=======
The fix is tested on a cluster of 3 nodes, where the panics due to this are hit every couple of days. A fix similar to this was deployed on such cluster and was stable for more than 30 days.
--- kernel/sched/rt.c | 54 ++++++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 28 deletions(-)
kernel/sched/rt.c +26 -28
@@ -1883,6 +1883,27 @@ static int find_lowest_rq(struct task_streturn -1 ; } +static struct task_struct *pick_next_pushable_task (struct rq *rq) +{ +struct task_struct *p; + +if (!has_pushable_tasks (rq)) +return NULL ; + + p =plist_first_entry (&rq->rt.pushable_tasks, + struct task_struct, pushable_tasks); + +BUG_ON (rq->cpu !=task_cpu (p)); +BUG_ON (task_current (rq, p)); +BUG_ON (task_current_donor (rq, p)); +BUG_ON (p->nr_cpus_allowed <=1 ); + +BUG_ON (!task_on_rq_queued (p)); +BUG_ON (!rt_task (p)); + +return p; +} +/* Will lock the rq it finds */ static struct rq *find_lock_lowest_rq (struct task_struct *task,struct rq *rq) {
@@ -1913,18 +1934,16 @@ static struct rq *find_lock_lowest_rq(st/* * We had to unlock the run queue. In * the mean time, task could have -* migrated already or had its affinity changed. -* Also make sure that it wasn't scheduled on its rq. +* migrated already or had its affinity changed, +* therefore check if the task is still at the +* head of the pushable tasks list. * It is possible the task was scheduled, set * "migrate_disabled" and then got preempted, so we must * check the task migration disable flag here too. */ -if (unlikely (task_rq (task) != rq || +if (unlikely (is_migration_disabled (task) || !cpumask_test_cpu (lowest_rq->cpu, &task->cpus_mask) || -task_on_cpu (rq, task) || - !rt_task (task) || -is_migration_disabled (task) || - !task_on_rq_queued (task))) { + task !=pick_next_pushable_task (rq))) {double_unlock_balance (rq, lowest_rq); lowest_rq =NULL ;
@@ -1944,27 +1963,6 @@ static struct rq *find_lock_lowest_rq(streturn lowest_rq; } -static struct task_struct *pick_next_pushable_task (struct rq *rq) -{ -struct task_struct *p; - -if (!has_pushable_tasks (rq)) -return NULL ; - - p =plist_first_entry (&rq->rt.pushable_tasks, - struct task_struct, pushable_tasks); - -BUG_ON (rq->cpu !=task_cpu (p)); -BUG_ON (task_current (rq, p)); -BUG_ON (task_current_donor (rq, p)); -BUG_ON (p->nr_cpus_allowed <=1 ); - -BUG_ON (!task_on_rq_queued (p)); -BUG_ON (!rt_task (p)); - -return p; -} -/* * If the current CPU has more than one RT task, see if the non * running task can migrate over to a CPU that is running a task
Greg Kroah-Hartman
maintainerPATCH 23/592 s390/pci: Remove redundant bus removal and disable from zpci_release_device()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niklas Schnelle <[email protected]>
commit d76f9633296785343d45f85199f4138cb724b6d2 upstream.
Remove zpci_bus_remove_device() and zpci_disable_device() calls from zpci_release_device(). These calls were done when the device transitioned into the ZPCI_FN_STATE_STANDBY state which is guaranteed to happen before it enters the ZPCI_FN_STATE_RESERVED state. When zpci_release_device() is called the device is known to be in the ZPCI_FN_STATE_RESERVED state which is also checked by a WARN_ON().
--- arch/s390/pci/pci.c | 6 ------ 1 file changed, 6 deletions(-)
arch/s390/pci/pci.c +0 -6
@@ -949,12 +949,6 @@ void zpci_release_device(struct kref *krWARN_ON (zdev->state !=ZPCI_FN_STATE_RESERVED ); -if (zdev->zbus->bus) -zpci_bus_remove_device (zdev, false); - -if (zdev_enabled (zdev)) -zpci_disable_device (zdev); -if (zdev->has_hp_slot)zpci_exit_slot (zdev);
Greg Kroah-Hartman
maintainerPATCH 6/592 sched/fair: Adhere to place_entity() constraints
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <[email protected]>
commit c70fc32f44431bb30f9025ce753ba8be25acbba3 upstream.
Mike reports that commit 6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing scheduling lag") relies on commit 4423af84b297 ("sched/fair: optimize the PLACE_LAG when se->vlag is zero") to not trip a WARN in place_entity().
What happens is that the lag of the very last entity is 0 per definition -- the average of one element matches the value of that element. Therefore place_entity() will match the condition skipping the lag adjustment:
if (sched_feat(PLACE_LAG) && cfs_rq->nr_queued && se->vlag) {Without the 'se->vlag' condition -- it will attempt to adjust the zero lag even though we're inserting into an empty tree.
Notably, we should have failed the 'cfs_rq->nr_queued' condition, but don't because they didn't get updated.
Additionally, move update_load_add() after placement() as is consistent with other place_entity() users -- this change is non-functional, place_entity() does not use cfs_rq->load.
--- kernel/sched/fair.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/sched/fair.c +3 -1
@@ -3795,6 +3795,7 @@ static void reweight_entity(struct cfs_rupdate_entity_lag (cfs_rq, se); se->deadline -= se->vruntime; se->rel_deadline =1 ; + cfs_rq->nr_queued--;if (!curr)__dequeue_entity (cfs_rq, se);update_load_sub (&cfs_rq->load, se->load.weight);
@@ -3821,10 +3822,11 @@ static void reweight_entity(struct cfs_renqueue_load_avg (cfs_rq, se);if (se->on_rq) { -update_load_add (&cfs_rq->load, se->load.weight);place_entity (cfs_rq, se,0 ); +update_load_add (&cfs_rq->load, se->load.weight);if (!curr)__enqueue_entity (cfs_rq, se); + cfs_rq->nr_queued++;/* * The entity's vruntime has been adjusted, so let's check
Greg Kroah-Hartman
maintainerPATCH 7/592 crypto: qat - add shutdown handler to qat_c3xxx
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Giovanni Cabiddu <[email protected]>
commit 71e0cc1eab584d6f95526a5e8c69ec666ca33e1b upstream.
During a warm reset via kexec, the system bypasses the driver removal sequence, meaning that the remove() callback is not invoked. If a QAT device is not shutdown properly, the device driver will fail to load in a newly rebooted kernel.
This might result in output like the following after the kexec reboot:
QAT: AE0 is inactive!!
QAT: failed to get device out of reset
c3xxx 0000:3f:00.0: qat_hal_clr_reset error
c3xxx 0000:3f:00.0: Failed to init the AEs
c3xxx 0000:3f:00.0: Failed to initialise Acceleration Engine
c3xxx 0000:3f:00.0: Resetting device qat_dev0
c3xxx 0000:3f:00.0: probe with driver c3xxx failed with error -14Implement the shutdown() handler that hooks into the reboot notifier list. This brings down the QAT device and ensures it is shut down properly.
--- drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c +8 -0
@@ -19,6 +19,13 @@#include <adf_dbgfs.h> #include "adf_c3xxx_hw_data.h" +static void adf_shutdown (struct pci_dev *pdev) +{ +struct adf_accel_dev *accel_dev =adf_devmgr_pci_to_accel_dev (pdev); + +adf_dev_down (accel_dev); +} +static const struct pci_device_id adf_pci_tbl[] = { {PCI_VDEVICE (INTEL ,PCI_DEVICE_ID_INTEL_QAT_C3XXX ), }, { }
@@ -33,6 +40,7 @@ static struct pci_driver adf_driver = { .name = ADF_C3XXX_DEVICE_NAME, .probe = adf_probe, .remove = adf_remove, + .shutdown = adf_shutdown, .sriov_configure = adf_sriov_configure, .err_handler = &adf_err_handler, };
Greg Kroah-Hartman
maintainerPATCH 8/592 crypto: qat - add shutdown handler to qat_420xx
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Giovanni Cabiddu <[email protected]>
commit 097143f23a1164bfd1b6f70279d229be44da2e30 upstream.
During a warm reset via kexec, the system bypasses the driver removal sequence, meaning that the remove() callback is not invoked. If a QAT device is not shutdown properly, the device driver will fail to load in a newly rebooted kernel.
This might result in output like the following after the kexec reboot:
420xx 0000:01:00.0: Failed to power up the device
420xx 0000:01:00.0: Failed to initialize device
420xx 0000:01:00.0: Resetting device qat_dev0
420xx 0000:01:00.0: probe with driver 420xx failed with error -14Implement the shutdown() handler that hooks into the reboot notifier list. This brings down the QAT device and ensures it is shut down properly.
--- drivers/crypto/intel/qat/qat_420xx/adf_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/crypto/intel/qat/qat_420xx/adf_drv.c +8 -0
@@ -186,11 +186,19 @@ static void adf_remove(struct pci_dev *padf_cleanup_accel (accel_dev); } +static void adf_shutdown (struct pci_dev *pdev) +{ +struct adf_accel_dev *accel_dev =adf_devmgr_pci_to_accel_dev (pdev); + +adf_dev_down (accel_dev); +} +static struct pci_driver adf_driver = { .id_table = adf_pci_tbl, .name =ADF_420XX_DEVICE_NAME , .probe = adf_probe, .remove = adf_remove, + .shutdown = adf_shutdown, .sriov_configure = adf_sriov_configure, .err_handler = &adf_err_handler, };
Greg Kroah-Hartman
maintainerPATCH 9/592 crypto: qat - add shutdown handler to qat_4xxx
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Giovanni Cabiddu <[email protected]>
commit 845bc952024dbf482c7434daeac66f764642d52d upstream.
During a warm reset via kexec, the system bypasses the driver removal sequence, meaning that the remove() callback is not invoked. If a QAT device is not shutdown properly, the device driver will fail to load in a newly rebooted kernel.
This might result in output like the following after the kexec reboot:
4xxx 0000:01:00.0: Failed to power up the device
4xxx 0000:01:00.0: Failed to initialize device
4xxx 0000:01:00.0: Resetting device qat_dev0
4xxx 0000:01:00.0: probe with driver 4xxx failed with error -14Implement the shutdown() handler that hooks into the reboot notifier list. This brings down the QAT device and ensures it is shut down properly.
--- drivers/crypto/intel/qat/qat_4xxx/adf_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/crypto/intel/qat/qat_4xxx/adf_drv.c +8 -0
@@ -188,11 +188,19 @@ static void adf_remove(struct pci_dev *padf_cleanup_accel (accel_dev); } +static void adf_shutdown (struct pci_dev *pdev) +{ +struct adf_accel_dev *accel_dev =adf_devmgr_pci_to_accel_dev (pdev); + +adf_dev_down (accel_dev); +} +static struct pci_driver adf_driver = { .id_table = adf_pci_tbl, .name =ADF_4XXX_DEVICE_NAME , .probe = adf_probe, .remove = adf_remove, + .shutdown = adf_shutdown, .sriov_configure = adf_sriov_configure, .err_handler = &adf_err_handler, };
Greg Kroah-Hartman
maintainerPATCH 10/592 crypto: qat - add shutdown handler to qat_c62x
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Giovanni Cabiddu <[email protected]>
commit a9a6e9279b2998e2610c70b0dfc80a234f97c76c upstream.
During a warm reset via kexec, the system bypasses the driver removal sequence, meaning that the remove() callback is not invoked. If a QAT device is not shutdown properly, the device driver will fail to load in a newly rebooted kernel.
This might result in output like the following after the kexec reboot:
QAT: AE0 is inactive!!
QAT: failed to get device out of reset
c6xx 0000:3f:00.0: qat_hal_clr_reset error
c6xx 0000:3f:00.0: Failed to init the AEs
c6xx 0000:3f:00.0: Failed to initialise Acceleration Engine
c6xx 0000:3f:00.0: Resetting device qat_dev0
c6xx 0000:3f:00.0: probe with driver c6xx failed with error -14Implement the shutdown() handler that hooks into the reboot notifier list. This brings down the QAT device and ensures it is shut down properly.
--- drivers/crypto/intel/qat/qat_c62x/adf_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/crypto/intel/qat/qat_c62x/adf_drv.c +8 -0
@@ -19,6 +19,13 @@#include <adf_dbgfs.h> #include "adf_c62x_hw_data.h" +static void adf_shutdown (struct pci_dev *pdev) +{ +struct adf_accel_dev *accel_dev =adf_devmgr_pci_to_accel_dev (pdev); + +adf_dev_down (accel_dev); +} +static const struct pci_device_id adf_pci_tbl[] = { {PCI_VDEVICE (INTEL ,PCI_DEVICE_ID_INTEL_QAT_C62X ), }, { }
@@ -33,6 +40,7 @@ static struct pci_driver adf_driver = { .name = ADF_C62X_DEVICE_NAME, .probe = adf_probe, .remove = adf_remove, + .shutdown = adf_shutdown, .sriov_configure = adf_sriov_configure, .err_handler = &adf_err_handler, };
Greg Kroah-Hartman
maintainerPATCH 11/592 crypto: qat - add shutdown handler to qat_dh895xcc
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Giovanni Cabiddu <[email protected]>
commit 2c4e8b228733bfbcaf49408fdf94d220f6eb78fc upstream.
During a warm reset via kexec, the system bypasses the driver removal sequence, meaning that the remove() callback is not invoked. If a QAT device is not shutdown properly, the device driver will fail to load in a newly rebooted kernel.
This might result in output like the following after the kexec reboot:
QAT: AE0 is inactive!!
QAT: failed to get device out of reset
dh895xcc 0000:3f:00.0: qat_hal_clr_reset error
dh895xcc 0000:3f:00.0: Failed to init the AEs
dh895xcc 0000:3f:00.0: Failed to initialise Acceleration Engine
dh895xcc 0000:3f:00.0: Resetting device qat_dev0
dh895xcc 0000:3f:00.0: probe with driver dh895xcc failed with error -14Implement the shutdown() handler that hooks into the reboot notifier list. This brings down the QAT device and ensures it is shut down properly.
--- drivers/crypto/intel/qat/qat_dh895xcc/adf_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/crypto/intel/qat/qat_dh895xcc/adf_drv.c +8 -0
@@ -19,6 +19,13 @@#include <adf_dbgfs.h> #include "adf_dh895xcc_hw_data.h" +static void adf_shutdown (struct pci_dev *pdev) +{ +struct adf_accel_dev *accel_dev =adf_devmgr_pci_to_accel_dev (pdev); + +adf_dev_down (accel_dev); +} +static const struct pci_device_id adf_pci_tbl[] = { {PCI_VDEVICE (INTEL ,PCI_DEVICE_ID_INTEL_QAT_DH895XCC ), }, { }
@@ -33,6 +40,7 @@ static struct pci_driver adf_driver = { .name = ADF_DH895XCC_DEVICE_NAME, .probe = adf_probe, .remove = adf_remove, + .shutdown = adf_shutdown, .sriov_configure = adf_sriov_configure, .err_handler = &adf_err_handler, };
Greg Kroah-Hartman
maintainerPATCH 12/592 ASoC: qcom: sdm845: Add error handling in sdm845_slim_snd_hw_params()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wentao Liang <[email protected]>
commit 688abe2860fd9c644705b9e11cb9649eb891b879 upstream.
The function sdm845_slim_snd_hw_params() calls the functuion snd_soc_dai_set_channel_map() but does not check its return value. A proper implementation can be found in msm_snd_hw_params().
Add error handling for snd_soc_dai_set_channel_map(). If the function fails and it is not a unsupported error, return the error code immediately.
--- sound/soc/qcom/sdm845.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/soc/qcom/sdm845.c +4 -0
@@ -91,6 +91,10 @@ static int sdm845_slim_snd_hw_params(strelse ret =snd_soc_dai_set_channel_map (cpu_dai, tx_ch_cnt, tx_ch,0 ,NULL ); +if (ret !=0 && ret != -ENOTSUPP ) { +dev_err (rtd->dev,"failed to set cpu chan map, err:%d\n" , ret); +return ret; + } }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 3/592 crypto: marvell/cesa - Do not chain submitted requests
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <[email protected]>
commit 0413bcf0fc460a68a2a7a8354aee833293d7d693 upstream.
This driver tries to chain requests together before submitting them to hardware in order to reduce completion interrupts.
However, it even extends chains that have already been submitted to hardware. This is dangerous because there is no way of knowing whether the hardware has already read the DMA memory in question or not.
Fix this by splitting the chain list into two. One for submitted requests and one for requests that have not yet been submitted. Only extend the latter.
--- drivers/crypto/marvell/cesa/cesa.c | 2 - drivers/crypto/marvell/cesa/cesa.h | 9 ++++-- drivers/crypto/marvell/cesa/tdma.c | 53 ++++++++++++++++++++++--------------- 3 files changed, 39 insertions(+), 25 deletions(-)
drivers/crypto/marvell/cesa/cesa.c +1 -1
@@ -94,7 +94,7 @@ static int mv_cesa_std_process(struct mvstatic int mv_cesa_int_process (struct mv_cesa_engine *engine,u32 status) { -if (engine->chain.first && engine->chain.last) +if (engine->chain_hw.first && engine->chain_hw.last)return mv_cesa_tdma_process (engine, status);return mv_cesa_std_process (engine, status);
drivers/crypto/marvell/cesa/cesa.h +6 -3
@@ -440,8 +440,10 @@ struct mv_cesa_dev {* SRAM * @queue: fifo of the pending crypto requests * @load: engine load counter, useful for load balancing -* @chain: list of the current tdma descriptors being processed -* by this engine. +* @chain_hw: list of the current tdma descriptors being processed +* by the hardware. +* @chain_sw: list of the current tdma descriptors that will be +* submitted to the hardware. * @complete_queue: fifo of the processed requests by the engine * * Structure storing CESA engine information.
@@ -463,7 +465,8 @@ struct mv_cesa_engine {struct gen_pool *pool;struct crypto_queue queue;atomic_t load; -struct mv_cesa_tdma_chain chain; +struct mv_cesa_tdma_chain chain_hw; +struct mv_cesa_tdma_chain chain_sw;struct list_head complete_queue;int irq; };
drivers/crypto/marvell/cesa/tdma.c +32 -21
82 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 25/592 s390/pci: Allow re-add of a reserved but not yet removed device
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niklas Schnelle <[email protected]>
commit 4b1815a52d7eb03b3e0e6742c6728bc16a4b2d1d upstream.
The architecture assumes that PCI functions can be removed synchronously as PCI events are processed. This however clashes with the reference counting of struct pci_dev which allows device drivers to hold on to a struct pci_dev reference even as the underlying device is removed. To bridge this gap commit 2a671f77ee49 ("s390/pci: fix use after free of zpci_dev") keeps the struct zpci_dev in ZPCI_FN_STATE_RESERVED state until common code releases the struct pci_dev. Only when all references are dropped, the struct zpci_dev can be removed and freed.
Later commit a46044a92add ("s390/pci: fix zpci_zdev_put() on reserve") moved the deletion of the struct zpci_dev from the zpci_list in zpci_release_device() to the point where the device is reserved. This was done to prevent handling events for a device that is already being removed, e.g. when the platform generates both PCI event codes 0x304 and 0x308. In retrospect, deletion from the zpci_list in the release function without holding the zpci_list_lock was also racy.
A side effect of this handling is that if the underlying device re-appears while the struct zpci_dev is in the ZPCI_FN_STATE_RESERVED state, the new and old instances of the struct zpci_dev and/or struct pci_dev may clash. For example when trying to create the IOMMU sysfs files for the new instance. In this case, re-adding the new instance is aborted. The old instance is removed, and the device will remain absent until the platform issues another event.
Fix this by allowing the struct zpci_dev to be brought back up right until it is finally removed. To this end also keep the struct zpci_dev in the zpci_list until it is finally released when all references have been dropped.
Deletion from the zpci_list from within the release function is made safe by using kref_put_lock() with the zpci_list_lock. This ensures that the releasing code holds the last reference.
--- arch/s390/pci/pci.c | 32 ++++++++++++++++++++++---------- arch/s390/pci/pci_bus.h | 7 ++----- arch/s390/pci/pci_event.c | 22 +++++++++++++++++++++- 3 files changed, 45 insertions(+), 16 deletions(-)
arch/s390/pci/pci.c +22 -10
@@ -70,6 +70,13 @@ EXPORT_SYMBOL_GPL(zpci_aipb);struct airq_iv *zpci_aif_sbv;EXPORT_SYMBOL_GPL (zpci_aif_sbv); +void zpci_zdev_put (struct zpci_dev *zdev) +{ +if (!zdev) +return ; +kref_put_lock (&zdev->kref, zpci_release_device, &zpci_list_lock); +} +struct zpci_dev *get_zdev_by_fid (u32 fid) {struct zpci_dev *tmp, *zdev =NULL ;
@@ -925,21 +932,20 @@ int zpci_deconfigure_device(struct zpci_* @zdev: the zpci_dev that was reserved * * Handle the case that a given zPCI function was reserved by another system. -* After a call to this function the zpci_dev can not be found via -* get_zdev_by_fid() anymore but may still be accessible via existing -* references though it will not be functional anymore. */ void zpci_device_reserved (struct zpci_dev *zdev) { -/* -* Remove device from zpci_list as it is going away. This also -* makes sure we ignore subsequent zPCI events for this device. -*/ -spin_lock (&zpci_list_lock); -list_del (&zdev->entry); -spin_unlock (&zpci_list_lock); +lockdep_assert_held (&zdev->state_lock); +/* We may declare the device reserved multiple times */ +if (zdev->state ==ZPCI_FN_STATE_RESERVED ) +return ; zdev->state =ZPCI_FN_STATE_RESERVED ;zpci_dbg (3 ,"rsv fid:%x\n" , zdev->fid); +/* +* The underlying device is gone. Allow the zdev to be freed +* as soon as all other references are gone by accounting for +* the removal as a dropped reference. +*/ zpci_zdev_put (zdev); }
@@ -948,6 +954,12 @@ void zpci_release_device(struct kref *kr struct zpci_dev *zdev = container_of(kref, struct zpci_dev, kref);WARN_ON (zdev->state !=ZPCI_FN_STATE_RESERVED ); +/* +* We already hold zpci_list_lock thanks to kref_put_lock(). +* This makes sure no new reference can be taken from the list. +*/ +list_del (&zdev->entry); +spin_unlock (&zpci_list_lock);if (zdev->has_hp_slot)zpci_exit_slot (zdev);
arch/s390/pci/pci_bus.h +2 -5
@@ -21,11 +21,8 @@ int zpci_bus_scan_device(struct zpci_devvoid zpci_bus_remove_device (struct zpci_dev *zdev,bool set_error);void zpci_release_device (struct kref *kref); -static inline void zpci_zdev_put (struct zpci_dev *zdev) -{ -if (zdev) -kref_put (&zdev->kref, zpci_release_device); -} + +void zpci_zdev_put (struct zpci_dev *zdev);static inline void zpci_zdev_get (struct zpci_dev *zdev) {
arch/s390/pci/pci_event.c +21 -1
@@ -335,6 +335,22 @@ static void zpci_event_hard_deconfigured zdev->state =ZPCI_FN_STATE_STANDBY ; } +static void zpci_event_reappear (struct zpci_dev *zdev) +{ +lockdep_assert_held (&zdev->state_lock); +/* +* The zdev is in the reserved state. This means that it was presumed to +* go away but there are still undropped references. Now, the platform +* announced its availability again. Bring back the lingering zdev +* to standby. This is safe because we hold a temporary reference +* now so that it won't go away. Account for the re-appearance of the +* underlying device by incrementing the reference count. +*/ + zdev->state =ZPCI_FN_STATE_STANDBY ; +zpci_zdev_get (zdev); +zpci_dbg (1 ,"rea fid:%x, fh:%x\n" , zdev->fid, zdev->fh); +} +static void __zpci_event_availability (struct zpci_ccdf_avail *ccdf) {struct zpci_dev *zdev =get_zdev_by_fid (ccdf->fid);
@@ -358,8 +374,10 @@ static void __zpci_event_availability(stbreak ; } }else { +if (zdev->state ==ZPCI_FN_STATE_RESERVED ) +zpci_event_reappear (zdev);/* the configuration request may be stale */ -if (zdev->state !=ZPCI_FN_STATE_STANDBY ) +else if (zdev->state !=ZPCI_FN_STATE_STANDBY )break ; zdev->state =ZPCI_FN_STATE_CONFIGURED ; }
@@ -375,6 +393,8 @@ static void __zpci_event_availability(stbreak ; } }else { +if (zdev->state ==ZPCI_FN_STATE_RESERVED ) +zpci_event_reappear (zdev);zpci_update_fh (zdev, ccdf->fh); }break ;
Greg Kroah-Hartman
maintainerPATCH 34/592 anon_inode: explicitly block ->setattr()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <[email protected]>
commit 22bdf3d6581af6d06ed8a46c6835648421cca0ea upstream.
It is currently possible to change the mode and owner of the single anonymous inode in the kernel:
int main(int argc, char *argv[])
{
int ret, sfd;
sigset_t mask;
struct signalfd_siginfo fdsi;
sigemptyset(&mask);
sigaddset(&mask, SIGINT);
sigaddset(&mask, SIGQUIT);
ret = sigprocmask(SIG_BLOCK, &mask, NULL);
if (ret < 0)
_exit(1);
sfd = signalfd(-1, &mask, 0);
if (sfd < 0)
_exit(2);
ret = fchown(sfd, 5555, 5555);
if (ret < 0)
_exit(3);
ret = fchmod(sfd, 0777);
if (ret < 0)
_exit(3);
_exit(4);
}This is a bug. It's not really a meaningful one because anonymous inodes don't really figure into path lookup and they cannot be reopened via /proc/<pid>/fd/<nr> and can't be used for lookup itself. So they can only ever serve as direct references.
But it is still completely bogus to allow the mode and ownership or any of the properties of the anonymous inode to be changed. Block this!
--- fs/anon_inodes.c | 7 +++++++ fs/internal.h | 2 ++ 2 files changed, 9 insertions(+)
fs/anon_inodes.c +7 -0
@@ -57,8 +57,15 @@ int anon_inode_getattr(struct mnt_idmapreturn 0 ; } +int anon_inode_setattr (struct mnt_idmap *idmap,struct dentry *dentry, +struct iattr *attr) +{ +return -EOPNOTSUPP ; +} +static const struct inode_operations anon_inode_operations = { .getattr = anon_inode_getattr, + .setattr = anon_inode_setattr, };/*
fs/internal.h +2 -0
@@ -346,3 +346,5 @@ int statmount_mnt_idmap(struct mnt_idmapint anon_inode_getattr (struct mnt_idmap *idmap,const struct path *path,struct kstat *stat,u32 request_mask,unsigned int query_flags); +int anon_inode_setattr (struct mnt_idmap *idmap,struct dentry *dentry, +struct iattr *attr);
Greg Kroah-Hartman
maintainerPATCH 35/592 anon_inode: raise SB_I_NODEV and SB_I_NOEXEC
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <[email protected]>
commit 1ed95281c0c77dbb1540f9855cd3c5f19900f7a5 upstream.
It isn't possible to execute anonymous inodes because they cannot be opened in any way after they have been created. This includes execution:
execveat(fd_anon_inode, "", NULL, NULL, AT_EMPTY_PATH)
Anonymous inodes have inode->f_op set to no_open_fops which sets no_open() which returns ENXIO. That means any call to do_dentry_open() which is the endpoint of the do_open_execat() will fail. There's no chance to execute an anonymous inode. Unless a given subsystem overrides it ofc.
However, we should still harden this and raise SB_I_NODEV and SB_I_NOEXEC on the superblock itself so that no one gets any creative ideas.
--- fs/anon_inodes.c | 2 ++ 1 file changed, 2 insertions(+)
fs/anon_inodes.c +2 -0
@@ -86,6 +86,8 @@ static int anon_inodefs_init_fs_context(struct pseudo_fs_context *ctx =init_pseudo (fc,ANON_INODE_FS_MAGIC );if (!ctx)return -ENOMEM ; + fc->s_iflags |=SB_I_NOEXEC ; + fc->s_iflags |=SB_I_NODEV ; ctx->dops = &anon_inodefs_dentry_operations;return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 36/592 wifi: ath11k: fix rx completion meta data corruption
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit ab52e3e44fe9b666281752e2481d11e25b0e3fdd upstream.
Add the missing memory barrier to make sure that the REO dest ring descriptor is read after the head pointer to avoid using stale data on weakly ordered architectures like aarch64.
This may fix the ring-buffer corruption worked around by commit f9fff67d2d7c ("wifi: ath11k: Fix SKB corruption in REO destination ring") by silently discarding data, and may possibly also address user reported errors like:
ath11k_pci 0006:01:00.0: msdu_done bit in attention is not set
Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
--- drivers/net/wireless/ath/ath11k/dp_rx.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
drivers/net/wireless/ath/ath11k/dp_rx.c +16 -9
@@ -2637,7 +2637,7 @@ int ath11k_dp_process_rx(struct ath11k_bstruct ath11k *ar;struct hal_reo_dest_ring *desc;enum hal_reo_dest_ring_push_reason push_reason; -u32 cookie; +u32 cookie, info0, rx_msdu_info0, rx_mpdu_info0;int i;for (i =0 ; i <MAX_RADIOS ; i++)
@@ -2650,11 +2650,14 @@ int ath11k_dp_process_rx(struct ath11k_b try_again:ath11k_hal_srng_access_begin (ab, srng); +/* Make sure descriptor is read after the head pointer. */ +dma_rmb (); +while (likely (desc = (struct hal_reo_dest_ring *)ath11k_hal_srng_dst_get_next_entry (ab, srng))) { cookie =FIELD_GET (BUFFER_ADDR_INFO1_SW_COOKIE , - desc->buf_addr_info.info1); +READ_ONCE (desc->buf_addr_info.info1)); buf_id =FIELD_GET (DP_RXDMA_BUF_COOKIE_BUF_ID , cookie); mac_id =FIELD_GET (DP_RXDMA_BUF_COOKIE_PDEV_ID , cookie);
@@ -2683,8 +2686,9 @@ try_again: num_buffs_reaped[mac_id]++; + info0 =READ_ONCE (desc->info0); push_reason =FIELD_GET (HAL_REO_DEST_RING_INFO0_PUSH_REASON , - desc->info0); + info0);if (unlikely (push_reason !=HAL_REO_DEST_RING_PUSH_REASON_ROUTING_INSTRUCTION )) {dev_kfree_skb_any (msdu);
@@ -2692,18 +2696,21 @@ try_again:continue ; } - rxcb->is_first_msdu = !!(desc->rx_msdu_info.info0 & + rx_msdu_info0 =READ_ONCE (desc->rx_msdu_info.info0); + rx_mpdu_info0 =READ_ONCE (desc->rx_mpdu_info.info0); + + rxcb->is_first_msdu = !!(rx_msdu_info0 &RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU ); - rxcb->is_last_msdu = !!(desc->rx_msdu_info.info0 & + rxcb->is_last_msdu = !!(rx_msdu_info0 &RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU ); - rxcb->is_continuation = !!(desc->rx_msdu_info.info0 & + rxcb->is_continuation = !!(rx_msdu_info0 &RX_MSDU_DESC_INFO0_MSDU_CONTINUATION ); rxcb->peer_id =FIELD_GET (RX_MPDU_DESC_META_DATA_PEER_ID , - desc->rx_mpdu_info.meta_data); +READ_ONCE (desc->rx_mpdu_info.meta_data)); rxcb->seq_no =FIELD_GET (RX_MPDU_DESC_INFO0_SEQ_NUM , - desc->rx_mpdu_info.info0); + rx_mpdu_info0); rxcb->tid =FIELD_GET (HAL_REO_DEST_RING_INFO0_RX_QUEUE_NUM , - desc->info0); + info0); rxcb->mac_id = mac_id;__skb_queue_tail (&msdu_list[mac_id], msdu);
Greg Kroah-Hartman
maintainerPATCH 37/592 wifi: rtw88: usb: Upload the firmware in bigger chunks
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bitterblue Smith <[email protected]>
commit 80fe0bc1659c0ccc79d082e426fa376be5df9c04 upstream.
RTL8811AU stops responding during the firmware download on some systems:
[ 809.256440] rtw_8821au 5-2.1:1.0: Firmware version 42.4.0, H2C version 0 [ 812.759142] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: renamed from wlan0 [ 837.315388] rtw_8821au 1-4:1.0: write register 0x1ef4 failed with -110 [ 867.524259] rtw_8821au 1-4:1.0: write register 0x1ef8 failed with -110 [ 868.930976] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: entered promiscuous mode [ 897.730952] rtw_8821au 1-4:1.0: write register 0x1efc failed with -110
Maybe it takes too long when writing the firmware 4 bytes at a time.
Write 196 bytes at a time for RTL8821AU, RTL8811AU, and RTL8812AU, and 254 bytes at a time for RTL8723DU. These are the sizes used in their official drivers. Tested with all these chips.
--- drivers/net/wireless/realtek/rtw88/hci.h | 8 ++++ drivers/net/wireless/realtek/rtw88/mac.c | 11 +++--- drivers/net/wireless/realtek/rtw88/mac.h | 2 + drivers/net/wireless/realtek/rtw88/pci.c | 2 + drivers/net/wireless/realtek/rtw88/sdio.c | 2 + drivers/net/wireless/realtek/rtw88/usb.c | 55 ++++++++++++++++++++++++++++++ 6 files changed, 76 insertions(+), 4 deletions(-)
drivers/net/wireless/realtek/rtw88/hci.h +8 -0
@@ -19,6 +19,8 @@ struct rtw_hci_ops {void (*link_ps)(struct rtw_dev *rtwdev,bool enter);void (*interface_cfg)(struct rtw_dev *rtwdev);void (*dynamic_rx_agg)(struct rtw_dev *rtwdev,bool enable); +void (*write_firmware_page)(struct rtw_dev *rtwdev,u32 page, +const u8 *data,u32 size);int (*write_data_rsvd_page)(struct rtw_dev *rtwdev,u8 *buf,u32 size);int (*write_data_h2c)(struct rtw_dev *rtwdev,u8 *buf,u32 size);
@@ -79,6 +81,12 @@ static inline void rtw_hci_dynamic_rx_ag rtwdev->hci.ops->dynamic_rx_agg (rtwdev, enable); } +static inline void rtw_hci_write_firmware_page (struct rtw_dev *rtwdev,u32 page, +const u8 *data,u32 size) +{ + rtwdev->hci.ops->write_firmware_page (rtwdev, page, data, size); +} +static inline int rtw_hci_write_data_rsvd_page (struct rtw_dev *rtwdev,u8 *buf,u32 size) {
drivers/net/wireless/realtek/rtw88/mac.c +7 -4
@@ -856,8 +856,8 @@ fwdl_ready: } } -static void -write_firmware_page (struct rtw_dev *rtwdev,u32 page,const u8 *data,u32 size) +void rtw_write_firmware_page (struct rtw_dev *rtwdev,u32 page, +const u8 *data,u32 size) {u32 val32;u32 block_nr;
@@ -887,6 +887,7 @@ write_firmware_page(struct rtw_dev *rtwdrtw_write32 (rtwdev, write_addr,le32_to_cpu (remain_data)); } } +EXPORT_SYMBOL (rtw_write_firmware_page);static int download_firmware_legacy (struct rtw_dev *rtwdev,const u8 *data,u32 size)
@@ -904,11 +905,13 @@ download_firmware_legacy(struct rtw_devrtw_write8_set (rtwdev,REG_MCUFW_CTRL ,BIT_FWDL_CHK_RPT );for (page =0 ; page < total_page; page++) { -write_firmware_page (rtwdev, page, data,DLFW_PAGE_SIZE_LEGACY ); +rtw_hci_write_firmware_page (rtwdev, page, data, +DLFW_PAGE_SIZE_LEGACY ); data +=DLFW_PAGE_SIZE_LEGACY ; }if (last_page_size) -write_firmware_page (rtwdev, page, data, last_page_size); +rtw_hci_write_firmware_page (rtwdev, page, data, + last_page_size);if (!check_hw_ready (rtwdev,REG_MCUFW_CTRL ,BIT_FWDL_CHK_RPT ,1 )) {rtw_err (rtwdev,"failed to check download firmware report\n" );
drivers/net/wireless/realtek/rtw88/mac.h +2 -0
@@ -34,6 +34,8 @@ int rtw_pwr_seq_parser(struct rtw_dev *r const struct rtw_pwr_seq_cmd * const *cmd_seq);int rtw_mac_power_on (struct rtw_dev *rtwdev);void rtw_mac_power_off (struct rtw_dev *rtwdev); +void rtw_write_firmware_page (struct rtw_dev *rtwdev,u32 page, +const u8 *data,u32 size);int rtw_download_firmware (struct rtw_dev *rtwdev,struct rtw_fw_state *fw);int rtw_mac_init (struct rtw_dev *rtwdev);void rtw_mac_flush_queues (struct rtw_dev *rtwdev,u32 queues,bool drop);
drivers/net/wireless/realtek/rtw88/pci.c +2 -0
@@ -12,6 +12,7 @@#include "fw.h" #include "ps.h" #include "debug.h" +#include "mac.h" static bool rtw_disable_msi;static bool rtw_pci_disable_aspm;
@@ -1602,6 +1603,7 @@ static const struct rtw_hci_ops rtw_pci_ .link_ps = rtw_pci_link_ps, .interface_cfg = rtw_pci_interface_cfg, .dynamic_rx_agg = NULL, + .write_firmware_page = rtw_write_firmware_page, .read8 = rtw_pci_read8, .read16 = rtw_pci_read16,
drivers/net/wireless/realtek/rtw88/sdio.c +2 -0
@@ -10,6 +10,7 @@#include <linux/mmc/host.h> #include <linux/mmc/sdio_func.h> #include "main.h" +#include "mac.h" #include "debug.h" #include "fw.h" #include "ps.h"
@@ -1154,6 +1155,7 @@ static const struct rtw_hci_ops rtw_sdio .link_ps = rtw_sdio_link_ps, .interface_cfg = rtw_sdio_interface_cfg, .dynamic_rx_agg = NULL, + .write_firmware_page = rtw_write_firmware_page, .read8 = rtw_sdio_read8, .read16 = rtw_sdio_read16,
drivers/net/wireless/realtek/rtw88/usb.c +55 -0
67 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 38/592 wifi: ath11k: fix ring-buffer corruption
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 6d037a372f817e9fcb56482f37917545596bd776 upstream.
Users of the Lenovo ThinkPad X13s have reported that Wi-Fi sometimes breaks and the log fills up with errors like:
ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1484, expected 1492
ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1460, expected 1484which based on a quick look at the driver seemed to indicate some kind of ring-buffer corruption.
Miaoqing Pan tracked it down to the host seeing the updated destination ring head pointer before the updated descriptor, and the error handling for that in turn leaves the ring buffer in an inconsistent state.
Add the missing memory barrier to make sure that the descriptor is read after the head pointer to address the root cause of the corruption while fixing up the error handling in case there are ever any (ordering) bugs on the device side.
Note that the READ_ONCE() are only needed to avoid compiler mischief in case the ring-buffer helpers are ever inlined.
Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
--- drivers/net/wireless/ath/ath11k/ce.c | 11 +++++------ drivers/net/wireless/ath/ath11k/hal.c | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath11k/ce.c +5 -6
@@ -393,11 +393,10 @@ static int ath11k_ce_completed_recv_next goto err; } +/* Make sure descriptor is read after the head pointer. */ +dma_rmb (); + *nbytes =ath11k_hal_ce_dst_status_get_length (desc); -if (*nbytes ==0 ) { - ret = -EIO ; - goto err; - } *skb = pipe->dest_ring->skb[sw_index]; pipe->dest_ring->skb[sw_index] =NULL ;
@@ -430,8 +429,8 @@ static void ath11k_ce_recv_process_cb(stdma_unmap_single (ab->dev,ATH11K_SKB_RXCB (skb)->paddr, max_nbytes,DMA_FROM_DEVICE ); -if (unlikely (max_nbytes < nbytes)) { -ath11k_warn (ab,"rxed more than expected (nbytes %d, max %d)" , +if (unlikely (max_nbytes < nbytes || nbytes ==0 )) { +ath11k_warn (ab,"unexpected rx length (nbytes %d, max %d)" , nbytes, max_nbytes);dev_kfree_skb_any (skb);continue ;
drivers/net/wireless/ath/ath11k/hal.c +2 -2
@@ -599,7 +599,7 @@ u32 ath11k_hal_ce_dst_status_get_length(struct hal_ce_srng_dst_status_desc *desc = buf;u32 len; - len =FIELD_GET (HAL_CE_DST_STATUS_DESC_FLAGS_LEN , desc->flags); + len =FIELD_GET (HAL_CE_DST_STATUS_DESC_FLAGS_LEN ,READ_ONCE (desc->flags)); desc->flags &= ~HAL_CE_DST_STATUS_DESC_FLAGS_LEN ;return len;
@@ -829,7 +829,7 @@ void ath11k_hal_srng_access_begin(struct srng->u.src_ring.cached_tp = *(volatile u32 *)srng->u.src_ring.tp_addr; }else { - srng->u.dst_ring.cached_hp = *srng->u.dst_ring.hp_addr; + srng->u.dst_ring.cached_hp =READ_ONCE (*srng->u.dst_ring.hp_addr);/* Try to prefetch the next descriptor in the ring */ if (srng->flags &HAL_SRNG_FLAGS_CACHED )
Greg Kroah-Hartman
maintainerPATCH 39/592 NFSD: unregister filesystem in case genl_register_family() fails
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maninder Singh <[email protected]>
commit ff12eb379554eea7932ad6caea55e3091701cce4 upstream.
With rpc_status netlink support, unregister of register_filesystem() was missed in case of genl_register_family() fails.
Correcting it by making new label.
--- fs/nfsd/nfsctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/nfsd/nfsctl.c +3 -1
@@ -2305,7 +2305,7 @@ static int __init init_nfsd(void) goto out_free_cld; retval =register_filesystem (&nfsd_fs_type);if (retval) - goto out_free_all; + goto out_free_nfsd4; retval =genl_register_family (&nfsd_nl_family);if (retval) goto out_free_all;
@@ -2313,6 +2313,8 @@ static int __init init_nfsd(void)return 0 ; out_free_all: +unregister_filesystem (&nfsd_fs_type); +out_free_nfsd4:nfsd4_destroy_laundry_wq (); out_free_cld:unregister_cld_notifier ();
Greg Kroah-Hartman
maintainerPATCH 40/592 NFSD: fix race between nfsd registration and exports_proc
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maninder Singh <[email protected]>
commit f7fb730cac9aafda8b9813b55d04e28a9664d17c upstream.
As of now nfsd calls create_proc_exports_entry() at start of init_nfsd and cleanup by remove_proc_entry() at last of exit_nfsd.
Which causes kernel OOPs if there is race between below 2 operations:
(i) exportfs -r
(ii) mount -t nfsd none /proc/fs/nfsd
for 5.4 kernel ARM64:
CPU 1:
el1_irq+0xbc/0x180 arch_counter_get_cntvct+0x14/0x18 running_clock+0xc/0x18 preempt_count_add+0x88/0x110 prep_new_page+0xb0/0x220 get_page_from_freelist+0x2d8/0x1778 __alloc_pages_nodemask+0x15c/0xef0 __vmalloc_node_range+0x28c/0x478 __vmalloc_node_flags_caller+0x8c/0xb0 kvmalloc_node+0x88/0xe0 nfsd_init_net+0x6c/0x108 [nfsd] ops_init+0x44/0x170 register_pernet_operations+0x114/0x270 register_pernet_subsys+0x34/0x50 init_nfsd+0xa8/0x718 [nfsd] do_one_initcall+0x54/0x2e0
CPU 2 :
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
PC is at : exports_net_open+0x50/0x68 [nfsd]
Call trace: exports_net_open+0x50/0x68 [nfsd] exports_proc_open+0x2c/0x38 [nfsd] proc_reg_open+0xb8/0x198 do_dentry_open+0x1c4/0x418 vfs_open+0x38/0x48 path_openat+0x28c/0xf18 do_filp_open+0x70/0xe8 do_sys_open+0x154/0x248
Sometimes it crashes at exports_net_open() and sometimes cache_seq_next_rcu().
and same is happening on latest 6.14 kernel as well:
[ 0.000000] Linux version 6.14.0-rc5-next-20250304-dirty ... [ 285.455918] Unable to handle kernel paging request at virtual address 00001f4800001f48 ... [ 285.464902] pc : cache_seq_next_rcu+0x78/0xa4 ... [ 285.469695] Call trace: [ 285.470083] cache_seq_next_rcu+0x78/0xa4 (P) [ 285.470488] seq_read+0xe0/0x11c [ 285.470675] proc_reg_read+0x9c/0xf0 [ 285.470874] vfs_read+0xc4/0x2fc [ 285.471057] ksys_read+0x6c/0xf4 [ 285.471231] __arm64_sys_read+0x1c/0x28 [ 285.471428] invoke_syscall+0x44/0x100 [ 285.471633] el0_svc_common.constprop.0+0x40/0xe0 [ 285.471870] do_el0_svc_compat+0x1c/0x34 [ 285.472073] el0_svc_compat+0x2c/0x80 [ 285.472265] el0t_32_sync_handler+0x90/0x140 [ 285.472473] el0t_32_sync+0x19c/0x1a0 [ 285.472887] Code: f9400885 93407c23 937d7c27 11000421 (f86378a3) [ 285.473422] ---[ end trace 0000000000000000 ]---
It reproduced simply with below script:
while [ 1 ]
do
/exportfs -r
done &
while [ 1 ]
do
insmod /nfsd.ko
mount -t nfsd none /proc/fs/nfsd
umount /proc/fs/nfsd
rmmod nfsd
done &
So exporting interfaces to user space shall be done at last and cleanup at first place.
With change there is no Kernel OOPs.
--- fs/nfsd/nfsctl.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
fs/nfsd/nfsctl.c +8 -9
@@ -2291,12 +2291,9 @@ static int __init init_nfsd(void)if (retval) goto out_free_pnfs;nfsd_lockd_init ();/* lockd->nfsd callbacks */ - retval =create_proc_exports_entry (); -if (retval) - goto out_free_lockd; retval =register_pernet_subsys (&nfsd_net_ops);if (retval <0 ) - goto out_free_exports; + goto out_free_lockd; retval =register_cld_notifier ();if (retval) goto out_free_subsys;
@@ -2308,11 +2305,16 @@ static int __init init_nfsd(void) goto out_free_nfsd4; retval =genl_register_family (&nfsd_nl_family);if (retval) + goto out_free_filesystem; + retval =create_proc_exports_entry (); +if (retval) goto out_free_all;nfsd_localio_ops_init ();return 0 ; out_free_all: +genl_unregister_family (&nfsd_nl_family); +out_free_filesystem:unregister_filesystem (&nfsd_fs_type); out_free_nfsd4:nfsd4_destroy_laundry_wq ();
@@ -2320,9 +2322,6 @@ out_free_cld:unregister_cld_notifier (); out_free_subsys:unregister_pernet_subsys (&nfsd_net_ops); -out_free_exports: -remove_proc_entry ("fs/nfs/exports" ,NULL ); -remove_proc_entry ("fs/nfs" ,NULL ); out_free_lockd:nfsd_lockd_shutdown ();nfsd_drc_slab_free ();
@@ -2335,14 +2334,14 @@ out_free_slabs: static void __exit exit_nfsd(void) { +remove_proc_entry ("fs/nfs/exports" ,NULL ); +remove_proc_entry ("fs/nfs" ,NULL );genl_unregister_family (&nfsd_nl_family);unregister_filesystem (&nfsd_fs_type);nfsd4_destroy_laundry_wq ();unregister_cld_notifier ();unregister_pernet_subsys (&nfsd_net_ops);nfsd_drc_slab_free (); -remove_proc_entry ("fs/nfs/exports" ,NULL ); -remove_proc_entry ("fs/nfs" ,NULL );nfsd_lockd_shutdown ();nfsd4_free_slabs ();nfsd4_exit_pnfs ();
Greg Kroah-Hartman
maintainerPATCH 41/592 NFSD: Implement FATTR4_CLONE_BLKSIZE attribute
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit d6ca7d2643eebe09cf46840bdc7d68b6e07aba77 upstream.
RFC 7862 states that if an NFS server implements a CLONE operation, it MUST also implement FATTR4_CLONE_BLKSIZE. NFSD implements CLONE, but does not implement FATTR4_CLONE_BLKSIZE.
Note that in Section 12.2, RFC 7862 claims that FATTR4_CLONE_BLKSIZE is RECOMMENDED, not REQUIRED. Likely this is because a minor version is not permitted to add a REQUIRED attribute. Confusing.
We assume this attribute reports a block size as a count of bytes, as RFC 7862 does not specify a unit.
--- fs/nfsd/nfs4xdr.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
fs/nfsd/nfs4xdr.c +18 -1
@@ -3391,6 +3391,23 @@ static __be32 nfsd4_encode_fattr4_suppatreturn nfsd4_encode_bitmap4 (xdr, supp[0 ], supp[1 ], supp[2 ]); } +/* +* Copied from generic_remap_checks/generic_remap_file_range_prep. +* +* These generic functions use the file system's s_blocksize, but +* individual file systems aren't required to use +* generic_remap_file_range_prep. Until there is a mechanism for +* determining a particular file system's (or file's) clone block +* size, this is the best NFSD can do. +*/ +static __be32 nfsd4_encode_fattr4_clone_blksize (struct xdr_stream *xdr, +const struct nfsd4_fattr_args *args) +{ +struct inode *inode =d_inode (args->dentry); + +return nfsd4_encode_uint32_t (xdr, inode->i_sb->s_blocksize); +} +#ifdef CONFIG_NFSD_V4_SECURITY_LABEL static __be32 nfsd4_encode_fattr4_sec_label (struct xdr_stream *xdr,const struct nfsd4_fattr_args *args)
@@ -3545,7 +3562,7 @@ static const nfsd4_enc_attr nfsd4_enc_fa [FATTR4_MODE_SET_MASKED] = nfsd4_encode_fattr4__noop, [FATTR4_SUPPATTR_EXCLCREAT] = nfsd4_encode_fattr4_suppattr_exclcreat, [FATTR4_FS_CHARSET_CAP] = nfsd4_encode_fattr4__noop, - [FATTR4_CLONE_BLKSIZE] = nfsd4_encode_fattr4__noop, + [FATTR4_CLONE_BLKSIZE] = nfsd4_encode_fattr4_clone_blksize, [FATTR4_SPACE_FREED] = nfsd4_encode_fattr4__noop, [FATTR4_CHANGE_ATTR_TYPE] = nfsd4_encode_fattr4__noop,
Greg Kroah-Hartman
maintainerPATCH 42/592 nfsd: fix access checking for NLM under XPRTSEC policies
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Olga Kornievskaia <[email protected]>
commit 0813c5f01249dbc32ccbc68d27a24fde5bf2901c upstream.
When an export policy with xprtsec policy is set with "tls" and/or "mtls", but an NFS client is doing a v3 xprtsec=tls mount, then NLM locking calls fail with an error because there is currently no support for NLM with TLS.
Until such support is added, allow NLM calls under TLS-secured policy.
--- fs/nfsd/export.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/nfsd/export.c +2 -1
@@ -1124,7 +1124,8 @@ __be32 check_nfsd_access(struct svc_expo test_bit(XPT_PEER_AUTH, &xprt->xpt_flags)) goto ok; } - goto denied; +if (!may_bypass_gss) + goto denied; ok:/* legacy gss-only clients are always OK: */
Greg Kroah-Hartman
maintainerPATCH 43/592 nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit 1244f0b2c3cecd3f349a877006e67c9492b41807 upstream.
If the request being processed is not a v4 compound request, then examining the cstate can have undefined results.
This patch adds a check that the rpc procedure being executed (rq_procinfo) is the NFSPROC4_COMPOUND procedure.
--- fs/nfsd/nfs4proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/nfsd/nfs4proc.c +2 -1
@@ -3766,7 +3766,8 @@ bool nfsd4_spo_must_allow(struct svc_rqsstruct nfs4_op_map *allow = &cstate->clp->cl_spo_must_allow;u32 opiter; -if (!cstate->minorversion) +if (rqstp->rq_procinfo != &nfsd_version4.vs_proc[NFSPROC4_COMPOUND ] || + cstate->minorversion ==0 )return false;if (cstate->spo_must_allowed)
Greg Kroah-Hartman
maintainerPATCH 26/592 s390/pci: Serialize device addition and removal
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niklas Schnelle <[email protected]>
commit 774a1fa880bc949d88b5ddec9494a13be733dfa8 upstream.
Prior changes ensured that when zpci_release_device() is called and it removed the zdev from the zpci_list this instance can not be found via the zpci_list anymore even while allowing re-add of reserved devices. This only accounts for the overall lifetime and zpci_list addition and removal, it does not yet prevent concurrent add of a new instance for the same underlying device. Such concurrent add would subsequently cause issues such as attempted re-use of the same IOMMU sysfs directory and is generally undesired.
Introduce a new zpci_add_remove_lock mutex to serialize adding a new device with removal. Together this ensures that if a struct zpci_dev is not found in the zpci_list it was either already removed and torn down, or its removal and tear down is in progress with the zpci_add_remove_lock held.
--- arch/s390/pci/pci.c | 7 +++++++ 1 file changed, 7 insertions(+)
arch/s390/pci/pci.c +7 -0
@@ -45,6 +45,7 @@/* list of all detected zpci devices */ static LIST_HEAD (zpci_list);static DEFINE_SPINLOCK (zpci_list_lock); +static DEFINE_MUTEX (zpci_add_remove_lock); static DECLARE_BITMAP(zpci_domain, ZPCI_DOMAIN_BITMAP_SIZE);static DEFINE_SPINLOCK (zpci_domain_lock);
@@ -74,7 +75,9 @@ void zpci_zdev_put(struct zpci_dev *zdev {if (!zdev)return ; +mutex_lock (&zpci_add_remove_lock);kref_put_lock (&zdev->kref, zpci_release_device, &zpci_list_lock); +mutex_unlock (&zpci_add_remove_lock); }struct zpci_dev *get_zdev_by_fid (u32 fid)
@@ -844,6 +847,7 @@ int zpci_add_device(struct zpci_dev *zde {int rc; +mutex_lock (&zpci_add_remove_lock);zpci_dbg (1 ,"add fid:%x, fh:%x, c:%d\n" , zdev->fid, zdev->fh, zdev->state); rc =zpci_init_iommu (zdev);if (rc)
@@ -857,12 +861,14 @@ int zpci_add_device(struct zpci_dev *zdespin_lock (&zpci_list_lock);list_add_tail (&zdev->entry, &zpci_list);spin_unlock (&zpci_list_lock); +mutex_unlock (&zpci_add_remove_lock);return 0 ; error_destroy_iommu:zpci_destroy_iommu (zdev); error:zpci_dbg (0 ,"add fid:%x, rc:%d\n" , zdev->fid, rc); +mutex_unlock (&zpci_add_remove_lock);return rc; }
@@ -953,6 +959,7 @@ void zpci_release_device(struct kref *kr { struct zpci_dev *zdev = container_of(kref, struct zpci_dev, kref); +lockdep_assert_held (&zpci_add_remove_lock);WARN_ON (zdev->state !=ZPCI_FN_STATE_RESERVED );/* * We already hold zpci_list_lock thanks to kref_put_lock().
Greg Kroah-Hartman
maintainerPATCH 44/592 nfsd: Initialize ssc before laundromat_work to prevent NULL dereference
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Lingfeng <[email protected]>
commit b31da62889e6d610114d81dc7a6edbcaa503fcf8 upstream.
In nfs4_state_start_net(), laundromat_work may access nfsd_ssc through nfs4_laundromat -> nfsd4_ssc_expire_umount. If nfsd_ssc isn't initialized, this can cause NULL pointer dereference.
Normally the delayed start of laundromat_work allows sufficient time for nfsd_ssc initialization to complete. However, when the kernel waits too long for userspace responses (e.g. in nfs4_state_start_net -> nfsd4_end_grace -> nfsd4_record_grace_done -> nfsd4_cld_grace_done -> cld_pipe_upcall -> __cld_pipe_upcall -> wait_for_completion path), the delayed work may start before nfsd_ssc initialization finishes.
Fix this by moving nfsd_ssc initialization before starting laundromat_work.
--- fs/nfsd/nfssvc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/nfsd/nfssvc.c +3 -3
@@ -396,13 +396,13 @@ static int nfsd_startup_net(struct net *if (ret) goto out_filecache; +#ifdef CONFIG_NFSD_V4_2_INTER_SSC +nfsd4_ssc_init_umount_work (nn); +#endif ret =nfs4_state_start_net (net);if (ret) goto out_reply_cache; -#ifdef CONFIG_NFSD_V4_2_INTER_SSC -nfsd4_ssc_init_umount_work (nn); -#endif nn->nfsd_net_up = true;return 0 ;
Greg Kroah-Hartman
maintainerPATCH 45/592 SUNRPC: Prevent hang on NFS mount with xprtsec=[m]tls
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit 0bd2f6b8996d4f1ca4573652454987826730a04a upstream.
Engineers at Hammerspace noticed that sometimes mounting with "xprtsec=tls" hangs for a minute or so, and then times out, even when the NFS server is reachable and responsive.
kTLS shuts off data_ready callbacks if strp->msg_ready is set to mitigate data_ready callbacks when a full TLS record is not yet ready to be read from the socket.
Normally msg_ready is clear when the first TLS record arrives on a socket. However, I observed that sometimes tls_setsockopt() sets strp->msg_ready, and that prevents forward progress because tls_data_ready() becomes a no-op.
Moreover, Jakub says: "If there's a full record queued at the time when [tlshd] passes the socket back to the kernel, it's up to the reader to read the already queued data out." So SunRPC cannot expect a data_ready call when ingress data is already waiting.
Add an explicit poll after SunRPC's upper transport is set up to pick up any data that arrived after the TLS handshake but before transport set-up is complete.
--- net/sunrpc/xprtsock.c | 5 +++++ 1 file changed, 5 insertions(+)
net/sunrpc/xprtsock.c +5 -0
@@ -2740,6 +2740,11 @@ static void xs_tcp_tls_setup_socket(stru }rpc_shutdown_client (lower_clnt); +/* Check for ingress data that arrived before the socket's +* ->data_ready callback was set up. +*/ +xs_poll_check_readable (upper_transport); + out_unlock:current_restore_flags (pflags,PF_MEMALLOC ); upper_transport->clnt =NULL ;
Greg Kroah-Hartman
maintainerPATCH 46/592 NFS: always probe for LOCALIO support asynchronously
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Snitzer <[email protected]>
commit 1ff4716f420b5a6e6ef095b23bb5db76f46be7fc upstream.
It was reported that NFS client mounts of AWS Elastic File System (EFS) volumes is slow, this is because the AWS firewall disallows LOCALIO (because it doesn't consider the use of NFS_LOCALIO_PROGRAM valid), see: https://bugzilla.redhat.com/show_bug.cgi?id=2335129
Switch to performing the LOCALIO probe asynchronously to address the potential for the NFS LOCALIO protocol being disallowed and/or slowed by the remote server's response.
While at it, fix nfs_local_probe_async() to always take/put a reference on the nfs_client that is using the LOCALIO protocol. Also, unexport the nfs_local_probe() symbol and make it private to fs/nfs/localio.c
This change has the side-effect of initially issuing reads, writes and commits over the wire via SUNRPC until the LOCALIO probe completes.
--- fs/nfs/client.c | 2 +- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +- fs/nfs/internal.h | 1 - fs/nfs/localio.c | 6 ++++-- 4 files changed, 6 insertions(+), 5 deletions(-)
fs/nfs/client.c +1 -1
@@ -439,7 +439,7 @@ struct nfs_client *nfs_get_client(constspin_unlock (&nn->nfs_client_lock); new = rpc_ops->init_client (new, cl_init);if (!IS_ERR (new)) -nfs_local_probe (new); +nfs_local_probe_async (new);return new; }
fs/nfs/flexfilelayout/flexfilelayoutdev.c +1 -1
@@ -400,7 +400,7 @@ nfs4_ff_layout_prepare_ds(struct pnfs_la* keep ds_clp even if DS is local, so that if local IO cannot * proceed somehow, we can fall back to NFS whenever we want. */ -nfs_local_probe (ds->ds_clp); +nfs_local_probe_async (ds->ds_clp); max_payload =nfs_block_size (rpc_max_payload (ds->ds_clp->cl_rpcclient),NULL );
fs/nfs/internal.h +0 -1
@@ -455,7 +455,6 @@ extern int nfs_wait_bit_killable(struct#if IS_ENABLED (CONFIG_NFS_LOCALIO )/* localio.c */ -extern void nfs_local_probe (struct nfs_client *);extern void nfs_local_probe_async (struct nfs_client *);extern void nfs_local_probe_async_work (struct work_struct *); extern struct nfsd_file *nfs_local_open_fh(struct nfs_client *,
fs/nfs/localio.c +4 -2
@@ -171,7 +171,7 @@ static bool nfs_server_uuid_is_local(str* - called after alloc_client and init_client (so cl_rpcclient exists) * - this function is idempotent, it can be called for old or new clients */ -void nfs_local_probe (struct nfs_client *clp) +static void nfs_local_probe (struct nfs_client *clp) {/* Disallow localio if disabled via sysfs or AUTH_SYS isn't used */ if (!localio_enabled ||
@@ -191,14 +191,16 @@ void nfs_local_probe(struct nfs_client *nfs_localio_enable_client (clp);nfs_uuid_end (&clp->cl_uuid); } -EXPORT_SYMBOL_GPL (nfs_local_probe);void nfs_local_probe_async_work (struct work_struct *work) {struct nfs_client *clp = container_of(work, struct nfs_client, cl_local_probe_work); +if (!refcount_inc_not_zero (&clp->cl_count)) +return ;nfs_local_probe (clp); +nfs_put_client (clp); }void nfs_local_probe_async (struct nfs_client *clp)
Greg Kroah-Hartman
maintainerPATCH 47/592 NFSv4: Dont check for OPEN feature support in v4.1
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Scott Mayhew <[email protected]>
commit 4d4832ed13ff505fe0371544b4773e79be2bb964 upstream.
fattr4_open_arguments is a v4.2 recommended attribute, so we shouldn't be sending it to v4.1 servers.
--- fs/nfs/nfs4proc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/nfs/nfs4proc.c +3 -2
@@ -3976,8 +3976,9 @@ static int _nfs4_server_capabilities(strFATTR4_WORD0_CASE_INSENSITIVE |FATTR4_WORD0_CASE_PRESERVING ;if (minorversion) - bitmask[2 ] =FATTR4_WORD2_SUPPATTR_EXCLCREAT | -FATTR4_WORD2_OPEN_ARGUMENTS ; + bitmask[2 ] =FATTR4_WORD2_SUPPATTR_EXCLCREAT ; +if (minorversion >1 ) + bitmask[2 ] |=FATTR4_WORD2_OPEN_ARGUMENTS ; status =nfs4_call_sync (server->client, server, &msg, &args.seq_args, &res.seq_res,0 );if (status ==0 ) {
Greg Kroah-Hartman
maintainerPATCH 48/592 fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Max Kellermann <[email protected]>
commit 4c10fa44bc5f700e2ea21de2fbae520ba21f19d9 upstream.
Sometimes, when a file was read while it was being truncated by another NFS client, the kernel could deadlock because folio_unlock() was called twice, and the second call would XOR back the PG_locked flag.
Most of the time (depending on the timing of the truncation), nobody notices the problem because folio_unlock() gets called three times, which flips PG_locked back off:
1. vfs_read, nfs_read_folio, ... nfs_read_add_folio, nfs_return_empty_folio
2. vfs_read, nfs_read_folio, ... netfs_read_collection, netfs_unlock_abandoned_read_pages
3. vfs_read, ... nfs_do_read_folio, nfs_read_add_folio, nfs_return_empty_folio
The problem is that nfs_read_add_folio() is not supposed to unlock the folio if fscache is enabled, and a nfs_netfs_folio_unlock() check is missing in nfs_return_empty_folio().
Rarely this leads to a warning in netfs_read_collection():
------------[ cut here ]------------ R=0000031c: folio 10 is not locked WARNING: CPU: 0 PID: 29 at fs/netfs/read_collect.c:133 netfs_read_collection+0x7c0/0xf00 [...] Workqueue: events_unbound netfs_read_collection_worker RIP: 0010:netfs_read_collection+0x7c0/0xf00 [...] Call Trace: <TASK> netfs_read_collection_worker+0x67/0x80 process_one_work+0x12e/0x2c0 worker_thread+0x295/0x3a0
Most of the time, however, processes just get stuck forever in folio_wait_bit_common(), waiting for PG_locked to disappear, which never happens because nobody is really holding the folio lock.
--- fs/nfs/read.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/nfs/read.c +2 -1
@@ -56,7 +56,8 @@ static int nfs_return_empty_folio(struct {folio_zero_segment (folio,0 ,folio_size (folio));folio_mark_uptodate (folio); -folio_unlock (folio); +if (nfs_netfs_folio_unlock (folio)) +folio_unlock (folio);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 49/592 wifi: ath12k: fix ring-buffer corruption
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 6b67d2cf14ea997061f61e9c8afd4e1c0f22acb9 upstream.
Users of the Lenovo ThinkPad X13s have reported that Wi-Fi sometimes breaks and the log fills up with errors like:
ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1484, expected 1492
ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1460, expected 1484which based on a quick look at the ath11k driver seemed to indicate some kind of ring-buffer corruption.
Miaoqing Pan tracked it down to the host seeing the updated destination ring head pointer before the updated descriptor, and the error handling for that in turn leaves the ring buffer in an inconsistent state.
While this has not yet been observed with ath12k, the ring-buffer implementation is very similar to the ath11k one and it suffers from the same bugs.
Add the missing memory barrier to make sure that the descriptor is read after the head pointer to address the root cause of the corruption while fixing up the error handling in case there are ever any (ordering) bugs on the device side.
Note that the READ_ONCE() are only needed to avoid compiler mischief in case the ring-buffer helpers are ever inlined.
Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
--- drivers/net/wireless/ath/ath12k/ce.c | 11 +++++------ drivers/net/wireless/ath/ath12k/hal.c | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath12k/ce.c +5 -6
@@ -343,11 +343,10 @@ static int ath12k_ce_completed_recv_next goto err; } +/* Make sure descriptor is read after the head pointer. */ +dma_rmb (); + *nbytes =ath12k_hal_ce_dst_status_get_length (desc); -if (*nbytes ==0 ) { - ret = -EIO ; - goto err; - } *skb = pipe->dest_ring->skb[sw_index]; pipe->dest_ring->skb[sw_index] =NULL ;
@@ -380,8 +379,8 @@ static void ath12k_ce_recv_process_cb(stdma_unmap_single (ab->dev,ATH12K_SKB_RXCB (skb)->paddr, max_nbytes,DMA_FROM_DEVICE ); -if (unlikely (max_nbytes < nbytes)) { -ath12k_warn (ab,"rxed more than expected (nbytes %d, max %d)" , +if (unlikely (max_nbytes < nbytes || nbytes ==0 )) { +ath12k_warn (ab,"unexpected rx length (nbytes %d, max %d)" , nbytes, max_nbytes);dev_kfree_skb_any (skb);continue ;
drivers/net/wireless/ath/ath12k/hal.c +2 -2
@@ -1943,7 +1943,7 @@ u32 ath12k_hal_ce_dst_status_get_length( {u32 len; - len =le32_get_bits (desc->flags,HAL_CE_DST_STATUS_DESC_FLAGS_LEN ); + len =le32_get_bits (READ_ONCE (desc->flags),HAL_CE_DST_STATUS_DESC_FLAGS_LEN ); desc->flags &= ~cpu_to_le32 (HAL_CE_DST_STATUS_DESC_FLAGS_LEN );return len;
@@ -2113,7 +2113,7 @@ void ath12k_hal_srng_access_begin(struct srng->u.src_ring.cached_tp = *(volatile u32 *)srng->u.src_ring.tp_addr; else - srng->u.dst_ring.cached_hp = *srng->u.dst_ring.hp_addr; + srng->u.dst_ring.cached_hp = READ_ONCE(*srng->u.dst_ring.hp_addr); }/* Update cached ring head/tail pointers to HW. ath12k_hal_srng_access_begin()
Greg Kroah-Hartman
maintainerPATCH 50/592 jbd2: fix data-race and null-ptr-deref in jbd2_journal_dirty_metadata()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeongjun Park <[email protected]>
commit af98b0157adf6504fade79b3e6cb260c4ff68e37 upstream.
Since handle->h_transaction may be a NULL pointer, so we should change it to call is_handle_aborted(handle) first before dereferencing it.
And the following data-race was reported in my fuzzer:
==================================================================
BUG: KCSAN: data-race in jbd2_journal_dirty_metadata / jbd2_journal_dirty_metadata
write to 0xffff888011024104 of 4 bytes by task 10881 on cpu 1:
jbd2_journal_dirty_metadata+0x2a5/0x770 fs/jbd2/transaction.c:1556 __ext4_handle_dirty_metadata+0xe7/0x4b0 fs/ext4/ext4_jbd2.c:358 ext4_do_update_inode fs/ext4/inode.c:5220 [inline] ext4_mark_iloc_dirty+0x32c/0xd50 fs/ext4/inode.c:5869 __ext4_mark_inode_dirty+0xe1/0x450 fs/ext4/inode.c:6074 ext4_dirty_inode+0x98/0xc0 fs/ext4/inode.c:6103
....
read to 0xffff888011024104 of 4 bytes by task 10880 on cpu 0:
jbd2_journal_dirty_metadata+0xf2/0x770 fs/jbd2/transaction.c:1512 __ext4_handle_dirty_metadata+0xe7/0x4b0 fs/ext4/ext4_jbd2.c:358 ext4_do_update_inode fs/ext4/inode.c:5220 [inline] ext4_mark_iloc_dirty+0x32c/0xd50 fs/ext4/inode.c:5869 __ext4_mark_inode_dirty+0xe1/0x450 fs/ext4/inode.c:6074 ext4_dirty_inode+0x98/0xc0 fs/ext4/inode.c:6103
....
value changed: 0x00000000 -> 0x00000001
==================================================================
This issue is caused by missing data-race annotation for jh->b_modified. Therefore, the missing annotation needs to be added.
--- fs/jbd2/transaction.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/jbd2/transaction.c +3 -2
@@ -1509,7 +1509,7 @@ int jbd2_journal_dirty_metadata(handle_t jh->b_next_transaction == transaction);spin_unlock (&jh->b_state_lock); } -if (jh->b_modified ==1 ) { +if (data_race (jh->b_modified ==1 )) {/* If it's in our transaction it must be in BJ_Metadata list. */ if (data_race (jh->b_transaction == transaction && jh->b_jlist != BJ_Metadata)) {
@@ -1528,7 +1528,6 @@ int jbd2_journal_dirty_metadata(handle_t goto out; } - journal = transaction->t_journal;spin_lock (&jh->b_state_lock);if (is_handle_aborted (handle)) {
@@ -1543,6 +1542,8 @@ int jbd2_journal_dirty_metadata(handle_t goto out_unlock_bh; } + journal = transaction->t_journal; +if (jh->b_modified ==0 ) {/* * This buffer's got modified and becoming part
Greg Kroah-Hartman
maintainerPATCH 51/592 svcrdma: Unregister the device if svc_rdma_accept() fails
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit 8ac6fcae5dc0e801f1c82a83f5ae2c0a4db19932 upstream.
To handle device removal, svc_rdma_accept() requests removal notification for the underlying device when accepting a connection. However svc_rdma_free() is not invoked if svc_rdma_accept() fails. There needs to be a matching "unregister" in that case; otherwise the device cannot be removed.
--- net/sunrpc/xprtrdma/svc_rdma_transport.c | 1 + 1 file changed, 1 insertion(+)
net/sunrpc/xprtrdma/svc_rdma_transport.c +1 -0
@@ -577,6 +577,7 @@ static struct svc_xprt *svc_rdma_accept(if (newxprt->sc_qp && !IS_ERR (newxprt->sc_qp))ib_destroy_qp (newxprt->sc_qp);rdma_destroy_id (newxprt->sc_cm_id); +rpcrdma_rn_unregister (dev, &newxprt->sc_rn);/* This call to put will destroy the transport */ svc_xprt_put (&newxprt->sc_xprt);return NULL ;
Greg Kroah-Hartman
maintainerPATCH 52/592 wifi: rtw88: usb: Reduce control message timeout to 500 ms
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bitterblue Smith <[email protected]>
commit 490340faddea461319652ce36dbc7c1b4482c35e upstream.
RTL8811AU stops responding during the firmware download on some systems:
[ 809.256440] rtw_8821au 5-2.1:1.0: Firmware version 42.4.0, H2C version 0 [ 812.759142] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: renamed from wlan0 [ 837.315388] rtw_8821au 1-4:1.0: write register 0x1ef4 failed with -110 [ 867.524259] rtw_8821au 1-4:1.0: write register 0x1ef8 failed with -110 [ 868.930976] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: entered promiscuous mode [ 897.730952] rtw_8821au 1-4:1.0: write register 0x1efc failed with -110
Each write takes 30 seconds to fail because that's the timeout currently used for control messages in rtw_usb_write().
In this scenario the firmware download takes at least 2000 seconds. Because this is done from the USB probe function, the long delay makes other things in the system hang.
Reduce the timeout to 500 ms. This is the value used by the official USB wifi drivers from Realtek.
Of course this only makes things hang for ~30 seconds instead of ~30 minutes. It doesn't fix the firmware download.
Tested with RTL8822CU, RTL8812BU, RTL8811CU, RTL8814AU, RTL8811AU, RTL8812AU, RTL8821AU, RTL8723DU.
--- drivers/net/wireless/realtek/rtw88/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/usb.c +1 -1
@@ -139,7 +139,7 @@ static void rtw_usb_write(struct rtw_dev ret =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),RTW_USB_CMD_REQ ,RTW_USB_CMD_WRITE , - addr,0 , data, len,30000 ); + addr,0 , data, len,500 );if (ret <0 && ret != -ENODEV && count++ <4 )rtw_err (rtwdev,"write register 0x%x failed with %d\n" , addr, ret);
Greg Kroah-Hartman
maintainerPATCH 53/592 wifi: rtlwifi: disable ASPM for RTL8723BE with subsystem ID 11ad:1723
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingcong Bai <[email protected]>
commit 77a6407c6ab240527166fb19ee96e95f5be4d3cd upstream.
RTL8723BE found on some ASUSTek laptops, such as F441U and X555UQ with subsystem ID 11ad:1723 are known to output large amounts of PCIe AER errors during and after boot up, causing heavy lags and at times lock-ups:
pcieport 0000:00:1c.5: AER: Correctable error message received from 0000:00:1c.5 pcieport 0000:00:1c.5: PCIe Bus Error: severity=Correctable, type=Physical Layer, (Receiver ID)
pcieport 0000:00:1c.5: device [8086:9d15] error status/mask=00000001/00002000
pcieport 0000:00:1c.5: [ 0] RxErr
Disable ASPM on this combo as a quirk.
This patch is a revision of a previous patch (linked below) which attempted to disable ASPM for RTL8723BE on all Intel Skylake and Kaby Lake PCIe bridges. I take a more conservative approach as all known reports point to ASUSTek laptops of these two generations with this particular wireless card.
Please note, however, before the rtl8723be finishes probing, the AER errors remained. After the module finishes probing, all AER errors would indeed be eliminated, along with heavy lags, poor network throughput, and/or occasional lock-ups.
--- drivers/net/wireless/realtek/rtlwifi/pci.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/wireless/realtek/rtlwifi/pci.c +10 -0
@@ -155,6 +155,16 @@ static void _rtl_pci_update_default_sett ((u8 )init_aspm) == (PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1 | PCI_EXP_LNKCTL_CCC)) ppsc->support_aspm = false; + +/* RTL8723BE found on some ASUSTek laptops, such as F441U and +* X555UQ with subsystem ID 11ad:1723 are known to output large +* amounts of PCIe AER errors during and after boot up, causing +* heavy lags, poor network throughput, and occasional lock-ups. +*/ +if (rtlpriv->rtlhal.hw_type ==HARDWARE_TYPE_RTL8723BE && + (rtlpci->pdev->subsystem_vendor ==0x11ad && + rtlpci->pdev->subsystem_device ==0x1723 )) + ppsc->support_aspm = false; } static bool _rtl_pci_platform_switch_device_pci_aspm(
Greg Kroah-Hartman
maintainerPATCH 27/592 regulator: max20086: Fix MAX200086 chip id
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: João Paulo Gonçalves <[email protected]>
commit 71406b6d1155d883c80c1b4405939a52f723aa05 upstream.
Quoted 1 line
From MAX20086-MAX20089 datasheet, the id for a MAX20086 is
0x30and not
0x40. With the current code, the driver will fail on probe when the driver tries to identify the chip id from a MAX20086 device over I2C.
--- drivers/regulator/max20086-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/max20086-regulator.c +1 -1
@@ -29,7 +29,7 @@#define MAX20086_REG_ADC4 0x09/* DEVICE IDs */ -#define MAX20086_DEVICE_ID_MAX20086 0x40 +#define MAX20086_DEVICE_ID_MAX20086 0x30#define MAX20086_DEVICE_ID_MAX20087 0x20#define MAX20086_DEVICE_ID_MAX20088 0x10#define MAX20086_DEVICE_ID_MAX20089 0x00
Greg Kroah-Hartman
maintainerPATCH 54/592 jfs: validate AG parameters in dbMount() to prevent crashes
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vasiliy Kovalev <[email protected]>
commit 37bfb464ddca87f203071b5bd562cd91ddc0b40a upstream.
Validate db_agheight, db_agwidth, and db_agstart in dbMount to catch corrupted metadata early and avoid undefined behavior in dbAllocAG. Limits are derived from L2LPERCTL, LPERCTL/MAXAG, and CTLTREESIZE:
- agheight: 0 to L2LPERCTL/2 (0 to 5) ensures shift (L2LPERCTL - 2*agheight) >= 0.
- agwidth: 1 to min(LPERCTL/MAXAG, 2^(L2LPERCTL - 2*agheight)) ensures agperlev >= 1.
- Ranges: 1-8 (agheight 0-3), 1-4 (agheight 4), 1 (agheight 5).
- LPERCTL/MAXAG = 1024/128 = 8 limits leaves per AG;
2^(10 - 2*agheight) prevents division to 0.- agstart: 0 to CTLTREESIZE-1 - agwidth*(MAXAG-1) keeps ti within stree (size 1365).
- Ranges: 0-1237 (agwidth 1), 0-348 (agwidth 8).
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:1400:9 shift exponent -335544310 is negative CPU: 0 UID: 0 PID: 5822 Comm: syz-executor130 Not tainted 6.14.0-rc5-syzkaller #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_shift_out_of_bounds+0x3c8/0x420 lib/ubsan.c:468 dbAllocAG+0x1087/0x10b0 fs/jfs/jfs_dmap.c:1400 dbDiscardAG+0x352/0xa20 fs/jfs/jfs_dmap.c:1613 jfs_ioc_trim+0x45a/0x6b0 fs/jfs/jfs_discard.c:105 jfs_ioctl+0x2cd/0x3e0 fs/jfs/ioctl.c:131 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
--- fs/jfs/jfs_dmap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
fs/jfs/jfs_dmap.c +5 -1
@@ -194,7 +194,11 @@ int dbMount(struct inode *ipbmap) !bmp->db_numag || (bmp->db_numag >MAXAG ) || (bmp->db_maxag >=MAXAG ) || (bmp->db_maxag <0 ) || (bmp->db_agpref >=MAXAG ) || (bmp->db_agpref <0 ) || - !bmp->db_agwidth || + (bmp->db_agheight <0 ) || (bmp->db_agheight > (L2LPERCTL >>1 )) || + (bmp->db_agwidth <1 ) || (bmp->db_agwidth > (LPERCTL /MAXAG )) || + (bmp->db_agwidth > (1 << (L2LPERCTL - (bmp->db_agheight <<1 )))) || + (bmp->db_agstart <0 ) || + (bmp->db_agstart > (CTLTREESIZE -1 - bmp->db_agwidth * (MAXAG -1 ))) || (bmp->db_agl2size >L2MAXL2SIZE -L2MAXAG ) || (bmp->db_agl2size <0 ) || ((bmp->db_mapsize - 1) >> bmp->db_agl2size) > MAXAG) {
Greg Kroah-Hartman
maintainerPATCH 55/592 media: ov8856: suppress probe deferral errors
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit e3d86847fba58cf71f66e81b6a2515e07039ae17 upstream.
Probe deferral should not be logged as an error:
ov8856 24-0010: failed to get HW configuration: -517
Use dev_err_probe() for the clock lookup and drop the (mostly) redundant dev_err() from sensor probe() to suppress it.
Note that errors during regulator lookup is already correctly logged using dev_err_probe().
--- drivers/media/i2c/ov8856.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/media/i2c/ov8856.c +3 -6
@@ -2276,8 +2276,8 @@ static int ov8856_get_hwcfg(struct ov885if (!is_acpi_node (fwnode)) { ov8856->xvclk =devm_clk_get (dev,"xvclk" );if (IS_ERR (ov8856->xvclk)) { -dev_err (dev,"could not get xvclk clock (%pe)\n" , - ov8856->xvclk); +dev_err_probe (dev,PTR_ERR (ov8856->xvclk), +"could not get xvclk clock\n" );return PTR_ERR (ov8856->xvclk); }
@@ -2382,11 +2382,8 @@ static int ov8856_probe(struct i2c_clienreturn -ENOMEM ; ret =ov8856_get_hwcfg (ov8856, &client->dev); -if (ret) { -dev_err (&client->dev,"failed to get HW configuration: %d" , - ret); +if (ret)return ret; - }v4l2_i2c_subdev_init (&ov8856->sd, client, &ov8856_subdev_ops);
Greg Kroah-Hartman
maintainerPATCH 56/592 media: ov5675: suppress probe deferral errors
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 8268da3c474a43a79a6540fb06c5d3b730a0d5a5 upstream.
Probe deferral should not be logged as an error:
ov5675 24-0010: failed to get HW configuration: -517
Drop the (mostly) redundant dev_err() from sensor probe() to suppress it.
Note that errors during clock and regulator lookup are already correctly logged using dev_err_probe().
--- drivers/media/i2c/ov5675.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/media/i2c/ov5675.c +1 -4
@@ -1295,11 +1295,8 @@ static int ov5675_probe(struct i2c_clienreturn -ENOMEM ; ret =ov5675_get_hwcfg (ov5675, &client->dev); -if (ret) { -dev_err (&client->dev,"failed to get HW configuration: %d" , - ret); +if (ret)return ret; - }v4l2_i2c_subdev_init (&ov5675->sd, client, &ov5675_subdev_ops);
Greg Kroah-Hartman
maintainerPATCH 57/592 media: i2c: change lt6911uxe irq_gpio name to "hpd"
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dongcheng Yan <[email protected]>
commit 20244cbafbd6c8486347bb82d972f6e2d2d5a201 upstream.
Lt6911uxe is used in IPU6 / x86 platform, worked with an out-of-tree int3472 patch and upstream intel/ipu6 before. It is only used on ACPI platforms till now and there are no devicetree bindings for this driver.
The upstream int3472 driver uses "hpd" instead of "readystat" now. this patch updates the irq_gpio name to "hpd" accordingly, so that mere users can now use the upstream version directly without relying on out-of-tree int3472 pin support.
The new name "hpd" (Hotplug Detect) aligns with common naming conventions used in other drivers(like adv7604) and documentation.
--- drivers/media/i2c/lt6911uxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/i2c/lt6911uxe.c +2 -2
@@ -605,10 +605,10 @@ static int lt6911uxe_probe(struct i2c_clreturn dev_err_probe (dev,PTR_ERR (lt6911uxe->reset_gpio),"failed to get reset gpio\n" ); - lt6911uxe->irq_gpio =devm_gpiod_get (dev,"readystat" ,GPIOD_IN ); + lt6911uxe->irq_gpio =devm_gpiod_get (dev,"hpd" ,GPIOD_IN );if (IS_ERR (lt6911uxe->irq_gpio))return dev_err_probe (dev,PTR_ERR (lt6911uxe->irq_gpio), -"failed to get ready_stat gpio\n" ); +"failed to get hpd gpio\n" ); ret =lt6911uxe_fwnode_parse (lt6911uxe, dev);if (ret)
Greg Kroah-Hartman
maintainerPATCH 58/592 media: imx335: Use correct register width for HNUM
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Umang Jain <[email protected]>
commit b122c9cfcb39c8ef520d50eddfbe15f3e6551a50 upstream.
CCI_REG_HNUM should be using CCI_REG16_LE() instead of CCI_REG8() as HNUM spans from 0x302e[0:7] to 0x302f[0:3].
--- drivers/media/i2c/imx335.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/imx335.c +1 -1
@@ -31,7 +31,7 @@#define IMX335_REG_CPWAIT_TIME CCI_REG8(0x300d)#define IMX335_REG_WINMODE CCI_REG8(0x3018)#define IMX335_REG_HTRIMMING_START CCI_REG16_LE(0x302c) -#define IMX335_REG_HNUM CCI_REG8(0x302e) +#define IMX335_REG_HNUM CCI_REG16_LE(0x302e)/* Lines per frame */ #define IMX335_REG_VMAX CCI_REG24_LE(0x3030)
Greg Kroah-Hartman
maintainerPATCH 59/592 media: nxp: imx8-isi: better handle the m2m usage_count
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laurentiu Palcu <[email protected]>
commit 910efa649076be9c2e1326059830327cf4228cf6 upstream.
Currently, if streamon/streamoff calls are imbalanced we can either end up with a negative ISI m2m usage_count (if streamoff() is called more times than streamon()) in which case we'll not be able to restart the ISI pipe next time, or the usage_count never gets to 0 and the pipe is never switched off.
To avoid that, add a 'streaming' flag to mxc_isi_m2m_ctx_queue_data and use it in the streamon/streamoff to avoid incrementing/decrementing the usage_count uselessly, if called multiple times from the same context.
--- drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c +13 -1
@@ -43,6 +43,7 @@ struct mxc_isi_m2m_ctx_queue_data {struct v4l2_pix_format_mplane format;const struct mxc_isi_format_info *info;u32 sequence; +bool streaming; };struct mxc_isi_m2m_ctx {
@@ -484,15 +485,18 @@ static int mxc_isi_m2m_streamon(struct f enum v4l2_buf_type type) {struct mxc_isi_m2m_ctx *ctx =to_isi_m2m_ctx (fh); +struct mxc_isi_m2m_ctx_queue_data *q =mxc_isi_m2m_ctx_qdata (ctx, type);const struct v4l2_pix_format_mplane *out_pix = &ctx->queues.out.format;const struct v4l2_pix_format_mplane *cap_pix = &ctx->queues.cap.format;const struct mxc_isi_format_info *cap_info = ctx->queues.cap.info;const struct mxc_isi_format_info *out_info = ctx->queues.out.info;struct mxc_isi_m2m *m2m = ctx->m2m;bool bypass; -int ret; +if (q->streaming) +return 0 ; +mutex_lock (&m2m->lock);if (m2m->usage_count ==INT_MAX ) {
@@ -545,6 +549,8 @@ static int mxc_isi_m2m_streamon(struct f goto unchain; } + q->streaming = true; +return 0 ; unchain:
@@ -567,10 +573,14 @@ static int mxc_isi_m2m_streamoff(struct enum v4l2_buf_type type) {struct mxc_isi_m2m_ctx *ctx =to_isi_m2m_ctx (fh); +struct mxc_isi_m2m_ctx_queue_data *q =mxc_isi_m2m_ctx_qdata (ctx, type);struct mxc_isi_m2m *m2m = ctx->m2m;v4l2_m2m_ioctl_streamoff (file, fh, type); +if (!q->streaming) +return 0 ; +mutex_lock (&m2m->lock);/*
@@ -596,6 +606,8 @@ static int mxc_isi_m2m_streamoff(structmutex_unlock (&m2m->lock); + q->streaming = false; +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 60/592 media: i2c: ds90ub913: Fix returned fmt from .set_fmt()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomi Valkeinen <[email protected]>
commit ef205273132bdc9bcfa1540eef8105475a453300 upstream.
When setting the sink pad's stream format, set_fmt accidentally changes the returned format's code to 'outcode', while the purpose is to only use the 'outcode' for the propagated source stream format.
--- drivers/media/i2c/ds90ub913.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/i2c/ds90ub913.c +2 -2
@@ -450,10 +450,10 @@ static int ub913_set_fmt(struct v4l2_subif (!fmt)return -EINVAL ; - format->format.code = finfo->outcode; - *fmt = format->format; + fmt->code = finfo->outcode; +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 61/592 media: ccs-pll: Start VT pre-PLL multiplier search from correct value
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sakari Ailus <[email protected]>
commit 06d2d478b09e6764fb6161d1621fc10d9f0f2860 upstream.
The ccs_pll_calculate_vt_tree() function does a search over possible VT PLL configurations to find the "best" one. If the sensor does not support odd pre-PLL divisors and the minimum value (with constraints) isn't 1, other odd values could be errorneously searched (and selected) for the pre-PLL divisor. Fix this.
--- drivers/media/i2c/ccs-pll.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/media/i2c/ccs-pll.c +2 -0
@@ -397,6 +397,8 @@ static int ccs_pll_calculate_vt_tree(str min_pre_pll_clk_div =max_t (u16, min_pre_pll_clk_div, pll->ext_clk_freq_hz / lim_fr->max_pll_ip_clk_freq_hz); +if (!(pll->flags &CCS_PLL_FLAG_EXT_IP_PLL_DIVIDER )) + min_pre_pll_clk_div =clk_div_even (min_pre_pll_clk_div);dev_dbg (dev,"vt min/max_pre_pll_clk_div: %u,%u\n" , min_pre_pll_clk_div, max_pre_pll_clk_div);
Greg Kroah-Hartman
maintainerPATCH 62/592 media: ov2740: Move pm-runtime cleanup on probe-errors to proper place
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <[email protected]>
commit 81cf4f46a03a07b0b86f9d677c34ba782df7d65e upstream.
When v4l2_subdev_init_finalize() fails no changes have been made to the runtime-pm device state yet, so the probe_error_media_entity_cleanup rollback path should not touch the runtime-pm device state.
Instead this should be done from the probe_error_v4l2_subdev_cleanup rollback path. Note the pm_runtime_xxx() calls are put above the v4l2_subdev_cleanup() call to have the reverse call order of probe().
--- drivers/media/i2c/ov2740.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/i2c/ov2740.c +2 -2
@@ -1456,12 +1456,12 @@ static int ov2740_probe(struct i2c_clienreturn 0 ; probe_error_v4l2_subdev_cleanup: +pm_runtime_disable (&client->dev); +pm_runtime_set_suspended (&client->dev);v4l2_subdev_cleanup (&ov2740->sd); probe_error_media_entity_cleanup:media_entity_cleanup (&ov2740->sd.entity); -pm_runtime_disable (&client->dev); -pm_runtime_set_suspended (&client->dev); probe_error_v4l2_ctrl_handler_free:v4l2_ctrl_handler_free (ov2740->sd.ctrl_handler);
Greg Kroah-Hartman
maintainerPATCH 63/592 media: ccs-pll: Start OP pre-PLL multiplier search from correct value
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sakari Ailus <[email protected]>
commit 660e613d05e449766784c549faf5927ffaf281f1 upstream.
The ccs_pll_calculate() function does a search over possible PLL configurations to find the "best" one. If the sensor does not support odd pre-PLL divisors and the minimum value (with constraints) isn't 1, other odd values could be errorneously searched (and selected) for the pre-PLL divisor. Fix this.
--- drivers/media/i2c/ccs-pll.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/media/i2c/ccs-pll.c +2 -0
@@ -817,6 +817,8 @@ int ccs_pll_calculate(struct device *devone_or_more (DIV_ROUND_UP (op_lim_fr->max_pll_op_clk_freq_hz, pll->ext_clk_freq_hz)))); +if (!(pll->flags &CCS_PLL_FLAG_EXT_IP_PLL_DIVIDER )) + min_op_pre_pll_clk_div =clk_div_even (min_op_pre_pll_clk_div);dev_dbg (dev,"pll_op check: min / max op_pre_pll_clk_div: %u / %u\n" , min_op_pre_pll_clk_div, max_op_pre_pll_clk_div);
Greg Kroah-Hartman
maintainerPATCH 28/592 regulator: max20086: Change enable gpio to optional
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: João Paulo Gonçalves <[email protected]>
commit e8ac7336dd62f0443a675ed80b17f0f0e6846e20 upstream.
The enable pin can be configured as always enabled by the hardware. Make the enable gpio request optional so the driver doesn't fail to probe when enable-gpios property is not present in the device tree.
--- drivers/regulator/max20086-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/max20086-regulator.c +1 -1
@@ -264,7 +264,7 @@ static int max20086_i2c_probe(struct i2c* shutdown. */ flags = boot_on ?GPIOD_OUT_HIGH :GPIOD_OUT_LOW ; - chip->ena_gpiod =devm_gpiod_get (chip->dev,"enable" , flags); + chip->ena_gpiod =devm_gpiod_get_optional (chip->dev,"enable" , flags);if (IS_ERR (chip->ena_gpiod)) { ret =PTR_ERR (chip->ena_gpiod);dev_err (chip->dev,"Failed to get enable GPIO: %d\n" , ret);
Greg Kroah-Hartman
maintainerPATCH 64/592 media: ccs-pll: Correct the upper limit of maximum op_pre_pll_clk_div
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sakari Ailus <[email protected]>
commit f639494db450770fa30d6845d9c84b9cb009758f upstream.
The PLL calculator does a search of the PLL configuration space for all valid OP pre-PLL clock dividers. The maximum did not take into account the CCS PLL flag CCS_PLL_FLAG_EXT_IP_PLL_DIVIDER in which case also odd PLL dividers (other than 1) are valid. Do that now.
--- drivers/media/i2c/ccs-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ccs-pll.c +1 -1
@@ -794,7 +794,7 @@ int ccs_pll_calculate(struct device *dev op_lim_fr->min_pre_pll_clk_div, op_lim_fr->max_pre_pll_clk_div); max_op_pre_pll_clk_div =min_t (u16, op_lim_fr->max_pre_pll_clk_div, -clk_div_even (pll->ext_clk_freq_hz / +DIV_ROUND_UP (pll->ext_clk_freq_hz, op_lim_fr->min_pll_ip_clk_freq_hz)); min_op_pre_pll_clk_div = max_t(u16, op_lim_fr->min_pre_pll_clk_div,
Greg Kroah-Hartman
maintainerPATCH 65/592 media: ccs-pll: Check for too high VT PLL multiplier in dual PLL case
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sakari Ailus <[email protected]>
commit 6868b955acd6e5d7405a2b730c2ffb692ad50d2c upstream.
The check for VT PLL upper limit in dual PLL case was missing. Add it now.
--- drivers/media/i2c/ccs-pll.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/media/i2c/ccs-pll.c +5 -0
@@ -312,6 +312,11 @@ __ccs_pll_calculate_vt_tree(struct devicdev_dbg (dev,"more_mul2: %u\n" , more_mul); pll_fr->pll_multiplier = mul * more_mul; +if (pll_fr->pll_multiplier > lim_fr->max_pll_multiplier) { +dev_dbg (dev,"pll multiplier %u too high\n" , + pll_fr->pll_multiplier); +return -EINVAL ; + }if (pll_fr->pll_multiplier * pll_fr->pll_ip_clk_freq_hz > lim_fr->max_pll_op_clk_freq_hz)
Greg Kroah-Hartman
maintainerPATCH 66/592 media: cxusb: no longer judge rbuf when the write fails
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Edward Adam Davis <[email protected]>
commit 73fb3b92da84637e3817580fa205d48065924e15 upstream.
syzbot reported a uninit-value in cxusb_i2c_xfer. [1]
Only when the write operation of usb_bulk_msg() in dvb_usb_generic_rw() succeeds and rlen is greater than 0, the read operation of usb_bulk_msg() will be executed to read rlen bytes of data from the dvb device into the rbuf.
In this case, although rlen is 1, the write operation failed which resulted in the dvb read operation not being executed, and ultimately variable i was not initialized.
[1]
BUG: KMSAN: uninit-value in cxusb_gpio_tuner drivers/media/usb/dvb-usb/cxusb.c:124 [inline] BUG: KMSAN: uninit-value in cxusb_i2c_xfer+0x153a/0x1a60 drivers/media/usb/dvb-usb/cxusb.c:196 cxusb_gpio_tuner drivers/media/usb/dvb-usb/cxusb.c:124 [inline] cxusb_i2c_xfer+0x153a/0x1a60 drivers/media/usb/dvb-usb/cxusb.c:196 __i2c_transfer+0xe25/0x3150 drivers/i2c/i2c-core-base.c:-1 i2c_transfer+0x317/0x4a0 drivers/i2c/i2c-core-base.c:2315 i2c_transfer_buffer_flags+0x125/0x1e0 drivers/i2c/i2c-core-base.c:2343 i2c_master_send include/linux/i2c.h:109 [inline] i2cdev_write+0x210/0x280 drivers/i2c/i2c-dev.c:183 do_loop_readv_writev fs/read_write.c:848 [inline] vfs_writev+0x963/0x14e0 fs/read_write.c:1057 do_writev+0x247/0x5c0 fs/read_write.c:1101 __do_sys_writev fs/read_write.c:1169 [inline] __se_sys_writev fs/read_write.c:1166 [inline] __x64_sys_writev+0x98/0xe0 fs/read_write.c:1166 x64_sys_call+0x2229/0x3c80 arch/x86/include/generated/asm/syscalls_64.h:21 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x1e0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f
--- drivers/media/usb/dvb-usb/cxusb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/dvb-usb/cxusb.c +1 -2
@@ -119,9 +119,8 @@ static void cxusb_gpio_tuner(struct dvb_ o[0 ] =GPIO_TUNER ; o[1 ] = onoff; -cxusb_ctrl_msg (d,CMD_GPIO_WRITE , o,2 , &i,1 ); -if (i !=0x01 ) +if (!cxusb_ctrl_msg (d,CMD_GPIO_WRITE , o,2 , &i,1 ) && i !=0x01 )dev_info (&d->udev->dev,"gpio_write failed.\n" ); st->gpio_write_state[GPIO_TUNER ] = onoff;
Greg Kroah-Hartman
maintainerPATCH 67/592 media: davinci: vpif: Fix memory leak in probe error path
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Nikiforov <[email protected]>
commit 024bf40edf1155e7a587f0ec46294049777d9b02 upstream.
If an error occurs during the initialization of pdev_display, the allocated platform device pdev_capture is not released properly, leading to a memory leak.
Adjust error path handling to fix the leak.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/media/platform/ti/davinci/vpif.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/platform/ti/davinci/vpif.c +3 -1
@@ -504,7 +504,7 @@ static int vpif_probe(struct platform_de pdev_display =kzalloc (sizeof (*pdev_display),GFP_KERNEL );if (!pdev_display) { ret = -ENOMEM ; - goto err_put_pdev_capture; + goto err_del_pdev_capture; } pdev_display->name ="vpif_display" ;
@@ -527,6 +527,8 @@ static int vpif_probe(struct platform_de err_put_pdev_display:platform_device_put (pdev_display); +err_del_pdev_capture: +platform_device_del (pdev_capture); err_put_pdev_capture:platform_device_put (pdev_capture); err_put_rpm:
Greg Kroah-Hartman
maintainerPATCH 68/592 media: gspca: Add error handling for stv06xx_read_sensor()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wentao Liang <[email protected]>
commit 398a1b33f1479af35ca915c5efc9b00d6204f8fa upstream.
In hdcs_init(), the return value of stv06xx_read_sensor() needs to be checked. A proper implementation can be found in vv6410_dump(). Add a check in loop condition and propergate error code to fix this issue.
--- drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c +4 -3
@@ -520,12 +520,13 @@ static int hdcs_init(struct sd *sd)static int hdcs_dump (struct sd *sd) {u16 reg, val; +int err =0 ;pr_info ("Dumping sensor registers:\n" ); -for (reg =HDCS_IDENT ; reg <=HDCS_ROWEXPH ; reg++) { -stv06xx_read_sensor (sd, reg, &val); +for (reg =HDCS_IDENT ; reg <=HDCS_ROWEXPH && !err; reg++) { + err =stv06xx_read_sensor (sd, reg, &val);pr_info ("reg 0x%02x = 0x%02x\n" , reg, val); } -return 0 ; +return (err <0 ) ? err :0 ; }
Greg Kroah-Hartman
maintainerPATCH 69/592 media: i2c: imx335: Fix frame size enumeration
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kieran Bingham <[email protected]>
commit b240df2913d396638033b86af0f0ff76aa1aafc8 upstream.
In commit cfa49ff0558a ("media: i2c: imx335: Support 2592x1940 10-bit mode") the IMX335 driver was extended to support multiple output bitdepth modes.
This incorrectly extended the frame size enumeration to check against the supported mbus_codes array instead of the supported mode/frame array. This has the unwanted side effect of reporting the currently supported frame size 2592x1944 three times.
Fix the check accordingly to report a frame size for each supported size, which is presently only a single entry.
--- drivers/media/i2c/imx335.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/imx335.c +2 -1
@@ -660,7 +660,8 @@ static int imx335_enum_frame_size(structstruct imx335 *imx335 =to_imx335 (sd);u32 code; -if (fsize->index >ARRAY_SIZE (imx335_mbus_codes)) +/* Only a single supported_mode available. */ +if (fsize->index >0 )return -EINVAL ; code =imx335_get_format_code (imx335, fsize->code);
Greg Kroah-Hartman
maintainerPATCH 70/592 media: imagination: fix a potential memory leak in e5010_probe()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haoxiang Li <[email protected]>
commit 609ba05b9484856b08869f827a6edee51d51b5f3 upstream.
Add video_device_release() to release the memory allocated by video_device_alloc() if something goes wrong.
--- drivers/media/platform/imagination/e5010-jpeg-enc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/media/platform/imagination/e5010-jpeg-enc.c +7 -2
@@ -1057,8 +1057,11 @@ static int e5010_probe(struct platform_d e5010->vdev->lock = &e5010->mutex; ret =v4l2_device_register (dev, &e5010->v4l2_dev); -if (ret) -return dev_err_probe (dev, ret,"failed to register v4l2 device\n" ); +if (ret) { +dev_err_probe (dev, ret,"failed to register v4l2 device\n" ); + goto fail_after_video_device_alloc; + } + e5010->m2m_dev =v4l2_m2m_init (&e5010_m2m_ops);if (IS_ERR (e5010->m2m_dev)) {
@@ -1118,6 +1121,8 @@ fail_after_video_register_device:v4l2_m2m_release (e5010->m2m_dev); fail_after_v4l2_register:v4l2_device_unregister (&e5010->v4l2_dev); +fail_after_video_device_alloc: +video_device_release (e5010->vdev);return ret; }
Greg Kroah-Hartman
maintainerPATCH 71/592 media: intel/ipu6: Fix dma mask for non-secure mode
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stanislaw Gruszka <[email protected]>
commit 0209916ebe2475079ce6d8dc4114afbc0ccad1c2 upstream.
We use dma_get_mask() of auxdev device for calculate iova pfn limit. This is always 32 bit mask as we do not initialize the mask (and we can not do so, since dev->dev_mask is NULL anyways for auxdev).
Since we need 31 bit mask for non-secure mode use mmu_info->aperture_end which is properly initialized to correct mask for both modes.
--- drivers/media/pci/intel/ipu6/ipu6-dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/pci/intel/ipu6/ipu6-dma.c +2 -2
@@ -172,7 +172,7 @@ void *ipu6_dma_alloc(struct ipu6_bus_dev count =PHYS_PFN (size); iova =alloc_iova (&mmu->dmap->iovad, count, -PHYS_PFN (dma_get_mask (dev)),0 ); +PHYS_PFN (mmu->dmap->mmu_info->aperture_end),0 );if (!iova) goto out_kfree;
@@ -398,7 +398,7 @@ int ipu6_dma_map_sg(struct ipu6_bus_devi nents, npages); iova =alloc_iova (&mmu->dmap->iovad, npages, -PHYS_PFN (dma_get_mask (dev)),0 ); +PHYS_PFN (mmu->dmap->mmu_info->aperture_end),0 );if (!iova)return 0 ;
Greg Kroah-Hartman
maintainerPATCH 29/592 net/mlx5_core: Add error handling inmlx5_query_nic_vport_qkey_viol_cntr()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wentao Liang <[email protected]>
commit f0b50730bdd8f2734e548de541e845c0d40dceb6 upstream.
The function mlx5_query_nic_vport_qkey_viol_cntr() calls the function mlx5_query_nic_vport_context() but does not check its return value. This could lead to undefined behavior if the query fails. A proper implementation can be found in mlx5_nic_vport_query_local_lb().
Add error handling for mlx5_query_nic_vport_context(). If it fails, free the out buffer via kvfree() and return error code.
--- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/vport.c +6 -3
@@ -519,19 +519,22 @@ int mlx5_query_nic_vport_qkey_viol_cntr( {u32 *out;int outlen =MLX5_ST_SZ_BYTES (query_nic_vport_context_out); +int err; out =kvzalloc (outlen,GFP_KERNEL );if (!out)return -ENOMEM ; -mlx5_query_nic_vport_context (mdev,0 , out); + err =mlx5_query_nic_vport_context (mdev,0 , out); +if (err) + goto out; *qkey_viol_cntr =MLX5_GET (query_nic_vport_context_out, out, nic_vport_context.qkey_violation_counter); - +out:kvfree (out); -return 0 ; +return err; }EXPORT_SYMBOL_GPL (mlx5_query_nic_vport_qkey_viol_cntr);
Greg Kroah-Hartman
maintainerPATCH 30/592 net/mlx5: Add error handling in mlx5_query_nic_vport_node_guid()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wentao Liang <[email protected]>
commit c6bb8a21cdad8c975a3a646b9e5c8df01ad29783 upstream.
The function mlx5_query_nic_vport_node_guid() calls the function mlx5_query_nic_vport_context() but does not check its return value. A proper implementation can be found in mlx5_nic_vport_query_local_lb().
Add error handling for mlx5_query_nic_vport_context(). If it fails, free the out buffer via kvfree() and return error code.
--- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/vport.c +6 -3
@@ -465,19 +465,22 @@ int mlx5_query_nic_vport_node_guid(struc {u32 *out;int outlen =MLX5_ST_SZ_BYTES (query_nic_vport_context_out); +int err; out =kvzalloc (outlen,GFP_KERNEL );if (!out)return -ENOMEM ; -mlx5_query_nic_vport_context (mdev,0 , out); + err =mlx5_query_nic_vport_context (mdev,0 , out); +if (err) + goto out; *node_guid =MLX5_GET64 (query_nic_vport_context_out, out, nic_vport_context.node_guid); - +out:kvfree (out); -return 0 ; +return err; }EXPORT_SYMBOL_GPL (mlx5_query_nic_vport_node_guid);
Greg Kroah-Hartman
maintainerPATCH 31/592 wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Lamparter <[email protected]>
commit da1b9a55ff116cb040528ef664c70a4eec03ae99 upstream.
Robert Morris reported:
|If a malicious USB device pretends to be an Intersil p54 wifi
|interface and generates an eeprom_readback message with a large
|eeprom->v1.len, p54_rx_eeprom_readback() will copy data from the
|message beyond the end of priv->eeprom.
|
|static void p54_rx_eeprom_readback(struct p54_common *priv,
| struct sk_buff *skb)
|{
| struct p54_hdr *hdr = (struct p54_hdr *) skb->data;
| struct p54_eeprom_lm86 *eeprom = (struct p54_eeprom_lm86 *) hdr->data;
|
| if (priv->fw_var >= 0x509) {
| memcpy(priv->eeprom, eeprom->v2.data,
| le16_to_cpu(eeprom->v2.len));
| } else {
| memcpy(priv->eeprom, eeprom->v1.data,
| le16_to_cpu(eeprom->v1.len));
| }
| [...]The eeprom->v{1,2}.len is set by the driver in p54_download_eeprom(). The device is supposed to provide the same length back to the driver. But yes, it's possible (like shown in the report) to alter the value to something that causes a crash/panic due to overrun.
This patch addresses the issue by adding the size to the common device context, so p54_rx_eeprom_readback no longer relies on possibly tampered values... That said, it also checks if the "firmware" altered the value and no longer copies them.
The one, small saving grace is: Before the driver tries to read the eeprom, it needs to upload >a< firmware. the vendor firmware has a proprietary license and as a reason, it is not present on most distributions by default.
--- drivers/net/wireless/intersil/p54/fwio.c | 2 ++ drivers/net/wireless/intersil/p54/p54.h | 1 + drivers/net/wireless/intersil/p54/txrx.c | 13 +++++++++---- 3 files changed, 12 insertions(+), 4 deletions(-)
drivers/net/wireless/intersil/p54/fwio.c +2 -0
@@ -231,6 +231,7 @@ int p54_download_eeprom(struct p54_commomutex_lock (&priv->eeprom_mutex); priv->eeprom = buf; + priv->eeprom_slice_size = len; eeprom_hdr =skb_put (skb, eeprom_hdr_size + len);if (priv->fw_var <0x509 ) {
@@ -253,6 +254,7 @@ int p54_download_eeprom(struct p54_commo ret = -EBUSY ; } priv->eeprom =NULL ; + priv->eeprom_slice_size =0 ;mutex_unlock (&priv->eeprom_mutex);return ret; }
drivers/net/wireless/intersil/p54/p54.h +1 -0
@@ -258,6 +258,7 @@ struct p54_common {/* eeprom handling */ void *eeprom; +size_t eeprom_slice_size;struct completion eeprom_comp;struct mutex eeprom_mutex; };
drivers/net/wireless/intersil/p54/txrx.c +9 -4
@@ -496,14 +496,19 @@ static void p54_rx_eeprom_readback(strucreturn ;if (priv->fw_var >=0x509 ) { -memcpy (priv->eeprom, eeprom->v2.data, -le16_to_cpu (eeprom->v2.len)); +if (le16_to_cpu (eeprom->v2.len) != priv->eeprom_slice_size) +return ; + +memcpy (priv->eeprom, eeprom->v2.data, priv->eeprom_slice_size); }else { -memcpy (priv->eeprom, eeprom->v1.data, -le16_to_cpu (eeprom->v1.len)); +if (le16_to_cpu (eeprom->v1.len) != priv->eeprom_slice_size) +return ; + +memcpy (priv->eeprom, eeprom->v1.data, priv->eeprom_slice_size); } priv->eeprom =NULL ; + priv->eeprom_slice_size =0 ; tmp =p54_find_and_unlink_skb (priv, hdr->req_id);dev_kfree_skb_any (tmp);complete (&priv->eeprom_comp);
Greg Kroah-Hartman
maintainerPATCH 32/592 wifi: mt76: mt7925: fix host interrupt register initialization
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Lo <[email protected]>
commit ca872e0ad97159375da8f3d05cac1f48239e01d7 upstream.
ensure proper interrupt handling and aligns with the hardware spec by updating the register offset for MT_WFDMA0_HOST_INT_ENA.
--- drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 3 --- drivers/net/wireless/mediatek/mt76/mt7925/regs.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/pci.c +0 -3
@@ -490,9 +490,6 @@ static int mt7925_pci_suspend(struct dev/* disable interrupt */ mt76_wr (dev, dev->irq_map->host_irq_enable,0 ); -mt76_wr (dev,MT_WFDMA0_HOST_INT_DIS , - dev->irq_map->tx.all_complete_mask | -MT_INT_RX_DONE_ALL |MT_INT_MCU_CMD );mt76_wr (dev,MT_PCIE_MAC_INT_ENABLE ,0x0 );
drivers/net/wireless/mediatek/mt76/mt7925/regs.h +1 -1
@@ -28,7 +28,7 @@#define MT_MDP_TO_HIF 0#define MT_MDP_TO_WM 1 -#define MT_WFDMA0_HOST_INT_ENA MT_WFDMA0(0x228) +#define MT_WFDMA0_HOST_INT_ENA MT_WFDMA0(0x204)#define MT_WFDMA0_HOST_INT_DIS MT_WFDMA0(0x22c)#define HOST_RX_DONE_INT_ENA4 BIT(12)#define HOST_RX_DONE_INT_ENA5 BIT(13)
Greg Kroah-Hartman
maintainerPATCH 33/592 anon_inode: use a proper mode internally
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <[email protected]>
commit cfd86ef7e8e7b9e015707e46479a6b1de141eed0 upstream.
This allows the VFS to not trip over anonymous inodes and we can add asserts based on the mode into the vfs. When we report it to userspace we can simply hide the mode to avoid regressions. I've audited all direct callers of alloc_anon_inode() and only secretmen overrides i_mode and i_op inode operations but it already uses a regular file.
--- fs/anon_inodes.c | 36 ++++++++++++++++++++++++++++++++++++ fs/internal.h | 3 +++ fs/libfs.c | 8 +++++++- 3 files changed, 46 insertions(+), 1 deletion(-)
fs/anon_inodes.c +36 -0
@@ -24,10 +24,44 @@#include <linux/uaccess.h> +#include "internal.h" +static struct vfsmount *anon_inode_mnt__ro_after_init ;static struct inode *anon_inode_inode__ro_after_init ;/* +* User space expects anonymous inodes to have no file type in st_mode. +* +* In particular, 'lsof' has this legacy logic: +* +* type = s->st_mode & S_IFMT; +* switch (type) { +* ... +* case 0: +* if (!strcmp(p, "anon_inode")) +* Lf->ntype = Ntype = N_ANON_INODE; +* +* to detect our old anon_inode logic. +* +* Rather than mess with our internal sane inode data, just fix it +* up here in getattr() by masking off the format bits. +*/ +int anon_inode_getattr (struct mnt_idmap *idmap,const struct path *path, +struct kstat *stat,u32 request_mask, +unsigned int query_flags) +{ +struct inode *inode =d_inode (path->dentry); + +generic_fillattr (&nop_mnt_idmap, request_mask, inode, stat); + stat->mode &= ~S_IFMT ; +return 0 ; +} + +static const struct inode_operations anon_inode_operations = { + .getattr = anon_inode_getattr, +}; + +/* * anon_inodefs_dname() is called from d_path(). */ static char *anon_inodefs_dname (struct dentry *dentry,char *buffer,int buflen)
@@ -66,6 +100,7 @@ static struct inode *anon_inode_make_secif (IS_ERR (inode))return inode; inode->i_flags &= ~S_PRIVATE ; + inode->i_op = &anon_inode_operations; error =security_inode_init_security_anon (inode, &QSTR (name), context_inode);if (error) {
@@ -313,6 +348,7 @@ static int __init anon_inode_init(void) anon_inode_inode =alloc_anon_inode (anon_inode_mnt->mnt_sb);if (IS_ERR (anon_inode_inode))panic ("anon_inode_init() inode allocation failed (%ld)\n" ,PTR_ERR (anon_inode_inode)); + anon_inode_inode->i_op = &anon_inode_operations;return 0 ; }
fs/internal.h +3 -0
@@ -343,3 +343,6 @@ static inline bool path_mounted(const stvoid file_f_owner_release (struct file *file);bool file_seek_cur_needs_f_lock (struct file *file);int statmount_mnt_idmap (struct mnt_idmap *idmap,struct seq_file *seq,bool uid_map); +int anon_inode_getattr (struct mnt_idmap *idmap,const struct path *path, +struct kstat *stat,u32 request_mask, +unsigned int query_flags);
fs/libfs.c +7 -1
@@ -1647,7 +1647,13 @@ struct inode *alloc_anon_inode(struct su* that it already _is_ on the dirty list. */ inode->i_state =I_DIRTY ; - inode->i_mode =S_IRUSR |S_IWUSR ; +/* +* Historically anonymous inodes didn't have a type at all and +* userspace has come to rely on this. Internally they're just +* regular files but S_IFREG is masked off when reporting +* information to userspace. +*/ + inode->i_mode =S_IFREG |S_IRUSR |S_IWUSR ; inode->i_uid =current_fsuid (); inode->i_gid =current_fsgid (); inode->i_flags |=S_PRIVATE ;
Greg Kroah-Hartman
maintainerPATCH 24/592 s390/pci: Prevent self deletion in disable_slot()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niklas Schnelle <[email protected]>
commit 47c397844869ad0e6738afb5879c7492f4691122 upstream.
As disable_slot() takes a struct zpci_dev from the Configured to the Standby state. In Standby there is still a hotplug slot so this is not usually a case of sysfs self deletion. This is important because self deletion gets very hairy in terms of locking (see for example recover_store() in arch/s390/pci/pci_sysfs.c).
Because the pci_dev_put() is not within the critical section of the zdev->state_lock however, disable_slot() can turn into a case of self deletion if zPCI device event handling slips between the mutex_unlock() and the pci_dev_put(). If the latter is the last put and zpci_release_device() is called this then tries to remove the hotplug slot via zpci_exit_slot() which will try to remove the hotplug slot directory the disable_slot() is part of i.e. self deletion.
Prevent this by widening the zdev->state_lock critical section to include the pci_dev_put() which is then guaranteed to happen with the struct zpci_dev still in Standby state ensuring it will not lead to a zpci_release_device() call as at least the zPCI event handling code still holds a reference.
--- drivers/pci/hotplug/s390_pci_hpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/hotplug/s390_pci_hpc.c +1 -1
@@ -65,9 +65,9 @@ static int disable_slot(struct hotplug_s rc =zpci_deconfigure_device (zdev); out: -mutex_unlock (&zdev->state_lock);if (pdev)pci_dev_put (pdev); +mutex_unlock (&zdev->state_lock);return rc; }
Greg Kroah-Hartman
maintainerPATCH 73/592 media: iris: fix error code in iris_load_fw_to_memory()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit e68c3c50a736490d9c07888fe525718d16ff9e9c upstream.
Return -ENOMEM if memremap() fails. Don't return success.
--- drivers/media/platform/qcom/iris/iris_firmware.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/platform/qcom/iris/iris_firmware.c +3 -1
@@ -53,8 +53,10 @@ static int iris_load_fw_to_memory(struct iris_core *core, const char *fw_name) } mem_virt =memremap (mem_phys, res_size,MEMREMAP_WC ); -if (!mem_virt) +if (!mem_virt) { + ret = -ENOMEM ; goto err_release_fw; + } ret =qcom_mdt_load (dev, firmware, fw_name, pas_id, mem_virt, mem_phys, res_size,NULL );
Signature · 1 line
2.50.0
Greg Kroah-Hartman
maintainerPATCH 82/592 media: videobuf2: use sgtable-based scatterlist wrappers
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <[email protected]>
commit a704a3c503ae1cfd9de8a2e2d16a0c9430e98162 upstream.
Use common wrappers operating directly on the struct sg_table objects to fix incorrect use of scatterlists sync calls. dma_sync_sg_for_*() functions have to be called with the number of elements originally passed to dma_map_sg_*() function, not the one returned in sgt->nents.
--- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/common/videobuf2/videobuf2-dma-sg.c +2 -2
@@ -469,7 +469,7 @@ vb2_dma_sg_dmabuf_ops_begin_cpu_access(sstruct vb2_dma_sg_buf *buf = dbuf->priv;struct sg_table *sgt = buf->dma_sgt; -dma_sync_sg_for_cpu (buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); +dma_sync_sgtable_for_cpu (buf->dev, sgt, buf->dma_dir);return 0 ; }
@@ -480,7 +480,7 @@ vb2_dma_sg_dmabuf_ops_end_cpu_access(strstruct vb2_dma_sg_buf *buf = dbuf->priv;struct sg_table *sgt = buf->dma_sgt; -dma_sync_sg_for_device (buf->dev, sgt->sgl, sgt->nents, buf->dma_dir); +dma_sync_sgtable_for_device (buf->dev, sgt, buf->dma_dir);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 83/592 media: vidtv: Terminating the subsequent process of initialization failure
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Edward Adam Davis <[email protected]>
commit 1d5f88f053480326873115092bc116b7d14916ba upstream.
syzbot reported a slab-use-after-free Read in vidtv_mux_init. [1]
After PSI initialization fails, the si member is accessed again, resulting in this uaf.
After si initialization fails, the subsequent process needs to be exited.
[1]
BUG: KASAN: slab-use-after-free in vidtv_mux_pid_ctx_init drivers/media/test-drivers/vidtv/vidtv_mux.c:78 [inline] BUG: KASAN: slab-use-after-free in vidtv_mux_init+0xac2/0xbe0 drivers/media/test-drivers/vidtv/vidtv_mux.c:524 Read of size 8 at addr ffff88802fa42acc by task syz.2.37/6059 CPU: 0 UID: 0 PID: 6059 Comm: syz.2.37 Not tainted 6.14.0-rc5-syzkaller #0 Hardware name: Google Compute Engine, BIOS Google 02/12/2025 Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xd9/0x110 mm/kasan/report.c:634 vidtv_mux_pid_ctx_init drivers/media/test-drivers/vidtv/vidtv_mux.c:78 vidtv_mux_init+0xac2/0xbe0 drivers/media/test-drivers/vidtv/vidtv_mux.c:524 vidtv_start_streaming drivers/media/test-drivers/vidtv/vidtv_bridge.c:194 vidtv_start_feed drivers/media/test-drivers/vidtv/vidtv_bridge.c:239 dmx_section_feed_start_filtering drivers/media/dvb-core/dvb_demux.c:973 dvb_dmxdev_feed_start drivers/media/dvb-core/dmxdev.c:508 [inline] dvb_dmxdev_feed_restart.isra.0 drivers/media/dvb-core/dmxdev.c:537 dvb_dmxdev_filter_stop+0x2b4/0x3a0 drivers/media/dvb-core/dmxdev.c:564 dvb_dmxdev_filter_free drivers/media/dvb-core/dmxdev.c:840 [inline] dvb_demux_release+0x92/0x550 drivers/media/dvb-core/dmxdev.c:1246 __fput+0x3ff/0xb70 fs/file_table.c:464 task_work_run+0x14e/0x250 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xad8/0x2d70 kernel/exit.c:938 do_group_exit+0xd3/0x2a0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1096 x64_sys_call+0x151f/0x1720 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f871d58d169 Code: Unable to access opcode bytes at 0x7f871d58d13f. RSP: 002b:00007fff4b19a788 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f871d58d169 RDX: 0000000000000064 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007fff4b19a7ec R08: 0000000b4b19a87f R09: 00000000000927c0 R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000003 R13: 00000000000927c0 R14: 000000000001d553 R15: 00007fff4b19a840 </TASK> Allocated by task 6059: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] vidtv_psi_pat_table_init drivers/media/test-drivers/vidtv/vidtv_psi.c:970 vidtv_channel_si_init drivers/media/test-drivers/vidtv/vidtv_channel.c:423 vidtv_mux_init drivers/media/test-drivers/vidtv/vidtv_mux.c:519 vidtv_start_streaming drivers/media/test-drivers/vidtv/vidtv_bridge.c:194 vidtv_start_feed drivers/media/test-drivers/vidtv/vidtv_bridge.c:239 dmx_section_feed_start_filtering drivers/media/dvb-core/dvb_demux.c:973 dvb_dmxdev_feed_start drivers/media/dvb-core/dmxdev.c:508 [inline] dvb_dmxdev_feed_restart.isra.0 drivers/media/dvb-core/dmxdev.c:537 dvb_dmxdev_filter_stop+0x2b4/0x3a0 drivers/media/dvb-core/dmxdev.c:564 dvb_dmxdev_filter_free drivers/media/dvb-core/dmxdev.c:840 [inline] dvb_demux_release+0x92/0x550 drivers/media/dvb-core/dmxdev.c:1246 __fput+0x3ff/0xb70 fs/file_table.c:464 task_work_run+0x14e/0x250 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xad8/0x2d70 kernel/exit.c:938 do_group_exit+0xd3/0x2a0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1096 x64_sys_call arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6059: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4609 [inline] kfree+0x2c4/0x4d0 mm/slub.c:4757 vidtv_channel_si_init drivers/media/test-drivers/vidtv/vidtv_channel.c:499 vidtv_mux_init drivers/media/test-drivers/vidtv/vidtv_mux.c:519 vidtv_start_streaming drivers/media/test-drivers/vidtv/vidtv_bridge.c:194 vidtv_start_feed drivers/media/test-drivers/vidtv/vidtv_bridge.c:239 dmx_section_feed_start_filtering drivers/media/dvb-core/dvb_demux.c:973 dvb_dmxdev_feed_start drivers/media/dvb-core/dmxdev.c:508 [inline] dvb_dmxdev_feed_restart.isra.0 drivers/media/dvb-core/dmxdev.c:537 dvb_dmxdev_filter_stop+0x2b4/0x3a0 drivers/media/dvb-core/dmxdev.c:564 dvb_dmxdev_filter_free drivers/media/dvb-core/dmxdev.c:840 [inline] dvb_demux_release+0x92/0x550 drivers/media/dvb-core/dmxdev.c:1246 __fput+0x3ff/0xb70 fs/file_table.c:464 task_work_run+0x14e/0x250 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xad8/0x2d70 kernel/exit.c:938 do_group_exit+0xd3/0x2a0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1096 x64_sys_call arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f
--- drivers/media/test-drivers/vidtv/vidtv_channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/test-drivers/vidtv/vidtv_channel.c +1 -1
@@ -497,7 +497,7 @@ free_sdt:vidtv_psi_sdt_table_destroy (m->si.sdt); free_pat:vidtv_psi_pat_table_destroy (m->si.pat); -return 0 ; +return -EINVAL ; }void vidtv_channel_si_destroy (struct vidtv_mux *m)
Greg Kroah-Hartman
maintainerPATCH 84/592 media: vivid: Change the siize of the composing
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Denis Arefev <[email protected]>
commit f83ac8d30c43fd902af7c84c480f216157b60ef0 upstream.
syzkaller found a bug:
BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_pattern drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2608 [inline] BUG: KASAN: vmalloc-out-of-bounds in tpg_fill_plane_buffer+0x1a9c/0x5af0 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2705 Write of size 1440 at addr ffffc9000d0ffda0 by task vivid-000-vid-c/5304 CPU: 0 UID: 0 PID: 5304 Comm: vivid-000-vid-c Not tainted 6.14.0-rc2-syzkaller-00039-g09fbf3d50205 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 tpg_fill_plane_pattern drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2608 [inline] tpg_fill_plane_buffer+0x1a9c/0x5af0 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:2705 vivid_fillbuff drivers/media/test-drivers/vivid/vivid-kthread-cap.c:470 [inline] vivid_thread_vid_cap_tick+0xf8e/0x60d0 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:629 vivid_thread_vid_cap+0x8aa/0xf30 drivers/media/test-drivers/vivid/vivid-kthread-cap.c:767 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 </TASK>
The composition size cannot be larger than the size of fmt_cap_rect. So execute v4l2_rect_map_inside() even if has_compose_cap == 0.
--- drivers/media/test-drivers/vivid/vivid-vid-cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/test-drivers/vivid/vivid-vid-cap.c +1 -1
@@ -946,8 +946,8 @@ int vivid_vid_cap_s_selection(struct filif (dev->has_compose_cap) {v4l2_rect_set_min_size (compose, &min_rect);v4l2_rect_set_max_size (compose, &max_rect); -v4l2_rect_map_inside (compose, &fmt); } +v4l2_rect_map_inside (compose, &fmt); dev->fmt_cap_rect = fmt;tpg_s_buf_height (&dev->tpg, fmt.height); }else if (dev->has_compose_cap) {
Greg Kroah-Hartman
maintainerPATCH 85/592 media: imx-jpeg: Drop the first error frames
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Qian <[email protected]>
commit d52b9b7e2f10d22a49468128540533e8d76910cd upstream.
When an output buffer contains error frame header, v4l2_jpeg_parse_header() will return error, then driver will mark this buffer and a capture buffer done with error flag in device_run().
But if the error occurs in the first frames, before setup the capture queue, there is no chance to schedule device_run(), and there may be no capture to mark error.
So we need to drop this buffer with error flag, and make the decoding can continue.
--- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +11 -1
@@ -1918,9 +1918,19 @@ static void mxc_jpeg_buf_queue(struct vb jpeg_src_buf =vb2_to_mxc_buf (vb); jpeg_src_buf->jpeg_parse_error = false; ret =mxc_jpeg_parse (ctx, vb); -if (ret) +if (ret) { jpeg_src_buf->jpeg_parse_error = true; +/* +* if the capture queue is not setup, the device_run() won't be scheduled, +* need to drop the error buffer, so that the decoding can continue +*/ +if (!vb2_is_streaming (v4l2_m2m_get_dst_vq (ctx->fh.m2m_ctx))) { +v4l2_m2m_buf_done (vbuf,VB2_BUF_STATE_ERROR ); +return ; + } + } + end:v4l2_m2m_buf_queue (ctx->fh.m2m_ctx, vbuf); }
Greg Kroah-Hartman
maintainerPATCH 86/592 media: imx-jpeg: Move mxc_jpeg_free_slot_data() ahead
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Qian <[email protected]>
commit 46e9c092f850bd7b4d06de92d3d21877f49a3fcb upstream.
Move function mxc_jpeg_free_slot_data() above mxc_jpeg_alloc_slot_data() allowing to call that function during allocation failures. No functional changes are made.
--- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-)
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +20 -20
@@ -752,6 +752,26 @@ static int mxc_get_free_slot(struct mxc_return -1 ; } +static void mxc_jpeg_free_slot_data (struct mxc_jpeg_dev *jpeg) +{ +/* free descriptor for decoding/encoding phase */ +dma_free_coherent (jpeg->dev,sizeof (struct mxc_jpeg_desc ), + jpeg->slot_data.desc, + jpeg->slot_data.desc_handle); + +/* free descriptor for encoder configuration phase / decoder DHT */ +dma_free_coherent (jpeg->dev,sizeof (struct mxc_jpeg_desc ), + jpeg->slot_data.cfg_desc, + jpeg->slot_data.cfg_desc_handle); + +/* free configuration stream */ +dma_free_coherent (jpeg->dev,MXC_JPEG_MAX_CFG_STREAM , + jpeg->slot_data.cfg_stream_vaddr, + jpeg->slot_data.cfg_stream_handle); + + jpeg->slot_data.used = false; +} +static bool mxc_jpeg_alloc_slot_data (struct mxc_jpeg_dev *jpeg) {struct mxc_jpeg_desc *desc;
@@ -798,26 +818,6 @@ err:return false; } -static void mxc_jpeg_free_slot_data (struct mxc_jpeg_dev *jpeg) -{ -/* free descriptor for decoding/encoding phase */ -dma_free_coherent (jpeg->dev,sizeof (struct mxc_jpeg_desc ), - jpeg->slot_data.desc, - jpeg->slot_data.desc_handle); - -/* free descriptor for encoder configuration phase / decoder DHT */ -dma_free_coherent (jpeg->dev,sizeof (struct mxc_jpeg_desc ), - jpeg->slot_data.cfg_desc, - jpeg->slot_data.cfg_desc_handle); - -/* free configuration stream */ -dma_free_coherent (jpeg->dev,MXC_JPEG_MAX_CFG_STREAM , - jpeg->slot_data.cfg_stream_vaddr, - jpeg->slot_data.cfg_stream_handle); - - jpeg->slot_data.used = false; -} -static void mxc_jpeg_check_and_set_last_buffer (struct mxc_jpeg_ctx *ctx,struct vb2_v4l2_buffer *src_buf,struct vb2_v4l2_buffer *dst_buf)
Greg Kroah-Hartman
maintainerPATCH 87/592 media: imx-jpeg: Reset slot data pointers when freed
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Qian <[email protected]>
commit faa8051b128f4b34277ea8a026d02d83826f8122 upstream.
Ensure that the slot data pointers are reset to NULL and handles are set to 0 after freeing the coherent memory. This makes he function mxc_jpeg_alloc_slot_data() and mxc_jpeg_free_slot_data() safe to be called multiple times.
--- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +6 -0
@@ -758,16 +758,22 @@ static void mxc_jpeg_free_slot_data(strudma_free_coherent (jpeg->dev,sizeof (struct mxc_jpeg_desc ), jpeg->slot_data.desc, jpeg->slot_data.desc_handle); + jpeg->slot_data.desc =NULL ; + jpeg->slot_data.desc_handle =0 ;/* free descriptor for encoder configuration phase / decoder DHT */ dma_free_coherent (jpeg->dev,sizeof (struct mxc_jpeg_desc ), jpeg->slot_data.cfg_desc, jpeg->slot_data.cfg_desc_handle); + jpeg->slot_data.cfg_desc_handle =0 ; + jpeg->slot_data.cfg_desc =NULL ;/* free configuration stream */ dma_free_coherent (jpeg->dev,MXC_JPEG_MAX_CFG_STREAM , jpeg->slot_data.cfg_stream_vaddr, jpeg->slot_data.cfg_stream_handle); + jpeg->slot_data.cfg_stream_vaddr =NULL ; + jpeg->slot_data.cfg_stream_handle =0 ; jpeg->slot_data.used = false; }
Greg Kroah-Hartman
maintainerPATCH 88/592 media: imx-jpeg: Cleanup after an allocation error
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Qian <[email protected]>
commit 7500bb9cf164edbb2c8117d57620227b1a4a8369 upstream.
When allocation failures are not cleaned up by the driver, further allocation errors will be false-positives, which will cause buffers to remain uninitialized and cause NULL pointer dereferences. Ensure proper cleanup of failed allocations to prevent these issues.
--- drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +1 -0
@@ -820,6 +820,7 @@ skip_alloc:return true; err:dev_err (jpeg->dev,"Could not allocate descriptors for slot %d" , jpeg->slot_data.slot); +mxc_jpeg_free_slot_data (jpeg);return false; }
Greg Kroah-Hartman
maintainerPATCH 89/592 media: uvcvideo: Return the number of processed controls
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda <[email protected]>
commit ba4fafb02ad6a4eb2e00f861893b5db42ba54369 upstream.
If we let know our callers that we have not done anything, they will be able to optimize their decisions.
Message-ID: <[email protected]>
--- drivers/media/usb/uvc/uvc_ctrl.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/media/usb/uvc/uvc_ctrl.c +10 -1
@@ -2090,12 +2090,17 @@ int uvc_ctrl_begin(struct uvc_video_chaireturn mutex_lock_interruptible (&chain->ctrl_mutex) ? -ERESTARTSYS :0 ; } +/* +* Returns the number of uvc controls that have been correctly set, or a +* negative number if there has been an error. +*/ static int uvc_ctrl_commit_entity (struct uvc_device *dev,struct uvc_fh *handle,struct uvc_entity *entity,int rollback,struct uvc_control **err_ctrl) { +unsigned int processed_ctrls =0 ;struct uvc_control *ctrl;unsigned int i;int ret;
@@ -2130,6 +2135,9 @@ static int uvc_ctrl_commit_entity(structelse ret =0 ; +if (!ret) + processed_ctrls++; +if (rollback || ret <0 ) memcpy(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT), uvc_ctrl_data(ctrl, UVC_CTRL_DATA_BACKUP),
@@ -2148,7 +2156,7 @@ static int uvc_ctrl_commit_entity(structuvc_ctrl_set_handle (handle, ctrl, handle); } -return 0 ; +return processed_ctrls; } static int uvc_ctrl_find_ctrl_idx(struct uvc_entity *entity,
@@ -2195,6 +2203,7 @@ int __uvc_ctrl_commit(struct uvc_fh *hanif (!rollback)uvc_ctrl_send_events (handle, ctrls->controls, ctrls->count); + ret =0 ; done:mutex_unlock (&chain->ctrl_mutex);return ret;
Greg Kroah-Hartman
maintainerPATCH 90/592 media: uvcvideo: Send control events for partial succeeds
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda <[email protected]>
commit 5c791467aea6277430da5f089b9b6c2a9d8a4af7 upstream.
Today, when we are applying a change to entities A, B. If A succeeds and B fails the events for A are not sent.
This change changes the code so the events for A are send right after they happen.
Message-ID: <[email protected]>
--- drivers/media/usb/uvc/uvc_ctrl.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/media/usb/uvc/uvc_ctrl.c +9 -3
@@ -1943,7 +1943,9 @@ static bool uvc_ctrl_xctrls_has_control( }static void uvc_ctrl_send_events (struct uvc_fh *handle, -const struct v4l2_ext_control *xctrls,unsigned int xctrls_count) +struct uvc_entity *entity, +const struct v4l2_ext_control *xctrls, +unsigned int xctrls_count) {struct uvc_control_mapping *mapping;struct uvc_control *ctrl;
@@ -1955,6 +1957,9 @@ static void uvc_ctrl_send_events(structs32 value; ctrl =uvc_find_control (handle->chain, xctrls[i].id, &mapping); +if (ctrl->entity != entity) +continue ; +if (ctrl->info.flags &UVC_CTRL_FLAG_ASYNCHRONOUS )/* Notification will be sent from an Interrupt event. */ continue ;
@@ -2198,11 +2203,12 @@ int __uvc_ctrl_commit(struct uvc_fh *hanuvc_ctrl_find_ctrl_idx (entity, ctrls, err_ctrl); goto done; + }else if (ret >0 && !rollback) { +uvc_ctrl_send_events (handle, entity, + ctrls->controls, ctrls->count); } } -if (!rollback) -uvc_ctrl_send_events (handle, ctrls->controls, ctrls->count); ret =0 ; done:mutex_unlock (&chain->ctrl_mutex);
Greg Kroah-Hartman
maintainerPATCH 91/592 media: uvcvideo: Fix deferred probing error
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Ribalda <[email protected]>
commit 387e8939307192d5a852a2afeeb83427fa477151 upstream.
uvc_gpio_parse() can return -EPROBE_DEFER when the GPIOs it depends on have not yet been probed. This return code should be propagated to the caller of uvc_probe() to ensure that probing is retried when the required GPIOs become available.
Currently, this error code is incorrectly converted to -ENODEV, causing some internal cameras to be ignored.
This commit fixes this issue by propagating the -EPROBE_DEFER error.
Message-ID: <[email protected]>
--- drivers/media/usb/uvc/uvc_driver.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-)
drivers/media/usb/uvc/uvc_driver.c +19 -8
@@ -2232,13 +2232,16 @@ static int uvc_probe(struct usb_interfac#endif /* Parse the Video Class control descriptor. */ -if (uvc_parse_control (dev) <0 ) { + ret =uvc_parse_control (dev); +if (ret <0 ) { + ret = -ENODEV ;uvc_dbg (dev,PROBE ,"Unable to parse UVC descriptors\n" ); goto error; }/* Parse the associated GPIOs. */ -if (uvc_gpio_parse (dev) <0 ) { + ret =uvc_gpio_parse (dev); +if (ret <0 ) {uvc_dbg (dev,PROBE ,"Unable to parse UVC GPIOs\n" ); goto error; }
@@ -2264,24 +2267,32 @@ static int uvc_probe(struct usb_interfac }/* Register the V4L2 device. */ -if (v4l2_device_register (&intf->dev, &dev->vdev) <0 ) + ret =v4l2_device_register (&intf->dev, &dev->vdev); +if (ret <0 ) goto error;/* Scan the device for video chains. */ -if (uvc_scan_device (dev) <0 ) +if (uvc_scan_device (dev) <0 ) { + ret = -ENODEV ; goto error; + }/* Initialize controls. */ -if (uvc_ctrl_init_device (dev) <0 ) +if (uvc_ctrl_init_device (dev) <0 ) { + ret = -ENODEV ; goto error; + }/* Register video device nodes. */ -if (uvc_register_chains (dev) <0 ) +if (uvc_register_chains (dev) <0 ) { + ret = -ENODEV ; goto error; + }#ifdef CONFIG_MEDIA_CONTROLLER /* Register the media device node */ -if (media_device_register (&dev->mdev) <0 ) + ret =media_device_register (&dev->mdev); +if (ret <0 ) goto error;#endif /* Save our data pointer in the interface data. */
@@ -2315,7 +2326,7 @@ static int uvc_probe(struct usb_interfac error:uvc_unregister_video (dev);kref_put (&dev->ref, uvc_delete); -return -ENODEV ; +return ret; }static void uvc_disconnect (struct usb_interface *intf)
Greg Kroah-Hartman
maintainerPATCH 74/592 media: mediatek: vcodec: Correct vsi_core framebuffer size
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fei Shao <[email protected]>
commit f19035b86382f635a0d13d177b601babaf263a12 upstream.
The framebuffer size for decoder instances was being incorrectly set - inst->vsi_core->fb.y.size was assigned twice consecutively.
Assign the second picinfo framebuffer size to the C framebuffer instead, which appears to be the intended target based on the surrounding code.
--- drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_hevc_req_multi_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_hevc_req_multi_if.c +1 -1
@@ -821,7 +821,7 @@ static int vdec_hevc_slice_setup_core_bu inst->vsi_core->fb.y.dma_addr = y_fb_dma; inst->vsi_core->fb.y.size = ctx->picinfo.fb_sz[0 ]; inst->vsi_core->fb.c.dma_addr = c_fb_dma; - inst->vsi_core->fb.y.size = ctx->picinfo.fb_sz[1 ]; + inst->vsi_core->fb.c.size = ctx->picinfo.fb_sz[1 ]; inst->vsi_core->dec.vdec_fb_va = (unsigned long )fb;
Greg Kroah-Hartman
maintainerPATCH 92/592 arm64/mm: Close theoretical race where stale TLB entry remains valid
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryan Roberts <[email protected]>
commit 4b634918384c0f84c33aeb4dd9fd4c38e7be5ccb upstream.
Commit 3ea277194daa ("mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries") describes a race that, prior to the commit, could occur between reclaim and operations such as mprotect() when using reclaim's tlbbatch mechanism. See that commit for details but the summary is:
"""
Nadav Amit identified a theoritical race between page reclaim and mprotect due to TLB flushes being batched outside of the PTL being held.
He described the race as follows:
CPU0 CPU1 ---- ---- user accesses memory using RW PTE [PTE now cached in TLB] try_to_unmap_one() ==> ptep_get_and_clear() ==> set_tlb_ubc_flush_pending() mprotect(addr, PROT_READ) ==> change_pte_range() ==> [ PTE non-present - no flush ] user writes using cached RW PTE ... try_to_unmap_flush()
"""
The solution was to insert flush_tlb_batched_pending() in mprotect() and friends to explcitly drain any pending reclaim TLB flushes. In the modern version of this solution, arch_flush_tlb_batched_pending() is called to do that synchronisation.
arm64's tlbbatch implementation simply issues TLBIs at queue-time (arch_tlbbatch_add_pending()), eliding the trailing dsb(ish). The trailing dsb(ish) is finally issued in arch_tlbbatch_flush() at the end of the batch to wait for all the issued TLBIs to complete.
Now, the Arm ARM states:
"""
The completion of the TLB maintenance instruction is guaranteed only by the execution of a DSB by the observer that performed the TLB maintenance instruction. The execution of a DSB by a different observer does not have this effect, even if the DSB is known to be executed after the TLB maintenance instruction is observed by that different observer. """
arch_tlbbatch_add_pending() and arch_tlbbatch_flush() conform to this requirement because they are called from the same task (either kswapd or caller of madvise(MADV_PAGEOUT)), so either they are on the same CPU or if the task was migrated, __switch_to() contains an extra dsb(ish).
HOWEVER, arm64's arch_flush_tlb_batched_pending() is also implemented as a dsb(ish). But this may be running on a CPU remote from the one that issued the outstanding TLBIs. So there is no architectural gurantee of synchonization. Therefore we are still vulnerable to the theoretical race described in Commit 3ea277194daa ("mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries").
Fix this by flushing the entire mm in arch_flush_tlb_batched_pending(). This aligns with what the other arches that implement the tlbbatch feature do.
--- arch/arm64/include/asm/tlbflush.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
arch/arm64/include/asm/tlbflush.h +5 -4
@@ -323,13 +323,14 @@ static inline bool arch_tlbbatch_should_ }/* -* If mprotect/munmap/etc occurs during TLB batched flushing, we need to -* synchronise all the TLBI issued with a DSB to avoid the race mentioned in -* flush_tlb_batched_pending(). +* If mprotect/munmap/etc occurs during TLB batched flushing, we need to ensure +* all the previously issued TLBIs targeting mm have completed. But since we +* can be executing on a remote CPU, a DSB cannot guarantee this like it can +* for arch_tlbbatch_flush(). Our only option is to flush the entire mm. */ static inline void arch_flush_tlb_batched_pending (struct mm_struct *mm) { -dsb (ish); +flush_tlb_mm (mm); }/*
Greg Kroah-Hartman
maintainerPATCH 93/592 ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ross Stutterheim <[email protected]>
commit 96e0b355883006554a0bee3697da475971d6bba8 upstream.
arm/memremap: fix arch_memremap_can_ram_remap()
commit 260364d112bc ("arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map") added the definition of arch_memremap_can_ram_remap() for arm[64] specific filtering of what pages can be used from the linear mapping. memblock_is_map_memory() was called with the pfn of the address given to arch_memremap_can_ram_remap(); however, memblock_is_map_memory() expects to be given an address for arm, not a pfn.
This results in calls to memremap() returning a newly mapped area when it should return an address in the existing linear mapping.
Fix this by removing the address to pfn translation and pass the address directly.
--- arch/arm/mm/ioremap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/arm/mm/ioremap.c +1 -3
@@ -515,7 +515,5 @@ void __init early_ioremap_init(void)bool arch_memremap_can_ram_remap (resource_size_t offset,size_t size,unsigned long flags) { -unsigned long pfn =PHYS_PFN (offset); - -return memblock_is_map_memory (pfn); +return memblock_is_map_memory (offset); }
Greg Kroah-Hartman
maintainerPATCH 94/592 ARM: omap: pmic-cpcap: do not mess around without CPCAP or OMAP4
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andreas Kemnade <[email protected]>
commit 7397daf1029d5bfd3415ec8622f5179603d5702d upstream.
The late init call just writes to omap4 registers as soon as CONFIG_MFD_CPCAP is enabled without checking whether the cpcap driver is actually there or the SoC is indeed an OMAP4.
Rather do these things only with the right device combination.
Fixes booting the BT200 with said configuration enabled and non-factory X-Loader and probably also some surprising behavior on other devices.
--- arch/arm/mach-omap2/pmic-cpcap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/pmic-cpcap.c +5 -1
@@ -264,7 +264,11 @@ int __init omap4_cpcap_init(void)static int __init cpcap_late_init (void ) { -omap4_vc_set_pmic_signaling (PWRDM_POWER_RET ); +if (!of_find_compatible_node (NULL ,NULL ,"motorola,cpcap" )) +return 0 ; + +if (soc_is_omap443x () ||soc_is_omap446x () ||soc_is_omap447x ()) +omap4_vc_set_pmic_signaling (PWRDM_POWER_RET );return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 95/592 ASoC: codecs: wcd9375: Fix double free of regulator supplies
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
commit 63fe298652d4eda07d738bfcbbc59d1343a675ef upstream.
Driver gets regulator supplies in probe path with devm_regulator_bulk_get(), so should not call regulator_bulk_free() in error and remove paths to avoid double free.
--- sound/soc/codecs/wcd937x.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
sound/soc/codecs/wcd937x.c +1 -5
@@ -2945,10 +2945,8 @@ static int wcd937x_probe(struct platformreturn dev_err_probe (dev, ret,"Failed to get supplies\n" ); ret =regulator_bulk_enable (WCD937X_MAX_BULK_SUPPLY , wcd937x->supplies); -if (ret) { -regulator_bulk_free (WCD937X_MAX_BULK_SUPPLY , wcd937x->supplies); +if (ret)return dev_err_probe (dev, ret,"Failed to enable supplies\n" ); - }wcd937x_dt_parse_micbias_info (dev, wcd937x);
@@ -2984,7 +2982,6 @@ static int wcd937x_probe(struct platform err_disable_regulators:regulator_bulk_disable (WCD937X_MAX_BULK_SUPPLY , wcd937x->supplies); -regulator_bulk_free (WCD937X_MAX_BULK_SUPPLY , wcd937x->supplies);return ret; }
@@ -3001,7 +2998,6 @@ static void wcd937x_remove(struct platfopm_runtime_dont_use_autosuspend (dev);regulator_bulk_disable (WCD937X_MAX_BULK_SUPPLY , wcd937x->supplies); -regulator_bulk_free (WCD937X_MAX_BULK_SUPPLY , wcd937x->supplies); }#if defined(CONFIG_OF )
Greg Kroah-Hartman
maintainerPATCH 96/592 ASoC: codecs: wcd937x: Drop unused buck_supply
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
commit dc59189d32fc3dbddcf418fd4b418fb61f24ade6 upstream.
Last user of wcd937x_priv->buck_supply was removed in commit 216d04139a6d ("ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply").
--- sound/soc/codecs/wcd937x.c | 1 - 1 file changed, 1 deletion(-)
sound/soc/codecs/wcd937x.c +0 -1
@@ -91,7 +91,6 @@ struct wcd937x_priv {struct regmap_irq_chip *wcd_regmap_irq_chip;struct regmap_irq_chip_data *irq_chip;struct regulator_bulk_data supplies[WCD937X_MAX_BULK_SUPPLY ]; -struct regulator *buck_supply;struct snd_soc_jack *jack;unsigned long status_mask;s32 micb_ref[WCD937X_MAX_MICBIAS ];
Greg Kroah-Hartman
maintainerPATCH 97/592 block: use plug request list tail for one-shot backmerge attempt
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jens Axboe <[email protected]>
commit 961296e89dc3800e6a3abc3f5d5bb4192cf31e98 upstream.
Previously, the block layer stored the requests in the plug list in LIFO order. For this reason, blk_attempt_plug_merge() would check just the head entry for a back merge attempt, and abort after that unless requests for multiple queues existed in the plug list. If more than one request is present in the plug list, this makes the one-shot back merging less useful than before, as it'll always fail to find a quick merge candidate.
Use the tail entry for the one-shot merge attempt, which is the last added request in the list. If that fails, abort immediately unless there are multiple queues available. If multiple queues are available, then scan the list. Ideally the latter scan would be a backwards scan of the list, but as it currently stands, the plug list is singly linked and hence this isn't easily feasible.
--- block/blk-merge.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
block/blk-merge.c +13 -13
@@ -1127,20 +1127,20 @@ bool blk_attempt_plug_merge(struct requeif (!plug ||rq_list_empty (&plug->mq_list))return false; -rq_list_for_each (&plug->mq_list, rq) { -if (rq->q == q) { -if (blk_attempt_bio_merge (q, rq, bio, nr_segs, false) == -BIO_MERGE_OK ) -return true; -break ; - } + rq = plug->mq_list.tail; +if (rq->q == q) +return blk_attempt_bio_merge (q, rq, bio, nr_segs, false) == +BIO_MERGE_OK ; +else if (!plug->multiple_queues) +return false; -/* -* Only keep iterating plug list for merges if we have multiple -* queues -*/ -if (!plug->multiple_queues) -break ; +rq_list_for_each (&plug->mq_list, rq) { +if (rq->q != q) +continue ; +if (blk_attempt_bio_merge (q, rq, bio, nr_segs, false) == +BIO_MERGE_OK ) +return true; +break ; }return false; }
Greg Kroah-Hartman
maintainerPATCH 98/592 block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Damien Le Moal <[email protected]>
commit f705d33c2f0353039d03e5d6f18f70467d86080e upstream.
When blk_zone_write_plug_bio_endio() is called for a regular write BIO used to emulate a zone append operation, that is, a BIO flagged with BIO_EMULATES_ZONE_APPEND, the BIO operation code is restored to the original REQ_OP_ZONE_APPEND but the BIO_EMULATES_ZONE_APPEND flag is not cleared. Clear it to fully return the BIO to its orginal definition.
--- block/blk-zoned.c | 1 + 1 file changed, 1 insertion(+)
block/blk-zoned.c +1 -0
@@ -1225,6 +1225,7 @@ void blk_zone_write_plug_bio_endio(strucif (bio_flagged (bio,BIO_EMULATES_ZONE_APPEND )) { bio->bi_opf &= ~REQ_OP_MASK ; bio->bi_opf |=REQ_OP_ZONE_APPEND ; +bio_clear_flag (bio,BIO_EMULATES_ZONE_APPEND ); }/*
Greg Kroah-Hartman
maintainerPATCH 99/592 bus: mhi: ep: Update read pointer only after buffer is written
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sumit Kumar <[email protected]>
commit 6f18d174b73d0ceeaa341f46c0986436b3aefc9a upstream.
Inside mhi_ep_ring_add_element, the read pointer (rd_offset) is updated before the buffer is written, potentially causing race conditions where the host sees an updated read pointer before the buffer is actually written. Updating rd_offset prematurely can lead to the host accessing an uninitialized or incomplete element, resulting in data corruption.
Invoke the buffer write before updating rd_offset to ensure the element is fully written before signaling its availability.
--- drivers/bus/mhi/ep/ring.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/bus/mhi/ep/ring.c +10 -6
@@ -131,19 +131,23 @@ int mhi_ep_ring_add_element(struct mhi_e } old_offset = ring->rd_offset; -mhi_ep_ring_inc_index (ring);dev_dbg (dev,"Adding an element to ring at offset (%zu)\n" , ring->rd_offset); + buf_info.host_addr = ring->rbase + (old_offset *sizeof (*el)); + buf_info.dev_addr = el; + buf_info.size =sizeof (*el); + + ret = mhi_cntrl->write_sync (mhi_cntrl, &buf_info); +if (ret) +return ret; + +mhi_ep_ring_inc_index (ring);/* Update rp in ring context */ rp =cpu_to_le64 (ring->rd_offset *sizeof (*el) + ring->rbase);memcpy_toio ((void __iomem *) &ring->ring_ctx->generic.rp, &rp,sizeof (u64)); - buf_info.host_addr = ring->rbase + (old_offset *sizeof (*el)); - buf_info.dev_addr = el; - buf_info.size =sizeof (*el); - -return mhi_cntrl->write_sync (mhi_cntrl, &buf_info); +return ret; }void mhi_ep_ring_init (struct mhi_ep_ring *ring,enum mhi_ep_ring_type type,u32 id)
Greg Kroah-Hartman
maintainerPATCH 100/592 bus: mhi: host: Fix conflict between power_up and SYSERR
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Hugo <[email protected]>
commit 4d92e7c5ccadc79764674ffc2c88d329aabbb7e0 upstream.
When mhi_async_power_up() enables IRQs, it is possible that we could receive a SYSERR notification from the device if the firmware has crashed for some reason. Then the SYSERR notification queues a work item that cannot execute until the pm_mutex is released by mhi_async_power_up().
So the SYSERR work item will be pending. If mhi_async_power_up() detects the SYSERR, it will handle it. If the device is in PBL, then the PBL state transition event will be queued, resulting in a work item after the pending SYSERR work item. Once mhi_async_power_up() releases the pm_mutex, the SYSERR work item can run. It will blindly attempt to reset the MHI state machine, which is the recovery action for SYSERR. PBL/SBL are not interrupt driven and will ignore the MHI Reset unless SYSERR is actively advertised. This will cause the SYSERR work item to timeout waiting for reset to be cleared, and will leave the host state in SYSERR processing. The PBL transition work item will then run, and immediately fail because SYSERR processing is not a valid state for PBL transition.
This leaves the device uninitialized.
This issue has a fairly unique signature in the kernel log:
mhi mhi3: Requested to power ON
Qualcomm Cloud AI 100 0000:36:00.0: Fatal error received from device. Attempting to recover
mhi mhi3: Power on setup success
mhi mhi3: Device failed to exit MHI Reset state mhi mhi3: Device MHI is not in valid state
We cannot remove the SYSERR handling from mhi_async_power_up() because the device may be in the SYSERR state, but we missed the notification as the irq was fired before irqs were enabled. We also can't queue the SYSERR work item from mhi_async_power_up() if SYSERR is detected because that may result in a duplicate work item, and cause the same issue since the duplicate item will blindly issue MHI reset even if SYSERR is no longer active.
Instead, add a check in the SYSERR work item to make sure that MHI reset is only issued if the device is in SYSERR state for PBL or SBL EEs.
--- drivers/bus/mhi/host/pm.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/bus/mhi/host/pm.c +17 -1
@@ -602,6 +602,7 @@ static void mhi_pm_sys_error_transition(struct mhi_cmd *mhi_cmd;struct mhi_event_ctxt *er_ctxt;struct device *dev = &mhi_cntrl->mhi_dev->dev; +bool reset_device = false;int ret, i; dev_dbg(dev, "Transitioning from PM state: %s to: %s\n",
@@ -630,8 +631,23 @@ static void mhi_pm_sys_error_transition(/* Wake up threads waiting for state transition */ wake_up_all (&mhi_cntrl->state_event); -/* Trigger MHI RESET so that the device will not access host memory */ if (MHI_REG_ACCESS_VALID (prev_state)) { +/* +* If the device is in PBL or SBL, it will only respond to +* RESET if the device is in SYSERR state. SYSERR might +* already be cleared at this point. +*/ +enum mhi_state cur_state =mhi_get_mhi_state (mhi_cntrl); +enum mhi_ee_type cur_ee =mhi_get_exec_env (mhi_cntrl); + +if (cur_state ==MHI_STATE_SYS_ERR ) + reset_device = true; +else if (cur_ee !=MHI_EE_PBL && cur_ee !=MHI_EE_SBL ) + reset_device = true; + } + +/* Trigger MHI RESET so that the device will not access host memory */ +if (reset_device) {u32 in_reset =-1 ;unsigned long timeout =msecs_to_jiffies (mhi_cntrl->timeout_ms);
Greg Kroah-Hartman
maintainerPATCH 101/592 can: kvaser_pciefd: refine error prone echo_skb_max handling logic
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fedor Pchelkin <[email protected]>
commit 54ec8b08216f3be2cc98b33633d3c8ea79749895 upstream.
echo_skb_max should define the supported upper limit of echo_skb[] allocated inside the netdevice's priv. The corresponding size value provided by this driver to alloc_candev() is KVASER_PCIEFD_CAN_TX_MAX_COUNT which is 17.
But later echo_skb_max is rounded up to the nearest power of two (for the max case, that would be 32) and the tx/ack indices calculated further during tx/rx may exceed the upper array boundary. Kasan reported this for the ack case inside kvaser_pciefd_handle_ack_packet(), though the xmit function has actually caught the same thing earlier.
BUG: KASAN: slab-out-of-bounds in kvaser_pciefd_handle_ack_packet+0x2d7/0x92a drivers/net/can/kvaser_pciefd.c:1528 Read of size 8 at addr ffff888105e4f078 by task swapper/4/0 CPU: 4 UID: 0 PID: 0 Comm: swapper/4 Not tainted 6.15.0 #12 PREEMPT(voluntary) Call Trace: <IRQ> dump_stack_lvl lib/dump_stack.c:122 print_report mm/kasan/report.c:521 kasan_report mm/kasan/report.c:634 kvaser_pciefd_handle_ack_packet drivers/net/can/kvaser_pciefd.c:1528 kvaser_pciefd_read_packet drivers/net/can/kvaser_pciefd.c:1605 kvaser_pciefd_read_buffer drivers/net/can/kvaser_pciefd.c:1656 kvaser_pciefd_receive_irq drivers/net/can/kvaser_pciefd.c:1684 kvaser_pciefd_irq_handler drivers/net/can/kvaser_pciefd.c:1733 __handle_irq_event_percpu kernel/irq/handle.c:158 handle_irq_event kernel/irq/handle.c:210 handle_edge_irq kernel/irq/chip.c:833 __common_interrupt arch/x86/kernel/irq.c:296 common_interrupt arch/x86/kernel/irq.c:286 </IRQ>
Tx max count definitely matters for kvaser_pciefd_tx_avail(), but for seq numbers' generation that's not the case - we're free to calculate them as would be more convenient, not taking tx max count into account. The only downside is that the size of echo_skb[] should correspond to the max seq number (not tx max count), so in some situations a bit more memory would be consumed than could be.
Thus make the size of the underlying echo_skb[] sufficient for the rounded max tx value.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
--- drivers/net/can/kvaser_pciefd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/can/kvaser_pciefd.c +1 -2
@@ -966,7 +966,7 @@ static int kvaser_pciefd_setup_can_ctrlsu32 status, tx_nr_packets_max; netdev =alloc_candev (sizeof (struct kvaser_pciefd_can ), -KVASER_PCIEFD_CAN_TX_MAX_COUNT ); +roundup_pow_of_two (KVASER_PCIEFD_CAN_TX_MAX_COUNT ));if (!netdev)return -ENOMEM ;
@@ -995,7 +995,6 @@ static int kvaser_pciefd_setup_can_ctrls can->tx_max_count =min (KVASER_PCIEFD_CAN_TX_MAX_COUNT , tx_nr_packets_max -1 ); can->can.clock.freq = pcie->freq; - can->can.echo_skb_max =roundup_pow_of_two (can->tx_max_count);spin_lock_init (&can->lock); can->can.bittiming_const = &kvaser_pciefd_bittiming_const;
Greg Kroah-Hartman
maintainerPATCH 75/592 media: omap3isp: use sgtable-based scatterlist wrappers
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <[email protected]>
commit 3de572fe2189a4a0bd80295e1f478401e739498e upstream.
Use common wrappers operating directly on the struct sg_table objects to fix incorrect use of scatterlists sync calls. dma_sync_sg_for_*() functions have to be called with the number of elements originally passed to dma_map_sg_*() function, not the one returned in sgtable's nents.
--- drivers/media/platform/ti/omap3isp/ispccdc.c | 8 ++++---- drivers/media/platform/ti/omap3isp/ispstat.c | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-)
drivers/media/platform/ti/omap3isp/ispccdc.c +4 -4
@@ -446,8 +446,8 @@ static int ccdc_lsc_config(struct isp_ccif (ret <0 ) goto done; -dma_sync_sg_for_cpu (isp->dev, req->table.sgt.sgl, - req->table.sgt.nents,DMA_TO_DEVICE ); +dma_sync_sgtable_for_cpu (isp->dev, &req->table.sgt, +DMA_TO_DEVICE );if (copy_from_user (req->table.addr, config->lsc, req->config.size)) {
@@ -455,8 +455,8 @@ static int ccdc_lsc_config(struct isp_cc goto done; } -dma_sync_sg_for_device (isp->dev, req->table.sgt.sgl, - req->table.sgt.nents,DMA_TO_DEVICE ); +dma_sync_sgtable_for_device (isp->dev, &req->table.sgt, +DMA_TO_DEVICE ); }spin_lock_irqsave (&ccdc->lsc.req_lock, flags);
drivers/media/platform/ti/omap3isp/ispstat.c +2 -4
@@ -161,8 +161,7 @@ static void isp_stat_buf_sync_for_deviceif (ISP_STAT_USES_DMAENGINE (stat))return ; -dma_sync_sg_for_device (stat->isp->dev, buf->sgt.sgl, - buf->sgt.nents,DMA_FROM_DEVICE ); +dma_sync_sgtable_for_device (stat->isp->dev, &buf->sgt,DMA_FROM_DEVICE ); } static void isp_stat_buf_sync_for_cpu(struct ispstat *stat,
@@ -171,8 +170,7 @@ static void isp_stat_buf_sync_for_cpu(stif (ISP_STAT_USES_DMAENGINE (stat))return ; -dma_sync_sg_for_cpu (stat->isp->dev, buf->sgt.sgl, - buf->sgt.nents,DMA_FROM_DEVICE ); +dma_sync_sgtable_for_cpu (stat->isp->dev, &buf->sgt,DMA_FROM_DEVICE ); }static void isp_stat_buf_clear (struct ispstat *stat)
Greg Kroah-Hartman
maintainerPATCH 102/592 can: tcan4x5x: fix power regulator retrieval during probe
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brett Werling <[email protected]>
commit db22720545207f734aaa9d9f71637bfc8b0155e0 upstream.
Fixes the power regulator retrieval in tcan4x5x_can_probe() by ensuring the regulator pointer is not set to NULL in the successful return from devm_regulator_get_optional().
--- drivers/net/can/m_can/tcan4x5x-core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/can/m_can/tcan4x5x-core.c +5 -4
@@ -411,10 +411,11 @@ static int tcan4x5x_can_probe(struct spi priv =cdev_to_priv (mcan_class); priv->power =devm_regulator_get_optional (&spi->dev,"vsup" ); -if (PTR_ERR (priv->power) == -EPROBE_DEFER ) { - ret = -EPROBE_DEFER ; - goto out_m_can_class_free_dev; - }else { +if (IS_ERR (priv->power)) { +if (PTR_ERR (priv->power) == -EPROBE_DEFER ) { + ret = -EPROBE_DEFER ; + goto out_m_can_class_free_dev; + } priv->power =NULL ; }
Greg Kroah-Hartman
maintainerPATCH 103/592 ceph: avoid kernel BUG for encrypted inode with unaligned file size
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Viacheslav Dubeyko <[email protected]>
commit 060909278cc0a91373a20726bd3d8ce085f480a9 upstream.
The generic/397 test hits a BUG_ON for the case of encrypted inode with unaligned file size (for example, 33K or 1K):
[ 877.737811] run fstests generic/397 at 2025-01-03 12:34:40 [ 877.875761] libceph: mon0 (2)127.0.0.1:40674 session established [ 877.876130] libceph: client4614 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 877.991965] libceph: mon0 (2)127.0.0.1:40674 session established [ 877.992334] libceph: client4617 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 878.017234] libceph: mon0 (2)127.0.0.1:40674 session established [ 878.017594] libceph: client4620 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 878.031394] xfs_io (pid 18988) is setting deprecated v1 encryption policy; recommend upgrading to v2. [ 878.054528] libceph: mon0 (2)127.0.0.1:40674 session established [ 878.054892] libceph: client4623 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 878.070287] libceph: mon0 (2)127.0.0.1:40674 session established [ 878.070704] libceph: client4626 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 878.264586] libceph: mon0 (2)127.0.0.1:40674 session established [ 878.265258] libceph: client4629 fsid 19b90bca-f1ae-47a6-93dd-0b03ee637949 [ 878.374578] -----------[ cut here ]------------ [ 878.374586] kernel BUG at net/ceph/messenger.c:1070! [ 878.375150] Oops: invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 878.378145] CPU: 2 UID: 0 PID: 4759 Comm: kworker/2:9 Not tainted 6.13.0-rc5+ #1 [ 878.378969] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 878.380167] Workqueue: ceph-msgr ceph_con_workfn [ 878.381639] RIP: 0010:ceph_msg_data_cursor_init+0x42/0x50 [ 878.382152] Code: 89 17 48 8b 46 70 55 48 89 47 08 c7 47 18 00 00 00 00 48 89 e5 e8 de cc ff ff 5d 31 c0 31 d2 31 f6 31 ff c3 cc cc cc cc 0f 0b <0f> 0b 0f 0b 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 [ 878.383928] RSP: 0018:ffffb4ffc7cbbd28 EFLAGS: 00010287 [ 878.384447] RAX: ffffffff82bb9ac0 RBX: ffff981390c2f1f8 RCX: 0000000000000000 [ 878.385129] RDX: 0000000000009000 RSI: ffff981288232b58 RDI: ffff981390c2f378 [ 878.385839] RBP: ffffb4ffc7cbbe18 R08: 0000000000000000 R09: 0000000000000000 [ 878.386539] R10: 0000000000000000 R11: 0000000000000000 R12: ffff981390c2f030 [ 878.387203] R13: ffff981288232b58 R14: 0000000000000029 R15: 0000000000000001 [ 878.387877] FS: 0000000000000000(0000) GS:ffff9814b7900000(0000) knlGS:0000000000000000 [ 878.388663] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 878.389212] CR2: 00005e106a0554e0 CR3: 0000000112bf0001 CR4: 0000000000772ef0 [ 878.389921] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 878.390620] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 878.391307] PKRU: 55555554 [ 878.391567] Call Trace: [ 878.391807] <TASK> [ 878.392021] ? show_regs+0x71/0x90 [ 878.392391] ? die+0x38/0xa0 [ 878.392667] ? do_trap+0xdb/0x100 [ 878.392981] ? do_error_trap+0x75/0xb0 [ 878.393372] ? ceph_msg_data_cursor_init+0x42/0x50 [ 878.393842] ? exc_invalid_op+0x53/0x80 [ 878.394232] ? ceph_msg_data_cursor_init+0x42/0x50 [ 878.394694] ? asm_exc_invalid_op+0x1b/0x20 [ 878.395099] ? ceph_msg_data_cursor_init+0x42/0x50 [ 878.395583] ? ceph_con_v2_try_read+0xd16/0x2220 [ 878.396027] ? _raw_spin_unlock+0xe/0x40 [ 878.396428] ? raw_spin_rq_unlock+0x10/0x40 [ 878.396842] ? finish_task_switch.isra.0+0x97/0x310 [ 878.397338] ? __schedule+0x44b/0x16b0 [ 878.397738] ceph_con_workfn+0x326/0x750 [ 878.398121] process_one_work+0x188/0x3d0 [ 878.398522] ? __pfx_worker_thread+0x10/0x10 [ 878.398929] worker_thread+0x2b5/0x3c0 [ 878.399310] ? __pfx_worker_thread+0x10/0x10 [ 878.399727] kthread+0xe1/0x120 [ 878.400031] ? __pfx_kthread+0x10/0x10 [ 878.400431] ret_from_fork+0x43/0x70 [ 878.400771] ? __pfx_kthread+0x10/0x10 [ 878.401127] ret_from_fork_asm+0x1a/0x30 [ 878.401543] </TASK> [ 878.401760] Modules linked in: hctr2 nhpoly1305_avx2 nhpoly1305_sse2 nhpoly1305 chacha_generic chacha_x86_64 libchacha adiantum libpoly1305 essiv authenc mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag intel_rapl_msr intel_rapl_common intel_uncore_frequency_common skx_edac_common nfit kvm_intel kvm crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic ghash_clmulni_intel sha256_ssse3 sha1_ssse3 aesni_intel joydev crypto_simd cryptd rapl input_leds psmouse sch_fq_codel serio_raw bochs i2c_piix4 floppy qemu_fw_cfg i2c_smbus mac_hid pata_acpi msr parport_pc ppdev lp parport efi_pstore ip_tables x_tables [ 878.407319] ---[ end trace 0000000000000000 ]--- [ 878.407775] RIP: 0010:ceph_msg_data_cursor_init+0x42/0x50 [ 878.408317] Code: 89 17 48 8b 46 70 55 48 89 47 08 c7 47 18 00 00 00 00 48 89 e5 e8 de cc ff ff 5d 31 c0 31 d2 31 f6 31 ff c3 cc cc cc cc 0f 0b <0f> 0b 0f 0b 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 [ 878.410087] RSP: 0018:ffffb4ffc7cbbd28 EFLAGS: 00010287 [ 878.410609] RAX: ffffffff82bb9ac0 RBX: ffff981390c2f1f8 RCX: 0000000000000000 [ 878.411318] RDX: 0000000000009000 RSI: ffff981288232b58 RDI: ffff981390c2f378 [ 878.412014] RBP: ffffb4ffc7cbbe18 R08: 0000000000000000 R09: 0000000000000000 [ 878.412735] R10: 0000000000000000 R11: 0000000000000000 R12: ffff981390c2f030 [ 878.413438] R13: ffff981288232b58 R14: 0000000000000029 R15: 0000000000000001 [ 878.414121] FS: 0000000000000000(0000) GS:ffff9814b7900000(0000) knlGS:0000000000000000 [ 878.414935] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 878.415516] CR2: 00005e106a0554e0 CR3: 0000000112bf0001 CR4: 0000000000772ef0 [ 878.416211] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 878.416907] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 878.417630] PKRU: 55555554
(gdb) l *ceph_msg_data_cursor_init+0x420xffffffff823b45a2 is in ceph_msg_data_cursor_init (net/ceph/messenger.c:1070). 1065
1066 void ceph_msg_data_cursor_init(struct ceph_msg_data_cursor *cursor,
1067 struct ceph_msg *msg, size_t length)
1068 {
1069 BUG_ON(!length); 1070 BUG_ON(length > msg->data_length); 1071 BUG_ON(!msg->num_data_items);
1072
1073 cursor->total_resid = length;
1074 cursor->data = msg->data;
The issue takes place because of this:
[ 202.628853] libceph: net/ceph/messenger_v2.c:2034 prepare_sparse_read_data(): msg->data_length 33792, msg->sparse_read_total 36864
1070 BUG_ON(length > msg->data_length);
The generic/397 test (xfstests) executes such steps:
(1) create encrypted files and directories;
(2) access the created files and folders with encryption key;
(3) access the created files and folders without encryption key.
The issue takes place in this portion of code:
if (IS_ENCRYPTED(inode)) {
struct page **pages;
size_t page_off;
err = iov_iter_get_pages_alloc2(&subreq->io_iter, &pages, len,
&page_off);
if (err < 0) {
doutc(cl, "%llx.%llx failed to allocate pages, %d\n",
ceph_vinop(inode), err);
goto out;
}
/* should always give us a page-aligned read */
WARN_ON_ONCE(page_off);
len = err;
err = 0;
osd_req_op_extent_osd_data_pages(req, 0, pages, len, 0, false,
false);The reason of the issue is that subreq->io_iter.count keeps unaligned value of length:
[ 347.751182] lib/iov_iter.c:1185 __iov_iter_get_pages_alloc(): maxsize 36864, maxpages 4294967295, start 18446659367320516064 [ 347.752808] lib/iov_iter.c:1196 __iov_iter_get_pages_alloc(): maxsize 33792, maxpages 4294967295, start 18446659367320516064 [ 347.754394] lib/iov_iter.c:1015 iter_folioq_get_pages(): maxsize 33792, maxpages 4294967295, extracted 0, _start_offset 18446659367320516064
This patch simply assigns the aligned value to subreq->io_iter.count before calling iov_iter_get_pages_alloc2().
[ idryomov: tag the comment with FIXME to make it clear that it's only
a workaround for netfslib not coexisting with fscrypt nicely (this is also noted in another pre-existing comment) ]
--- fs/ceph/addr.c | 9 +++++++++ 1 file changed, 9 insertions(+)
fs/ceph/addr.c +9 -0
@@ -409,6 +409,15 @@ static void ceph_netfs_issue_read(structstruct page **pages;size_t page_off; +/* +* FIXME: io_iter.count needs to be corrected to aligned +* length. Otherwise, iov_iter_get_pages_alloc2() operates +* with the initial unaligned length value. As a result, +* ceph_msg_data_cursor_init() triggers BUG_ON() in the case +* if msg->sparse_read_total > msg->data_length. +*/ + subreq->io_iter.count = len; + err =iov_iter_get_pages_alloc2 (&subreq->io_iter, &pages, len, &page_off);if (err <0 ) { doutc(cl, "%llx.%llx failed to allocate pages, %d\n",
Greg Kroah-Hartman
maintainerPATCH 104/592 ceph: set superblock s_magic for IMA fsmagic matching
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dennis Marttinen <[email protected]>
commit 72386d5245b249f5a0a8fabb881df7ad947b8ea4 upstream.
The CephFS kernel driver forgets to set the filesystem magic signature in its superblock. As a result, IMA policy rules based on fsmagic matching do not apply as intended. This causes a major performance regression in Talos Linux [1] when mounting CephFS volumes, such as when deploying Rook Ceph [2]. Talos Linux ships a hardened kernel with the following IMA policy (irrelevant lines omitted):
[...]dont_measure fsmagic=0xc36400 # CEPH_SUPER_MAGIC
[...]
measure func=FILE_CHECK mask=^MAY_READ euid=0
measure func=FILE_CHECK mask=^MAY_READ uid=0
[...]
Currently, IMA compares 0xc36400 == 0x0 for CephFS files, resulting in all files opened with O_RDONLY or O_RDWR getting measured with SHA512 on every open(2):
10 69990c87e8af323d47e2d6ae4... ima-ng sha512:<hash> /data/cephfs/test-file
Since O_WRONLY is rare, this results in an order of magnitude lower performance than expected for practically all file operations. Properly setting CEPH_SUPER_MAGIC in the CephFS superblock resolves the regression.
Tests performed on a 3x replicated Ceph v19.3.0 cluster across three i5-7200U nodes each equipped with one Micron 7400 MAX M.2 disk (BlueStore) and Gigabit ethernet, on Talos Linux v1.10.2:
FS-Mark 3.3
Test: 500 Files, Empty
Files/s > Higher Is Better
6.12.27-talos . 16.6 |====
+twelho patch . 208.4 |====================================================
FS-Mark 3.3
Test: 500 Files, 1KB Size
Files/s > Higher Is Better
6.12.27-talos . 15.6 |=======
+twelho patch . 118.6 |====================================================
FS-Mark 3.3
Test: 500 Files, 32 Sub Dirs, 1MB Size
Files/s > Higher Is Better
6.12.27-talos . 12.7 |===============
+twelho patch . 44.7 |=====================================================
IO500 [3] 2fcd6d6 results (benchmarks within variance omitted):
| IO500 benchmark | 6.12.27-talos | +twelho patch | Speedup | |-------------------|----------------|----------------|-----------| | mdtest-easy-write | 0.018524 kIOPS | 1.135027 kIOPS | 6027.33 % | | mdtest-hard-write | 0.018498 kIOPS | 0.973312 kIOPS | 5161.71 % | | ior-easy-read | 0.064727 GiB/s | 0.155324 GiB/s | 139.97 % | | mdtest-hard-read | 0.018246 kIOPS | 0.780800 kIOPS | 4179.29 % |
This applies outside of synthetic benchmarks as well, for example, the time to rsync a 55 MiB directory with ~12k of mostly small files drops from an unusable 10m5s to a reasonable 26s (23x the throughput).
[1]: https://www.talos.dev/
[2]: https://www.talos.dev/v1.10/kubernetes-guides/configuration/ceph-with-rook/
[3]: https://github.com/IO500/io500
--- fs/ceph/super.c | 1 + 1 file changed, 1 insertion(+)
fs/ceph/super.c +1 -0
@@ -1227,6 +1227,7 @@ static int ceph_set_super(struct super_b s->s_time_min =0 ; s->s_time_max =U32_MAX ; s->s_flags |=SB_NODIRATIME |SB_NOATIME ; + s->s_magic =CEPH_SUPER_MAGIC ;ceph_fscrypt_set_ops (s);
Greg Kroah-Hartman
maintainerPATCH 105/592 cgroup,freezer: fix incomplete freezing when attaching tasks
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ridong <[email protected]>
commit 37fb58a7273726e59f9429c89ade5116083a213d upstream.
An issue was found:
# cd /sys/fs/cgroup/freezer/ # mkdir test # echo FROZEN > test/freezer.state # cat test/freezer.state FROZEN # sleep 1000 & [1] 863 # echo 863 > test/cgroup.procs # cat test/freezer.state FREEZING
When tasks are migrated to a frozen cgroup, the freezer fails to immediately freeze the tasks, causing the cgroup to remain in the "FREEZING".
The freeze_task() function is called before clearing the CGROUP_FROZEN flag. This causes the freezing() check to incorrectly return false, preventing __freeze_task() from being invoked for the migrated task.
To fix this issue, clear the CGROUP_FROZEN state before calling freeze_task().
--- kernel/cgroup/legacy_freezer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/cgroup/legacy_freezer.c +1 -2
@@ -188,13 +188,12 @@ static void freezer_attach(struct cgroupif (!(freezer->state &CGROUP_FREEZING )) {__thaw_task (task); }else { -freeze_task (task); -/* clear FROZEN and propagate upwards */ while (freezer && (freezer->state &CGROUP_FROZEN )) { freezer->state &= ~CGROUP_FROZEN ; freezer =parent_freezer (freezer); } +freeze_task (task); } }
Greg Kroah-Hartman
maintainerPATCH 106/592 bus: firewall: Fix missing static inline annotations for stubs
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
commit 66db876162155c1cec87359cd78c62aaafde9257 upstream.
Stubs in the header file for !CONFIG_STM32_FIREWALL case should be both static and inline, because they do not come with earlier declaration and should be inlined in every unit including the header.
--- include/linux/bus/stm32_firewall_device.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
include/linux/bus/stm32_firewall_device.h +9 -6
@@ -114,27 +114,30 @@ void stm32_firewall_release_access_by_id#else /* CONFIG_STM32_FIREWALL */ -int stm32_firewall_get_firewall (struct device_node *np,struct stm32_firewall *firewall, -unsigned int nb_firewall) +static inline int stm32_firewall_get_firewall (struct device_node *np, +struct stm32_firewall *firewall, +unsigned int nb_firewall) {return -ENODEV ; } -int stm32_firewall_grant_access (struct stm32_firewall *firewall) +static inline int stm32_firewall_grant_access (struct stm32_firewall *firewall) {return -ENODEV ; } -void stm32_firewall_release_access (struct stm32_firewall *firewall) +static inline void stm32_firewall_release_access (struct stm32_firewall *firewall) { } -int stm32_firewall_grant_access_by_id (struct stm32_firewall *firewall,u32 subsystem_id) +static inline int stm32_firewall_grant_access_by_id (struct stm32_firewall *firewall, +u32 subsystem_id) {return -ENODEV ; } -void stm32_firewall_release_access_by_id (struct stm32_firewall *firewall,u32 subsystem_id) +static inline void stm32_firewall_release_access_by_id (struct stm32_firewall *firewall, +u32 subsystem_id) { }
Greg Kroah-Hartman
maintainerPATCH 107/592 ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tasos Sahanidis <[email protected]>
commit d29fc02caad7f94b62d56ee1b01c954f9c961ba7 upstream.
The controller has a hardware bug that can hard hang the system when doing ATAPI DMAs without any trace of what happened. Depending on the device attached, it can also prevent the system from booting.
In this case, the system hangs when reading the ATIP from optical media with cdrecord -vvv -atip on an _NEC DVD_RW ND-4571A 1-01 and an Optiarc DVD RW AD-7200A 1.06 attached to an ASRock 990FX Extreme 4, running at UDMA/33.
The issue can be reproduced by running the same command with a cygwin build of cdrecord on WinXP, although it requires more attempts to cause it. The hang in that case is also resolved by forcing PIO. It doesn't appear that VIA has produced any drivers for that OS, thus no known workaround exists.
HDDs attached to the controller do not suffer from any DMA issues.
--- drivers/ata/pata_via.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ata/pata_via.c +2 -1
@@ -368,7 +368,8 @@ static unsigned int via_mode_filter(stru }if (dev->class ==ATA_DEV_ATAPI && -dmi_check_system (no_atapi_dma_dmi_table)) { + (dmi_check_system (no_atapi_dma_dmi_table) || + config->id ==PCI_DEVICE_ID_VIA_6415 )) {ata_dev_warn (dev,"controller locks up on ATAPI DMA, forcing PIO\n" ); mask &=ATA_MASK_PIO ; }
Greg Kroah-Hartman
maintainerPATCH 108/592 ata: ahci: Disallow LPM for ASUSPRO-D840SA motherboard
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niklas Cassel <[email protected]>
commit b5acc3628898baa63658bc4125f9525f9b3dd4f3 upstream.
A user has bisected a regression which causes graphical corruptions on his screen to commit 7627a0edef54 ("ata: ahci: Drop low power policy board type").
Simply reverting commit 7627a0edef54 ("ata: ahci: Drop low power policy board type") makes the graphical corruptions on his screen to go away. (Note: there are no visible messages in dmesg that indicates a problem with AHCI.)
The user also reports that the problem occurs regardless if there is an HDD or an SSD connected via AHCI, so the problem is not device related.
The devices also work fine on other motherboards, so it seems specific to the ASUSPRO-D840SA motherboard.
While enabling low power modes for AHCI is not supposed to affect completely unrelated hardware, like a graphics card, it does however allow the system to enter deeper PC-states, which could expose ACPI issues that were previously not visible (because the system never entered these lower power states before).
There are previous examples where enabling LPM exposed serious BIOS/ACPI bugs, see e.g. commit 240630e61870 ("ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS").
Since there hasn't been any BIOS update in years for the ASUSPRO-D840SA motherboard, disable LPM for this board, in order to avoid entering lower PC-states, which triggers graphical corruptions.
--- drivers/ata/ahci.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
drivers/ata/ahci.c +18 -1
@@ -1410,8 +1410,15 @@ static bool ahci_broken_suspend(struct pstatic bool ahci_broken_lpm (struct pci_dev *pdev) { +/* +* Platforms with LPM problems. +* If driver_data is NULL, there is no existing BIOS version with +* functioning LPM. +* If driver_data is non-NULL, then driver_data contains the DMI BIOS +* build date of the first BIOS version with functioning LPM (i.e. older +* BIOS versions have broken LPM). +*/ static const struct dmi_system_id sysids[] = { -/* Various Lenovo 50 series have LPM issues with older BIOSen */ { .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ),
@@ -1446,6 +1453,13 @@ static bool ahci_broken_lpm(struct pci_d*/ .driver_data = "20180310", /* 2.35 */ }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_PRODUCT_VERSION, "ASUSPRO D840MB_M840SA"), + }, + /* 320 is broken, there is no known good version yet. */ + }, { }/* terminate list */ };const struct dmi_system_id *dmi =dmi_first_match (sysids);
@@ -1455,6 +1469,9 @@ static bool ahci_broken_lpm(struct pci_dif (!dmi)return false; +if (!dmi->driver_data) +return true; +dmi_get_date (DMI_BIOS_DATE , &year, &month, &date);snprintf (buf,sizeof (buf),"%04d%02d%02d" , year, month, date);
Greg Kroah-Hartman
maintainerPATCH 109/592 ata: ahci: Disallow LPM for Asus B550-F motherboard
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikko Korhonen <[email protected]>
commit a7b3b77fd111d49f8e25624e4ea1046322a57baf upstream.
Asus ROG STRIX B550-F GAMING (WI-FI) motherboard has problems on some SATA ports with at least one hard drive model (WDC WD20EFAX-68FB5N0) when LPM is enabled. Disabling LPM solves the issue.
--- drivers/ata/ahci.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/ata/ahci.c +17 -1
@@ -1458,7 +1458,23 @@ static bool ahci_broken_lpm(struct pci_d DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_VERSION, "ASUSPRO D840MB_M840SA"), }, - /* 320 is broken, there is no known good version yet. */ + /* 320 is broken, there is no known good version. */ + }, + { +/* +* AMD 500 Series Chipset SATA Controller [1022:43eb] +* on this motherboard timeouts on ports 5 and 6 when +* LPM is enabled, at least with WDC WD20EFAX-68FB5N0 +* hard drives. LPM with the same drive works fine on +* all other ports on the same controller. +*/ + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, + "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_BOARD_NAME, + "ROG STRIX B550-F GAMING (WI-FI)"), + }, + /* 3621 is broken, there is no known good version. */ }, { }/* terminate list */ };
Greg Kroah-Hartman
maintainerPATCH 110/592 bus: fsl-mc: do not add a device-link for the UAPI used DPMCP device
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ioana Ciornei <[email protected]>
commit dd7d8e012b23de158ca0188239c7a1f2a83b4484 upstream.
The fsl-mc bus associated to the root DPRC in a DPAA2 system exports a device file for userspace access to the MC firmware. In case the DPRC's local MC portal (DPMCP) is currently in use, a new DPMCP device is allocated through the fsl_mc_portal_allocate() function.
In this case, the call to fsl_mc_portal_allocate() will fail with -EINVAL when trying to add a device link between the root DPRC (consumer) and the newly allocated DPMCP device (supplier). This is because the DPMCP is a dependent of the DPRC device (the bus).
Fix this by not adding a device link in case the DPMCP is allocated for the root DPRC's usage.
--- drivers/bus/fsl-mc/mc-io.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/bus/fsl-mc/mc-io.c +13 -6
@@ -214,12 +214,19 @@ int __must_check fsl_mc_portal_allocate(if (error <0 ) goto error_cleanup_resource; - dpmcp_dev->consumer_link =device_link_add (&mc_dev->dev, - &dpmcp_dev->dev, -DL_FLAG_AUTOREMOVE_CONSUMER ); -if (!dpmcp_dev->consumer_link) { - error = -EINVAL ; - goto error_cleanup_mc_io; +/* If the DPRC device itself tries to allocate a portal (usually for +* UAPI interaction), don't add a device link between them since the +* DPMCP device is an actual child device of the DPRC and a reverse +* dependency is not allowed. +*/ +if (mc_dev != mc_bus_dev) { + dpmcp_dev->consumer_link =device_link_add (&mc_dev->dev, + &dpmcp_dev->dev, +DL_FLAG_AUTOREMOVE_CONSUMER ); +if (!dpmcp_dev->consumer_link) { + error = -EINVAL ; + goto error_cleanup_mc_io; + } } *new_mc_io = mc_io;
Greg Kroah-Hartman
maintainerPATCH 111/592 bus: fsl-mc: fix GET/SET_TAILDROP command ids
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wan Junjie <[email protected]>
commit c78230ad34f82c6c0e0e986865073aeeef1f5d30 upstream.
Command ids for taildrop get/set can not pass the check when they are using from the restool user space utility. Correct them according to the user manual.
--- drivers/bus/fsl-mc/fsl-mc-uapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bus/fsl-mc/fsl-mc-uapi.c +2 -2
@@ -275,13 +275,13 @@ static struct fsl_mc_cmd_desc fsl_mc_acc .size = 8, }, [DPSW_GET_TAILDROP] = { - .cmdid_value = 0x0A80, + .cmdid_value = 0x0A90, .cmdid_mask = 0xFFF0, .token = true, .size = 14, }, [DPSW_SET_TAILDROP] = { - .cmdid_value = 0x0A90, + .cmdid_value = 0x0A80, .cmdid_mask = 0xFFF0, .token = true, .size = 24,
Greg Kroah-Hartman
maintainerPATCH 76/592 media: ov08x40: Extend sleep after reset to 5 ms
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <[email protected]>
commit 77aed862c34f192f9d4b80d5288263b22b50ca98 upstream.
Some users are reporting that ov08x40_identify_module() fails to identify the chip reading 0x00 as value for OV08X40_REG_CHIP_ID.
Intel's out of tree IPU6 drivers include some ov08x40 changes including adding support for the reset GPIO for older kernels and Intel's patch for this uses 5 ms. Extend the sleep to 5 ms following Intel's example, this fixes the ov08x40_identify_module() problem.
--- drivers/media/i2c/ov08x40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov08x40.c +1 -1
@@ -1341,7 +1341,7 @@ static int ov08x40_power_on(struct devic }gpiod_set_value_cansleep (ov08x->reset_gpio,0 ); -usleep_range (1500 ,1800 ); +usleep_range (5000 ,5500 );return 0 ;
Greg Kroah-Hartman
maintainerPATCH 112/592 ext4: inline: fix len overflow in ext4_prepare_inline_data
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thadeu Lima de Souza Cascardo <[email protected]>
commit 227cb4ca5a6502164f850d22aec3104d7888b270 upstream.
When running the following code on an ext4 filesystem with inline_data feature enabled, it will lead to the bug below.
fd = open("file1", O_RDWR | O_CREAT | O_TRUNC, 0666);
ftruncate(fd, 30);
pwrite(fd, "a", 1, (1UL << 40) + 5UL);That happens because write_begin will succeed as when ext4_generic_write_inline_data calls ext4_prepare_inline_data, pos + len will be truncated, leading to ext4_prepare_inline_data parameter to be 6 instead of 0x10000000006.
Then, later when write_end is called, we hit:
BUG_ON(pos + len > EXT4_I(inode)->i_inline_size);
at ext4_write_inline_data.
Fix it by using a loff_t type for the len parameter in ext4_prepare_inline_data instead of an unsigned int.
[ 44.545164] ------------[ cut here ]------------ [ 44.545530] kernel BUG at fs/ext4/inline.c:240! [ 44.545834] Oops: invalid opcode: 0000 [#1] SMP NOPTI [ 44.546172] CPU: 3 UID: 0 PID: 343 Comm: test Not tainted 6.15.0-rc2-00003-g9080916f4863 #45 PREEMPT(full) 112853fcebfdb93254270a7959841d2c6aa2c8bb [ 44.546523] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 44.546523] RIP: 0010:ext4_write_inline_data+0xfe/0x100 [ 44.546523] Code: 3c 0e 48 83 c7 48 48 89 de 5b 41 5c 41 5d 41 5e 41 5f 5d e9 e4 fa 43 01 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc 0f 0b <0f> 0b 0f 1f 44 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 20 49 [ 44.546523] RSP: 0018:ffffb342008b79a8 EFLAGS: 00010216 [ 44.546523] RAX: 0000000000000001 RBX: ffff9329c579c000 RCX: 0000010000000006 [ 44.546523] RDX: 000000000000003c RSI: ffffb342008b79f0 RDI: ffff9329c158e738 [ 44.546523] RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000 [ 44.546523] R10: 00007ffffffff000 R11: ffffffff9bd0d910 R12: 0000006210000000 [ 44.546523] R13: fffffc7e4015e700 R14: 0000010000000005 R15: ffff9329c158e738 [ 44.546523] FS: 00007f4299934740(0000) GS:ffff932a60179000(0000) knlGS:0000000000000000 [ 44.546523] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 44.546523] CR2: 00007f4299a1ec90 CR3: 0000000002886002 CR4: 0000000000770eb0 [ 44.546523] PKRU: 55555554 [ 44.546523] Call Trace: [ 44.546523] <TASK> [ 44.546523] ext4_write_inline_data_end+0x126/0x2d0 [ 44.546523] generic_perform_write+0x17e/0x270 [ 44.546523] ext4_buffered_write_iter+0xc8/0x170 [ 44.546523] vfs_write+0x2be/0x3e0 [ 44.546523] __x64_sys_pwrite64+0x6d/0xc0 [ 44.546523] do_syscall_64+0x6a/0xf0 [ 44.546523] ? __wake_up+0x89/0xb0 [ 44.546523] ? xas_find+0x72/0x1c0 [ 44.546523] ? next_uptodate_folio+0x317/0x330 [ 44.546523] ? set_pte_range+0x1a6/0x270 [ 44.546523] ? filemap_map_pages+0x6ee/0x840 [ 44.546523] ? ext4_setattr+0x2fa/0x750 [ 44.546523] ? do_pte_missing+0x128/0xf70 [ 44.546523] ? security_inode_post_setattr+0x3e/0xd0 [ 44.546523] ? ___pte_offset_map+0x19/0x100 [ 44.546523] ? handle_mm_fault+0x721/0xa10 [ 44.546523] ? do_user_addr_fault+0x197/0x730 [ 44.546523] ? do_syscall_64+0x76/0xf0 [ 44.546523] ? arch_exit_to_user_mode_prepare+0x1e/0x60 [ 44.546523] ? irqentry_exit_to_user_mode+0x79/0x90 [ 44.546523] entry_SYSCALL_64_after_hwframe+0x55/0x5d [ 44.546523] RIP: 0033:0x7f42999c6687 [ 44.546523] Code: 48 89 fa 4c 89 df e8 58 b3 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff [ 44.546523] RSP: 002b:00007ffeae4a7930 EFLAGS: 00000202 ORIG_RAX: 0000000000000012 [ 44.546523] RAX: ffffffffffffffda RBX: 00007f4299934740 RCX: 00007f42999c6687 [ 44.546523] RDX: 0000000000000001 RSI: 000055ea6149200f RDI: 0000000000000003 [ 44.546523] RBP: 00007ffeae4a79a0 R08: 0000000000000000 R09: 0000000000000000 [ 44.546523] R10: 0000010000000005 R11: 0000000000000202 R12: 0000000000000000 [ 44.546523] R13: 00007ffeae4a7ac8 R14: 00007f4299b86000 R15: 000055ea61493dd8 [ 44.546523] </TASK> [ 44.546523] Modules linked in: [ 44.568501] ---[ end trace 0000000000000000 ]--- [ 44.568889] RIP: 0010:ext4_write_inline_data+0xfe/0x100 [ 44.569328] Code: 3c 0e 48 83 c7 48 48 89 de 5b 41 5c 41 5d 41 5e 41 5f 5d e9 e4 fa 43 01 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc 0f 0b <0f> 0b 0f 1f 44 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 20 49 [ 44.570931] RSP: 0018:ffffb342008b79a8 EFLAGS: 00010216 [ 44.571356] RAX: 0000000000000001 RBX: ffff9329c579c000 RCX: 0000010000000006 [ 44.571959] RDX: 000000000000003c RSI: ffffb342008b79f0 RDI: ffff9329c158e738 [ 44.572571] RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000 [ 44.573148] R10: 00007ffffffff000 R11: ffffffff9bd0d910 R12: 0000006210000000 [ 44.573748] R13: fffffc7e4015e700 R14: 0000010000000005 R15: ffff9329c158e738 [ 44.574335] FS: 00007f4299934740(0000) GS:ffff932a60179000(0000) knlGS:0000000000000000 [ 44.575027] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 44.575520] CR2: 00007f4299a1ec90 CR3: 0000000002886002 CR4: 0000000000770eb0 [ 44.576112] PKRU: 55555554 [ 44.576338] Kernel panic - not syncing: Fatal exception [ 44.576517] Kernel Offset: 0x1a600000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
--- fs/ext4/inline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/inline.c +1 -1
@@ -397,7 +397,7 @@ out: }static int ext4_prepare_inline_data (handle_t *handle,struct inode *inode, -unsigned int len) +loff_t len) {int ret, size, no_expand;struct ext4_inode_info *ei =EXT4_I (inode);
Greg Kroah-Hartman
maintainerPATCH 113/592 ext4: fix calculation of credits for extent tree modification
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <[email protected]>
commit 32a93f5bc9b9812fc710f43a4d8a6830f91e4988 upstream.
Luis and David are reporting that after running generic/750 test for 90+ hours on 2k ext4 filesystem, they are able to trigger a warning in jbd2_journal_dirty_metadata() complaining that there are not enough credits in the running transaction started in ext4_do_writepages().
Indeed the code in ext4_do_writepages() is racy and the extent tree can change between the time we compute credits necessary for extent tree computation and the time we actually modify the extent tree. Thus it may happen that the number of credits actually needed is higher. Modify ext4_ext_index_trans_blocks() to count with the worst case of maximum tree depth. This can reduce the possible number of writers that can operate in the system in parallel (because the credit estimates now won't fit in one transaction) but for reasonably sized journals this shouldn't really be an issue. So just go with a safe and simple fix.
--- fs/ext4/extents.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
fs/ext4/extents.c +6 -5
@@ -2396,18 +2396,19 @@ int ext4_ext_calc_credits_for_single_extint ext4_ext_index_trans_blocks (struct inode *inode,int extents) {int index; -int depth;/* If we are converting the inline data, only one is needed here. */ if (ext4_has_inline_data (inode))return 1 ; - depth =ext_depth (inode); - +/* +* Extent tree can change between the time we estimate credits and +* the time we actually modify the tree. Assume the worst case. +*/ if (extents <=1 ) - index = depth *2 ; + index =EXT4_MAX_EXTENT_DEPTH *2 ;else - index = depth *3 ; + index =EXT4_MAX_EXTENT_DEPTH *3 ;return index; }
Greg Kroah-Hartman
maintainerPATCH 114/592 ext4: fix out of bounds punch offset
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Yi <[email protected]>
commit b5e58bcd79625423487fa3ecba8e8411b5396327 upstream.
Punching a hole with a start offset that exceeds max_end is not permitted and will result in a negative length in the truncate_inode_partial_folio() function while truncating the page cache, potentially leading to undesirable consequences.
A simple reproducer:
truncate -s 9895604649994 /mnt/foo
xfs_io -c "pwrite 8796093022208 4096" /mnt/foo xfs_io -c "fpunch 8796093022213 25769803777" /mnt/foo
kernel BUG at include/linux/highmem.h:275!
Oops: invalid opcode: 0000 [#1] SMP PTI CPU: 3 UID: 0 PID: 710 Comm: xfs_io Not tainted 6.15.0-rc3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:zero_user_segments.constprop.0+0xd7/0x110 RSP: 0018:ffffc90001cf3b38 EFLAGS: 00010287 RAX: 0000000000000005 RBX: ffffea0001485e40 RCX: 0000000000001000 RDX: 000000000040b000 RSI: 0000000000000005 RDI: 000000000040b000 RBP: 000000000040affb R08: ffff888000000000 R09: ffffea0000000000 R10: 0000000000000003 R11: 00000000fffc7fc5 R12: 0000000000000005 R13: 000000000040affb R14: ffffea0001485e40 R15: ffff888031cd3000 FS: 00007f4f63d0b780(0000) GS:ffff8880d337d000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000001ae0b038 CR3: 00000000536aa000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> truncate_inode_partial_folio+0x3dd/0x620 truncate_inode_pages_range+0x226/0x720 ? bdev_getblk+0x52/0x3e0 ? ext4_get_group_desc+0x78/0x150 ? crc32c_arch+0xfd/0x180 ? __ext4_get_inode_loc+0x18c/0x840 ? ext4_inode_csum+0x117/0x160 ? jbd2_journal_dirty_metadata+0x61/0x390 ? __ext4_handle_dirty_metadata+0xa0/0x2b0 ? kmem_cache_free+0x90/0x5a0 ? jbd2_journal_stop+0x1d5/0x550 ? __ext4_journal_stop+0x49/0x100 truncate_pagecache_range+0x50/0x80 ext4_truncate_page_cache_block_range+0x57/0x3a0 ext4_punch_hole+0x1fe/0x670 ext4_fallocate+0x792/0x17d0 ? __count_memcg_events+0x175/0x2a0 vfs_fallocate+0x121/0x560 ksys_fallocate+0x51/0xc0 __x64_sys_fallocate+0x24/0x40 x64_sys_call+0x18d2/0x4170 do_syscall_64+0xa7/0x220 entry_SYSCALL_64_after_hwframe+0x76/0x7e
Fix this by filtering out cases where the punching start offset exceeds max_end.
--- fs/ext4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/inode.c +1 -1
@@ -4016,7 +4016,7 @@ int ext4_punch_hole(struct file *file, lWARN_ON_ONCE (!inode_is_locked (inode));/* No need to punch hole beyond i_size */ -if (offset >= inode->i_size) +if (offset >= inode->i_size || offset >= max_end)return 0 ;/*
Greg Kroah-Hartman
maintainerPATCH 115/592 ext4: fix incorrect punch max_end
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Yi <[email protected]>
commit 29ec9bed2395061350249ae356fb300dd82a78e7 upstream.
For the extents based inodes, the maxbytes should be sb->s_maxbytes instead of sbi->s_bitmap_maxbytes. Additionally, for the calculation of max_end, the -sb->s_blocksize operation is necessary only for indirect-block based inodes. Correct the maxbytes and max_end value to correct the behavior of punch hole.
--- fs/ext4/inode.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
fs/ext4/inode.c +9 -3
@@ -4006,7 +4006,7 @@ int ext4_punch_hole(struct file *file, lstruct inode *inode =file_inode (file);struct super_block *sb = inode->i_sb;ext4_lblk_t start_lblk, end_lblk; -loff_t max_end =EXT4_SB (sb)->s_bitmap_maxbytes - sb->s_blocksize; +loff_t max_end = sb->s_maxbytes;loff_t end = offset + length;handle_t *handle;unsigned int credits;
@@ -4015,14 +4015,20 @@ int ext4_punch_hole(struct file *file, ltrace_ext4_punch_hole (inode, offset, length,0 );WARN_ON_ONCE (!inode_is_locked (inode)); +/* +* For indirect-block based inodes, make sure that the hole within +* one block before last range. +*/ +if (!ext4_test_inode_flag (inode,EXT4_INODE_EXTENTS )) + max_end =EXT4_SB (sb)->s_bitmap_maxbytes - sb->s_blocksize; +/* No need to punch hole beyond i_size */ if (offset >= inode->i_size || offset >= max_end)return 0 ;/* * If the hole extends beyond i_size, set the hole to end after -* the page that contains i_size, and also make sure that the hole -* within one block before last range. +* the page that contains i_size. */ if (end > inode->i_size) end =round_up (inode->i_size,PAGE_SIZE );
Greg Kroah-Hartman
maintainerPATCH 116/592 ext4: factor out ext4_get_maxbytes()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Yi <[email protected]>
commit dbe27f06fa38b9bfc598f8864ae1c5d5831d9992 upstream.
There are several locations that get the correct maxbytes value based on the inode's block type. It would be beneficial to extract a common helper function to make the code more clear.
--- fs/ext4/ext4.h | 7 +++++++ fs/ext4/extents.c | 7 +------ fs/ext4/file.c | 7 +------ 3 files changed, 9 insertions(+), 12 deletions(-)
fs/ext4/ext4.h +7 -0
@@ -3378,6 +3378,13 @@ static inline unsigned int ext4_flex_bg_return 1 << sbi->s_log_groups_per_flex; } +static inline loff_t ext4_get_maxbytes (struct inode *inode) +{ +if (ext4_test_inode_flag (inode,EXT4_INODE_EXTENTS )) +return inode->i_sb->s_maxbytes; +return EXT4_SB (inode->i_sb)->s_bitmap_maxbytes; +} +#define ext4_std_error (sb, errno) \ do { \ if ((errno)) \
fs/ext4/extents.c +1 -6
@@ -4932,12 +4932,7 @@ static const struct iomap_ops ext4_iomapstatic int ext4_fiemap_check_ranges (struct inode *inode,u64 start,u64 *len) { -u64 maxbytes; - -if (ext4_test_inode_flag (inode,EXT4_INODE_EXTENTS )) - maxbytes = inode->i_sb->s_maxbytes; -else - maxbytes =EXT4_SB (inode->i_sb)->s_bitmap_maxbytes; +u64 maxbytes =ext4_get_maxbytes (inode);if (*len ==0 )return -EINVAL ;
fs/ext4/file.c +1 -6
@@ -929,12 +929,7 @@ static int ext4_file_open(struct inode *loff_t ext4_llseek (struct file *file,loff_t offset,int whence) {struct inode *inode = file->f_mapping->host; -loff_t maxbytes; - -if (!(ext4_test_inode_flag (inode,EXT4_INODE_EXTENTS ))) - maxbytes =EXT4_SB (inode->i_sb)->s_bitmap_maxbytes; -else - maxbytes = inode->i_sb->s_maxbytes; +loff_t maxbytes =ext4_get_maxbytes (inode);switch (whence) {default :
Greg Kroah-Hartman
maintainerPATCH 77/592 media: qcom: camss: csid: suppress CSID log spam
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit aef1d545989bc9e7f555af6b9f1be4963772192b upstream.
A recent commit refactored the printing of the CSID hardware version, but (without it being mentioned) also changed the log level from debug to info.
This results in repeated log spam during use, for example, on the Lenovo ThinkPad X13s:
qcom-camss ac5a000.camss: CSID:0 HW Version = 1.0.0 qcom-camss ac5a000.camss: CSID:0 HW Version = 1.0.0 qcom-camss ac5a000.camss: CSID:0 HW Version = 1.0.0 qcom-camss ac5a000.camss: CSID:0 HW Version = 1.0.0 qcom-camss ac5a000.camss: CSID:0 HW Version = 1.0.0
Suppress the version logging by demoting to debug level again.
--- drivers/media/platform/qcom/camss/camss-csid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/qcom/camss/camss-csid.c +2 -2
@@ -613,8 +613,8 @@ u32 csid_hw_version(struct csid_device *csid) hw_gen = (hw_version >>HW_VERSION_GENERATION ) &0xF ; hw_rev = (hw_version >>HW_VERSION_REVISION ) &0xFFF ; hw_step = (hw_version >>HW_VERSION_STEPPING ) &0xFFFF ; -dev_info (csid->camss->dev,"CSID:%d HW Version = %u.%u.%u\n" , - csid->id, hw_gen, hw_rev, hw_step); +dev_dbg (csid->camss->dev,"CSID:%d HW Version = %u.%u.%u\n" , + csid->id, hw_gen, hw_rev, hw_step);return hw_version; }
Signature · 1 line
2.50.0
Greg Kroah-Hartman
maintainerPATCH 78/592 media: qcom: camss: vfe: suppress VFE version log spam
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit b6fafb3941fa0f065def304d44d6c3c6d6ac0f64 upstream.
A recent commit refactored the printing of the VFE hardware version, but (without it being mentioned) also changed the log level from debug to info.
This results in several hundred lines of repeated log spam during boot and use, for example, on the Lenovo ThinkPad X13s:
qcom-camss ac5a000.camss: VFE:1 HW Version = 1.2.2 qcom-camss ac5a000.camss: VFE:0 HW Version = 1.2.2 qcom-camss ac5a000.camss: VFE:2 HW Version = 1.2.2 qcom-camss ac5a000.camss: VFE:2 HW Version = 1.2.2 qcom-camss ac5a000.camss: VFE:3 HW Version = 1.2.2 qcom-camss ac5a000.camss: VFE:5 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:6 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:4 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:5 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:6 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:7 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:7 HW Version = 1.3.0 qcom-camss ac5a000.camss: VFE:7 HW Version = 1.3.0 ...
Suppress the version logging by demoting to debug level again.
--- drivers/media/platform/qcom/camss/camss-vfe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/qcom/camss/camss-vfe.c +2 -2
@@ -428,8 +428,8 @@ u32 vfe_hw_version(struct vfe_device *vfe)u32 rev = (hw_version >>HW_VERSION_REVISION ) &0xFFF ;u32 step = (hw_version >>HW_VERSION_STEPPING ) &0xFFFF ; -dev_info (vfe->camss->dev,"VFE:%d HW Version = %u.%u.%u\n" , - vfe->id, gen, rev, step); +dev_dbg (vfe->camss->dev,"VFE:%d HW Version = %u.%u.%u\n" , + vfe->id, gen, rev, step);return hw_version; }
Signature · 1 line
2.50.0
Greg Kroah-Hartman
maintainerPATCH 79/592 media: rcar-vin: Fix RAW10
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomi Valkeinen <[email protected]>
commit 94bf847ae5a61e0ab0b971ed186a443688eb793f upstream.
Fix the following to get RAW10 formats working:
In rvin_formats, the bpp is set to 4 for RAW10. As VIN unpacks RAW10 to 16-bit containers, the bpp should be 2.
Don't set VNDMR_YC_THR to the VNDMR register. The YC_THR is "YC Data Through Mode", used for YUV formats and should not be set for RAW10.
--- drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 2 +- drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/media/platform/renesas/rcar-vin/rcar-dma.c +1 -1
@@ -910,7 +910,7 @@ static int rvin_setup(struct rvin_dev *vcase V4L2_PIX_FMT_SGBRG10 :case V4L2_PIX_FMT_SGRBG10 :case V4L2_PIX_FMT_SRGGB10 : - dmr =VNDMR_RMODE_RAW10 |VNDMR_YC_THR ; + dmr =VNDMR_RMODE_RAW10 ;break ;default : vin_err(vin, "Invalid pixelformat (0x%x)\n",
drivers/media/platform/renesas/rcar-vin/rcar-v4l2.c +4 -4
@@ -88,19 +88,19 @@ static const struct rvin_video_format rv }, { .fourcc = V4L2_PIX_FMT_SBGGR10, - .bpp = 4, + .bpp = 2, }, { .fourcc = V4L2_PIX_FMT_SGBRG10, - .bpp = 4, + .bpp = 2, }, { .fourcc = V4L2_PIX_FMT_SGRBG10, - .bpp = 4, + .bpp = 2, }, { .fourcc = V4L2_PIX_FMT_SRGGB10, - .bpp = 4, + .bpp = 2, }, };
Greg Kroah-Hartman
maintainerPATCH 80/592 media: v4l2-dev: fix error handling in __video_register_device()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ma Ke <[email protected]>
commit 2a934fdb01db6458288fc9386d3d8ceba6dd551a upstream.
Once device_register() failed, we should call put_device() to decrement reference count for cleanup. Or it could cause memory leak. And move callback function v4l2_device_release() and v4l2_device_get() before put_device().
As comment of device_register() says, 'NOTE: _Never_ directly free @dev after calling this function, even if it returned an error! Always use put_device() to give up the reference initialized in this function instead.'
Found by code review.
--- drivers/media/v4l2-core/v4l2-dev.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/media/v4l2-core/v4l2-dev.c +7 -7
@@ -1054,25 +1054,25 @@ int __video_register_device(struct video vdev->dev.class = &video_class; vdev->dev.devt =MKDEV (VIDEO_MAJOR , vdev->minor); vdev->dev.parent = vdev->dev_parent; + vdev->dev.release = v4l2_device_release;dev_set_name (&vdev->dev,"%s%d" , name_base, vdev->num); + +/* Increase v4l2_device refcount */ +v4l2_device_get (vdev->v4l2_dev); +mutex_lock (&videodev_lock); ret =device_register (&vdev->dev);if (ret <0 ) {mutex_unlock (&videodev_lock);pr_err ("%s: device_register failed\n" , __func__); - goto cleanup; +put_device (&vdev->dev); +return ret; } -/* Register the release callback that will be called when the last -reference to the device goes away. */ - vdev->dev.release = v4l2_device_release;if (nr !=-1 && nr != vdev->num && warn_if_nr_in_use)pr_warn ("%s: requested %s%d, got %s\n" , __func__, name_base, nr,video_device_node_name (vdev)); -/* Increase v4l2_device refcount */ -v4l2_device_get (vdev->v4l2_dev); -/* Part 5: Register the entity. */ ret =video_register_media_controller (vdev);
Greg Kroah-Hartman
maintainerPATCH 81/592 media: venus: Fix probe error handling
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Loic Poulain <[email protected]>
commit 523cea3a19f0b3b020a4745344c136a636e6ffd7 upstream.
Video device registering has been moved earlier in the probe function, but the new order has not been propagated to error handling. This means we can end with unreleased resources on error (e.g dangling video device on missing firmware probe aborting).
--- drivers/media/platform/qcom/venus/core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/media/platform/qcom/venus/core.c +8 -8
@@ -438,7 +438,7 @@ static int venus_probe(struct platform_d ret =v4l2_device_register (dev, &core->v4l2_dev);if (ret) - goto err_core_deinit; + goto err_hfi_destroy;platform_set_drvdata (pdev, core);
@@ -476,24 +476,24 @@ static int venus_probe(struct platform_d ret =venus_enumerate_codecs (core,VIDC_SESSION_TYPE_DEC );if (ret) - goto err_venus_shutdown; + goto err_core_deinit; ret =venus_enumerate_codecs (core,VIDC_SESSION_TYPE_ENC );if (ret) - goto err_venus_shutdown; + goto err_core_deinit; ret =pm_runtime_put_sync (dev);if (ret) {pm_runtime_get_noresume (dev); - goto err_dev_unregister; + goto err_core_deinit; }venus_dbgfs_init (core);return 0 ; -err_dev_unregister: -v4l2_device_unregister (&core->v4l2_dev); +err_core_deinit: +hfi_core_deinit (core, false); err_venus_shutdown:venus_shutdown (core); err_firmware_deinit:
@@ -506,9 +506,9 @@ err_runtime_disable:pm_runtime_put_noidle (dev);pm_runtime_disable (dev);pm_runtime_set_suspended (dev); +v4l2_device_unregister (&core->v4l2_dev); +err_hfi_destroy:hfi_destroy (core); -err_core_deinit: -hfi_core_deinit (core, false); err_core_put:if (core->pm_ops->core_put) core->pm_ops->core_put (core);
Greg Kroah-Hartman
maintainerPATCH 72/592 media: ipu6: Remove workaround for Meteor Lake ES2
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hao Yao <[email protected]>
commit d471fb06b21ae54bf76464731ae1dcb26ef1ca68 upstream.
There was a hardware bug which need IPU6 driver to disable the ATS. This workaround is not needed anymore as the bug was fixed in hardware level.
Additionally, Arrow Lake has the same IPU6 PCI ID and x86 stepping but does not have the bug. Removing the Meteor Lake workaround is also required for the driver to function on Arrow Lake.
--- drivers/media/pci/intel/ipu6/ipu6.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/media/pci/intel/ipu6/ipu6.c +0 -5
@@ -464,11 +464,6 @@ static int ipu6_pci_config_setup(struct {int ret; -/* disable IPU6 PCI ATS on mtl ES2 */ -if (is_ipu6ep_mtl (hw_ver) && boot_cpu_data.x86_stepping ==0x2 && -pci_ats_supported (dev)) -pci_disable_ats (dev); -/* No PCI msi capability for IPU6EP */ if (is_ipu6ep (hw_ver) ||is_ipu6ep_mtl (hw_ver)) {/* likely do nothing as msi not enabled by default */
Greg Kroah-Hartman
maintainerPATCH 118/592 ext4: only dirty folios when data journaling regular files
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian Foster <[email protected]>
commit e26268ff1dcae5662c1b96c35f18cfa6ab73d9de upstream.
fstest generic/388 occasionally reproduces a crash that looks as follows:
BUG: kernel NULL pointer dereference, address: 0000000000000000 ... Call Trace: <TASK> ext4_block_zero_page_range+0x30c/0x380 [ext4] ext4_truncate+0x436/0x440 [ext4] ext4_process_orphan+0x5d/0x110 [ext4] ext4_orphan_cleanup+0x124/0x4f0 [ext4] ext4_fill_super+0x262d/0x3110 [ext4] get_tree_bdev_flags+0x132/0x1d0 vfs_get_tree+0x26/0xd0 vfs_cmd_create+0x59/0xe0 __do_sys_fsconfig+0x4ed/0x6b0 do_syscall_64+0x82/0x170 ...
This occurs when processing a symlink inode from the orphan list. The partial block zeroing code in the truncate path calls ext4_dirty_journalled_data() -> folio_mark_dirty(). The latter calls mapping->a_ops->dirty_folio(), but symlink inodes are not assigned an a_ops vector in ext4, hence the crash.
To avoid this problem, update the ext4_dirty_journalled_data() helper to only mark the folio dirty on regular files (for which a_ops is assigned). This also matches the journaling logic in the ext4_symlink() creation path, where ext4_handle_dirty_metadata() is called directly.
--- fs/ext4/inode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/ext4/inode.c +6 -1
@@ -1009,7 +1009,12 @@ int ext4_walk_page_buffers(handle_t *han*/ static int ext4_dirty_journalled_data (handle_t *handle,struct buffer_head *bh) { -folio_mark_dirty (bh->b_folio); +struct folio *folio = bh->b_folio; +struct inode *inode = folio->mapping->host; + +/* only regular files have a_ops */ +if (S_ISREG (inode->i_mode)) +folio_mark_dirty (folio);return ext4_handle_dirty_metadata (handle,NULL , bh); }
Greg Kroah-Hartman
maintainerPATCH 127/592 NFC: nci: uart: Set tty->disc_data only in success path
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
commit fc27ab48904ceb7e4792f0c400f1ef175edf16fe upstream.
Setting tty->disc_data before opening the NCI device means we need to clean it up on error paths. This also opens some short window if device starts sending data, even before NCIUARTSETDRIVER IOCTL succeeded (broken hardware?). Close the window by exposing tty->disc_data only on the success path, when opening of the NCI device and try_module_get() succeeds.
The code differs in error path in one aspect: tty->disc_data won't be ever assigned thus NULL-ified. This however should not be relevant difference, because of "tty->disc_data=NULL" in nci_uart_tty_open().
--- net/nfc/nci/uart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/nfc/nci/uart.c +4 -4
@@ -119,22 +119,22 @@ static int nci_uart_set_driver(struct ttmemcpy (nu, nci_uart_drivers[driver],sizeof (struct nci_uart )); nu->tty = tty; - tty->disc_data = nu;skb_queue_head_init (&nu->tx_q);INIT_WORK (&nu->write_work, nci_uart_write_work);spin_lock_init (&nu->rx_lock); ret = nu->ops.open (nu);if (ret) { - tty->disc_data =NULL ;kfree (nu); +return ret; }else if (!try_module_get (nu->owner)) { nu->ops.close (nu); - tty->disc_data =NULL ;kfree (nu);return -ENOENT ; } -return ret; + tty->disc_data = nu; + +return 0 ; }/* ------ LDISC part ------ */
Greg Kroah-Hartman
maintainerPATCH 128/592 net/sched: fix use-after-free in taprio_dev_notifier
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hyunwoo Kim <[email protected]>
commit b160766e26d4e2e2d6fe2294e0b02f92baefcec5 upstream.
Since taprio’s taprio_dev_notifier() isn’t protected by an RCU read-side critical section, a race with advance_sched() can lead to a use-after-free.
Adding rcu_read_lock() inside taprio_dev_notifier() prevents this.
--- net/sched/sch_taprio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/sched/sch_taprio.c +4 -2
@@ -1328,13 +1328,15 @@ static int taprio_dev_notifier(struct no stab =rtnl_dereference (q->root->stab); - oper =rtnl_dereference (q->oper_sched); +rcu_read_lock (); + oper =rcu_dereference (q->oper_sched);if (oper)taprio_update_queue_max_sdu (q, oper, stab); - admin =rtnl_dereference (q->admin_sched); + admin =rcu_dereference (q->admin_sched);if (admin)taprio_update_queue_max_sdu (q, admin, stab); +rcu_read_unlock ();break ; }
Greg Kroah-Hartman
maintainerPATCH 129/592 net: ftgmac100: select FIXED_PHY
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiner Kallweit <[email protected]>
commit ae409629e022fbebbc6d31a1bfeccdbbeee20fd6 upstream.
Depending on e.g. DT configuration this driver uses a fixed link. So we shouldn't rely on the user to enable FIXED_PHY, select it in Kconfig instead. We may end up with a non-functional driver otherwise.
--- drivers/net/ethernet/faraday/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/faraday/Kconfig +1 -0
@@ -31,6 +31,7 @@ config FTGMAC100 depends on ARM || COMPILE_TEST depends on !64BIT || BROKEN select PHYLIB + select FIXED_PHY select MDIO_ASPEED if MACH_ASPEED_G6 select CRC32 help
Greg Kroah-Hartman
maintainerPATCH 130/592 iommu/vt-d: Restore context entry setup order for aliased devices
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lu Baolu <[email protected]>
commit 320302baed05c6456164652541f23d2a96522c06 upstream.
Commit 2031c469f816 ("iommu/vt-d: Add support for static identity domain") changed the context entry setup during domain attachment from a set-and-check policy to a clear-and-reset approach. This inadvertently introduced a regression affecting PCI aliased devices behind PCIe-to-PCI bridges.
Specifically, keyboard and touchpad stopped working on several Apple Macbooks with below messages:
kernel: platform pxa2xx-spi.3: Adding to iommu group 20
kernel: input: Apple SPI Keyboard as /devices/pci0000:00/0000:00:1e.3/pxa2xx-spi.3/spi_master/spi2/spi-APP000D:00/input/input0
kernel: DMAR: DRHD: handling fault status reg 3
kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr 0xffffa000 [fault reason 0x06] PTE Read access is not set
kernel: DMAR: DRHD: handling fault status reg 3
kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr 0xffffa000 [fault reason 0x06] PTE Read access is not set
kernel: applespi spi-APP000D:00: Error writing to device: 01 0e 00 00
kernel: DMAR: DRHD: handling fault status reg 3
kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr 0xffffa000 [fault reason 0x06] PTE Read access is not set
kernel: DMAR: DRHD: handling fault status reg 3
kernel: applespi spi-APP000D:00: Error writing to device: 01 0e 00 00
Fix this by restoring the previous context setup order.
--- drivers/iommu/intel/iommu.c | 11 +++++++++++ drivers/iommu/intel/iommu.h | 1 + drivers/iommu/intel/nested.c | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-)
drivers/iommu/intel/iommu.c +11 -0
@@ -1859,6 +1859,7 @@ static int dmar_domain_attach_device(strreturn ret; info->domain = domain; + info->domain_attached = true;spin_lock_irqsave (&domain->lock, flags);list_add (&info->link, &domain->devices);spin_unlock_irqrestore (&domain->lock, flags);
@@ -3257,6 +3258,10 @@ void device_block_translation(struct devstruct intel_iommu *iommu = info->iommu;unsigned long flags; +/* Device in DMA blocking state. Noting to do. */ +if (!info->domain_attached) +return ; +if (info->domain)cache_tag_unassign_domain (info->domain, dev,IOMMU_NO_PASID );
@@ -3268,6 +3273,9 @@ void device_block_translation(struct devdomain_context_clear (info); } +/* Device now in DMA blocking state. */ + info->domain_attached = false; +if (!info->domain)return ;
@@ -4357,6 +4365,9 @@ static int identity_domain_attach_dev(stelse ret =device_setup_pass_through (dev); +if (!ret) + info->domain_attached = true; +return ret; }
drivers/iommu/intel/iommu.h +1 -0
@@ -773,6 +773,7 @@ struct device_domain_info { u8 ats_supported:1; u8 ats_enabled:1; u8 dtlb_extra_inval:1; /* Quirk for devices need extra flush */ + u8 domain_attached:1; /* Device has domain attached */u8 ats_qdep;unsigned int iopf_refcount;struct device *dev;/* it's NULL for PCIe-to-PCI bridge */
drivers/iommu/intel/nested.c +2 -2
@@ -27,8 +27,7 @@ static int intel_nested_attach_dev(strucunsigned long flags;int ret =0 ; -if (info->domain) -device_block_translation (dev); +device_block_translation (dev);if (iommu->agaw < dmar_domain->s2_domain->agaw) {dev_err_ratelimited (dev,"Adjusted guest address width not compatible\n" );
@@ -62,6 +61,7 @@ static int intel_nested_attach_dev(struc goto unassign_tag; info->domain = dmar_domain; + info->domain_attached = true;spin_lock_irqsave (&dmar_domain->lock, flags);list_add (&info->link, &dmar_domain->devices);spin_unlock_irqrestore (&dmar_domain->lock, flags);
Greg Kroah-Hartman
maintainerPATCH 131/592 fbdev: Fix do_register_framebuffer to prevent null-ptr-deref in fb_videomode_to_var
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Murad Masimov <[email protected]>
commit 17186f1f90d34fa701e4f14e6818305151637b9e upstream.
If fb_add_videomode() in do_register_framebuffer() fails to allocate memory for fb_videomode, it will later lead to a null-ptr dereference in fb_videomode_to_var(), as the fb_info is registered while not having the mode in modelist that is expected to be there, i.e. the one that is described in fb_info->var.
================================================================
general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 1 PID: 30371 Comm: syz-executor.1 Not tainted 5.10.226-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:fb_videomode_to_var+0x24/0x610 drivers/video/fbdev/core/modedb.c:901 Call Trace: display_to_var+0x3a/0x7c0 drivers/video/fbdev/core/fbcon.c:929 fbcon_resize+0x3e2/0x8f0 drivers/video/fbdev/core/fbcon.c:2071 resize_screen drivers/tty/vt/vt.c:1176 [inline] vc_do_resize+0x53a/0x1170 drivers/tty/vt/vt.c:1263 fbcon_modechanged+0x3ac/0x6e0 drivers/video/fbdev/core/fbcon.c:2720 fbcon_update_vcs+0x43/0x60 drivers/video/fbdev/core/fbcon.c:2776 do_fb_ioctl+0x6d2/0x740 drivers/video/fbdev/core/fbmem.c:1128 fb_ioctl+0xe7/0x150 drivers/video/fbdev/core/fbmem.c:1203 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x19a/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x67/0xd1 ================================================================
Even though fbcon_init() checks beforehand if fb_match_mode() in var_to_display() fails, it can not prevent the panic because fbcon_init() does not return error code. Considering this and the comment in the code about fb_match_mode() returning NULL - "This should not happen" - it is better to prevent registering the fb_info if its mode was not set successfully. Also move fb_add_videomode() closer to the beginning of do_register_framebuffer() to avoid having to do the cleanup on fail.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
--- drivers/video/fbdev/core/fbmem.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
drivers/video/fbdev/core/fbmem.c +11 -7
@@ -388,7 +388,7 @@ static int fb_check_foreignness(struct fstatic int do_register_framebuffer (struct fb_info *fb_info) { -int i; +int i, err =0 ;struct fb_videomode mode;if (fb_check_foreignness (fb_info))
@@ -397,10 +397,18 @@ static int do_register_framebuffer(strucif (num_registered_fb ==FB_MAX )return -ENXIO ; - num_registered_fb++;for (i =0 ; i <FB_MAX ; i++)if (!registered_fb[i])break ; + +if (!fb_info->modelist.prev || !fb_info->modelist.next) +INIT_LIST_HEAD (&fb_info->modelist); + +fb_var_to_videomode (&mode, &fb_info->var); + err =fb_add_videomode (&mode, &fb_info->modelist); +if (err <0 ) +return err; + fb_info->node = i;refcount_set (&fb_info->count,1 );mutex_init (&fb_info->lock);
@@ -426,16 +434,12 @@ static int do_register_framebuffer(strucif (bitmap_empty (fb_info->pixmap.blit_y,FB_MAX_BLIT_HEIGHT ))bitmap_fill (fb_info->pixmap.blit_y,FB_MAX_BLIT_HEIGHT ); -if (!fb_info->modelist.prev || !fb_info->modelist.next) -INIT_LIST_HEAD (&fb_info->modelist); -if (fb_info->skip_vt_switch)pm_vt_switch_required (fb_info->device, false);else pm_vt_switch_required (fb_info->device, true); -fb_var_to_videomode (&mode, &fb_info->var); -fb_add_videomode (&mode, &fb_info->modelist); + num_registered_fb++; registered_fb[i] = fb_info;#ifdef CONFIG_GUMSTIX_AM200EPD
Greg Kroah-Hartman
maintainerPATCH 132/592 EDAC/altera: Use correct write width with the INTTEST register
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niravkumar L Rabara <[email protected]>
commit e5ef4cd2a47f27c0c9d8ff6c0f63a18937c071a3 upstream.
On the SoCFPGA platform, the INTTEST register supports only 16-bit writes. A 32-bit write triggers an SError to the CPU so do 16-bit accesses only.
[ bp: AI-massage the commit message. ]
--- drivers/edac/altera_edac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/edac/altera_edac.c +3 -3
@@ -1746,9 +1746,9 @@ altr_edac_a10_device_trig(struct file *flocal_irq_save (flags);if (trig_type ==ALTR_UE_TRIGGER_CHAR ) -writel (priv->ue_set_mask, set_addr); +writew (priv->ue_set_mask, set_addr);else -writel (priv->ce_set_mask, set_addr); +writew (priv->ce_set_mask, set_addr);/* Ensure the interrupt test bits are set */ wmb ();
@@ -1778,7 +1778,7 @@ altr_edac_a10_device_trig2(struct file *local_irq_save (flags);if (trig_type ==ALTR_UE_TRIGGER_CHAR ) { -writel (priv->ue_set_mask, set_addr); +writew (priv->ue_set_mask, set_addr); }else {/* Setup read/write of 4 bytes */ writel (ECC_WORD_WRITE , drvdata->base +ECC_BLK_DBYTECTRL_OFST );
Greg Kroah-Hartman
maintainerPATCH 133/592 fbdev: Fix fb_set_var to prevent null-ptr-deref in fb_videomode_to_var
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Murad Masimov <[email protected]>
commit 05f6e183879d9785a3cdf2f08a498bc31b7a20aa upstream.
If fb_add_videomode() in fb_set_var() fails to allocate memory for fb_videomode, later it may lead to a null-ptr dereference in fb_videomode_to_var(), as the fb_info is registered while not having the mode in modelist that is expected to be there, i.e. the one that is described in fb_info->var.
================================================================
general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 1 PID: 30371 Comm: syz-executor.1 Not tainted 5.10.226-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:fb_videomode_to_var+0x24/0x610 drivers/video/fbdev/core/modedb.c:901 Call Trace: display_to_var+0x3a/0x7c0 drivers/video/fbdev/core/fbcon.c:929 fbcon_resize+0x3e2/0x8f0 drivers/video/fbdev/core/fbcon.c:2071 resize_screen drivers/tty/vt/vt.c:1176 [inline] vc_do_resize+0x53a/0x1170 drivers/tty/vt/vt.c:1263 fbcon_modechanged+0x3ac/0x6e0 drivers/video/fbdev/core/fbcon.c:2720 fbcon_update_vcs+0x43/0x60 drivers/video/fbdev/core/fbcon.c:2776 do_fb_ioctl+0x6d2/0x740 drivers/video/fbdev/core/fbmem.c:1128 fb_ioctl+0xe7/0x150 drivers/video/fbdev/core/fbmem.c:1203 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x19a/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x67/0xd1 ================================================================
The reason is that fb_info->var is being modified in fb_set_var(), and then fb_videomode_to_var() is called. If it fails to add the mode to fb_info->modelist, fb_set_var() returns error, but does not restore the old value of fb_info->var. Restore fb_info->var on failure the same way it is done earlier in the function.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
--- drivers/video/fbdev/core/fbmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/video/fbdev/core/fbmem.c +3 -1
@@ -328,8 +328,10 @@ fb_set_var(struct fb_info *info, struct !list_empty(&info->modelist)) ret =fb_add_videomode (&mode, &info->modelist); -if (ret) +if (ret) { + info->var = old_var;return ret; + } event.info = info; event.data = &mode;
Greg Kroah-Hartman
maintainerPATCH 134/592 parisc/unaligned: Fix hex output to show 8 hex chars
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <[email protected]>
commit 213205889d5ffc19cb8df06aa6778b2d4724c887 upstream.
Change back printk format to 0x%08lx instead of %#08lx, since the latter does not seem to reliably format the value to 8 hex chars.
--- arch/parisc/kernel/unaligned.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/parisc/kernel/unaligned.c +1 -1
@@ -25,7 +25,7 @@ #define DPRINTF(fmt, args...)#endif -#define RFMT "%#08lx" +#define RFMT "0x%08lx"/* 1111 1100 0000 0000 0001 0011 1100 0000 */ #define OPCODE1 (a,b,c) ((a)<<26|(b)<<12|(c)<<6)
Greg Kroah-Hartman
maintainerPATCH 135/592 vgacon: Add check for vc_origin address range in vgacon_scroll()
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: GONG Ruiqi <[email protected]>
commit 864f9963ec6b4b76d104d595ba28110b87158003 upstream.
Our in-house Syzkaller reported the following BUG (twice), which we believed was the same issue with [1]:
==================================================================
BUG: KASAN: slab-out-of-bounds in vcs_scr_readw+0xc2/0xd0 drivers/tty/vt/vt.c:4740 Read of size 2 at addr ffff88800f5bef60 by task syz.7.2620/12393 ... Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x72/0xa0 lib/dump_stack.c:106 print_address_description.constprop.0+0x6b/0x3d0 mm/kasan/report.c:364 print_report+0xba/0x280 mm/kasan/report.c:475 kasan_report+0xa9/0xe0 mm/kasan/report.c:588 vcs_scr_readw+0xc2/0xd0 drivers/tty/vt/vt.c:4740 vcs_write_buf_noattr drivers/tty/vt/vc_screen.c:493 [inline] vcs_write+0x586/0x840 drivers/tty/vt/vc_screen.c:690 vfs_write+0x219/0x960 fs/read_write.c:584 ksys_write+0x12e/0x260 fs/read_write.c:639 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x59/0x110 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x78/0xe2 ... </TASK> Allocated by task 5614: kasan_save_stack+0x20/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:201 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc+0x62/0x140 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:721 [inline] vc_do_resize+0x235/0xf40 drivers/tty/vt/vt.c:1193 vgacon_adjust_height+0x2d4/0x350 drivers/video/console/vgacon.c:1007 vgacon_font_set+0x1f7/0x240 drivers/video/console/vgacon.c:1031 con_font_set drivers/tty/vt/vt.c:4628 [inline] con_font_op+0x4da/0xa20 drivers/tty/vt/vt.c:4675 vt_k_ioctl+0xa10/0xb30 drivers/tty/vt/vt_ioctl.c:474 vt_ioctl+0x14c/0x1870 drivers/tty/vt/vt_ioctl.c:752 tty_ioctl+0x655/0x1510 drivers/tty/tty_io.c:2779 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0x12d/0x190 fs/ioctl.c:857 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x59/0x110 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x78/0xe2 Last potentially related work creation: kasan_save_stack+0x20/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x94/0xa0 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0xc3/0xa10 kernel/rcu/tree.c:2713 netlink_release+0x620/0xc20 net/netlink/af_netlink.c:802 __sock_release+0xb5/0x270 net/socket.c:663 sock_close+0x1e/0x30 net/socket.c:1425 __fput+0x408/0xab0 fs/file_table.c:384 __fput_sync+0x4c/0x60 fs/file_table.c:465 __do_sys_close fs/open.c:1580 [inline] __se_sys_close+0x68/0xd0 fs/open.c:1565 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x59/0x110 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x78/0xe2 Second to last potentially related work creation: kasan_save_stack+0x20/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x94/0xa0 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0xc3/0xa10 kernel/rcu/tree.c:2713 netlink_release+0x620/0xc20 net/netlink/af_netlink.c:802 __sock_release+0xb5/0x270 net/socket.c:663 sock_close+0x1e/0x30 net/socket.c:1425 __fput+0x408/0xab0 fs/file_table.c:384 task_work_run+0x154/0x240 kernel/task_work.c:239 exit_task_work include/linux/task_work.h:45 [inline] do_exit+0x8e5/0x1320 kernel/exit.c:874 do_group_exit+0xcd/0x280 kernel/exit.c:1023 get_signal+0x1675/0x1850 kernel/signal.c:2905 arch_do_signal_or_restart+0x80/0x3b0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x1b3/0x1e0 kernel/entry/common.c:218 do_syscall_64+0x66/0x110 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x78/0xe2 The buggy address belongs to the object at ffff88800f5be000 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 2656 bytes to the right of
allocated 1280-byte region [ffff88800f5be000, ffff88800f5be500)
...
Memory state around the buggy address:
ffff88800f5bee00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88800f5bee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88800f5bef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88800f5bef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88800f5bf000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================By analyzing the vmcore, we found that vc->vc_origin was somehow placed one line prior to vc->vc_screenbuf when vc was in KD_TEXT mode, and further writings to /dev/vcs caused out-of-bounds reads (and writes right after) in vcs_write_buf_noattr().
Our further experiments show that in most cases, vc->vc_origin equals to vga_vram_base when the console is in KD_TEXT mode, and it's around vc->vc_screenbuf for the KD_GRAPHICS mode. But via triggerring a TIOCL_SETVESABLANK ioctl beforehand, we can make vc->vc_origin be around vc->vc_screenbuf while the console is in KD_TEXT mode, and then by writing the special 'ESC M' control sequence to the tty certain times (depends on the value of vc->state.y - vc->vc_top), we can eventually move vc->vc_origin prior to vc->vc_screenbuf. Here's the PoC, tested on QEMU:
```
int main() {
const int RI_NUM = 10; // should be greater than `vc->state.y - vc->vc_top`
int tty_fd, vcs_fd;
const char *tty_path = "/dev/tty0";
const char *vcs_path = "/dev/vcs";
const char escape_seq[] = "\x1bM"; // ESC + M
const char trigger_seq[] = "Let's trigger an OOB write.";
struct vt_sizes vt_size = { 70, 2 };
int blank = TIOCL_BLANKSCREEN;
tty_fd = open(tty_path, O_RDWR);
char vesa_mode[] = { TIOCL_SETVESABLANK, 1 };
ioctl(tty_fd, TIOCLINUX, vesa_mode);
ioctl(tty_fd, TIOCLINUX, &blank);
ioctl(tty_fd, VT_RESIZE, &vt_size);
for (int i = 0; i < RI_NUM; ++i)
write(tty_fd, escape_seq, sizeof(escape_seq) - 1);
vcs_fd = open(vcs_path, O_RDWR);
write(vcs_fd, trigger_seq, sizeof(trigger_seq));
close(vcs_fd);
close(tty_fd);
return 0;
}
```To solve this problem, add an address range validation check in vgacon_scroll(), ensuring vc->vc_origin never precedes vc_screenbuf.
--- drivers/video/console/vgacon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/console/vgacon.c +1 -1
@@ -1168,7 +1168,7 @@ static bool vgacon_scroll(struct vc_data c->vc_screenbuf_size - delta); c->vc_origin = vga_vram_end - c->vc_screenbuf_size; vga_rolled_over =0 ; - }else + }else if (oldo - delta >= (unsigned long )c->vc_screenbuf) c->vc_origin -= delta; c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size; scr_memsetw((u16 *) (c->vc_origin), c->vc_video_erase_char,
Greg Kroah-Hartman
maintainerPATCH 136/592 parisc: fix building with gcc-15
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
commit 7cbb015e2d3d6f180256cde0c908eab21268e7b9 upstream.
The decompressor is built with the default C dialect, which is now gnu23 on gcc-15, and this clashes with the kernel's bool type definition:
In file included from include/uapi/linux/posix_types.h:5,
from arch/parisc/boot/compressed/misc.c:7:include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant
11 | false = 0,
Add the -std=gnu11 argument here, as we do for all other architectures.
--- arch/parisc/boot/compressed/Makefile | 1 + 1 file changed, 1 insertion(+)
arch/parisc/boot/compressed/Makefile +1 -0
@@ -18,6 +18,7 @@ KBUILD_CFLAGS += -fno-PIE -mno-space-reg ifndef CONFIG_64BIT KBUILD_CFLAGS += -mfast-indirect-calls endif +KBUILD_CFLAGS += -std=gnu11 LDFLAGS_vmlinux := -X -e startup --as-needed -T $(obj)/vmlinux: $(obj)/vmlinux.lds $(addprefix $(obj)/, $(OBJECTS)) $(LIBGCC) FORCE
Greg Kroah-Hartman
maintainerPATCH 119/592 Input: gpio-keys - fix a sleep while atomic with PREEMPT_RT
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabrice Gasnier <[email protected]>
commit f4a8f561d08e39f7833d4a278ebfb12a41eef15f upstream.
When enabling PREEMPT_RT, the gpio_keys_irq_timer() callback runs in hard irq context, but the input_event() takes a spin_lock, which isn't allowed there as it is converted to a rt_spin_lock().
[ 4054.289999] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 [ 4054.290028] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/0 ... [ 4054.290195] __might_resched+0x13c/0x1f4 [ 4054.290209] rt_spin_lock+0x54/0x11c [ 4054.290219] input_event+0x48/0x80 [ 4054.290230] gpio_keys_irq_timer+0x4c/0x78 [ 4054.290243] __hrtimer_run_queues+0x1a4/0x438 [ 4054.290257] hrtimer_interrupt+0xe4/0x240 [ 4054.290269] arch_timer_handler_phys+0x2c/0x44 [ 4054.290283] handle_percpu_devid_irq+0x8c/0x14c [ 4054.290297] handle_irq_desc+0x40/0x58 [ 4054.290307] generic_handle_domain_irq+0x1c/0x28 [ 4054.290316] gic_handle_irq+0x44/0xcc
Considering the gpio_keys_irq_isr() can run in any context, e.g. it can be threaded, it seems there's no point in requesting the timer isr to run in hard irq context.
Relax the hrtimer not to use the hard context.
--- drivers/input/keyboard/gpio_keys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/keyboard/gpio_keys.c +2 -2
@@ -486,7 +486,7 @@ static irqreturn_t gpio_keys_irq_isr(intif (bdata->release_delay)hrtimer_start (&bdata->release_timer,ms_to_ktime (bdata->release_delay), -HRTIMER_MODE_REL_HARD ); +HRTIMER_MODE_REL ); out:return IRQ_HANDLED ; }
@@ -628,7 +628,7 @@ static int gpio_keys_setup_key(struct pl bdata->release_delay = button->debounce_interval;hrtimer_setup (&bdata->release_timer, gpio_keys_irq_timer, -CLOCK_REALTIME ,HRTIMER_MODE_REL_HARD ); +CLOCK_REALTIME ,HRTIMER_MODE_REL ); isr = gpio_keys_irq_isr; irqflags =0 ;
Greg Kroah-Hartman
maintainerPATCH 137/592 clk: meson-g12a: add missing fclk_div2 to spicc
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Da Xue <[email protected]>
commit daf004f87c3520c414992893e2eadd5db5f86a5a upstream.
SPICC is missing fclk_div2, which means fclk_div5 and fclk_div7 indexes are wrong on this clock. This causes the spicc module to output sclk at 2.5x the expected rate when clock index 3 is picked.
Adding the missing fclk_div2 resolves this.
--- drivers/clk/meson/g12a.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/meson/g12a.c +1 -0
@@ -4093,6 +4093,7 @@ static const struct clk_parent_data spic { .hw = &g12a_clk81.hw }, { .hw = &g12a_fclk_div4.hw }, { .hw = &g12a_fclk_div3.hw }, + { .hw = &g12a_fclk_div2.hw }, { .hw = &g12a_fclk_div5.hw }, { .hw = &g12a_fclk_div7.hw }, };
Greg Kroah-Hartman
maintainerPATCH 138/592 ipc: fix to protect IPCS lookups using RCU
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeongjun Park <[email protected]>
commit d66adabe91803ef34a8b90613c81267b5ded1472 upstream.
syzbot reported that it discovered a use-after-free vulnerability, [0]
[0]: https://lore.kernel.org/all/[email protected]/
idr_for_each() is protected by rwsem, but this is not enough. If it is not protected by RCU read-critical region, when idr_for_each() calls radix_tree_node_free() through call_rcu() to free the radix_tree_node structure, the node will be freed immediately, and when reading the next node in radix_tree_for_each_slot(), the already freed memory may be read.
Therefore, we need to add code to make sure that idr_for_each() is protected within the RCU read-critical region when we call it in shm_destroy_orphaned().
--- ipc/shm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
ipc/shm.c +4 -1
@@ -431,8 +431,11 @@ static int shm_try_destroy_orphaned(intvoid shm_destroy_orphaned (struct ipc_namespace *ns) {down_write (&shm_ids (ns).rwsem); -if (shm_ids (ns).in_use) +if (shm_ids (ns).in_use) { +rcu_read_lock ();idr_for_each (&shm_ids (ns).ipcs_idr, &shm_try_destroy_orphaned, ns); +rcu_read_unlock (); + }up_write (&shm_ids (ns).rwsem); }
Greg Kroah-Hartman
maintainerPATCH 139/592 watchdog: fix watchdog may detect false positive of softlockup
In reply to Greg Kroah-Hartman6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luo Gengkun <[email protected]>
commit 7123dbbef88cfd9f09e8a7899b0911834600cfa3 upstream.
When updating watchdog_thresh, there is a race condition between writing the new watchdog_thresh value and stopping the old watchdog timer. If the old timer triggers during this window, it may falsely detect a softlockup due to the old interval and the new watchdog_thresh value being used. The problem can be described as follow:
# We asuume previous watchdog_thresh is 60, so the watchdog timer is
# coming every 24s. echo 10 > /proc/sys/kernel/watchdog_thresh (User space) | +------>+ update watchdog_thresh (We are in kernel now) | | # using old interval and new `watchdog_thresh` +------>+ watchdog hrtimer (irq context: detect softlockup) | | +-------+ | | + softlockup_stop_all
To fix this problem, introduce a shadow variable for watchdog_thresh. The update to the actual watchdog_thresh is delayed until after the old timer is stopped, preventing false positives.
The following testcase may help to understand this problem.
---------------------------------------------
echo RT_RUNTIME_SHARE > /sys/kernel/debug/sched/features echo -1 > /proc/sys/kernel/sched_rt_runtime_us
echo 0 > /sys/kernel/debug/sched/fair_server/cpu3/runtime echo 60 > /proc/sys/kernel/watchdog_thresh
taskset -c 3 chrt -r 99 /bin/bash -c "while true;do true; done" & echo 10 > /proc/sys/kernel/watchdog_thresh &
---------------------------------------------
The test case above first removes the throttling restrictions for real-time tasks. It then sets watchdog_thresh to 60 and executes a real-time task ,a simple while(1) loop, on cpu3. Consequently, the final command gets blocked because the presence of this real-time thread prevents kworker:3 from being selected by the scheduler. This eventually triggers a softlockup detection on cpu3 due to watchdog_timer_fn operating with inconsistent variable - using both the old interval and the updated watchdog_thresh simultaneously.
--- kernel/watchdog.c | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-)
kernel/watchdog.c +27 -14
@@ -47,6 +47,7 @@ int __read_mostly watchdog_user_enabledstatic int __read_mostly watchdog_hardlockup_user_enabled =WATCHDOG_HARDLOCKUP_DEFAULT ;static int __read_mostly watchdog_softlockup_user_enabled =1 ;int __read_mostly watchdog_thresh =10 ; +static int __read_mostly watchdog_thresh_next;static int __read_mostly watchdog_hardlockup_available;struct cpumask watchdog_cpumask__read_mostly ;
@@ -870,12 +871,20 @@ int lockup_detector_offline_cpu(unsignedreturn 0 ; } -static void __lockup_detector_reconfigure (void ) +static void __lockup_detector_reconfigure (bool thresh_changed) {cpus_read_lock ();watchdog_hardlockup_stop ();softlockup_stop_all (); +/* +* To prevent watchdog_timer_fn from using the old interval and +* the new watchdog_thresh at the same time, which could lead to +* false softlockup reports, it is necessary to update the +* watchdog_thresh after the softlockup is completed. +*/ +if (thresh_changed) + watchdog_thresh =READ_ONCE (watchdog_thresh_next);set_sample_period ();lockup_detector_update_enable ();if (watchdog_enabled && watchdog_thresh)
@@ -888,7 +897,7 @@ static void __lockup_detector_reconfigurvoid lockup_detector_reconfigure (void ) {mutex_lock (&watchdog_mutex); -__lockup_detector_reconfigure (); +__lockup_detector_reconfigure (false);mutex_unlock (&watchdog_mutex); }
@@ -908,27 +917,29 @@ static __init void lockup_detector_setupreturn ;mutex_lock (&watchdog_mutex); -__lockup_detector_reconfigure (); +__lockup_detector_reconfigure (false); softlockup_initialized = true; mutex_unlock(&watchdog_mutex); }#else /* CONFIG_SOFTLOCKUP_DETECTOR */ -static void __lockup_detector_reconfigure (void ) +static void __lockup_detector_reconfigure (bool thresh_changed) {cpus_read_lock ();watchdog_hardlockup_stop (); +if (thresh_changed) + watchdog_thresh =READ_ONCE (watchdog_thresh_next);lockup_detector_update_enable ();watchdog_hardlockup_start ();cpus_read_unlock (); }void lockup_detector_reconfigure (void ) { -__lockup_detector_reconfigure (); +__lockup_detector_reconfigure (false); }static inline void lockup_detector_setup (void ) { -__lockup_detector_reconfigure (); +__lockup_detector_reconfigure (false); }#endif /* !CONFIG_SOFTLOCKUP_DETECTOR */
@@ -946,11 +957,11 @@ void lockup_detector_soft_poweroff(void)#ifdef CONFIG_SYSCTL /* Propagate any changes to the watchdog infrastructure */ -static void proc_watchdog_update (void ) +static void proc_watchdog_update (bool thresh_changed) {/* Remove impossible cpus to keep sysctl output clean. */ cpumask_and (&watchdog_cpumask, &watchdog_cpumask, cpu_possible_mask); -__lockup_detector_reconfigure (); +__lockup_detector_reconfigure (thresh_changed); }/*
@@ -984,7 +995,7 @@ static int proc_watchdog_common(int whic }else { err =proc_dointvec_minmax (table, write, buffer, lenp, ppos);if (!err && old !=READ_ONCE (*param)) -proc_watchdog_update (); +proc_watchdog_update (false); }mutex_unlock (&watchdog_mutex);return err;
@@ -1035,11 +1046,13 @@ static int proc_watchdog_thresh(const stmutex_lock (&watchdog_mutex); - old =READ_ONCE (watchdog_thresh); + watchdog_thresh_next =READ_ONCE (watchdog_thresh); + + old = watchdog_thresh_next; err =proc_dointvec_minmax (table, write, buffer, lenp, ppos); -if (!err && write && old !=READ_ONCE (watchdog_thresh)) -proc_watchdog_update (); +if (!err && write && old !=READ_ONCE (watchdog_thresh_next)) +proc_watchdog_update (true);mutex_unlock (&watchdog_mutex);return err;
@@ -1060,7 +1073,7 @@ static int proc_watchdog_cpumask(const s err =proc_do_large_bitmap (table, write, buffer, lenp, ppos);if (!err && write) -proc_watchdog_update (); +proc_watchdog_update (false);mutex_unlock (&watchdog_mutex);return err;
@@ -1080,7 +1093,7 @@ static const struct ctl_table watchdog_s }, { .procname = "watchdog_thresh", - .data = &watchdog_thresh, + .data = &watchdog_thresh_next, .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_watchdog_thresh,