Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fixes from Paolo Bonzini:
"arm64:
- Bound PINTID during ITE table restore, avoiding the possibility
that the guest plants an out-of-range LPI INTID in its own
in-memory ITS tables prior to restore.
- Do not blindly trust the vINTID field coming from KVM, and reject
anything that is out of the boundaries that the hardware ITS is
configured to support.
- Add signal_pending checks to the scan_its_table() loop; device
table entries with num_eventid_bits = 16 (or 65536 EventIDs per
device) are valid but takes a long time to restore.
- Remove quadratic complexity from the algorithm used to prune IRQs
sitting in the AP list has a quadratic complexity, and simplify the
[68 lines not shown]
Merge tag 'xfs-fixes-7.4-rc6' of git://git.kernel.org:/pub/scm/fs/xfs/xfs-linux
Pull xfs fixes from Carlos Maiolino:
"This includes fixes for xfs's reflink feature, RWF_ATOMIC support, an
uninitialized variable and another wrong function argument"
* tag 'xfs-fixes-7.4-rc6' of git://git.kernel.org:/pub/scm/fs/xfs/xfs-linux:
xfs: force all shared extent swap to use rmap shared path
xfs: move _right_neighbor_result trace before erroring out
xfs: recheck direct write alignment after write checks
fs: validate atomic writes after O_APPEND and limits
xfs: pass proper leaf argument from xfs_rtrefcountbt_broot_realloc()
xfs: initialize error in xfs_getfsmap_rtdev_rtbitmap()
Merge tag 'sched_ext-for-7.4-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext
Pull sched_ext fixes from Tejun Heo:
- The kfuncs that print messages for BPF schedulers read the format
string with no length limit and could see it change between
validation and use
- An exiting task could keep pointing at a scheduler that was later
freed
- A task dispatched to a shared queue could be taken off it by another
CPU before the dispatch finished and then never run again
- With core scheduling, a sub-scheduler's task could run on a CPU that
the sub-scheduler isn't allowed to use
- Smaller fixes: kfuncs that depend on the caller's locking context are
now rejected from the sub-scheduler capability callback, and a task's
[15 lines not shown]
Merge tag 'cgroup-for-7.4-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo:
- Writing a long fractional value to cpu.uclamp.min or cpu.uclamp.max
could divide by zero, and negative fractional values lost their sign
and were accepted
- A cpuset partition update could free the scheduler domain
housekeeping cpumask while a reader was still using it. The fix is in
the CPU isolation code and comes through cgroup with Frederic's
review
* tag 'cgroup-for-7.4-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup: Preserve sign for fractional input
sched/isolation: Publish new HK_TYPE_DOMAIN cpumask under cpuset_mutex
selftests/cgroup: Test parsing of long fractions in cpu.uclamp.min
cgroup: Fix divide error on long fractions in cgroup_parse_float()
Merge tag 'wq-for-7.4-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue fix from Tejun Heo:
- cancel_work_sync() and disable_work_sync() could return while the
work item was still running on an ordered workqueue
* tag 'wq-for-7.4-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: fix cancel_work_sync() on ordered workqueues
Merge tag 'nfsd-7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd fix from Chuck Lever:
- Close a mount-point crossing gap introduced in v7.4-rc
* tag 'nfsd-7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
NFSD: Check the entered export on a mount crossing
Merge tag 'sound-7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"A batch of small fixes across the sound subsystem. There are a few
ALSA core fixes wrt OSS emulation, which have been added quickly as
PoC was presented. Other than that, mostly device-specific small fixes
and quirks as usual.
ALSA core:
- Various fixes for PCM buffer management and mmap via OSS API
- Prohibit PCM stream linking with OSS substreams
- Fix audio timestamp calculation for the DEFAULT timestamp type
HD-audio:
- Various quirks for Lenovo, MacBook, HP, Acer, and Pavilion devices
USB-audio:
- Fix missing 64-bit conversions for 64-channel mixer controls
- Fix probe regression on UA-1000
[35 lines not shown]
Merge tag 'mm-nonmm-hotfixes-stable-2026-12-03-14-02' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull non-MM fixes from Andrew Morton:
- "ipc/msg: prevent reads after queue permission revocation" (Hyunho
Song):
Prevent a blocked receiver from taking a message sent after IPC_SET
revoked its read access. Make it recheck permissions before
receiving, including when IPC_SET races with its insertion on the
wait list
- An OCFS2 quota-file extension failure no longer tries to free a NULL
chunk, which could oops instead of returning the error. Allocate the
chunk before extending the file, so allocation failure also leaves
the file alone
- Unregister the JBD2 shrinker before OCFS2 journal shutdown takes its
semaphore. This removes a lockdep warning during unmount; the
[14 lines not shown]
sched_ext: Reset task fields after ops.exit_task()
__scx_disable_and_exit_task() resets the task fields before
ops.exit_task(). ops.exit_task() runs while @p is still on the scheduler,
so scx_bpf_task_set_dsq_vtime() accepts its writes, and they outlive the
reset. When @p moves between a parent scheduler and a sub-scheduler, the
next scheduler's ops.enable() then finds the vtime the previous one left.
Reset after ops.exit_task() instead. ops.disable() and ops.exit_task()
still see the final values, and a cancelled init now gets the reset too.
Fixes: 5771e79e461e ("sched_ext: Reset dsq_vtime and slice when a task leaves SCX")
Reported-by: Andrea Righi <arighi at nvidia.com>
Link: https://lore.kernel.org/r/aw57uMvkiKrLBBBI@gpd4
Signed-off-by: Changwoo Min <changwoo at igalia.com>
Reviewed-by: Andrea Righi <arighi at nvidia.com>
Signed-off-by: Tejun Heo <tj at kernel.org>
Merge tag 'mm-hotfixes-stable-2026-12-03-13-49' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull MM fixes from Andrew Morton:
- "mm/damon: three fixes for idle_time overflow and damos_walk() hang"
(SJ Park):
Fix a DAMOS walk which can wait forever when watermarks disable all
schemes. Preserve watermark activation state across scheme commits
and fix 32-bit idle-time statistics after about 36 minutes
- Swapoff now drops a large swap-in folio which was never mapped,
instead of leaving it for a later fault to trip a kernel BUG
- cachestat() returns zeros for DAX files rather than mistaking DAX
entries for workingset shadows and crashing
- HMM returns the right subpage of a device-private PMD; the old offset
could give a GPU the wrong application data, and Nouveau could select
[41 lines not shown]
sched_ext: Don't skip NONE tasks in sched_ext_dead()
sched_ext_dead() leaves p->scx.sched set if the task was punted by
scx_fail_parent(), which leads to a use-after-free of the parent sched.
Tasks hold no reference on their sched, so p->scx.sched has to be
cleared before the sched is freed. sched_ext_dead() doesn't do that
for a task at SCX_TASK_NONE, and scx_punt_task() leaves a live task at
NONE with p->scx.sched set:
scx_sub_disable(sub)
__scx_init_task(parent) fails
scx_fail_parent()
scx_punt_task(parent, p) NONE, p->scx.sched = parent
sched_ext_dead(p)
list_del_init() p is off scx_tasks
state is NONE p->scx.sched stays
scx_root_disable(parent)
scx_task_iter_next_locked() doesn't visit p
[26 lines not shown]
Merge tag 'asoc-fix-v7.4-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v7.4
A few quirks here, including one that fixes regressions on the Arduino
Monza which finds it needs special casing with some recent changes in
the generic card, plus a fix for an issue with PLL reprogramming being
skipped on nau8822 which broke audio when streams were started and
stopped quickly.
ALSA: pcm: Prohibit linking from/to OSS substream
The linked PCM is provided only for ALSA-native substreams. Since OSS
emulation layer has exceptions and complications, we should avoid
mixing with OSS substream. For more safety, add a sanity check to
snd_pcm_link() and prune the OSS substreams.
Cc: <stable at vger.kernel.org>
Link: https://patch.msgid.link/20261203113501.1222374-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai at suse.de>
ALSA: pcm: Prohibit buffer (re-)allocation/free during mmap
It's not right to (re-)allocate or free the PCM buffer while it's
still being mapped. Add sanity checks in snd_pcm_lib_malloc_pages()
and *_free_pages() helpers for more safety.
Link: https://lore.kernel.org/20261202140117.1164633-1-ahmedabdelmoumen05@gmail.com
Reported-by: Ahmed Abdelmoemen <ahmedabdelmoumen05 at gmail.com>
Cc: stable at vger.kernel.org
Reviewed-by: Ahmed Abdelmoemen <ahmedabdelmoumen05 at gmail.com>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
Link: https://patch.msgid.link/20261203113424.1222171-4-tiwai@suse.de
ALSA: pcm: Reject hw_params with buffer size changes while mmapped
Due to its design, OSS emulation allow switching the access type, etc,
during the buffer is mmapped, but the actual buffer shouldn't change;
when its is changed and the buffer is re-allocated, the mapped memory
may point to a bogus page. Even a period size or number of periods
shouldn't be changed, either, as this can influence on the buffer
allocation in the driver side, too (e.g. cs46xx driver).
Add a sanity check to restrict the buffer changes with the mmap, and
avoid the buffer reallocation when mmapped.
Link: https://lore.kernel.org/20261202140117.1164633-1-ahmedabdelmoumen05@gmail.com
Reported-by: Ahmed Abdelmoemen <ahmedabdelmoumen05 at gmail.com>
Cc: stable at vger.kernel.org
Reviewed-by: Ahmed Abdelmoemen <ahmedabdelmoumen05 at gmail.com>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
Link: https://patch.msgid.link/20261203113424.1222171-3-tiwai@suse.de
ALSA: pcm: Avoid forcibly changing to OPEN state at hw_params errors
When an error happens at snd_pcm_hw_params() call, it tried to degrade
to SNDRV_PCM_STATE_OPEN, forcibly call hw_free and release memories.
This, however, shouldn't be done when the buffer is mmapped (happening
only in OSS); otherwise it may point to stray pages.
Add a check of the mmap at the error path and skips the state change
and the buffer release when mmap is used. It'll be released at a
later point (at latest at releasing the file) in anyway.
Since there is a small window in snd_pcm_make_ready() between
snd_pcm_oss_change_param() and snd_pcm_oss_prepare(), an additional
check is put in snd_pcm_oss_prepare() to catch the failing hw_params
in the case above, too.
Link: https://lore.kernel.org/20261202140117.1164633-1-ahmedabdelmoumen05@gmail.com
Reported-by: Ahmed Abdelmoemen <ahmedabdelmoumen05 at gmail.com>
Cc: stable at vger.kernel.org
[3 lines not shown]
cgroup: Preserve sign for fractional input
cgroup_parse_float() parses the whole part with sscanf() and accumulates
and rounds the fractional digits separately. The sign is only carried by
the whole part, so "-0.5" is composed as 0.5 and "-1.5" as -0.5. If the
fraction rounds up to a whole unit, "-1.999" at two decimal places is
composed as zero.
Callers such as cpu.uclamp.* and io.cost.qos reject negative parsed
values. Losing the sign lets negative fractional input bypass those
checks and be accepted as a nonnegative value.
Read the leading sign once, after skipping whitespace, and parse the
whole part with unsigned sscanf(). Compose the scaled unsigned magnitude
with overflow checks, reject results above S64_MAX, and then apply the
sign once at the end. This also rejects a large whole part that used to
wrap during composition and be accepted as a small positive value.
Extend the cpu.uclamp.min parsing selftest to cover negative fractions,
[7 lines not shown]
Merge tag 'kvm-s390-master-7.4-3' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
Memory, vsie and IRQ injection fixes:
- Floating IRQ kick improvement (Christian)
- VSIE ESA PSW manipulation fix (Yvan)
- VSIE early validity state synchronization fix (Gautam)
- Migration MMU fix (Gautam)
Merge kvm-7.4-rc6/kvm-arm64-urgent-fixes.bundle into kvm-20261202
- Bound PINTID during ITE table restore, avoiding the possibility that the
guest plants an out-of-range LPI INTID in its own in-memory ITS tables
prior to restore.
- Do not blindly trust the vINTID field coming from KVM, and reject
anything that is out of the boundaries that the hardware ITS is
configured to support.
- Add signal_pending checks to the scan_its_table() loop; device table
entries with num_eventid_bits = 16 (or 65536 EventIDs per device) are
valid but takes a long time to restore.
- Remove quadratic complexity from the algorithm used to prune IRQs sitting
in the AP list has a quadratic complexity, and simplify the locking while
at that.
Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
Merge tag 'net-7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni:
"Including fixes from netfilter, Bluetooth, CAN and LoWPAN
Previous releases - regressions:
- core:
- limit pagecache folio refcount
- don't leave napi->timer queued when deleting a napi
- ipv6:
- check the scope of the best source address candidate in a VRF
- fix MSG_SPLICE_PAGES with a dst trailer in __ip6_append_data()
- do not wait for a running gc in ip6_dst_gc()
- tcp: do not BUG on an unreadable urgent byte
- mptcp: fix use-after-free of the subflow context on the delegated list
[62 lines not shown]
Merge tag 'gpio-fixes-for-v7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski:
"GPIO core fixes:
- fix a memory leak in GPIO sysfs unexport path
- avoid undersized array bitmap in GPIO get value fastpath
GPIO driver fixes:
- fix GPIO chip leaks in unbind path in gpio-sifive and gpio-xlp
- don't allow atomic operations on sleeping chips in gpio-virtuser
- fix the device name displayed for gpio-virtuser devices before
they're active
- fix one-byte overflow in lookup entry show callback in
gpio-virtuser
- fix UAF bug in unbind path in gpio-loongson
- fix init ordering in gpio-mxc
- only publish the legacy IRQ domain after GPIO setup succeeds in
gpio-pxa
- only update the GPIOLIB's IRQ state when the line is actually
[14 lines not shown]
Merge tag 'slab-for-7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/slab
Pull slab fixes from Harry Yoo:
- fix for the kvfree_rcu boot parameters rcutree.rcu_min_cached_objs
and rcutree.rcu_delay_page_cache_fill_msec being silently ignored
since kvfree_rcu() moved from RCU to slab in 6.14 (Zhan Xusheng)
- fix for a possible deadlock in kvfree_rcu() under memory pressure
when rcutree.rcu_delay_page_cache_fill_msec is set to 0. The minimum
is now 1 ms (Zhan Xusheng)
* tag 'slab-for-7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/slab:
mm/slab: don't queue the page cache work under krcp->lock
mm/slab: restore the rcutree. prefix of the kvfree_rcu parameters
rxrpc: Fix kvec overflow when padding a path-MTU probe ACK
rxrpc_send_ACK() pads a PMTUD PING ACK out to call->peer->pmtud_trial +
sizeof(struct rxrpc_wire_header) by appending one PAGE_SIZE zeropage kvec
per page. The table it fills is call->local->kvec[], sized
1 + RXRPC_MAX_NR_JUMBO == 47 entries so that it can also hold a
maximum-size jumbo DATA packet. rxrpc_alloc_ack() has already used three
entries, so only 44 zeropage entries fit, and the loop has no upper
bound: a probe larger than 44 * PAGE_SIZE writes past the end of the
rxrpc_local allocation.
pmtud_trial can be driven that large because rxrpc_assess_MTU_size()
takes the peer MTU straight from dst_mtu(). An IPv4 output XFRM policy
with an unresolvable ESP template makes xfrm_lookup_route() return a
blackhole dst; ipv4_blackhole_route() points it at the loopback device
and dst_blackhole_mtu() returns dst_dev(dst)->mtu without the
IP_MAX_MTU clamp that ip_dst_mtu_maybe_forward() applies to ordinary
IPv4 dsts. With loopback's MTU raised inside a netns,
peer->pmtud_bad = if_mtu - hdrsize + 1 becomes huge and the probe search
[27 lines not shown]
r8169: clear RxOverflow before unmasking interrupts
When the RTL8125B runs out of RX descriptors it sets RxOverflow
(RxDescUnavail in the vendor driver) and stops receiving until
RxOverflow is cleared in IntrStatus, even after the driver has returned
the descriptors. Since commit 6994520a3328 ("r8169: disable interrupt
source RxOverflow") nothing may clear it:
1. The ring fills. The chip completes the last frames (RxOK), then
sets RxOverflow and stops receiving.
2. rtl8169_interrupt() read IntrStatus before RxOverflow was set, so it
clears only RxOK.
3. NAPI empties the ring and unmasks the interrupts.
4. The stopped receiver raises no new RxOK, and RxOverflow is not an
interrupt source, so reception stays stopped until another event,
such as TxOK, makes the handler clear all status bits.
This was observed on an RTL8125B (XID 641) on an arm64 Qualcomm QCS8550
with a 2.5 Gbit/s link, running v7.2.6 and receiving UDP at
[44 lines not shown]
net: stmmac: Advertise TX checksum offload only when supported
stmmac unconditionally adds IPv4 and IPv6 TX checksum offload to
hw_features and copies the resulting features to vlan_features. When
tx_coe is false, for example in threshold DMA mode on hardware with a
capability register, stmmac_fix_features() removes the flags from the
active features at registration, but vlan_features retains them.
DSA user ports inherit vlan_features and can therefore advertise TX
checksum offload even though the conduit cannot perform it.
Only add NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM to hw_features when
tx_coe is enabled. This prevents the unsupported features from being
propagated to DSA user ports and reports them as fixed off on the
conduit.
The issue was discovered while using stmmac as the DSA CPU port on
RZ/T2H and RZ/N2H EVKs. The fix was tested with ethtool on the switch
ports of both EVKs.
[6 lines not shown]
ALSA: pcm: derive the audio timestamp for the DEFAULT type
snd_pcm_update_hw_ptr0() calls ->get_time_info() only when
audio_tstamp_config.type_requested is not DEFAULT, while
update_audio_tstamp() derives the timestamp from the buffer position
only when audio_tstamp_report.actual_type is DEFAULT. The two
conditions do not line up for a stream that requests the DEFAULT
type. The callback is never called for such a stream, so actual_type
stays at SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT, the zero value a
kzalloc'ed runtime starts with, and update_audio_tstamp() reads the
local audio_tstamp that was never written. This path never reaches a
driver, so it cannot be fixed driver-side.
BUG: KMSAN: uninit-value in update_audio_tstamp+0x728/0x880 [snd_pcm]
update_audio_tstamp+0x728/0x880 [snd_pcm]
snd_pcm_update_hw_ptr0+0x189c/0x1c50 [snd_pcm]
snd_pcm_delay+0x258/0x890 [snd_pcm]
snd_pcm_common_ioctl+0x2ef/0xbc0 [snd_pcm]
snd_pcm_ioctl+0x72/0xd0 [snd_pcm]
[20 lines not shown]
net/sched: act_csum: reject over-long packets before adding the offset
tcf_csum_skb_nextlayer() validates the claimed packet length @ipl by
calling pskb_may_pull(skb, ipl + ntkoff), where @ntkoff is the offset of
the network header from skb->data and @ipl is taken from the packet
itself.
For IPv6 the action honours the jumbo payload option, so @ipl is derived
from an attacker controlled 32-bit value and can be made to wrap when
@ntkoff is added:
ipl = 0xFFFFFFF2, ntkoff = 14 -> ipl + ntkoff = 0
pskb_may_pull(skb, 0) then succeeds and the ipl < hl check is also
defeated, so tcf_csum_ipv6_udp() hands the packet's own (u16) UDPLITE
length to csum_partial(), which reads up to 65535 bytes from an skb that
is only a few dozen bytes long. The ICMPv6, TCP and SCTP branches pass
ipl - ihl, which is negative as an int, so they do not read.
[22 lines not shown]
tcp_metrics: fix zero snd_cwnd_clamp from a half updated entry
tcp_init_metrics() takes snd_cwnd_clamp from the cached TCP_METRIC_CWND
when that metric is locked, i.e. the route has "cwnd lock N".
tcpm_suck_dst() refreshes a cached entry in place. It writes tcpm_lock
first and only then updates TCP_METRIC_CWND from
dst_metric_raw(dst, RTAX_CWND). Readers only hold rcu_read_lock(), so
when an entry that had no cwnd metric (value 0) is refreshed from a
route with a locked cwnd we can have:
CPU0 CPU1
tcpm_suck_dst() tcp_init_metrics()
WRITE_ONCE(tm->tcpm_lock, val)
tcp_metric_locked(tm, TCP_METRIC_CWND)
-> true
tcp_metric_get(tm, TCP_METRIC_CWND)
-> 0, not updated yet
tp->snd_cwnd_clamp = 0
[41 lines not shown]
ASoC: nau8822: reprogram PLL after it has been disabled
A playback started within the DAPM power-down delay fails with
"aplay: pcm_write:2191: write error: Input/output error" when the codec
is clock provider and its clock comes from the PLL.
Setting the sysclk to 0 on stream shutdown disables the PLL but keeps
the cached PLL frequencies, so on the next stream nau8822_set_pll()
returns early and never enables the PLL again. Within the delay, DAPM
still considers the "PLL" supply widget powered and does not set PLL_EN
either.
A playback started after the delay (5 seconds by default) works because
DAPM has powered down the "PLL" supply widget, and powering it up again
for the next stream sets PLL_EN. The PLL registers still hold valid
values, so the early return is harmless in that case.
Clear the cached frequencies when disabling the PLL.
[5 lines not shown]
gpio: pxa: Publish the legacy IRQ domain after GPIO setup succeeds
Probe errors and manual unbind can leave the legacy IRQ domain pointing
to the old GPIO controller.
Avoid leaving the IRQ domain behind on probe errors by creating it after
the last fallible GPIO setup step. Defer GPIO-to-IRQ lookups until then
and keep the built-in system GPIO controller bound once its IRQ and
syscore users are active.
Fixes: 7a4d5079baf2 ("gpio: pxa: parse gpio from DTS file")
Signed-off-by: Tian Xuechen <202300460064 at mail.sdu.edu.cn>
Link: https://patch.msgid.link/20261129094739.1691742-1-202300460064@mail.sdu.edu.cn
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>