Merge tag 'thermal-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control fix from Rafael Wysocki:
"Address a possible NULL pointer dereference in the thermal
sysfs interface by adding thermal zone locking to some show/store
callbacks (Yu Zhang)"
* tag 'thermal-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
thermal: sysfs: take the zone lock in the tzp attribute handlers
Merge tag 'pm-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki:
"These fix two issues in the intel_pstate driver including one recent
regression:
- Prevent intel_pstate from triggering lockdep splats during system
resume due to suspicious ordering of locks that is a consequence of
a recent cpufreq core update (Rafael Wysocki)
- Make intel_pstate refresh cpuinfo.max_freq when a CPU goes online
to avoid using a stale value of it (Hugo Sales)"
* tag 'pm-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: intel_pstate: Use dedicated lock in set_power_ctl_ee_state()
cpufreq: intel_pstate: Refresh cpuinfo.max_freq when a CPU goes online
Merge tag 'iommu-fixes-v7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux
Pull iommu fixes from Joerg Roedel:
"AMD IOMMU:
- Fix DMA failures on AMD Cezanne by flushing CPU cache lines for
IOMMU v2 page tables
VeriSilicon IOMMU:
- Keep runtime PM callbacks available without CONFIG_PM_SLEEP, fixing
an SError on the RK3588 AV1 decoder. Avoid sleeping in hard IRQ
context, balance runtime PM references during TLB invalidation, and
flush the TLB on resume
- Fix domain-switch locking and out-of-bounds access when attaching
or resuming an identity domain. Drop the unsupported disable write
on suspend and unprepare clocks if IRQ lookup fails during probe
[17 lines not shown]
Merge tag 'sound-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"A collection of various small fixes across the sound subsystem. Mostly
the device-specific quirks and driver fixes as usual, along with a few
race and deadlock fixes in ALSA core and ASoC drivers:
ALSA core:
- Fix potential ABBA deadlock at snd_pcm_action_nonatomic()
- Prevent hw_params/hw_refine changes during PCM buffer access
- Simplify PCM buffer access gate with auto-cleanup helpers
- Fix deadlock regression at OSS device unregistration
- Refine slave hw_params after setting format in PCM OSS
- Protect slave timer instance flags with the timer lock
HD-audio:
- Fix unbalanced display power reference on delayed probe failure
- Fix NULL pointer dereference on unbind in TAS2781 SPI driver
- Revert for regression on Higole F9B due to generic SSID conflict
[44 lines not shown]
Merge tag 'staging-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver removal from Greg KH:
"Here is a single staging driver patch that removes the vme_user
driver.
There is no more users of it and the LLMs are falling all over
themselves attempting to find all of the "security bugs" in this
driver, despite no one ever actually use it. So just remove it to
keep from wasting everyone's time.
This removal has been in linux-next for quite a while with no
reported issues"
* tag 'staging-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: vme_user: delete driver
Merge tag 'usb-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB / Thunderbolt fixes from Greg KH:
"Here are a bunch of small USB and Thunderbolt driver fixes for
reported issues. Most of these are for gadget driver issues that
people have reported a while ago, it just took me a bit to catch up
with the pending patch submissions. Fixes in here include:
- small thunderbolt driver fixes for some minor issues
- lots of small usb gadget fixes, from users having problems,
syzbot-found issues, or llm-found problems, all with reproducers
- typec driver fixes
- dwc3 driver fixes
- dwc2 driver fixes
[34 lines not shown]
Merge tag 'ata-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux
Pull ata fix from Niklas Cassel:
- Quirk the ADATA SU650 SSD with NOLPM due to its defective link
power management (me)
* tag 'ata-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
ata: libata-core: Disable LPM on ADATA SU650 with firmware XD0R3C0F
Merge tag 'gpio-fixes-for-v7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski:
"GPIO core fixes:
- fix several logic & locking issues and resource leaks in GPIO
character device code
- fix GPIO hogging for controllers using the three-cell binding
- fix inverted trace values in gpiod_get_array_value()
- remove shared GPIO proxies before freeing interrupts that are still
requested by the parent controller and fix a race in remove path
- fix UAF bugs around the GPIO label cleanup
GPIO driver fixes:
- fix a use-after-free bug in gpio-davinci
- fix an issue in gpio-davinci where the driver could setup an IRQ
for a wrong controller
- validate the number of GPIOs in gpio-mvebu
- use correct registers in suspend/resume in gpio-mvebu
- fix non-kerneldoc comment in nsc-gpio header
[36 lines not shown]
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Catalin Marinas:
"Mostly missing barriers and break-before-make in kernel page table
updates (fixmap, early ID map, KPTI) plus a livepatch fix for late PLT
writes to read-only module text:
- Fix missing barriers and break-before-make in kernel page table
updates: ISBs after mapping the FDT in the initial ID map and after
remapping the KPTI page-table slot; non-deferred barriers for
fixmap entries in lazy MMU mode; break-before-make when overwriting
a valid fixmap entry
- Route late (livepatch) PLT and ADRP veneer writes through the
text-poke API as the module's .plt section is read-only by then"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: fixmap: fix missing break-before-make in __set_fixmap()
arm64: module: Use text-poke for late PLT/veneer emission
[3 lines not shown]
Merge tag 's390-7.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Alexander Gordeev:
- Fix the cert_store code keyring locking, lifetime handling, missing
error and return code checks, several reference leaks and potential
use-after-free issues caused by unbalanced keyring reference counting
- Look up the cert_store keyring only in the user session keyring. As
result a foreign keyring named "cert_store", which a task may have
inherited, is no longer destroyed during refresh
- Fix out-of-bounds reads in hash validation and in Verification
Certificate Entry (VCE) debug output, avoid copying uninitialized
DIAG 320 data to the debug area, and print the correct value of
max_vcxe_length
- Allocate the cert_store keyring with a link restriction, so that
arbitrary keys cannot be linked into it
[23 lines not shown]
Merge tag 'mm-core-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/core
Pull core MM fixes from David Hildenbrand:
"Two hotfixes and a bunch of fixes for other nasty issues we found that
I want to have fixed sooner rather than later. All got a couple of
days in -next after proper review, which is why I am rather late this
week.
- Fix deadlocks on the folio lock when splitting folios and when
migrating folios, triggerable by unprivileged users
- Fix lost writes and stale reads due to stale TLB entries with
delayed rmap handling on UP, when zapping dirty file PMDs, when
installing CoW'ed folios, and when reclaim does not write back a
dirty folio
- Fix various MADV_FREE issues that can lead to data loss or exposure
of stale swap content
[28 lines not shown]
Merge tag 'keys-v7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd
Pull keys fixes from Jarkko Sakkinen:
- Trusted keys: initialize backend static calls before ->init(),
synchronize TEE session lifetime against device removal (and disable
sysfs bind/unbind), and propagate CAAM option parsing errors.
- keyctl_pkey: fix user buffer bounds in keyctl_pkey_e_d_s() and
keyctl_pkey_verify(), and zero temporary buffers with
kfree_sensitive().
- Key instantiation: take key->sem during instantiation and rejection
to serialize key->user access against keyctl_chown_key().
- big_key: instantiate the new payload before destroying the old one in
big_key_update() so -EDQUOT cannot leave a positive key with a
cleared payload.
[10 lines not shown]
iommu/vsi: Unlink the IOMMU from its old domain under that domain's lock
Attaching a paging domain moves iommu->node to the new domain's list
holding only the new domain's lock. A concurrent map or unmap on the old
domain walks the old list in vsi_iommu_flush_tlb() and can follow the
moved node into the new list.
Unlink the IOMMU under the old domain's lock first.
Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver")
Reported-by: Sashiko <sashiko-bot at kernel.org>
Closes: https://lore.kernel.org/all/sashiko-outbox-206639@kernel.org/
Cc: stable at vger.kernel.org
Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
iommu/vsi: Unprepare the clocks when getting the IRQ fails
vsi_iommu_probe() returns without clk_bulk_unprepare() when
platform_get_irq() fails.
Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver")
Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
iommu/amd: Mark v2 page tables incoherent on Cezanne
DMA fails on Cezanne (family 19h, model 50h) when a device is placed in
an IOMMU v2 paging domain due to missing coherency setting in IOMMU HW.
The IOMMU walks v2 page tables without observing CPU writes still held
in the cache. v1 PTEs have a Force Coherent bit, which the driver sets
on every entry, but the v2 format has no equivalent bit, so v2 walks
are not kept coherent.
Set PT_FEAT_DMA_INCOHERENT for v2 domains on this CPU so the generic
page-table code clflushes table memory before the IOMMU reads it.
Link: https://lore.kernel.org/linux-iommu/CACOV87VBwH+R3eSBEOuz8hk7OaT63+A9m6ipPSW5wt1VhHMFPg@mail.gmail.com/
Cc: Mario Limonciello (AMD) <superm1 at kernel.org>
Cc: Alex Deucher <alexander.deucher at amd.com>
Tested-by: Akshata V Unkal <Akshata.VUnkal at amd.com>
Co-developed-by: Nathan Blomquist <nblomquist at gmail.com>
Signed-off-by: Nathan Blomquist <nblomquist at gmail.com>
Signed-off-by: Vasant Hegde <vasant.hegde at amd.com>
[5 lines not shown]
iommu/vsi: Don't leak a runtime PM reference in the TLB flush
pm_runtime_get() takes a usage reference even when it fails, e.g. with
-EINPROGRESS while a resume runs, and vsi_iommu_flush_tlb() then skips
the put. The IOMMU then never suspends again.
Flush only an active IOMMU and flush the TLB when the IOMMU is enabled,
which covers resume.
Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver")
Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
iommu/vsi: Don't use the identity domain as a paging domain
vsi_identity_domain is a bare struct iommu_domain, but identity attach
and resume pass it to to_vsi_domain() and take the lock of that
vsi_iommu_domain, which is memory past the static domain. Identity
attach also unlinks the IOMMU from its old domain's list without that
domain's lock.
Take the old paging domain's lock to unlink the IOMMU, and only the
IOMMU lock otherwise. Resume touches neither the page tables nor the
domain's list, so it needs only the IOMMU lock.
Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver")
Reported-by: Sashiko <sashiko-bot at kernel.org>
Closes: https://sashiko.dev/#/patchset/20261113-vsi-iommu-pm-ref-v1-0-fd917eebdf18@gmail.com?part=1
Cc: stable at vger.kernel.org
Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
iommu/vsi: Don't resume the IOMMU in its interrupt handler
The interrupt handler calls pm_runtime_resume_and_get(), which can
sleep, in hard IRQ context. Handle the interrupt only if the IOMMU is
active.
Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver")
Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
iommu/vsi: Don't write the enable register on suspend
Benjamin Gaignard pointed out that, per the IOMMU documentation, the
IOMMU can't be disabled once enabled. Drop the write on suspend:
resume reprograms the IOMMU anyway.
Suggested-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
iommu/hyperv: Don't free a paging domain the hypervisor did not delete
hv_iommu_paging_domain_free() frees all page-table pages with
pt_iommu_deinit() and only then asks the hypervisor to delete the
device domain that points at them. If HVCALL_DELETE_DEVICE_DOMAIN
fails, hv_delete_device_domain() only logs the error, returns the
domain ID to the IDA, and the domain is freed anyway.
The hypervisor then keeps a device domain whose page tables have been
freed and can be reused for anything. The ID is also handed out again
by the next paging domain allocation, while the hypervisor still has a
domain with that ID.
Delete the domain before freeing its page tables, and keep the ID, the
page tables and the domain if the hypervisor fails to delete it. WARN
when the delete fails, as the domain is then leaked.
Fixes: 2690d4156b51 ("iommu/hyperv: Add para-virtualized IOMMU support for Hyper-V guest")
Reviewed-by: Easwar Hariharan <easwar.hariharan at linux.microsoft.com>
[4 lines not shown]
iommu/vsi: keep the runtime PM callbacks without PM_SLEEP
The runtime PM operations are handed to the driver core through
pm_sleep_ptr(), which is NULL unless CONFIG_PM_SLEEP is set.
Without system sleep support the IOMMU has no runtime PM callbacks at
all: its clocks are never enabled by the driver, the page table is not
restored when the power domain comes back, and iommu->enable stays set
while genpd powers the domain off.
The TLB flush issued from vsi_iommu_map() then writes to the unpowered
IOMMU, and the first buffer allocation of the RK3588 AV1 decoder ends
in an asynchronous SError.
Use pm_ptr(), which keeps the operations whenever CONFIG_PM is set.
Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver")
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
iommu/hyperv: Keep a new domain's page tables if it cannot be deleted
When hv_iommu_domain_alloc_paging() fails to configure a new device
domain, hv_create_configure_device_domain() deletes the domain again,
and the caller then frees the page tables with pt_iommu_deinit(). The
page tables are freed even if the delete fails and the hypervisor
still has the domain.
The current Hyper-V implementation does not adopt the page table root
when HVCALL_CONFIGURE_DEVICE_DOMAIN fails, so the page tables are not
referenced in this case today. This change is defensive: it avoids
relying on that while the hypervisor still has the domain.
Create and configure the domain in hv_iommu_domain_alloc_paging()
itself, and leak the page tables and the domain when the delete fails,
as hv_iommu_paging_domain_free() does.
Reported-by: Jacob Pan <jacob.pan at linux.microsoft.com>
Closes: https://lore.kernel.org/all/20261105141427.00005946@linux.microsoft.com/
[5 lines not shown]
Merge tag 'usb-serial-7.4-rc5' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes:
USB serial fixes for 7.4-rc5
Here are couple of fixes for long-standing issues that could cause
trouble, for example, when open() races with disconnect.
Both have been in linux-next with no reported issues.
* tag 'usb-serial-7.4-rc5' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
USB: serial: f81232: drain work on failed open
USB: serial: mct_u232: fix NULL-deref on open() failure
Merge tag 'asoc-fix-v7.4-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v7.4
A fairly big but mostly routine pile of driver specific fixes and quirks
for v7.4. The new Tegra support is the biggest thing here, it's all
data required by the newly added device, there's no real code in there
so while it was on the edge of getting applied for v7.5 it seemed fine
here.
Merge tag 'net-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni:
"Including fixes from WiFi, Bluetooth and CAN.
Current release - regressions:
- eth: mlx5e: TC, fix a NULL pointer write in the peer flow error path
Current release - new code bugs:
- xfrm: interface: drop non-IP packets before pskb_inet_may_pull()
- eth: b53: use the correct override register 2 Gbps bit
Previous releases - regressions:
- core:
- do not run out of frags in alloc_skb_with_frags()
[78 lines not shown]
Merge tag 'ext4_for-linus-7.4-rc5-postmerge' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 fixes from Ted Ts'o:
"Fix the KUnit ext4_xattr_test by adding missing stub registration
after the recent merge into mainline.
Also address two teset failures that weren't noticed in my original
pre-PR testing.
- Fix the ext4_inode_test when CONFIG_USER_NS is enabled
- Fix generic/311 failure for ext4 with the fast_commit and
inline_data features are enabled"
* tag 'ext4_for-linus-7.4-rc5-postmerge' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: don't track metadata buffers on an inode during fast commit replay
ext4: set s_user_ns in the KUnit tests' fake superblocks
ext4: stub ext4_sb_find_get_block_nonatomic() in the inode KUnit tests
sched/wait: kill leftover bookmark logic in __wake_up_common()
The manual list head check and list_for_each_entry_safe_from() in
__wake_up_common() are leftovers from commit 2554db916586 ("sched/wait:
Break up long wake list walk").
This logic was later removed by commit 37acade0ce89 ("sched: remove
wait bookmarks") but the now-unnecessary list hacks were left behind.
Signed-off-by: Oleg Nesterov <oleg at redhat.com>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
sctp: don't let a blocked reader take write-space wakeups
sctp_wait_for_packet() waits exclusively on sk_sleep() with the default
autoremove wake function, so it accepts any wakeup and consumes it.
Then __sctp_write_space() sends EPOLLOUT with a wake-one wakeup:
sctp_wait_for_packet() wakes up, finds no data, goes back to sleep, and
the walk stops.
End result: anybody else queued behind it that was waiting for EPOLLOUT
will never see it.
Filter on EPOLLIN | EPOLLERR like receiver_wake_function() in
net/core/datagram.c. State changes (using sock_def_wakeup()) use an
unkeyed wake-all and still get through and will ignore the exclusive
nature of sctp_wait_for_packet().
Cc: Oleg Nesterov <oleg at redhat.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
[5 lines not shown]
ASoC: amd: yc: Add DMI quirk for HP 255R G10 (board 8D22)
The HP 255R 15.6 inch G10 Notebook PC (board 8D22, Ryzen 7 7735U)
has an internal DMIC connected to the ACP6x. Without a quirk entry
the acp6x machine driver doesn't register a card and the internal
microphone doesn't work.
Add a DMI entry for the board to enable it.
Signed-off-by: Alen Tišljar <alen.tisljar at gmail.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda at amd.com>
Link: https://patch.msgid.link/20261124182329.20428-1-alen.tisljar@gmail.com
Signed-off-by: Mark Brown <broonie at kernel.org>