| Age | Commit message (Collapse) | Author |
|
git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull ARC fix from Vineet Gupta:
- workaround a GCC bug which has been causing upstream build fails
* tag 'arc-fixes-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
ARC: io: work around GCC PR127718 in __raw_write{w,l}()
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Madhavan Srinivasan:
- Handle of_property_count_u32_elems() error in parse_thread_groups()
- Defer Nemo IRQ initialization
- disable watchdog when watchdog_thresh=0
- Reserve a PLT entry for ftrace_regs_caller
- powerpc KVM fixes
- misc fixes and cleanups
Thanks to Amit Machhiwal, Bradley Morgan, Christian Zigotzky, Christophe
Leroy, Gautam Menghani, Jiale Yao, Luiz Capitulino, Michael Ellerman,
Mohammad Shahid, Nathan Chancellor, Ritesh Harjani, Sasha Levin,
Shrikanth Hegde, and Timothy Pearson
* tag 'powerpc-7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/perf/vpa-dtl: use GFP_ATOMIC for DTL buffer allocation
powerpc32/modules: Reserve a PLT entry for ftrace_regs_caller
powerpc/watchdog: disable watchdog when watchdog_thresh=0
selftests/powerpc: override EMIT_TESTS instead of the emit_tests rule
powerpc/smp: Handle of_property_count_u32_elems() error in parse_thread_groups()
powerpc/pasemi: Defer Nemo IRQ initialization
KVM: PPC: Book3S HV: Avoid spurious interrupts caused by LPCR_MER bit
KVM: PPC: Book3S HV: Take SRCU read lock around kvmppc_h_page_init() call
KVM: PPC: Book3S HV: XICS: Avoid NULL ptr deref in kvmppc_xive_cleanup_vcpu()
KVM: PPC: Book3S HV: XICS: Update irq_type for cleanup to work
KVM: PPC: Book3S HV: Ensure that calls to idr_alloc are synchronized
KVM: PPC: Book3S HV: Disable preemption around host-side HPT lock users
powerpc/eeh: NUL-terminate force recovery input
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/mm/core
Pull core memory management fixes from David Hildenbrand:
"The main changes are:
- Prevent folio refcount overflows with pagecache folios, mostly
relevant for large folios today. The networking changes for this
will go through the net tree.
- Fix out-of-bounds page table accesses with folded PMDs in 3
scenarios.
- Fix write-sealing of memfd to detect GUP pins with concurrent
(un)mapping more reliably, preventing writes through GUP pins after
write-sealing.
- Fix lost wakeups when splitting large folios.
- Fix exposing uninitialized data through MADV_COLLAPSE to user
space.
The refcount changes also include a related iommufd fix for properly
cleaning up when pinning memfd folios fails, which is now easier to
trigger"
* tag 'mm-core-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/core:
mm/gup: limit pagecache folio refcount when grabbing references
iommufd: fix cleanup when adding memfd folio pins fails
mm/mmu_gather: flush pending references early before the folio limit
mm: limit pagecache folio refcount when splicing into pipes
mm: limit pagecache folio refcount when mapping pages
mm/huge_memory: prevent losing PG_waiters in __split_folio_to_order()
mm/rmap: fix PTE table overruns during batched reference checks
mm/rmap: fix PTE table overruns during batched unmap
mm/userfaultfd: fix PTE table overruns in UFFDIO_MOVE
mm/memfd: handle GUP pins more reliably when write-sealing
mm/khugepaged: don't map folios that are not uptodate in MADV_COLLAPSE
|
|
Clean up assoc_array library code
I had already gotten rid of this tag locally, because we then decided
to just remove the assoc_array library entirely since it has only one
single user - the key handling code - and that user is getting rewritten
to use rhashtable instead.
But that removal is scheduled for 7.5, and this fixes real bugs and does
clean up some of the code. So while it's all slated for removal, some
of the fixes need back-porting and we might as well remove the
cleaned-up version. Maybe somebody decides they want to resurrect it
for another project - it really is fairly generic library code - they
shouldn't get the messy end state that we decided to jettison.
Background: Nils Ollrogge reported a bug in the assoc_array library and
had a patch to fix it too, but that code was too obscure for me to
follow, so I used some LLM tools to help make sense of it all and found
more issues in the process.
* tag 'assoc-array-fixes-v2':
assoc_array: use assoc_array_parent_link() when splitting a shortcut
assoc_array: find and collapse in deletion without gotos
assoc_array: move deletion's collapse into a function of its own
assoc_array: replace the labels in gc's tree walk with a loop
assoc_array: move gc's folding into a function of its own
assoc_array: keep gc's cleanup out of the live tree on allocation failure
assoc_array: don't chain a new shortcut onto an existing one
assoc_array: choose between splitting a node and a shortcut without gotos
assoc_array: move shortcut creation into a function of its own
assoc_array: move node splitting into a function of its own
assoc_array: fill the segment cache in one place
assoc_array: move in-place insertion into a function of its own
assoc_array: don't lose objects when a root shortcut is split at level 4
assoc_array: don't lose objects when a shortcut is split on a word boundary
assoc_array: correct the documentation of get_key_chunk()'s level argument
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc/iio driver fixes from Greg KH:
"Here are a bunch of char, misc, and iio driver fixes for reported
problems for 7.4-rc4. Included in here are:
- usual collection of lots of IIO driver fixes for issues
- binder driver fix
- iio, w1, and comedi driver fixes found and fixed by Josef
- comedi driver fix for a reported problem
- other misc driver fixes
All of these have been in linux-next for a while with no reported
issues"
* tag 'char-misc-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (68 commits)
iio: hid-sensors: fix fractional part for unit exponents -7 and -8
iio: trigger: free the trigger ID after device_del()
iio: hid-sensors: fix a division by zero
iio: humidity: hid-sensor-humidity: Use per-instance callbacks
iio: temperature: hid-sensor-temperature: Use per-instance callbacks
comedi: comedi_bond: Fix leak of opened device references
mei: me: add ice lake point LP iTouch DID
mei: lb: read the MTU once
rust_binder: push BR_TRANSACTION_COMPLETE before BR_FAILED_REPLY
misc: ibmvmc: initialize HMC state before device registration
w1: w1_therm: leave the slaves of other families alone
w1: w1_therm: lock the list of slaves for the bulk read
w1: don't hold list_mutex while a slave is torn down
w1: netlink: drop the slave after the bus is unlocked
w1: ds2805: use the bus mutex to talk on the bus
w1: ds28e04: use the bus mutex to talk on the bus
w1: ds2482: set the strong pull-up with its byte
w1: remove the master's files before taking its locks
w1: use the bus mutex for the "rw" file
misc: bcm-vk: fix DMA allocation memory leak
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver fixes from Greg KH:
"Here are some small tty and serial driver fixes for reported problems
for 7.4-rc4. Included in here are:
- tty driver and vt fixes reported and fixed by Josef Bacik and Chris
Mason
- some serial driver fixes by Jiri for found problems
All of these have been in linux-next for almost 2 weeks now, with no
reported issues"
* tag 'tty-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
serial: samsung: put the previous baud clock
serial: samsung: don't leak the tty on an RX IRQ
serial: rda: free the interrupt on shutdown
serial: imx: fix the tty reference of the wakeup event
serial: fsl_lpuart: fix tty ref of wakeup event
serial: 8250_mxpcie: handle hangup during break
serial: 8250_lpss: don't divide by 0 above 6.25 Mbaud
serial: core: respect runtime PM when sending x_char
vt: serialise the producers of the flip buffer
tty: fix misapplied compat_ptr() in tty_compat_ioctl()
serial: 8250_hp300: reorder HPDCA code
serial: 8250_exar: check priv->gpio properly
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB/Thunderbolt fixes from Greg KH:
"Here are a bunch of USB (and one Thunderbolt) fixes. Sorry for the
delay on them, been stuck in travel hell for a bit and these have been
sitting all ready to be merged for too long. Included in here are:
- lots of tiny USB fixes found by anthropic scans
- usb-serial bugfixes
- xhci driver fixes for issues regressions by many people
- dwc3 driver fixes for reported problems
- some usb gadget driver fixes for reported problems
- other minor USB driver fixes
Most of these have been in linux-next for weeks with no reported
issues, the others have been in linux-next for 11 days, also with no
reported problems"
* tag 'usb-7.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (45 commits)
usb: xhci: fix 'num_active_eps' accounting on allocation failure
usb: xhci: clear stale bandwidth data after hibernation
usb: pci-quirks: always assert xHCI OS ownership
usb: xhci: disable the correct slot on alloc_dev failure
xhci: keep port link_inactive and connected flags in sync when polled
usb: typec: ucsi: retry init only while the PPM is not ready
xhci: give back TDs and clean up ep0 after disconnect
USB: serial: garmin_gps: fix deadlock on reset request
USB: serial: oti6858: fix the teardown order in close
USB: serial: io_edgeport: serialise MCR accesses
USB: serial: io_edgeport: fix potential use-after-free on disconnect
USB: serial: io_edgeport: fix potential fifo corruption
USB: serial: io_edgeport: move initial termios update to open()
USB: serial: io_edgeport: fix potential NULL-deref at open
USB: serial: io_edgeport: fix potential close() use-after-free
USB: serial: io_edgeport: fix NULL-deref on early status
USB: serial: upd78f0730: fix NULL-deref on hangup
USB: serial: sierra: validate URB length in instat callback
USB: serial: garmin_gps: validate packet data length in nat_receive()
usb: gadget: f_ncm: restart the TX timer if the TX freelist is empty
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux
Pull RCU fixes from Joel Fernandes:
"Fix a build break with recent clang, which warns about unsequenced
accesses to the volatile jiffies variable in show_rcu_nocb_state() and
fails the build with CONFIG_WERROR=y / W=e. Read jiffies once into a
local variable instead.
Also replace the rcupdate.rcu_task_collapse_debug module parameter,
added in the v7.4 merge window, with pr_debug() for the RCU Tasks
callback contend/collapse messages. The messages stay off by default
and can be enabled with dynamic debug, and no official kernel carries
the extra parameter"
* tag 'rcu-fixes.v7.4-20261115a' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux:
rcu/nocb: Avoid unsequenced accesses to jiffies in show_rcu_nocb_state()
rcu-tasks: Use pr_debug() for callback contend/collapse messages
|
|
After a recent improvement in clang to warn on unsequenced accesses to
volatile variables [1], an instance appears in show_rcu_nocb_state(),
which can break the build with CONFIG_WERROR=y / W=e:
In file included from kernel/rcu/tree.c:5123:
kernel/rcu/tree_nocb.h:1651:3: error: unsequenced accesses to volatile qualified 'jiffies' [-Werror,-Wunsequenced]
1650 | jiffies - rdp->nocb_bypass_first,
| ~~~~~~~
1651 | jiffies - rdp->nocb_nobypass_last,
| ^
Per C11 5.1.2.3.2, accessing a volatile object is a side effect. Per C11
6.5.2, unsequenced side effects on the same scalar object are undefined
behavior. Per C11 6.5.2.2.10/12, the evaluation of arguments in a
function call is indeterminately sequenced, meaning any side effects in
the arguments are unsequenced.
Add a local variable to hold the value of jiffies before the function
call so that there are no unsequenced side effects, clearing up the
warning.
Cc: stable@vger.kernel.org
Fixes: f7a81b12d6af ("rcu/nocb: Print no-CBs diagnostics when rcutorture writer unduly delayed")
Closes: https://github.com/ClangBuiltLinux/linux/issues/2192
Link: https://github.com/llvm/llvm-project/commit/955715460eaf9188c241c74750637fc82dfcc423 [1]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Joel Fernandes <jfern@kernel.org>
Signed-off-by: Joel Fernandes <jfern@kernel.org>
|
|
Commit 5de907d24919 ("rcu-tasks: Disable callback contend/collapse
messages by default") added the rcupdate.rcu_task_collapse_debug module
parameter to gate the three pr_info() messages that report RCU Tasks
switching between CPU-0 and per-CPU callback queuing.
The kernel already has a mechanism for debug-only messages that are off
by default: pr_debug(). Use pr_debug() for these messages, and remove
the rcu_task_collapse_debug module parameter, its documentation, and
its boot-time announcement.
The messages stay off by default. On CONFIG_DYNAMIC_DEBUG=y kernels,
they can be enabled at boot with:
dyndbg="file kernel/rcu/tasks.h +p"
or at runtime with:
echo 'file kernel/rcu/tasks.h +p' > /proc/dynamic_debug/control
Assisted-by: Claude:claude-opus-5
Signed-off-by: Song Liu <song@kernel.org>
Reviewed-by: Joel Fernandes <jfern@kernel.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Tested-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Joel Fernandes <jfern@kernel.org>
|
|
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext
Pull sched_ext fixes from Tejun Heo:
- With proxy execution or core scheduling, a CPU could run a task that
had been requeued on another CPU while dispatch had the rq lock
dropped.
- Unregistering a scheduler could return while its teardown was still
running, letting the teardown call into BPF code that was already
freed.
- A CPU coming online could call into the BPF scheduler before the
scheduler was told that the CPU is online.
- A parent scheduler could be asked to attach a sub-scheduler to a
cgroup that was already removed.
- Hardening: more kfuncs that take a queue lock are rejected in tracing
programs, where they could deadlock the CPU, and a queue iterator no
longer restarts after reaching the end, which the BPF verifier
assumes can't happen.
- Smaller fixes: tasks needlessly sent back to the BPF scheduler on
idle CPUs, stale scheduling state carried into a task's next
scheduler, and uneven CPU shards with partially populated SMT cores.
* tag 'sched_ext-for-7.4-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext:
sched_ext: Reject DSQ iterator kfuncs in tracing programs
sched_ext: make DSQ iterator stay drained after NULL
sched_ext: Fix partial-SMT core counting in calc_shard_layout()
sched_ext: Reset task fields on exit of an SCX_TASK_READY task
sched_ext: Read exit_kind before flushing in scx_flush_disable_work()
sched_ext: Reject scx_bpf_destroy_dsq() in tracing programs
sched_ext: Fix ops.enqueue/dispatch() calls before ops.cpu_online()
sched_ext: Factor out drain_offline_rq()
sched_ext: Fix stale pick when the donor changes during dispatch
sched_ext: Call ops.sub_attach() only while the cgroup is online
sched_ext: Fix scx_bpf_dsq_reenq() kerneldoc claiming NMI calls are allowed
sched_ext: Avoid unnecessary IMMED reenqueues on idle CPUs
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo:
- A file notification racing the file's removal could re-arm the
notification timer after it was shut down, corrupting the timer wheel
or firing on freed memory.
- The v1 freezer could leave an exiting task frozen forever after its
cgroup was thawed or removed.
- With memcg built without the block cgroup controller, memcg reclaim
waited on writeback and could deadlock against a filesystem freeze.
memcg now selects the controller.
- cpuset partition state could go wrong when CPUs move between nested
partitions or go offline: isolated CPUs leaked or went missing,
invalid partitions kept exclusive CPUs or came back with no usable
CPU, and expanding a remote partition could fail. Separately, a
forked child could inherit a corrupted memory node mask.
* tag 'cgroup-for-7.4-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup/cpuset: Don't revive invalid partition without active CPU on hotplug
cgroup/cpuset: Remove redundant WARN_ON_ONCE() in remote_cpus_update()
memcg: make MEMCG select BLK_CGROUP
cpuset: generalize the validate_partition() interface
cpuset: settle isolation state when CPUs are given back to parent
cgroup/cpuset: Correctly set isolated_cpus when switching partition state
cgroup/cpuset: Protect current->mems_allowed read in cpuset_fork()
selftests/cgroup: Fix "test_cpuset_prs.sh -v" failures
cpuset: add early empty cpumask check in partition_xcpus_add/del
cgroup/cpuset: Reset partition data when an invalid partition stays invalid
cgroup/freezer: Fix exiting tasks left frozen forever after rmdir
cgroup/freezer: walk exiting tasks in the v1 freezer
cgroup: arm the notify timer only while the file exists
cgroup/cpuset: Do housekeeping check when isolated child with root parent may get more xcpus
cgroup/cpuset: Recompute effective cpumask in update_cpumasks_hier() after calling update_parent_effective_cpumask()
cgroup/cpuset: Fix incorrect CPU accounting with parent's effective_xcpus expansion
|
|
Pull NFS client fixes from Anna Schumaker:
- Various NFS and SunRPC fixes from Avi Weiss
- Various localio fixes from Mike Snitzer
- Delegated timestamp fixes from Jeff Layton
- CB_NOTIFY_LOCK fixes from Olga Kornievskaia
- Various sunrpc, flexfiles, and xprtrdma fixes from Tim Menninger
* tag 'nfs-for-7.4-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: (26 commits)
NFSv4: Prevent indefinite waits for out-of-order OPEN stateids
NFSv4/flexfiles: limit transport disconnects when cancelling I/O
SUNRPC: add request-scoped disconnects when cancelling tasks
pNFS: avoid repeatedly cancelling I/O for the same lseg
xprtrdma: serialize unmap_sync with xprt_disconnect
NFSv4: remember that the server may send CB_NOTIFY_LOCK
NFSv4: wake blocking lock waiters when a delegated lock is released
NFS: stamp after the server's ctime following a CLONE
NFS: stamp after the server's ctime when truncating under delegated times
NFS: don't let delegated c/mtime stamps go backward
NFS/localio: give the LOCALIO probe a short timeout of its own
NFS/localio: probe again for LOCALIO when localio_enabled is set to Y
NFS/localio: hold the client across an asynchronous LOCALIO probe
SUNRPC: Balance queue accounting when relocating a task
SUNRPC: Balance switch queue length on transport removal
SUNRPC: Fix TCP-with-TLS transport class identification
SUNRPC: preserve transport security policy when cloning clients
SUNRPC: preserve timeout policy when cloning clients
SUNRPC: preserve fatal network errors during RPC binding
sunrpc: instantiate rpc_pipefs dentry before publishing it
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper fixes from Mikulas Patocka:
"dm:
- fix infinite loop when removing a zoned device
- fix misbehavior if kobject_init_and_add fails
- fix refcount underflow if zone reset failed
- fix misbehavior if we attempt to load a table after previous table
load failed
- fix use-after-free if we open a device read-only and then re-open
it read-write
- fix error being ignored if flush failed
dm-pcache:
- fix misbehavior on flush failure
dm-raid:
- validate array_position after it is read from the superblock
dm-cache:
- fix a crash if dm_kcopyd_client_create fails
- fix divide by zero on extremely large device
- fix NULL pointer dereference on open failure
- fix misbehavior if dm_bitset_cursor_begin fails
dm-snapshot:
- properly advertise discard_granularity in the queue limits
- fix data corruption on unaligned discards
dm-crypt:
- fix a crash on invalid table line
- fix scheduling in atomic context when using no_write_workqueue and
asynchronous completion cipher
- fix misbehavior if percpu_counter_init fails
dm-thin:
- fix integer overflow if no_space_timeout is too high
- fix data corruption if discard races with regular I/O
- fix leak if __set_snapshot_details fails
- fix parsing of feature arguments
dm-mpath:
- fix buffer overflow when parsing the table string
- fix integer overflow in queue_if_no_path_timeout_secs
dm-log-userspace:
- fix open device leak on initialization error
dm-zoned:
- back off when reclaim cannot make progress
- do not reclaim a random zone into another random zone
dm-integrity:
- don't recalculate with HMAC because of a dirty bitmap
- don't attempt to commit journal on disabled device
dm-persistent-data:
- don't ignore the return value of node_copy
- fix buffer leak if find_leaf fails
dm-verity:
- don't restart or panic on errors during system shutdown
dm-raid:
- flush a work item in raid_dtr, fix use-after-free"
* tag 'for-7.4/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (34 commits)
dm: fail a REQ_PREFLUSH bio with data when its preflush fails
dm-raid: fix use-after-free in raid_dtr()
dm-integrity: don't attempt to commit journal on disabled device
dm-verity: don't restart or panic on errors during system shutdown
dm crypt: fix use of uninitialized percpu_counter in ctr error path
dm: fix use-after-free when dm_get_device() widens the open mode
dm persistent data: don't leak bufio buffer if find_leaf fails
dm persistent data: don't ignore writeback errors
dm persistent data: test return value of node_copy
dm-thin: fix parsing of feature arguments
dm-thin: fix leak if __set_snapshot_details fails
dm-thin: fix data corruption if discard races with regular I/O
dm-cache: fix ending a cursor that never began
dm-cache: fix NULL pointer dereference on open failure
dm-crypt: defer async write submission to write thread
dm mpath: cap queue_if_no_path_timeout_secs
dm cache: validate the discard block size before narrowing
dm: Reject table setup after queue or disk teardown
dm: avoid double-dropping the zone reset submission reference
dm-sysfs: fix misbehavior if kobject_init_and_add fails
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown:
"There's a few small collection of driver fixes here, the usual story
where none of them are super remarkable if you don't have the have the
hardware. The largest batch is the Tegra fixes which are mainly around
error handling"
* tag 'spi-fix-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: axi-spi-engine: Start the program length at zero
spi: virtio: move teardown to .remove()
spi: dt-bindings: pl022: Allow a power domain
spi: tegra210-quad: Unmap DMA buffers on transfer timeout
spi: tegra210-quad: Track DMA mapping state
spi: tegra210-quad: don't overwrite refreshed status with lost-IRQ snapshot
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown:
"A small change adding support for the Silergy SYM827 which is a
variation on the FAN53555 so needs some quirk data and a new DT
compatible"
* tag 'regulator-fix-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: fan53555: Add support for Silergy SYM827
regulator: dt-bindings: fan53555: Add Silergy SYM827
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core
Pull driver core fix from Danilo Krummrich:
- Fix a use-after-free during device removal when a child device reuses
its parent's managed software node (affecting Xe)
* tag 'driver-core-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
software node: only let the owner release a managed node
|
|
When a CPU hotplug leaves no CPU outside of the partitions for the top
cpuset, cpuset_handle_hotplug() clears subpartitions_cpus and gives all
the active CPUs back to the top cpuset. cpuset_hotplug_update_tasks()
then walks the hierarchy and invalidates the partitions, as
subpartitions_cpus is empty.
However, an invalid partition visited in the same walk may be revived
if its effective_xcpus is not empty. tasks_nocpu_error() doesn't catch
it when its CPUs are all offline but it has no task. Its CPUs are put
back into subpartitions_cpus, and the valid partitions visited after it
are no longer invalidated, as subpartitions_cpus is not empty any more.
The top cpuset is left with CPUs overlapping with these partitions.
It can be reproduced on a system with 8 CPUs:
# cd /sys/fs/cgroup
# echo +cpuset > cgroup.subtree_control
# mkdir A1 B1
# echo 1 > A1/cpuset.cpus
# echo 1 > A1/cpuset.cpus.exclusive
# echo 0,2-7 > B1/cpuset.cpus
# echo root > B1/cpuset.cpus.partition
# echo root > A1/cpuset.cpus.partition
# cat A1/cpuset.cpus.partition
root invalid (Parent unable to distribute cpu downstream)
# echo 0 > /sys/devices/system/cpu/cpu1/online
# cat A1/cpuset.cpus.partition B1/cpuset.cpus.partition
root
root
# cat cpuset.cpus.effective
0,2-7
A1 can't take CPU 1, the last CPU of the root cgroup which has tasks.
When CPU 1 is offlined, A1 is revived without any active CPU, and B1
stays valid while its CPUs are also in the effective CPUs of the root
cgroup, which triggers
WARNING: kernel/cgroup/cpuset.c:919 at rebuild_sched_domains_locked
Only revive an invalid partition in hotplug if its effective_xcpus has
an active CPU, the same as what is required to create a partition with
tasks. With that, A1 and B1 are both invalidated in the above case.
Fixes: 0c7f293efc87 ("cgroup/cpuset: Add cpuset.cpus.exclusive.effective for v2")
Cc: stable@vger.kernel.org # v6.7+
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://sashiko.dev/#/patchset/20261114083124.1340140-1-ridong.chen%40linux.dev?part=11
Signed-off-by: Ridong Chen <chenridong@xiaomi.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
|
|
remote_cpus_update() warns if the CPUs to be added to a remote partition
intersect subpartitions_cpus, and then checks the very same condition
right below to set PERR_NOCPUS and invalidate the partition:
WARN_ON_ONCE(cpumask_intersects(tmp->addmask, subpartitions_cpus));
if (!capable(CAP_SYS_ADMIN))
WRITE_ONCE(cs->prs_err, PERR_ACCESS);
else if (cpumask_intersects(tmp->addmask, subpartitions_cpus) ||
cpumask_subset(top_cpuset.effective_cpus, tmp->addmask))
WRITE_ONCE(cs->prs_err, PERR_NOCPUS);
Sashiko reported that the warning could be triggered by a write to a
cpuset control file, before the CAP_SYS_ADMIN check, which would panic a
system with panic_on_warn set.
The warning was added by commit 86888c7bd117 ("cgroup/cpuset: Add
warnings to catch inconsistency in exclusive CPUs") as an assertion that
such CPUs have been filtered out before. No way to trigger it with the
current interfaces has been found, as these CPUs are rejected when
cpuset.cpus.exclusive is written. But the warning is redundant, as the
conflict is handled right below anyway.
Remove the warning and rely on the PERR_NOCPUS check, the same as
remote_partition_enable() already does for this conflict.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://sashiko.dev/#/patchset/20261114083124.1340140-1-ridong.chen%40linux.dev?part=6
Signed-off-by: Ridong Chen <chenridong@xiaomi.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
- Don't print reset reason in VMs, to fix Xen PV domU boot
regression on AMD Zen CPUs (Jason Andryuk)
- Preserve the default VGA fallback for legacy modes, to fix
regression where a SeaBIOS QEMU guest with bochs and VKMS
the boot VGA (bochs) loses its DRM boot_display attribute
(Hengyu Liang)
- Ensure write visibility during LDT installation (Dave Hansen)
* tag 'x86-urgent-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Ensure write visibility during LDT installation
x86/video: Preserve the default VGA fallback for legacy modes
x86/CPU/AMD: Don't print reset reason in VMs
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Ingo Molnar::
- Add VDSO_UNALIGNED_PACKED config option for targets without efficient
unaligned memory accesses (such as ARMv5), and turn it on for
!CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS platforms.
Propagate these changes into tooling headers as well (Ian Rogers)
- Read getboottime64() offsets under the tk_core.seq sequence counter
(Hungyu Lin)
- Keep tsacct task begin times stable across suspend (Hungyu Lin)
- Reject cross timestamps for invalid AUX clocks (Avi Weiss)
- Refresh auxiliary timekeeper base before offset validation (Avi
Weiss)
* tag 'timers-urgent-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
timekeeping: Refresh auxiliary base before offset validation
timekeeping: Reject cross timestamps for invalid AUX clocks
tsacct: Keep task begin times stable across suspend
timekeeping: Read getboottime64() offsets under the sequence counter
tools headers: Update the vdso/unaligned.h copy with the kernel sources
vdso: Add VDSO_UNALIGNED_PACKED config option
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar:
- Fix spurious SYS_sched_setattr() -EPERM for migration-disabled
tasks (Andrea Parri)
- Reject clamp values above SCHED_CAPACITY_SCALE (Andrea Parri)
- Fix cpuset_mutex double unlock in __sched_setscheduler()
(Andrea Parri)
- Don't use fits_capacity() to compare thread and CPU counts in
in invalid_llc_nr() (Zhan Xusheng)
- Do not touch SMT siblings that have not joined the core yet
during CPU onlining (Seiji Nishikawa)
* tag 'sched-urgent-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/core: Do not touch SMT siblings that have not joined the core yet
sched/cache: Don't use fits_capacity() to compare thread and CPU counts
sched/core: Fix cpuset_mutex double unlock in __sched_setscheduler()
sched/uclamp: Reject clamp values above SCHED_CAPACITY_SCALE
sched/deadline: Fix spurious -EPERM for migration-disabled tasks
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf events fixes from Ingo Molnar:
- Avoid AMD uncore context migration from non-owners (Sandipan Das)
- Clear stop state in perf_trace_add(), to fix self-profilers such as
async-profiler. Also fix a similar bug in hw_breakpoint_add() (Paolo
Bertinetti)
- Fix racy update of cpc->hrtimer_interval (Benjamin Segall)
- Do not resurrect cpuctx->cgrp after last cgroup event exit, to fix
UAF bug (Phat Dinh)
* tag 'perf-urgent-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/core: Do not resurrect cpuctx->cgrp after last cgroup event exit
perf: Fix racy update of cpc->hrtimer_interval
perf/hw_breakpoint: Clear stop state in hw_breakpoint_add()
tracing/perf: Clear stop state in perf_trace_add()
perf/x86/amd/uncore: Avoid context migration from non-owners
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core syscall fixes from Ingo Molnar:
- Two generic syscall entry code fixes for return code
data type definitions (Florian Bezdeka)
* tag 'core-urgent-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
entry: Complete syscall_enter_from_user_mode_work() to bool migration
entry: Fix return type of syscall_trace_enter()
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
Pull liveupdate fixes from Mike Rapoport:
- avoid address translation in is_kho_boot() before the linear map is
initialized, fixing early boot BUG_ONs on arm64
- check for duplicate session names before growing the sessions
preservations block set to avoid preserving an empty block that
causes restoration to panic()
* tag 'fixes-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux:
kho: check fdt_phys in is_kho_boot()
liveupdate: check for duplicate session before growing block set
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
Pull kexec MAINTAINERS update from Mike Rapoport:
"Remove Dave Young as kdump reviewer"
* tag 'kexec-fixes-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux:
Remove myself as a kdump reviewer
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull probe fixes from Masami Hiramatsu:
"Fix ftrace ops switching and optprobe state transitions:
- Switch an armed ftrace-based kprobe from kprobe_ftrace_ops to
kprobe_ipmodify_ops in register_aggr_kprobe() when adding a probe
with a post_handler, so later disarming does not fail with -ENOENT
and leave the probe armed
- Queue forcibly unoptimized probes onto the generation's
cooling_list in force_unoptimize_kprobe() so unregister_kprobes()
waits for Tasks RCU before freeing the optinsn slot, preventing a
use-after-free
- Skip arch_arm_kprobe() in __arm_kprobe() when a probe is queued for
unoptimization so the active relative jump instruction is not
partially overwritten with a breakpoint before the optimizer runs
- Re-queue any jump-optimized sibling probe covering a disabled
probe's address when that probe finishes cooling in
optprobe_finalize_generation(), matching the freeing_list path
Fix multiprobe lifecycle and boot kprobe setup
- Return early in setup_boot_kprobe_events() when the kprobe_event=
boot buffer is empty to avoid contending on event_mutex with
asynchronous eval-map work during normal boot
- Verify that a multiprobe event is neither enabled nor busy before
unlinking any sibling kprobe, fprobe, uprobe, or eprobe so active
probes cannot be unlinked and freed via dynamic_events
- Register and enable a newly appended fprobe or uprobe immediately
when the target multiprobe event is already enabled so the probe
fires and disable or perf cleanup does not act on an unregistered
probe
- Free the temporary event name string with __free(kfree) in
__trace_uprobe_create() to prevent a memory leak if a subsequent
allocation fails
Fix BTF parsing and string array fetch handling:
- Compute BTF bitfield byte and bit offsets consistently, select the
smallest unsigned fetch type covering the bitfield, and size
FETCH_OP_MOD_BF from that type to prevent an 8-byte out-of-bounds
write on smaller ring buffer slots
- Validate BTF_KIND_PTR and non-NULL BTF_KIND_INT types in
btf_type_is_char_ptr() and btf_type_is_char_array() before reading
inner type metadata to avoid misinterpreting byte sizes as type IDs
or reading out of bounds
- Check for FETCH_OP_UDEREF before advancing the fetch instruction
slot in finalize_fetch_insn() so user-space dereference string
arrays emit FETCH_OP_ST_USTRING instead of reading kernel memory
- Reject string array counts when the preceding fetch operation is
not a memory dereference so non-dereference string sources ($comm,
immediate strings, eprobe fields) do not emit invalid
FETCH_OP_LP_ARRAY loops
Fix signed 1-byte field fetch and fprobe target check:
- Use explicit fixed-width integer types (s8/u8, s16/u16, s32/u32) in
get_event_field() so 1-byte signed event fields are sign-extended
instead of zero-extended under -funsigned-char
- Exclude TRACE_EVENT_FL_FPROBE events in find_and_get_event() so
eprobes cannot attach to fprobe or tprobe events
Fix typo in kprobes documentation:
- Remove a stray closing parenthesis in Documentation/trace/kprobes.rst"
* tag 'probes-fixes-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
tracing/uprobes: Fix memory leak of tail in __trace_uprobe_create()
tracing/probes: Reject array count on non-dereference string sources
tracing/probes: Fix user-space dereference string array store type
tracing/eprobe: Disallow attaching eprobes to fprobe events
tracing/eprobe: Fix 1-byte signed field fetch in get_event_field()
tracing/probes: Fix missing BTF kind checks in char pointer/array helpers
tracing/probes: Fix BTF bitfield parsing and out-of-bounds buffer write
tracing/probes: Enable newly appended probe when target event is enabled
tracing/probes: Check enabled and busy state before unlinking sibling probes
kprobes: Re-optimize blocked sibling probe when cooling finishes
kprobes: Do not overwrite jump instruction when re-arming unoptimizing probe
kprobes: Fix UAF and queue cooling probes on forced unoptimization
kprobes: Switch ftrace ops when adding probe with post_handler
docs, kprobes: Fix bracket
tracing: skip boot kprobe setup when no events were requested
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull bootconfig fixes from Masami Hiramatsu:
- bootconfig: Allow keys with the maximum supported depth
Check the array capacity before storing the next key component in
xbc_node_compose_key_after() so keys at XBC_DEPTH_MAX (16) are
composed instead of failing with -ERANGE when listing keys or
creating /proc/bootconfig.
- bootconfig: Trim unquoted values at end of file
Trim trailing whitespace from unquoted values in __xbc_parse_value()
after scanning finishes so values at end of input without a trailing
newline do not retain extra whitespace.
- tools/bootconfig: Close only opened braces in compact output
Check key children while skipping value nodes when backtracking in
xbc_show_compact_tree() so a brace is not closed when a single subkey
under a valued key was printed in dotted notation.
- tools/bootconfig: Test listing keys at the maximum depth
Add regression tests verifying that a 16-component key can be
attached and listed in full while a 17-component key is rejected.
* tag 'bootconfig-fixes-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
bootconfig: Trim unquoted values at end of file
tools/bootconfig: Close only opened braces in compact output
tools/bootconfig: Test listing keys at the maximum depth
bootconfig: Allow keys with the maximum supported depth
|
|
Memcg reclaim only relies on writeback throttling if
writeback_throttling_sane() does. Since commit 97c9341f7271 ("mm:
vmscan: disable memcg direct reclaim stalling if cgroup writeback
support is in use") that's the case if the memory controller is on the
default hierarchy and CONFIG_CGROUP_WRITEBACK is set. Otherwise
shrink_folio_list() sleeps in folio_wait_writeback() for a folio that
is under writeback and already marked for reclaim if the allocation may
enter the filesystem.
CONFIG_CGROUP_WRITEBACK is enabled whenever CONFIG_MEMCG and
CONFIG_BLK_CGROUP are. So with CONFIG_MEMCG=y and CONFIG_BLK_CGROUP=n
memcg reclaim on cgroup v2 waits for writeback just like it does on
cgroup v1.
That wait can deadlock against freezing a filesystem. Loop takes freeze
protection on the backing filesystem for its writes. A task in the
middle of a write() to the backing filesystem holds freeze protection
as well.
If that task enters memcg reclaim it can end up waiting for writeback of
a folio that belongs to a filesystem on the loop device. If a freeze of
the backing filesystem is pending the loop worker blocks when it tries
to write that folio out. And the freeze waits for the task in reclaim to
drop its freeze protection. The same applies to other drivers that serve
block I/O by writing to a file on a local filesystem and take freeze
protection for it, e.g., the scsi target's fileio backend.
Make CONFIG_MEMCG select CONFIG_BLK_CGROUP if CONFIG_BLOCK is set. Then
CONFIG_CGROUP_WRITEBACK is always enabled together with memcg and memcg
reclaim on cgroup v2 doesn't sleep in folio_wait_writeback() anymore.
a
Without CONFIG_BLOCK there are no block devices that could deadlock
like this.
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
|
|
During LDT installation, the intent is to overwrite the old per-mm
LDT value, then send an IPI to the mm user CPUs to have each load
the new value.
But there is an ordering problem: a new mm user CPU sets itself in
mm_cpumask() and then reads mm->context.ldt. The LDT-installing CPU
writes mm->context.ldt and then reads mm_cpumask(). But, there is
nothing which orders the LDT installation side actions. The CPU
can read mm_cpumask() before its write becomes visible.
Ensure that new mm user CPUs see the new mm->context.ldt. Make
mm->context.ldt visible before reading mm_cpumask().
Also convert the smp_store_release() over to a WRITE_ONCE().
smp_store_release() has an internal barrier which is weaker than
the new smp_mb(). Avoid an extra barrier by converting it to
WRITE_ONCE().
Also refresh/correct misleading comments. READ/WRITE_ONCE() do not
"synchronize" anything themselves.
Reported-by: Jaeyoung Chung <jjy600901@snu.ac.kr>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Jaeyoung Chung <jjy600901@snu.ac.kr>
Acked-by: Linus Torvalds <torvalds@linuxfoundation.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@vger.kernel.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fixes from Juergen Gross:
"A bunch of isolated fixes of Xen related drivers"
* tag 'for-linus-7.4a-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
Xen/gnttab: improve error handling in gnttab_dma_{alloc,free}_pages()
xen: don't allow gnttab_dma_[alloc|free]_pages() in PV guest
xen/pvcalls: destroy the per-socket workqueue on release
xen/pvcalls: unwind pvcalls_new_active_socket() step by step
xen/privcmd: fix double free when an irqfd is shut down twice
xen/gntdev: fix deadlock between map ioctl and mmap
xen/platform-pci: Disable device before releasing PCI regions
xen/grant-table: annotate on-stack work in gnttab_unmap_refs_sync()
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck:
- Read tracking-mode voltage fault limits dynamically in the mp2975
PMBus driver instead of caching probe-time snapshots, avoiding false
over-voltage alarms when CPU voltage changes at runtime.
- Fix SCMI sensor probe by enabling supported sensors via firmware IDs
before exposing channels and checking channel config allocations.
- Fix runtime PM enable and reference count imbalances during probe and
teardown in the gpio-fan driver.
- Fix max31760 fan controller initialization and reporting, including
leaving standby at probe, initial 0 RPM reporting, and swapped
temperature limit registers.
- Assorted minor sensor reading, interval clamping, and register
handling fixes in other drivers.
* tag 'hwmon-for-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (aht10) Fix update_interval overflow on 64-bit
hwmon: (scmi) Configure sensors before exposing channels
hwmon: (scmi) Check channel config allocation
hwmon: (nct6775) Handle dual use registers
hwmon: (scmi) Enable temperature sensors using their sensor IDs
hwmon: (pmbus/mp2975) Get vout fault limits dynamically
hwmon: (sy7636a) fix negative temperatures
hwmon: (max31760) Report 0 RPM before the first fan speed measurement
hwmon: (max31760) Leave standby mode at probe
hwmon: (max31760) Fix the local temperature limit registers
hwmon: (gpio-fan) Fix runtime PM imbalance in probe and teardown
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs
Pull overlayfs fixes from Amir Goldstein:
- Fixes for data-only layers (composefs), some for regressions from
v6.16, which relaxed the requirements for redirects to data-only
layers
- Fix a use-after-free in lookup of a hardlink with a FUSE upper,
reported by Sashiko
- Fix a mount failure right after unmount of an overlay with the same
upperdir
- Reject lower layers on the same fs with different idmaps, which could
decode file handles through the wrong layer
- Minor fixes for a memory leak, an error message and readdir d_ino
* tag 'ovl-fixes-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
selftests: overlayfs: reject different lower idmaps on same fs
ovl: reject different lower idmaps on the same fs
ovl: bump the impure dir version when linking a file with origin
ovl: return EIO if the lowerdata is missing
ovl: follow lower to lowerdata redirects from any lower layer
ovl: report the requested redirect_dir mode in conflicting options
ovl: do not allow nfs_export with data-only layers
ovl: do not check the deferred lowerdata redirect on index lookup
ovl: fix leak of lowerdata redirect on ovl_get_inode() failure
ovl: do not always clear absolute_redirect
ovl: release the upperdir/workdir in-use locks before the umount sync
ovl: do not read the flags of a put upper dentry in lookup
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs
Pull ntfs fixes from Namjae Jeon:
- Validate that $INDEX_ALLOCATION is open and non-resident before
reading or writing index blocks, preventing NULL pointer dereferences
when an earlier index operation has not opened it
- Check that index allocation inodes are non-resident and child VCNs
are non-negative and within bounds before directory lookup reads,
preventing a deadlock when $INDEX_ALLOCATION is missing or damaged
- Validate file names against the index entry's key length, preventing
out-of-bounds reads when directory enumeration resumes using a copied
key
- Return -ENOENT for NTFS_IOC_LIST_STREAMS on deleted base files and
fix unsigned underflow in its buffer bounds check, preventing
out-of-bounds writes when the sizing and filling passes disagree
- Use kfree() for the temporary runlist allocated with kmalloc() on
merge failure, resolving the Coccinelle allocation/free mismatch
warning
* tag 'ntfs-for-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs:
ntfs: open the index allocation before reading or writing an index block
ntfs: do not read an index block outside $INDEX_ALLOCATION
ntfs: silence kmalloc/kvfree mismatch warning
ntfs: check the file name against the key length of an index entry
ntfs: fix out-of-bounds write race in NTFS_IOC_LIST_STREAMS
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb
Pull smb server fixes from Namjae Jeon:
- Evaluate explicit-access requests in DACL order with exact SID
matching, and prevent guest and anonymous sessions from matching
Authenticated Users
- Apply Unix group and OWNER RIGHTS ACEs, and keep their denials when
POSIX ACL fallback determines access
- Allow the parent directory’s DACL to grant explicitly requested
DELETE and FILE_READ_ATTRIBUTES through FILE_DELETE_CHILD and
FILE_LIST_DIRECTORY
- Exclude metadata-only file and stream opens from sharing conflicts
and stream delete-sharing checks, while accounting for writes implied
by overwrites and named-stream creation
- Return STATUS_ACCESS_DENIED for reads on files lacking FMODE_READ,
preventing warnings in __kernel_read() and potential panics
- Pin parent dentries during SMB2 CREATE permission, status, and ACL
inheritance operations to prevent use-after-free races with
concurrent rename and removal
- Keep expired sessions bound to their original user during NTLM
reauthentication, preventing identity changes and a user-object leak
* tag 'ksmbd-for-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb:
ksmbd: keep group denials when a POSIX ACL entry decides access
ksmbd: refuse reauthentication of an expired session as another user
ksmbd: pin parent dentries in SMB2 CREATE ACL path
ksmbd: let the parent's DACL grant DELETE and FILE_READ_ATTRIBUTES
ksmbd: evaluate the DACL in order for explicit access requests
ksmbd: skip metadata-only stream opens in the delete check
ksmbd: skip metadata-only opens in sharing checks
ksmbd: refuse to read a handle that is not open for reading
ksmbd: grant a caller what its groups and OWNER RIGHTS ACEs allow
|
|
David Hildenbrand (Arm) <david@kernel.org> says:
Users can create a lot of folio references to pagecache folios, making
it possible to overflow the refcount of large folios.
While we knew that one could in theory overflow a folio's refcount, we
mostly assumed that bad things would happen and it wouldn't go
unnoticed.
Not so sure if that is really always the case, and leaving that problem
unsolved is irresponsible, so let's limit pagecache folio refcounts.
This is mostly relevant for large folios / thps in the page cache, where
a single VMA can hold multiple folio references, allowing for many folio
references. But with sufficient (memory+process) resources, it is also
possible with small folios, just not that relevant in practice today.
With anon folios (including THPs), we should not be able to trigger folio
refcount overflows, as one would need so many processes that it
becomes impossible in practice. It was likely a problem for anon folios as
well before we had a dedicated pincount.
Let's limit the refcount before it turns negative, giving admin processes
some extra reserves (to recover a problematic system). We still leave some
headroom to allow for some slight limit overshooting, to make the
implementation easier.
But to make that work reliably, we have to make anybody that can take
an unbounded number of folio references obey these limits.
Patch #1 handles mapping references from page tables. We also have to take
care of mmu_gather, to not hold too many references when zapping (whereby
new page faults could remap pages concurrently), which we do in patch #3.
Patch #4 fixes iommufd cleanup when adding folio pins fails, which these
limits make easier to trigger.
Splicing pagecache folios to a pipe (patch #2) also needs care. After
feedback from Linus, these users really should be using try_get_page(),
where we now also implement the new limit check. We also teach GUP in
patch #5 to stay below the limit, to avoid negative refcounts that cause
trouble.
Doing some digging after getting a hint from Andrew, there are various
paths in net that can also take an unbounded number of page refs and are
problematic. Let's use try_get_page() in all affected paths.
Net paths that take page refs that I don't touch because the references
are either bounded or the paths are not relevant in practice:
- skb_split(): can add one reference per split, but each split
allocates a new skb that is charged to the socket, and the references
go away once the data was acked. Reworking that to be able to fail
requires more plumbing.
- IP-TFS reassembly: needs one new inner skb per additional reference.
- io_uring zerocopy send (managed frag references): each zerocopy piece
is charged at least 4 KiB of TCP memory, so not relevant in practice.
- kTLS software splicing: only transfers references from the pipe, so
not a problem.
- AF_XDP zerocopy TX, nfsd splice reads, sockmap / sk_msg, espintcp:
bounded, or require privileges / special setups, so not a problem in
practice.
- Driver-specific paths (e.g., kTLS device offload): require special
hardware, didn't look into these.
- page_pool and net_iov frags: not pagecache pages, so not a problem.
For page table mappings, this is only a temporary solution for
upstream+stable, until we have something better, which will be harder to
backport:
- Letting the mapcount of large folios be a long
- Holding a single refcount if the folio is mapped, across all mappings
- Reverting the limits introduced in this series
After that, most of patch #1 will be reverted, everything else will
stay.
Tested on x86-64 by lowering the folio refcount limits such that limits
can easily be exceeded, to then test fault (SIGBUS), fork(), splice and GUP
behavior briefly when we run into refcount limits on a shmem THP.
The net patches were tested similarly with AF_PACKET, nft dup, NFQUEUE,
software GSO segmentation, TCP receive coalescing with dropped ACKs and
socket splicing.
* patches from https://patch.msgid.link/20261112-refcount_overflow_stable-v4-0-ad3deef0bd23@kernel.org:
mm/gup: limit pagecache folio refcount when grabbing references
iommufd: fix cleanup when adding memfd folio pins fails
mm/mmu_gather: flush pending references early before the folio limit
mm: limit pagecache folio refcount when splicing into pipes
mm: limit pagecache folio refcount when mapping pages
The -net patches part of the series will be dealt with separately.
Link: https://patch.msgid.link/20261112-refcount_overflow_stable-v4-0-ad3deef0bd23@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
|
|
Let's add __folio_ref_count_over_limit() checks in fast and slow GUP
before acquiring additional references or pins.
Keep it simple and use the check for all folio types.
Also propagate try_grab_folio() errors when grabbing additional
references in __get_user_pages() and in memfd_pin_folios(), so hitting
the limit returns -ENOMEM instead of -EFAULT and -EINVAL, respectively.
Keep the existing invalid-refcount warnings.
Fixes: 800d8c63b2e9 ("shmem: add huge pages support")
Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS")
Fixes: 793917d997df ("mm/readahead: Add large folio readahead")
Cc: stable@vger.kernel.org
Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Link: https://patch.msgid.link/20261112-refcount_overflow_stable-v4-5-ad3deef0bd23@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
|
|
folio_add_pins() can fail after memfd_pin_folios() succeeded pinning a
folio. Upcoming folio refcount limit checks will make this easier to
trigger.
Let's fix three problems in the error handling:
1. pfn_reader_release_pins() uses the allocated array size instead of the
number of folios returned by memfd_pin_folios(). With large folios,
cleanup can unpin uninitialized entries. Remember the number of returned
folios and use that during cleanup.
2. pin_memfd_pages() returns on failure without releasing the pins acquired
by the current call. Release the per-page pins for folios already
expanded into the page array, and the single pins for the remaining
folios.
3. pfn_reader_next() returns on failure before updating batch_end_index,
even if the batch already contains successfully expanded folios. Update
it before propagating the error so cleanup releases those pins as well.
Fixes: 92687c793644 ("iommufd: pfn_reader for file mappings")
Cc: stable@vger.kernel.org
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://patch.msgid.link/20261112-refcount_overflow_stable-v4-4-ad3deef0bd23@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
|
|
When a task zaps mappings (e.g., MADV_DONTNEED), it can drop the PT lock
and defer dropping the folio references. In the meantime, page faults
can refault pagecache folios, creating more references for the same
folios. These deferred references can build up over multiple VMAs.
Let's just request a flush after enqueueing folios whose refcount reached
a certain threshold. Start flushing well before new references are refused,
regardless of the caller's privileges.
When returning "true" from __tlb_remove_folio_pages_size(), PTE zapping
will flush the TLB before dropping the PT lock, but drop the references
afterwards. Refaults can still race with that, but flushing early reduces
the risk of letting others hit the limit.
This is a temporary measure until we have something better.
Reported-by: Chris Mason <mason@kernel.org>
Fixes: 800d8c63b2e9 ("shmem: add huge pages support")
Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS")
Fixes: 793917d997df ("mm/readahead: Add large folio readahead")
Cc: stable@vger.kernel.org
Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Link: https://patch.msgid.link/20261112-refcount_overflow_stable-v4-3-ad3deef0bd23@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
|
|
Similar to mapping pagecache folios into page tables, let's reject
additional references when splicing folios into a pipe if the refcount
is at its limit.
This will prevent more cases of possible folio refcount overflows with
large pagecache folios.
Introduce folio_get_checked() for checked reference acquisition when
the caller already holds a reference. It warns and fails on a non-positive
refcount and rejects additional references at the limit.
Add __folio_ref_count_over_limit() so folio_get_checked() can reuse the
refcount instead of having to read it a second time.
Use folio_get_checked() in splice_folio_into_pipe() and
fuse_ref_folio(), returning -EFAULT on failure, like we already do for
pipe-buffer duplication. Similarly, make try_get_page() use it instead.
Likely try_get_page() should be renamed (or removed) later, as it doesn't
match the folio_try_get() semantics and is confusing.
If we hit the limit after splicing some data, return the number of bytes
already spliced. Teach the callers to handle errors, and stop
filemap_splice_read() if we only spliced part of a folio, so we don't
skip ahead to the next folio: note that we wouldn't run into this
scenario before as we always spliced the requested range.
The check in try_get_page() also covers pipe-buffer duplication by tee()
and partial pipe-to-pipe splicing.
Note that we deliberately will not fall back to the slow path of copying
the folio, particularly as the folio might have an invalid refcount. If
it is ever really required, we can revisit.
Fixes: 800d8c63b2e9 ("shmem: add huge pages support")
Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS")
Fixes: 793917d997df ("mm/readahead: Add large folio readahead")
Cc: stable@vger.kernel.org
Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Link: https://patch.msgid.link/20261112-refcount_overflow_stable-v4-2-ad3deef0bd23@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
|
|
With large file folios, overflowing the folio mapcount and refcount
became possible more easily. For anon folios it is currently not really
an issue: each large anon folio can only be mapped once into a process; on
4k kernels it would be more processes than usually allowed on a system,
and on 16k or 64k kernels the processes alone would consume hundreds of
GiB. Something to be sorted out at some point, but it's not as urgent.
Being able to overflow the refcount is not really big news, but it's about
time that we do something about it because some modern technology might
find ways to abuse it :)
One of the enablers for that was commit ddc58f27f9ee ("mm: drop tail page
refcounting"), however, file thp support was added later.
File folios can be mapped multiple times into the same process, allowing
for processes to hold many references to the same folio.
As a short-term solution, let's introduce two folio refcount limits:
one for ordinary consumers and one for admins. Leave some headroom
before the refcount goes negative, which we really don't want (having
the mapcount go negative is also not expected).
Start reporting SIGBUS and a ratelimited warning if we run into limits.
When restoring mappings from migration entries, instead zap the pte/pmd
entry. We allow for slightly exceeding the limit to keep things simpler.
During fork(), prefer not copying page table entries over failing fork.
For fault-around, check in next_uptodate_folio() before trying to lock
the folio.
Export folio_ref_count_over_limit_slowpath() using EXPORT_SYMBOL_GPL
right away so modules can use it through try_get_page(), where we will
use it next.
Use has_capability_noaudit(current, CAP_SYS_RESOURCE),
so filesystem credential overrides do not affect access to the admin
reserve, and to not generate auditing messages simply because we access
optional reserves.
Don't grant access to the admin reserve from kernel threads, from
interrupt context, where "current" is just the interrupted task, or with
IRQs disabled, as even unaudited capability checks can take locks.
This is far from ideal, but better than all easy alternatives we can
backport comfortably. For now it fixes the big problem: letting
the refcount (+mapcount) go negative and cause trouble.
This is only a temporary fix. Keep the mapping checks explicit and
separate from reference acquisition: most are expected to disappear when
we rework the underlying refcounting.
Check order 0 folios as well for consistency: each
folio_add_file_rmap*() and folio_dup_file_rmap*() needs a prior check.
Adjust the check in folio_get() to just check for invalid refcounts and
drop folio_ref_zero_or_close_to_overflow(): we really don't want
negative refcounts or negative mapcounts. Convert to VM_WARN_ON_FOLIO as
we touch it.
Also, just document -EHWPOISON for copy_present_ptes() while at it.
Note: When zapping file migration entries, uffd-wp is preserved using PTE
markers, but uffd-rwp protection is lost because there is no corresponding
marker. try_to_unmap() already has the same problem when unmapping file
folios, so we'll happily ignore it.
Reported-by: Chris Mason <mason@kernel.org>
Fixes: 800d8c63b2e9 ("shmem: add huge pages support")
Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS")
Fixes: 793917d997df ("mm/readahead: Add large folio readahead")
Cc: stable@vger.kernel.org
Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Acked-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Link: https://patch.msgid.link/20261112-refcount_overflow_stable-v4-1-ad3deef0bd23@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
|
|
The __raw_write{w,l}() accessors use inline asm with an "m" operand for
the store destination. GCC's ARC backend lets "m" match any legitimate
address, including the register-indexed [b,c] forms that only loads
support: stores only have [reg], [reg,s9] and [limm] addressing. With
newer GCC (late-combine in GCC 15, combine in GCC 16), a writew() with a
scaled, non-constant offset gets
stw.as r2,[r0,r1]
which the assembler rejects:
Error: inappropriate arguments for opcode 'stw'
With GCC 16 this breaks even hsdk_defconfig (drivers/net/pcs/
pcs-xpcs-plat.c) and axs101_defconfig. allyesconfig additionally trips
in drivers/pinctrl/renesas/pinctrl-rza2.c and drivers/video/fbdev/
s3c-fb.c.
Work around it by passing the address in a register and using a fixed
[%1] address in the asm template, so the compiler can't pick an
addressing mode that stores don't support. This is the minimal fix.
The next patch drops the inline asm altogether.
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127718
Cc: stable@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd
Pull key fixes from Jarkko Sakkinen:
- Invoke the match callback before the state checks in
keyring_search_iterator(), so that a non-matching revoked,
expired or invalidated key cannot decide the search result
- Take key->sem for reading around the ->asym_*() method calls
in the keyctl pkey operations, as a key reference does not
pin the module providing the key type
* tag 'keys-v7.4-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
KEYS: Protect pkey method checks against type removal
KEYS: do not let an unmatched key decide the search result
|
|
Pull drm fixes from Dave Airlie:
"Weekly drm fixes, this is a bit bigger as we missed xe last week due
to a tree screw up, so it's mostly xe and amdgpu, then the usual
scattering of fixes across drivers.
sched:
- Ensure stopped entity cannot be re-added to the run-queue
bridge:
- ssd2825: Fix panel enable sequence
- sii902x: validate I2S data lane values
display:
- hdmi: Fixes to SCDC
i915:
- Fix for PTL GitLab #9196: eDP-2 on DDI B ends up in a state where
any enable fails
- PSR fixes
amdgpu:
- DCN 6 DML2 fix
- VCE fixes
- GC 11.0.2 fix
- SMU 15 fix
- Error handling fixes
- Partition fix
- IMU firmware clean up fix
- TLB fence handling fix
amdkfd:
- SVM fixes
- CRIU fixes
xe:
- select configfs
- Sync Wa_16023105232 in xe_was to match OOB rule
- Program LMTT directory pointer from each GT init path
- Demote uncorrectable local error log on CRI
- Apply tile workarounds after PCODE init
- VRAM offlining fixes
- ras: Fix sysctrl and drm-ras discrepancy
- pat: Return error from xe_pat_init_early() on unknown
- Prevent VF memory IRQ from accessing a torn-down engine
- guc: Protect timeout handling from device unplug
- gt: Disable GT reset worker before engine teardown
- Various hwmon fixes
- tuning: Restrict Anyhit NULL-query tuning to render engines
- gsc: Fix NVL-S GSC compatibility number
- Don't abort the shrinker walk on -EBUSY
- Mark xe_vma_ops_alloc() noinline for error injection
- lrc: Restore CTX_CS_INDIRECT_CTX_OFFSET programming for pre-Xe2
- Fix build with DRM_XE=y and CONFIGFS_FS=m
- madvise: use already clamped pat_index
- Various wedging fixes
- Rebind BOs evicted before the first LR queue
- Toggle the D3Cold enable flag at runtime resume
- Access GT MMIO after pcode init
- xe_late_bind_fw: Fix firmware leak on missing manifest entry
- svm: Preserve default PAT index when resetting VMA attributes
- Unwrap sync fences before adding them as job dependencies
- Schedule disable G2H fixes
gud:
- Avoid divide error in gud_stats_debugfs
meson:
- load ENCL gamma table while ENCL is disabled
nouveau:
- disp: Set atomic functions in struct drm_mode_config_funcs
- gsp: Handle only IRQs routed to host
panfrost:
- Fixes to perfcnt
vc4:
- Fix firmware reference leak
- Hold runtime PM reference while allocating the binner BO
- Rebuild V3D interrupt mask on every power transition
- Re-enable the V3D interrupt after a GPU reset"
* tag 'drm-fixes-2026-11-14' of https://gitlab.freedesktop.org/drm/kernel: (81 commits)
drm/vc4: Re-enable the V3D interrupt after a GPU reset
drm/vc4: Rebuild the V3D interrupt mask on every power transition
drm/vc4: Hold a runtime PM reference while allocating the binner BO
drm: xe: select configfs
drm/xe: Sync Wa_16023105232 in xe_was to match OOB rule
drm/xe/pf: Program LMTT directory pointer from each GT's init path
drm/xe/guc: Demote uncorrectable local error log on CRI
drm/xe/pm: Apply tile workarounds after PCODE initialization
drm/gud: avoid divide error in gud_stats_debugfs
drm/nouveau/disp: Set drm_mode_config_funcs.atomic_(check|commit) (attempt 2)
drm/amdgpu: fix TLB invalidation fence handling v4
drm/amdkfd: check CRIU SVM priv data bounds before allocating
drm/amdgpu: release the IMU firmware with the other GFX microcode
drm/amdgpu: Allow cancelling a requested NPS mode
drm/amdgpu: fix the error handling of amdgpu_vm_init_entities()
drm/amdgpu: use supported SMU clock messages on SMU 15.0.0
drm/amdkfd: skip GPUs without a VM when checkpointing the BO mappings
drm/amdkfd: Acquire cwsr buffer during CRIU resume
drm/amdkfd: Acquire buffers in CRIU queue restore (again)
drm/amdgpu: Fix VCE buffer size check for DPB and input surface
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull watchdog fixes from Guenter Roeck:
- gunyah_wdt: Re-enable the watchdog on resume
- mediatek: Register reset controller before watchdog device
- meson_gxbb_wdt: fix suspend/resume handling of HW_RUNNING watchdog
- mtk_wdt: Stop a running watchdog over system sleep even if not opened
- npcm: fix clock prepare leak when setting timeout on a running
watchdog
- omap: Fix early_enable handling in omap_wdt_probe()
- orion_wdt: load the pretimeout counter on Armada 370/XP start
- rzv2h: Drop runtime PM handling from WDTDCR init, and use
pm_runtime_put_sync()
- sbsa_gwdt: Limit the MediaTek WS0 race workaround to revision 0
- sc1200wdt: add missing MODULE_DEVICE_TABLE()
- sp5100_tco: Use release_mem_region() for EFCH MMIO resource
* tag 'watchdog-fixes-for-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
watchdog: rzv2h: Drop runtime PM handling from WDTDCR init
watchdog: rzv2h: Use pm_runtime_put_sync()
watchdog: omap: Fix early_enable handling in omap_wdt_probe()
watchdog: npcm: fix clock prepare leak when setting timeout on a running watchdog
watchdog: gunyah_wdt: Re-enable the watchdog on resume
watchdog: mediatek: Register reset controller before watchdog device
watchdog: sp5100_tco: Use release_mem_region() for EFCH MMIO resource
watchdog: sbsa_gwdt: Limit the MediaTek WS0 race workaround to revision 0
watchdog: meson_gxbb_wdt: fix suspend/resume handling of HW_RUNNING watchdog
watchdog: mtk_wdt: Stop a running watchdog over system sleep even if not opened
watchdog: orion_wdt: load the pretimeout counter on Armada 370/XP start
watchdog: sc1200wdt: add missing MODULE_DEVICE_TABLE()
|
|
https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
Short summary of fixes pull:
bridge:
- ssd2825: Fix panel enable sequence
- sii902x: validate I2S data lane values
display:
- hdmi: Fixes to SCDC
gud:
- Avoid divide error in gud_stats_debugfs
meson:
- load ENCL gamma table while ENCL is disabled
nouveau:
- disp: Set atomic functions in struct drm_mode_config_funcs
- gsp: Handle only IRQs routed to host
panfrost:
- Fixes to perfcnt
sched:
- Ensure stopped entity cannot be re-added to the run-queue
vc4:
- Fix firmware reference leak
- Hold runtime PM reference while allocating the binner BO
- Rebuild V3D interrupt mask on every power transition
- Re-enable the V3D interrupt after a GPU reset
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20261113074438.GA14592@linux.fritz.box
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Catalin Marinas:
"Fix hugetlb write fault livelock, permission overlay and GCS state
preservation across CPU suspend, cpuidle context tracking during
system suspend, GCS mode handling on signal return, AMU counter errata
workarounds, kexec loading of images with a non-zero text_offset and a
spurious ptrace warning:
- Fix hugetlb write fault livelocks caused by stale read-only TLB
entries after another CPU makes the page writable and only performs
a local invalidate. Unlike the generic fault path, hugetlb has no
fix_spurious_fault() fallback
- Save and restore POR_EL0, GCSPR_EL0 and GCSCRE0_EL1 across CPU
suspend
- Restrict cpuidle context tracking in cpu_suspend() to idle tasks,
avoiding context tracking warnings during system suspend
- Ignore attempts to change GCS mode through signal return, which
updated the software state without updating the hardware. Changes
made through prctl() in the signal handler are preserved. This
changes the documented ABI but no known userspace relies on it.
Allowing mode changes through both prctl() and signal return also
creates confusing interactions, with signal return potentially
undoing changes deliberately made by the handler
- Extend the AMU constant counter workaround to additional CPUs and
add a core cycle counter workaround for Cortex-A715/A720, treating
the affected counters as unavailable
- Avoid CMA allocations when loading a kexec Image with a non-zero
text_offset, fixing an incorrect entry point and a memory leak when
freeing the image
- Remove a spurious ptrace warning when setting the syscall number of
a task in a non-seized group-stop without siginfo"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: suspend: Only track cpuidle context for idle tasks
arm64: ptrace: don't warn on missing siginfo in a group-stop
arm64: kexec_file: Do not use CMA for images with a non-zero text_offset
arm64: errata: Add Cortex-A715/A720 AMU core counter workaround
arm64: errata: Extend the workaround for broken AMEVCNTR01 counter
arm64/gcs: Ignore attempts to change GCS mode during signal return
arm64: hugetlb: Prevent write fault livelocks on stale TLB entries
arm64: suspend: Save GCS state over suspend
arm64: suspend: Save POR_EL0 over suspend
|
|
For a bio with REQ_PREFLUSH and data, dm core may send an empty flush
first. If the flush fails, __dm_io_complete() still reissues the bio
without REQ_PREFLUSH and drops the error. When that write succeeds,
the XFS log keeps running and fsync() can return 0.
End the bio with the flush error instead of writing the data, as
blk-mq does.
Fixes: 6a8736d10cb4 ("dm: relax ordering of bio-based flush implementation")
Cc: stable@vger.kernel.org
Signed-off-by: Daejun Park <daejun7.park@samsung.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
|
|
On 64-bit, update_interval writes are clamped to LONG_MAX ms, but
ms_to_ktime() overflows above 9223372036854 ms and the interval wraps.
LONG_MAX becomes -1 ms, so every read starts a new measurement and
update_interval reads back -1.
Clamp to INT_MAX like sht4x, so the limit is the same on all platforms.
Fixes: 8c78f0dee437 ("hwmon: Add AHT10 Temperature and Humidity Sensor Driver")
Cc: stable@vger.kernel.org
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
Link: https://patch.msgid.link/20261108172651.220121-1-zoone.rupert@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|