Merge tag 'staging-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver removal from Greg KH:
"Here is a single staging driver patch that removes the vme_user
driver.
There is no more users of it and the LLMs are falling all over
themselves attempting to find all of the "security bugs" in this
driver, despite no one ever actually use it. So just remove it to
keep from wasting everyone's time.
This removal has been in linux-next for quite a while with no
reported issues"
* tag 'staging-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: vme_user: delete driver
Merge tag 'usb-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB / Thunderbolt fixes from Greg KH:
"Here are a bunch of small USB and Thunderbolt driver fixes for
reported issues. Most of these are for gadget driver issues that
people have reported a while ago, it just took me a bit to catch up
with the pending patch submissions. Fixes in here include:
- small thunderbolt driver fixes for some minor issues
- lots of small usb gadget fixes, from users having problems,
syzbot-found issues, or llm-found problems, all with reproducers
- typec driver fixes
- dwc3 driver fixes
- dwc2 driver fixes
[34 lines not shown]
Merge tag 'ata-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux
Pull ata fix from Niklas Cassel:
- Quirk the ADATA SU650 SSD with NOLPM due to its defective link
power management (me)
* tag 'ata-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
ata: libata-core: Disable LPM on ADATA SU650 with firmware XD0R3C0F
Merge tag 'gpio-fixes-for-v7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski:
"GPIO core fixes:
- fix several logic & locking issues and resource leaks in GPIO
character device code
- fix GPIO hogging for controllers using the three-cell binding
- fix inverted trace values in gpiod_get_array_value()
- remove shared GPIO proxies before freeing interrupts that are still
requested by the parent controller and fix a race in remove path
- fix UAF bugs around the GPIO label cleanup
GPIO driver fixes:
- fix a use-after-free bug in gpio-davinci
- fix an issue in gpio-davinci where the driver could setup an IRQ
for a wrong controller
- validate the number of GPIOs in gpio-mvebu
- use correct registers in suspend/resume in gpio-mvebu
- fix non-kerneldoc comment in nsc-gpio header
[36 lines not shown]
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Catalin Marinas:
"Mostly missing barriers and break-before-make in kernel page table
updates (fixmap, early ID map, KPTI) plus a livepatch fix for late PLT
writes to read-only module text:
- Fix missing barriers and break-before-make in kernel page table
updates: ISBs after mapping the FDT in the initial ID map and after
remapping the KPTI page-table slot; non-deferred barriers for
fixmap entries in lazy MMU mode; break-before-make when overwriting
a valid fixmap entry
- Route late (livepatch) PLT and ADRP veneer writes through the
text-poke API as the module's .plt section is read-only by then"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: fixmap: fix missing break-before-make in __set_fixmap()
arm64: module: Use text-poke for late PLT/veneer emission
[3 lines not shown]
Merge tag 's390-7.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Alexander Gordeev:
- Fix the cert_store code keyring locking, lifetime handling, missing
error and return code checks, several reference leaks and potential
use-after-free issues caused by unbalanced keyring reference counting
- Look up the cert_store keyring only in the user session keyring. As
result a foreign keyring named "cert_store", which a task may have
inherited, is no longer destroyed during refresh
- Fix out-of-bounds reads in hash validation and in Verification
Certificate Entry (VCE) debug output, avoid copying uninitialized
DIAG 320 data to the debug area, and print the correct value of
max_vcxe_length
- Allocate the cert_store keyring with a link restriction, so that
arbitrary keys cannot be linked into it
[23 lines not shown]
Merge tag 'mm-core-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/core
Pull core MM fixes from David Hildenbrand:
"Two hotfixes and a bunch of fixes for other nasty issues we found that
I want to have fixed sooner rather than later. All got a couple of
days in -next after proper review, which is why I am rather late this
week.
- Fix deadlocks on the folio lock when splitting folios and when
migrating folios, triggerable by unprivileged users
- Fix lost writes and stale reads due to stale TLB entries with
delayed rmap handling on UP, when zapping dirty file PMDs, when
installing CoW'ed folios, and when reclaim does not write back a
dirty folio
- Fix various MADV_FREE issues that can lead to data loss or exposure
of stale swap content
[28 lines not shown]
Merge tag 'keys-v7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd
Pull keys fixes from Jarkko Sakkinen:
- Trusted keys: initialize backend static calls before ->init(),
synchronize TEE session lifetime against device removal (and disable
sysfs bind/unbind), and propagate CAAM option parsing errors.
- keyctl_pkey: fix user buffer bounds in keyctl_pkey_e_d_s() and
keyctl_pkey_verify(), and zero temporary buffers with
kfree_sensitive().
- Key instantiation: take key->sem during instantiation and rejection
to serialize key->user access against keyctl_chown_key().
- big_key: instantiate the new payload before destroying the old one in
big_key_update() so -EDQUOT cannot leave a positive key with a
cleared payload.
[10 lines not shown]
Merge tag 'usb-serial-7.4-rc5' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes:
USB serial fixes for 7.4-rc5
Here are couple of fixes for long-standing issues that could cause
trouble, for example, when open() races with disconnect.
Both have been in linux-next with no reported issues.
* tag 'usb-serial-7.4-rc5' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
USB: serial: f81232: drain work on failed open
USB: serial: mct_u232: fix NULL-deref on open() failure
Merge tag 'net-7.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni:
"Including fixes from WiFi, Bluetooth and CAN.
Current release - regressions:
- eth: mlx5e: TC, fix a NULL pointer write in the peer flow error path
Current release - new code bugs:
- xfrm: interface: drop non-IP packets before pskb_inet_may_pull()
- eth: b53: use the correct override register 2 Gbps bit
Previous releases - regressions:
- core:
- do not run out of frags in alloc_skb_with_frags()
[78 lines not shown]
Merge tag 'ext4_for-linus-7.4-rc5-postmerge' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 fixes from Ted Ts'o:
"Fix the KUnit ext4_xattr_test by adding missing stub registration
after the recent merge into mainline.
Also address two teset failures that weren't noticed in my original
pre-PR testing.
- Fix the ext4_inode_test when CONFIG_USER_NS is enabled
- Fix generic/311 failure for ext4 with the fast_commit and
inline_data features are enabled"
* tag 'ext4_for-linus-7.4-rc5-postmerge' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: don't track metadata buffers on an inode during fast commit replay
ext4: set s_user_ns in the KUnit tests' fake superblocks
ext4: stub ext4_sb_find_get_block_nonatomic() in the inode KUnit tests
sched/wait: kill leftover bookmark logic in __wake_up_common()
The manual list head check and list_for_each_entry_safe_from() in
__wake_up_common() are leftovers from commit 2554db916586 ("sched/wait:
Break up long wake list walk").
This logic was later removed by commit 37acade0ce89 ("sched: remove
wait bookmarks") but the now-unnecessary list hacks were left behind.
Signed-off-by: Oleg Nesterov <oleg at redhat.com>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
sctp: don't let a blocked reader take write-space wakeups
sctp_wait_for_packet() waits exclusively on sk_sleep() with the default
autoremove wake function, so it accepts any wakeup and consumes it.
Then __sctp_write_space() sends EPOLLOUT with a wake-one wakeup:
sctp_wait_for_packet() wakes up, finds no data, goes back to sleep, and
the walk stops.
End result: anybody else queued behind it that was waiting for EPOLLOUT
will never see it.
Filter on EPOLLIN | EPOLLERR like receiver_wake_function() in
net/core/datagram.c. State changes (using sock_def_wakeup()) use an
unkeyed wake-all and still get through and will ignore the exclusive
nature of sctp_wait_for_packet().
Cc: Oleg Nesterov <oleg at redhat.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
[5 lines not shown]
Merge tag 'linux-can-fixes-for-7.4-20261124' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
Marc Kleine-Budde says:
====================
pull-request: can 2026-11-24
this is a pull request of 12 patches for net/main.
The first 7 patches are by Oliver Hartkopp and avoid RTNL stalls in
CAN_RAW, CAN_ISOTP and CAN_BCM protocols and fix CAN_ISOTP issues.
Followed by 3 patches are by Zhu Ling that fix problems with the CAN
netlink handling.
A patch by my fixes a kernel memory information leak over USB in the
gs_usb driver.
Uwe Kleine-König contributes a patch to the flexcan driver to fix
[22 lines not shown]
gpio: mvebu: fix Armada XP per-CPU mask register save/restore
The Armada XP variant keeps the per-CPU edge/level mask registers in a
second I/O window (percpu_regs) rather than in the main GPIO window.
The suspend and resume paths however read and wrote them through
mvchip->regs with the per-CPU offsets, which hits unrelated registers
in the main window (including the global GPIO_EDGE_MASK /
GPIO_LEVEL_MASK registers) instead. The per-CPU mask state was
therefore never saved or restored, so interrupts the kernel had
unmasked could stay masked after resume, while the main window was
written with per-CPU mask values.
Use mvchip->percpu_regs for the Armada XP per-CPU mask registers in
both the suspend save and the resume restore paths, matching the
mask/unmask handlers and the probe-time masking.
Fixes: b5b7b487431b ("gpio: mvebu: add suspend/resume support")
Cc: stable at vger.kernel.org
Signed-off-by: Rosen Penev <rosenp at gmail.com>
[3 lines not shown]
udp: only quit inuse scan early on identical SO_REUSEPORT sockets
Commit df560056d960 ("udp: inuse checks can quit early for reuseport")
optimized udp_lib_lport_inuse() and udp_lib_lport_inuse2() to return 0
immediately upon encountering the first same-UID SO_REUSEPORT socket
that matches under wildcard conflict rules.
However, a socket that matches under wildcard rules (or shares only a
relaxed subset of bind attributes) does not guarantee that the remaining
sockets in hslot->head or hslot2->head are conflict-free for the new
socket. Because IPv4 UDP sockets prepend to the head of the hash chain,
an unprivileged local user can bind a non-conflicting SO_REUSEPORT
socket (e.g., 127.0.0.2:PORT) ahead of another user's exclusive
127.0.0.1:PORT UDP listener, then bind 0.0.0.0:PORT (returning early on
127.0.0.2:PORT without reaching the exclusive listener), and finally
bind 127.0.0.1:PORT at the head of hslot2->head to intercept cross-UID
UDP datagrams.
Only take the O(1) early exit when sk and sk2 share the exact same
[19 lines not shown]
gpio: mvebu: validate ngpios before use
If ngpios is read as 0 from device tree, it is passed via
irq_alloc_domain_generic_chips() as irqs_per_chip, which leads to a
division by zero in DIV_ROUND_UP(d->revmap_size, irqs_per_chip).
Reject ngpios == 0 early.
Also reject higher than 32, which is the limit.
Fixes: fefe7b0923459 ("gpio: introduce gpio-mvebu driver for Marvell SoCs")
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://patch.msgid.link/20261126002650.603321-1-rosenp@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
gpiolib: use the of_xlate() result when hogging lines
Since commit d1d564ec4992 ("gpio: move hogs into GPIO core"),
gpiochip_add_hog() takes the hogged line from the first cell of the
"gpios" property. The of_xlate() callback is still called for OF nodes
but only to get the flags so on controllers that compute the offset in
of_xlate() (sunxi, Qualcomm PMIC GPIOs, tegra186, ...) the wrong line is
hogged.
Use the descriptor returned by of_xlate() for OF nodes.
Cc: stable at vger.kernel.org
Fixes: d1d564ec4992 ("gpio: move hogs into GPIO core")
Reported-by: Norman Herms <dockseed at proton.me>
Closes: https://lore.kernel.org/all/qh4LV99kGaQYdQuGbsPX4b9Fm6Cip_Ow7ImY4icfwI8IsbMQy_09FovZY82b-_HVkDmR2ELMlKe8bzCuBB5NpaZizoO-s4tc11zAX30FDhw=@proton.me/
Reviewed-by: Mika Westerberg <westeri at kernel.org>
Reviewed-by: Linus Walleij <linusw at kernel.org>
Tested-by: Norman Herms <dockseed at proton.me>
Link: https://patch.msgid.link/20261125-gpio-three-cell-hog-v1-1-724b15c4f0d8@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
gpio: aspeed: Fix potential coprocessor bank map leak
The coprocessor bank map is allocated lazily but is never freed when
the GPIO controller is removed. Its only owner is the device-managed
GPIO private data.
Allocate the map with the controller's managed resources before
registering the GPIO chip, so chip removal finishes before the map
is freed. Round up the bank count to cover a partial last bank.
This issue was found by our static analysis tool under development.
Fixes: a7ca13826e47 ("gpio: aspeed: Add interfaces for co-processor to grab GPIOs")
Cc: stable at vger.kernel.org
Signed-off-by: Guangshuo Li <liguangshuo at mail.sdu.edu.cn>
Link: https://patch.msgid.link/20261124135833.2275409-1-liguangshuo@mail.sdu.edu.cn
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
gpio: davinci: allocate bank IRQ data before installing handlers
If allocation fails partway through bank setup, previously installed
chained handlers still point at devm-managed data that is released when
probe fails. Allocate the complete bank-data array before installing the
first chained handler so an allocation failure leaves no handlers behind.
This fixes the probe-failure path; it does not change ordinary device
removal.
Fixes: b5cf3fd827d2 ("gpio: davinci: Redesign driver to accommodate ngpios in one gpio chip")
Reviewed-by: Linus Walleij <linusw at kernel.org>
Signed-off-by: Sahaj Chaudhari <sahaj123.sc at gmail.com>
Link: https://patch.msgid.link/20261124121500.2cd5cbf30f89-3-sahaj123.sc@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
gpio: davinci: use controller-specific MMIO for BINTEN
The file-global gpio_base can be overwritten when probes for multiple
DaVinci GPIO controllers overlap. The later IRQ setup can then write the
BINTEN register of a different controller.
Derive the BINTEN address from the current controller's mapped bank
instead of shared global state.
Fixes: 118150f22d6b ("gpio: davinci: move to platform device")
Reviewed-by: Linus Walleij <linusw at kernel.org>
Signed-off-by: Sahaj Chaudhari <sahaj123.sc at gmail.com>
Link: https://patch.msgid.link/20261124121500.2cd5cbf30f89-2-sahaj123.sc@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
net: dsa: tag_brcm: fix link-local detection with a prepended tag
brcm_tag_rcv_ll() checks eth_hdr(skb)->h_dest to avoid marking link-local
frames as forwarded by the switch. With a prepended tag, eth_type_trans()
sets the MAC header at the start of the tag, so the address checked is the
tag plus the first two bytes of the real destination address. Link-local
frames such as BPDUs, LLDP or EAPOL are then not recognized and get
skb->offload_fwd_mark set, which keeps the bridge from forwarding them in
software to the other ports of the switch when it is configured to do so.
Read the destination address after the tag instead when the tag is
prepended. Tags embedded after the source address are not affected.
Fixes: 762e7e174da9 ("net: dsa: tag_brcm: do not mark link local traffic as offloaded")
Signed-off-by: Florian Fainelli <florian.fainelli at broadcom.com>
Link: https://patch.msgid.link/20261118184004.1916105-1-florian.fainelli@broadcom.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
arm64: fixmap: fix missing break-before-make in __set_fixmap()
__set_fixmap() installs a new PTE with __set_pte() but never invalidates
the TLB; only the clear path calls flush_tlb_kernel_range(). The
dsb(ishst)/isb that __set_pte() emits makes the new PTE visible to the
table walker but does not invalidate stale TLB entries. Overwriting a
still-valid slot therefore leaves the old translation cached and
violates break-before-make: accesses may keep hitting the old output
address, and changing the attributes of a cached entry can trigger TLB
conflict aborts or CONSTRAINED UNPREDICTABLE behaviour.
Two in-tree callers overwrite a valid FIX_EARLYCON_MEM_BASE slot:
- earlycon: earlycon_map() maps the UART before match->setup() runs.
If setup fails, con->write is unset, or the DT reg-io-width is
unsupported, the slot stays valid but no console is registered. The
console_is_registered() guard only blocks successful registrations,
so a later attempt (e.g. a failed DT earlycon followed by earlycon=
on the command line) remaps the slot to a different UART.
[38 lines not shown]
Merge branch 'tg3-bug-fixes'
Pavan Chebbi says:
====================
tg3: Bug fixes
This patchset has 4 fixes. The first patch restores probe on 57766 when
the 31-bit coherent DMA mask cannot be set. The second patch makes NCSI
PLL lock on the TLP clock to fix WOL at 1G speed on 5720. The third
patch fixes ethtool -i display on 5719/5720 when NCSI component is
missing. The fourth one fixes a possible heap overflow in the NVRAM
write path.
v1: https://lore.kernel.org/all/20261108065526.710152-1-pavan.chebbi@broadcom.com/
====================
Link: https://patch.msgid.link/20261118105408.1076095-1-pavan.chebbi@broadcom.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
tg3: Skip management FW version when APE firmware is not ready
When the APE firmware is not present or not ready, for example when
the NCSI component is missing in the NVRAM, tg3_read_fw_ver() still
calls tg3_read_dash_ver() after tg3_probe_ncsi(). The signature and
ready checks that tg3_read_dash_ver() used to make were moved into
tg3_probe_ncsi(), which only sets the NCSI flag and does not stop the
caller. The driver then reads the APE firmware version register, which
holds no valid data in this state, and ethtool -i shows an invalid
"DASH" string with a garbage version.
Make tg3_probe_ncsi() return whether valid, ready APE firmware was
found, and read the version only in that case. Otherwise just report
the bootcode version.
This was seen by a user on BCM5719/BCM5720 with no NCSI component in
the NVRAM. With this change, ethtool -i displays only the bootcode
version.
[5 lines not shown]
tg3: Fix heap overflow in unbuffered NVRAM write path
tg3_nvram_write_block_unbuffered() reads a whole NVRAM page into a
buffer of pagesize bytes, copies the caller's data into it at page_off,
and writes the page back. The copy size was clamped to pagesize rather
than to the room left in the page, pagesize - page_off, so a write at an
offset that is not page aligned, as ETHTOOL_SEEPROM allows, copies past
the end of the buffer and corrupts the kernel heap.
Clamp size to pagesize - page_off. Also advance buf by size on each
iteration. Without this, a write that spans more than one page
programmed every page after the first with the data of the first page,
and a write that did not start on a page boundary lost the tail of the
data without reporting an error.
Reject an nvram_pagesize that is smaller than 4 or not a power of two.
The page mask is pagesize - 1, which is only a valid mask for a power
of two. A page size of 0, which tg3_get_nvram_info() leaves unset for
an unhandled flash vendor, also made the loop issue erase commands at
[13 lines not shown]
tg3: Don't fail probe if 31-bit coherent DMA mask is unsupported
Commit 614f4d166eee ("tg3: Set coherent DMA mask bits to 31 for
BCM57766 chipsets") lowered the coherent DMA mask to 31 bits as a
workaround for a spurious address overflow error in the hardware.
The result of dma_set_coherent_mask() is fatal to probe, so on
platforms that cannot satisfy such a mask the device fails to probe:
tg3 0000:01:00.0: Unable to obtain 64 bit DMA for consistent allocations
tg3 0000:01:00.0: probe with driver tg3 failed with error -5
This was reported on a Mac mini (Macmini6,2, BCM57766) running a
kernel built without CONFIG_ZONE_DMA and with IOMMU passthrough as
the default. Without CONFIG_ZONE_DMA, dma_direct_supported() only
accepts a mask narrower than 32 bits if it covers the highest
physical memory address, so with direct mapping a 31-bit coherent
mask is rejected whenever memory extends above 2GB.
Treat the 31-bit mask as best effort. If it is refused, warn and fall
[15 lines not shown]
Merge branch 'tls-don-t-hide-a-queued-keyupdate-from-poll'
Felipe Pereira Stival says:
====================
tls: don't hide a queued KeyUpdate from poll()
A kTLS reader that waits for a read event before each recv() can stall
after the peer sends a TLS 1.3 KeyUpdate. I ran into this while testing
a kTLS patch for Erlang/OTP.
Erlang does one recv() per read event, with level-triggered epoll.
When application data is followed by a KeyUpdate, one recv() can
decrypt both records, return the data without an error, and leave the
KeyUpdate queued. Because a rekey is now pending, poll() no longer
reports the socket as readable. Without another read event, the reader
never calls recv() again, never sees the -EIO for the KeyUpdate, and
never provides the new key.
[16 lines not shown]
selftests: tls: add a poll test for a queued KeyUpdate
Check that poll() reports a read event when a recv() for data has
decrypted and queued a KeyUpdate. Once the KeyUpdate has been read,
check that poll() doesn't report a record sent with the new key.
Signed-off-by: Felipe Pereira Stival <v0idpwn at gmail.com>
Reviewed-by: Simon Horman <horms at kernel.org>
Reviewed-by: Sabrina Dubroca <sd at queasysnail.net>
Link: https://patch.msgid.link/20261118-v0idpwn-tls-poll-parked-keyupdate-v1-2-8e25101e7be6@gmail.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>