Merge tag 'cifs-fixes-7.4-rc6' of https://git.manguebit.org/linux
Pull smb client fixes from Paulo Alcantara:
- Fix several races around server->smbd_conn, which a reconnect can
destroy via cifs_abort_connection() while smbd_get_parameters(),
smbd_register_mr() and the debug handler still use it without a
reference or lock; readers now take a socket reference under
server->srv_lock
- Fix the SMB Direct RDMA I/O limits underflowing to zero during a
reconnect when there is no connection, which dropped the negotiated
RDMA sizes
- Return the real error from smbd_get_connection() instead of a made-up
-ENOENT, so mount and reconnect report the actual RDMA failure
- Use a per-session counter for the nonce of encrypted messages instead
of random bytes, to keep the nonce unique as the protocol requires
[40 lines not shown]
Merge tag 'block-7.4-20261205' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull block fixes from Jens Axboe:
"A bit bigger than I would've liked, and honestly some of the NVMe
changes _could_ have waited for 7.5. But they are well tested and
Keith already bundled them up, and here we are... Expect only little
bits going forward to close out the 7.4 kernel.
- NVMe fixes via Keith:
- nvme-fc fixes for a use-after-free in LS disconnect matching,
uninitialized I/O queues on reconnect, and the result on
transport failure
- nvme-tcp fixes for a released socket in poll, the R2T length
check overflow, and PDU alignment and header digest on the
target side
- nvme-multipath fixes for the ANATT timer teardown and
delayed_removal_secs handling
- Handle a missed doorbell write on a passthrough request
- Limit Write Zeroes to 65536 logical blocks
[34 lines not shown]
Merge tag 'io_uring-7.4-20261205' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull io_uring fixes from Jens Axboe:
- Close a race between polling a disabled SINGLE_ISSUER ring and
IORING_REGISTER_ENABLE_RINGS, which could leave an epoll waiter not
getting notified of pending completions.
- Only arm local work wakeups for the submitter when cancelling, fixing
a NULL pointer dereference when a canceling task visits a disabled
ring that later receives ZCRX events.
- Don't dma_sync dma-buf backed zcrx buffers, as those follow their own
synchronisation rules.
- Enforce the per-task opcode restrictions and BPF filters on the
embedded request of IORING_REGISTER_SEND_MSG_RING.
* tag 'io_uring-7.4-20261205' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:
[4 lines not shown]
Merge tag 'watchdog-for-v7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull watchdog fixes from Guenter Roeck:
- set set .owner = THIS_MODULE in watchdog_ops to prevent unloading
while /dev/watchdog is open (arm_smc_wdt, bd96801_wdt, ebc-c384_wdt,
max77620, meson_gxbb_wdt)
- atcwdt200: select REGMAP_MMIO in Kconfig to fix build failures
- npcm: enable clock before checking running state in probe
- sbsa: evaluate MediaTek WS0 workaround after IRQ fallback
- rzv2h: use 64-bit arithmetic to avoid 32-bit max_hw_heartbeat_ms
overflow
* tag 'watchdog-for-v7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
watchdog: rzv2h: Avoid 32-bit overflow in max_hw_heartbeat_ms calculation
[8 lines not shown]
Merge tag 'hwmon-for-v7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck:
- Runtime, locking, and resource fixes for coretemp (uneven core
counts), tmp513 and emc2305 (divide-by-zero), it87 (missing device
lock on sensor type read), da9052 (tsiref regulator lifetime),
vexpress (modular regulator check), and pmbus/max34440 (legacy ASCII
revision)
- Kconfig, modular build, and OF modalias fixes for lan966x,
ltq-cputemp, pmbus/ltc4286, and pmbus/xdp710
* tag 'hwmon-for-v7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (coretemp) Fix missing sensors with uneven core counts
hwmon: (tmp513) avoid divide by zero from rounded-down current LSB
hwmon: (emc2305) fix division by zero for a small tach reading
hwmon: (it87) Lock the device while reading the temperature sensor type
hwmon: (pmbus/ltc4286) support building the sensor as a module
[6 lines not shown]
Merge tag 'fixes-2026-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
Pull liveupdate fixes from Mike Rapoport:
- A failed kho_init() on a KHO boot frees kho-bootmem memory that is
still in use and panics.
Free the kho-bootmem areas in error paths of kho_init() only on a
cold boot
- kho_init() treats debugfs initaliation errors as fatal and because of
this KHO can't be used with debugfs disabled.
Don't fail kho_init() when it can't create debugfs entries.
* tag 'fixes-2026-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux:
kho: don't fail kho_init() when debugfs is disabled
kho: don't release incoming bootmem areas when kho_init() fails
hwmon: (tmp513) avoid divide by zero from rounded-down current LSB
tmp51x_calibrate() computes the current LSB as
curr_lsb_ua = DIV_ROUND_CLOSEST_ULL(max_curr_ma * MILLI, 32767);
and then derives pwr_lsb_uw = 20 * curr_lsb_ua and
div = DIV_ROUND_CLOSEST_ULL(curr_lsb_ua * shunt_uohms, MICRO);
so the calibration register write is DIV_ROUND_CLOSEST(40960, div).
curr_lsb_ua decreasing with a larger shunt means that for large shunt
resistors DIV_ROUND_CLOSEST_ULL() rounds it to 0. Both div and
pwr_lsb_uw then become 0: the calibration division traps, and a later
write to power1_crit (tmp51x_set_value(), DIV_ROUND_CLOSEST(val,
pwr_lsb_uw)) traps as well, because tmp51x_is_visible() only hides the
attributes when shunt_uohms is exactly 0.
curr_lsb_ua is a minimum resolution that only needs to be >= 1 uA; round
[10 lines not shown]
hwmon: (coretemp) Fix missing sensors with uneven core counts
topology_num_cores_per_package() returns the core count of the package
with the lowest APIC ID. If another package has more cores, e.g. because
the BIOS disabled cores on only one CPU, the extra cores get no
temperature sensors and "Adding Core N failed" is logged.
Use num_possible_cpus() as the limit instead, and allocate the array
with kvzalloc_objs() so large systems don't need a high-order
allocation.
Fixes: b89e1255c92b ("hwmon: (coretemp) replace hardcoded core count with dynamic value")
Cc: stable at vger.kernel.org
Reported-by: Sashiko <sashiko-bot at kernel.org>
Closes: https://lore.kernel.org/linux-hwmon/20260516121622.1E9DAC19425@smtp.kernel.org/
Tested-by: Asaf Nuri Bertizlioğlu <asafbertizlioglu at gmail.com>
Reviewed-by: Asaf Nuri Bertizlioğlu <asafbertizlioglu at gmail.com>
Signed-off-by: Aveline Noir <jm5905938 at gmail.com>
Link: https://patch.msgid.link/20261205-coretemp-core-limit-v2-1-e10810df5a3a@gmail.com
Signed-off-by: Guenter Roeck <linux at roeck-us.net>
hwmon: (emc2305) fix division by zero for a small tach reading
emc2305_show_fan() guards the raw 16-bit tach register value with
`if (ret <= 0)`, then shifts it right by EMC2305_TACH_REGS_UNUSE_BITS (3)
before dividing:
ret = ret >> EMC2305_TACH_REGS_UNUSE_BITS;
ret = EMC2305_RPM_FACTOR / ret;
A tach register value of 1..7 survives the first check but becomes 0
after the shift, so the division is a divide by zero. The register value
comes from the fan controller (the driver never writes it); reading the
read-only fan1_input attribute of a faulty or emulated controller that
reports 1..7 therefore crashes the kernel. Userspace only triggers the
read; the zero divisor is device-provided.
Re-check for zero after the shift.
Fixes: 0d8400c5a2ce ("hwmon: (emc2305) add support for EMC2301/2/3/5 RPM-based PWM Fan Speed Controller.")
[4 lines not shown]
hwmon: (it87) Lock the device while reading the temperature sensor type
show_temp_type() calls it87_update_device() and then get_temp_type().
it87_update_device() drops data->update_lock before it returns. Since
commit 6593eac89920 ("hwmon: (it87) Add support to detect sensor type
AMDTSI"), get_temp_type() no longer uses the cached register values but
reads IT87_REG_IFSEL, IT87_REG_TEMP_ENABLE and IT87_REG_TEMP_EXTRA from
the chip. These reads therefore run without update_lock and with SMBus
access enabled, while the comment above it87_read_value() requires both.
it87_read_value() and it87_write_value() go through one address/data
port pair. If a read of tempN_type races with a sysfs store that holds
the lock, for example set_temp_type(), the address write of one side can
land between the address and data accesses of the other. The store can
then write its value to a different register, or the read returns the
wrong register.
Take the lock with it87_lock() around get_temp_type(), as
set_temp_type() does. get_temp_type() uses none of the cached values, so
[13 lines not shown]
hwmon: (pmbus/ltc4286) support building the sensor as a module
With PMBUS=m, Kbuild descends into pmbus/ for modules. An ltc4286 object
placed in obj-y by the boolean sensor option is not part of that build.
Make the sensor option tristate. Export its existing OF match table as
well: an I2C client instantiated from a device tree can produce an OF
modalias rather than an i2c modalias. Keep the existing I2C IDs for
other clients.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 0c459759ca97 ("hwmon: (pmbus) Add ltc4286 driver")
Signed-off-by: Pengpeng Hou <hppiscas at 163.com>
Link: https://patch.msgid.link/179634903882.74470.12607115542458648726@163.com
Signed-off-by: Guenter Roeck <linux at roeck-us.net>
hwmon: (ltq-cputemp) depend on HWMON=y
The XWAY temperature driver is selected by a boolean option under HWMON.
With HWMON=m the selected built-in object is not included by that
directory descent.
Require HWMON=y for this platform driver. This avoids advertising an
unbuilt sensor; it does not implement a loadable XWAY sensor.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 7074d0a92758 ("hwmon: (ltq-cputemp) add cpu temp sensor driver")
Cc: stable at vger.kernel.org
Signed-off-by: Pengpeng Hou <hppiscas at 163.com>
Link: https://patch.msgid.link/179634928168.74470.5781132422211450535@163.com
Signed-off-by: Guenter Roeck <linux at roeck-us.net>
hwmon: (da9052) Tie the tsiref regulator to the hwmon device
da9052_hwmon_probe() calls devm_regulator_get_enable_read_voltage() on
the parent MFD device, because the tsiref supply is described in the
PMIC node. The reference and the enable then belong to the parent and
are not dropped when the probe fails later or when the hwmon driver is
unbound. Every new bind enables the regulator once more.
Look the regulator up on the parent, but enable it with the plain
calls and disable and put it from a devm action of the hwmon device.
Fixes: d72fd5228c9f ("hwmon: (da9052) Use devm_regulator_get_enable_read_voltage()")
Cc: stable at vger.kernel.org
Reviewed-by: David Lechner <dlechner at baylibre.com>
Signed-off-by: Arina Kharlamova <arina.kharlamova at mbzuai.ac.ae>
Link: https://patch.msgid.link/20261203-s2p-lpr-hwmon-v2-1-8d808e44d20e@mbzuai.ac.ae
Signed-off-by: Guenter Roeck <linux at roeck-us.net>
hwmon: (vexpress) use IS_ENABLED() for CONFIG_REGULATOR_VEXPRESS
Both the Versatile Express regulator and hwmon drivers match the voltage
node. The hwmon driver is intended to expose voltage only when the
regulator driver is not configured; its current guard still claims
voltage when the regulator is modular.
Use IS_ENABLED for the voltage attributes and match entry. The other
hwmon sensors remain available.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 48ed88772446 ("hwmon: Versatile Express hwmon driver")
Cc: stable at vger.kernel.org
Signed-off-by: Pengpeng Hou <hppiscas at 163.com>
Link: https://patch.msgid.link/179635096045.74470.14679551183623100373@163.com
Signed-off-by: Guenter Roeck <linux at roeck-us.net>
hwmon: (xdp710) export the OF module alias
xdp710 exports its I2C ID table but not its OF match table. Export the
latter so the OF modalias generated for a device tree client can load
the driver.
Fixes: 35fe06d94e39 ("hwmon: (pmbus) Add support for Infineon XDP710")
Cc: stable at vger.kernel.org
Signed-off-by: Pengpeng Hou <hppiscas at 163.com>
Link: https://patch.msgid.link/20261203034406.62675-1-hppiscas@163.com
Signed-off-by: Guenter Roeck <linux at roeck-us.net>
hwmon: (lan966x) Select the MMIO regmap backend
lan966x-hwmon.c initializes an MMIO regmap using
devm_regmap_init_mmio(), but SENSORS_LAN966X does not select
REGMAP_MMIO. The driver can therefore be enabled without the
required register-transport implementation and fail to build.
Select REGMAP_MMIO so the backend is enabled at the linkage level
required by this consumer, rather than relying on another driver to
pull it in.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: c8f55be4a1c7 ("hwmon: add driver for the Microchip LAN966x SoC")
Cc: stable at vger.kernel.org
Signed-off-by: Pengpeng Hou <hppiscas at 163.com>
Link: https://patch.msgid.link/20261130132053.82864-1-hppiscas@163.com
Signed-off-by: Guenter Roeck <linux at roeck-us.net>
block: fail a delayed bio if its disk was removed
A bio delayed by an error injection rule is resubmitted from a workqueue
with submit_bio_noacct_nocheck(), which skips bio_check_eod(). The
delayed bio holds no queue usage counter, so del_gendisk() does not wait
for it. For disks that don't own their queue, such as sd and sr, the
queue is unfrozen again after del_gendisk(). When sd is unbound while a
bio is delayed, the resubmitted bio reaches scsi_queue_rq() after the
driver is gone:
BUG: kernel NULL pointer dereference, address: 00000000000000c0
Workqueue: blk_error_inject blk_error_inject_delay_work
RIP: 0010:scsi_queue_rq+0x5b2/0xb80
Call Trace:
__blk_mq_issue_directly+0x3f/0xb0
blk_mq_try_issue_directly+0x8e/0x110
blk_mq_submit_bio+0x6b0/0x710
submit_bio_noacct_nocheck+0x2da/0x3c0
process_one_work+0x19b/0x370
[10 lines not shown]
block: copy BIO_ERROR_INJECTED to the split in bio_split()
BIO_ERROR_INJECTED keeps a bio that was delayed by an error injection
rule from being evaluated again when it is resubmitted. bio_split()
does not copy the flag to the split. raid10_handle_discard() resubmits
the front split of an unaligned discard to the md device, so a discard
delayed by a rule on that device has its front part evaluated, and
possibly delayed, a second time.
Copy the flag in bio_split(), as is already done for
BIO_TRACE_COMPLETION.
Fixes: 6bd856cc9996 ("block: allow error injection rules to delay bios")
Reported-by: Sashiko <sashiko-bot at kernel.org>
Link: https://sashiko.dev/#/patchset/20261111215838.103356-1-haris.iqbal%40linux.dev?part=2
Signed-off-by: Md Haris Iqbal <haris.iqbal at linux.dev>
Link: https://patch.msgid.link/20261205141912.37608-4-haris.iqbal@linux.dev
Signed-off-by: Jens Axboe <axboe at kernel.dk>
block: clear BIO_ERROR_INJECTED when a bio changes device
BIO_ERROR_INJECTED keeps a bio that was delayed by an error injection
rule from being evaluated again when it is resubmitted. Rules belong to
a disk, but the flag stays set when a bio is remapped in place to
another device with bio_set_dev(), so the new device's rules would be
skipped for it.
Clear the flag in bio_set_dev() when the device changes, as is already
done for BIO_BPS_THROTTLED.
With nvme multipath, a bio delayed by a rule on the head disk loses the
flag when it is remapped to a path, so on failover it is checked against
the head's rules again.
Fixes: 6bd856cc9996 ("block: allow error injection rules to delay bios")
Reported-by: Sashiko <sashiko-bot at kernel.org>
Link: https://sashiko.dev/#/patchset/20261111215838.103356-1-haris.iqbal%40linux.dev?part=2
Signed-off-by: Md Haris Iqbal <haris.iqbal at linux.dev>
[2 lines not shown]
io_uring: enforce task restrictions on blind MSG_RING
IORING_REGISTER_SEND_MSG_RING executes an embedded MSG_RING SQE
without going through normal submission. This bypasses per-task SQE
opcode restrictions and BPF filters.
Apply the same checks to the embedded request before sending the message.
Fixes: ed82f35b926b ("io_uring: allow registration of per-task restrictions")
Link: https://gist.github.com/shaos26/5175f691637a55377f1ce5c1e4b57dba
Signed-off-by: Shawn Shao <shawnq1 at 163.com>
Link: https://patch.msgid.link/20261205040843.2911303-1-shawnq1@163.com
Signed-off-by: Jens Axboe <axboe at kernel.dk>
Merge tag 'for-7.4-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba:
- zoned mode fixes:
- properly finish the relocated block group's zone
- distinguish overreserved metadata space and free zones
- don't release active zone reservations for conventional zones
- handle transient delayed reserve refill errors during forced commit
- skip missing devices when releasing active zone reservations
- validate properties after reading them from device
- fix defrag extent lookup on inode item boundary
- fix returned value for partial direct IO writes
- fix tracepoint print of extent type map field
[19 lines not shown]
Merge tag 'drm-fixes-2026-12-05-2' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Ailie:
"Usual weekly fixes, the usual suspects in xe/i915/amdgpu, but mediatek
seems to have ran into the AI hammer for this week, but they are all
small trivial fixes, otherwise just a few scattered fix across other
drivers and core.
core:
- edid: Don't mark DisplayID Type VII YCbCr 4:2:0 timings preferred
- sched: Fix timestamp handling
- ttm: Destroy the ttm_tt in ttm_bo_move_null() when it's no longer
needed
bridge:
- lt9611uxc: Fix firmware update verification
- nwl-dsi: Fix DSI disable logic
- tc358762: Fix reset gpio handling
[93 lines not shown]
Merge tag 'pinctrl-v7.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control fixes from Linus Walleij:
- A big set of fixes for Qualcomm SoCs: the majority involves properly
marking "EGPIO" (external GPIOs) as being, well GPIOs. Then bugs in
pull direction reporting, config cache, dual edge IRQs, off-by-one
bugs, pin patterns and pin definition discrepancies. Remove some
nonexisting pins added by misunderstandings or erroneous
documentation
- SCMI pincontrol with GPIO add-in has some additional fixes relating
to milliampere conversions, reporting of off state
- Wrong component ID and dual-edged IRQ fix for the Ingenic SoC pin
controller
- Bias fix for the Airoha pin controller
[30 lines not shown]
Merge tag 'mtd/fixes-for-7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull mtd fixes from Miquel Raynal:
"A few important patches. Among them, two spinand core fixes, one
around the use of the is/mark bad functions, and the other on
continuous reads.
On CFI, a recent change lead to a regression which is also now fixed.
Same for SPI-NOR, a rework broke octal chips by not taking them into
account.
Finally, a page calculation is fixed on samsung chips and their
correct geometry is now reported"
* tag 'mtd/fixes-for-7.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
mtd: spinand: set request type explicitly in spinand_{is,mark}bad() functions
mtd: spi-nor: clear the default read_sr2 opcode for Octal DTR flashes
mtd: cfi_cmdset_0002: also clamp the write buffer of an x16 part strapped to x8
mtd: rawnand: samsung: fix pages_per_eraseblock calculation
mtd: spinand: Do not re-enable continuous reads vetoed during variant selection
io_uring/zcrx: don't sync dma-bufs
dma-bufs follow different synchronisation rules comparing to normal
memory, the user accessing it must use proper API like
DMA_BUF_IOCTL_SYNC. Don't sync dma-buf backed buffers with the
dma_sync_*() family of helpers.
Fixes: a5c98e9424573 ("io_uring/zcrx: dmabuf backed zerocopy receive")
Cc: stable at vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence at gmail.com>
Reviewed-by: Mina Almasry <almasrymina at google.com>
Link: https://patch.msgid.link/8e93a756a3b8fea2be7935d34e1b833fd98e40ea.1796301395.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe at kernel.dk>
Merge tag 'mediatek-drm-fixes-20261203' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes
Mediatek DRM Fixes - 20261203
1. mtk_hdmi: Set tz_disabled for mt8167
2. mtk_hdmi: Improve the secure output bit toggle
3. mtk_crtc: Look up connector routes in the CRTC's own mmsys
4. mtk_crtc: Skip the empty connector route slot in destroy
5. mtk_crtc: Pick the connector route on every CRTC enable
6. dsi: Fix handling of long packet reads
7. Keep the mutex node reference across deferred binds
8. Validate gamma_lut size
9. mtk_dsi: do not enable HS clock in pre-enable for LPM panels
10. dsi: Don't let a signal cut the IRQ wait short
11. dp: Unregister child devices on probe failure
12. mtk_hdmi_common: Fix clock reference leaks
13. Initialize ret in mtk_drm_of_ddp_path_build()
14. dsi: return tx_len for write transfers in mtk_dsi_host_transfer()
15. ovl: Report coverage blending on older SoCs
[5 lines not shown]
Merge tag 'platform-drivers-x86-v7.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Ilpo Järvinen:
- Allow wmi module to load on arm64 DT system that have ACPI disabled
- Two MAINTAINERS updates
* tag 'platform-drivers-x86-v7.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
MAINTAINERS: Add Ahmed Yaseen as co-maintainer for ASUS notebooks
MAINTAINERS: Update Intel SCU driver maintainer
platform/wmi: Allow wmi module to load when acpi_disabled is set
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fix from Catalin Marinas:
- Fix an LLD "does not converge" link error by avoiding a wrap-around
in SPAN_NR_ENTRIES()
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: Fix transient negative image size observed by the linker
io_uring/cancel: arm local work wakeups only for submitter
io_uring_try_cancel_requests() arms cq_wait_nr on every DEFER_TASKRUN
ring it visits, so that io_req_local_work_add() wakes the caller. The
wakeup goes to submitter_task, which need not be the caller. A
cancelling task can visit a ring whose local work belongs to another
task, and ring release and io_ring_exit_work() call in as well.
A cancelling task can also visit a ring that is still disabled, where
submitter_task is NULL. A later ZCRX event then passes it to
wake_up_state():
BUG: kernel NULL pointer dereference, address: 00000000000008e4
RIP: 0010:_raw_spin_lock_irqsave+0x1b/0x50
Call Trace:
try_to_wake_up+0x51/0x790
io_req_local_work_add+0xbb/0x1b0
zcrx_send_notif+0xf9/0x120
[32 lines not shown]