5.10.248-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainerPATCH 428/451 NFS: Fix up the automount fs_context to use the correct cred
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit a2a8fc27dd668e7562b5326b5ed2f1604cb1e2e9 ]
When automounting, the fs_context should be fixed up to use the cred from the parent filesystem, since the operation is just extending the namespace. Authorisation to enter that namespace will already have been provided by the preceding lookup.
--- fs/nfs/namespace.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/nfs/namespace.c +5 -0
@@ -170,6 +170,11 @@ struct vfsmount *nfs_d_automount(struct path *path)if (!ctx->clone_data.fattr) goto out_fc; +if (fc->cred != server->cred) { +put_cred (fc->cred); + fc->cred =get_cred (server->cred); + } +if (fc->net_ns != client->cl_net) {put_net (fc->net_ns); fc->net_ns =get_net (client->cl_net);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 411/451 net: 3com: 3c59x: fix possible null dereference in vortex_probe1()
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Fourier <[email protected]>
commit a4e305ed60f7c41bbf9aabc16dd75267194e0de3 upstream.
pdev can be null and free_ring: can be called in 1297 with a null pdev.
--- drivers/net/ethernet/3com/3c59x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/3com/3c59x.c +1 -1
@@ -1471,7 +1471,7 @@ static int vortex_probe1(struct device *return 0 ; free_ring: -dma_free_coherent (&pdev->dev, +dma_free_coherent (gendev,sizeof (struct boom_rx_desc ) *RX_RING_SIZE +sizeof (struct boom_tx_desc ) *TX_RING_SIZE , vp->rx_ring, vp->rx_ring_dma);
Greg Kroah-Hartman
maintainerPATCH 429/451 scsi: ipr: Enable/disable IRQD_NO_BALANCING during reset
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wen Xiong <[email protected]>
[ Upstream commit 6ac3484fb13b2fc7f31cfc7f56093e7d0ce646a5 ]
A dynamic remove/add storage adapter test hits EEH on PowerPC:
EEH: [c00000000004f75c] __eeh_send_failure_event+0x7c/0x160
EEH: [c000000000048444] eeh_dev_check_failure.part.0+0x254/0x650
EEH: [c008000001650678] eeh_readl+0x60/0x90 [ipr]
EEH: [c00800000166746c] ipr_cancel_op+0x2b8/0x524 [ipr]
EEH: [c008000001656524] ipr_eh_abort+0x6c/0x130 [ipr]
EEH: [c000000000ab0d20] scmd_eh_abort_handler+0x140/0x440
EEH: [c00000000017e558] process_one_work+0x298/0x590
EEH: [c00000000017eef8] worker_thread+0xa8/0x620
EEH: [c00000000018be34] kthread+0x124/0x130
EEH: [c00000000000cd64] ret_from_kernel_thread+0x5c/0x64
A PCIe bus trace reveals that a vector of MSI-X is cleared to 0 by irqbalance daemon. If we disable irqbalance daemon, we won't see the issue.
With debug enabled in ipr driver:
[ 44.103071] ipr: Entering __ipr_remove [ 44.103083] ipr: Entering ipr_initiate_ioa_bringdown [ 44.103091] ipr: Entering ipr_reset_shutdown_ioa [ 44.103099] ipr: Leaving ipr_reset_shutdown_ioa [ 44.103105] ipr: Leaving ipr_initiate_ioa_bringdown [ 44.149918] ipr: Entering ipr_reset_ucode_download [ 44.149935] ipr: Entering ipr_reset_alert [ 44.150032] ipr: Entering ipr_reset_start_timer [ 44.150038] ipr: Leaving ipr_reset_alert [ 44.244343] scsi 1:2:3:0: alua: Detached [ 44.254300] ipr: Entering ipr_reset_start_bist [ 44.254320] ipr: Entering ipr_reset_start_timer [ 44.254325] ipr: Leaving ipr_reset_start_bist [ 44.364329] scsi 1:2:4:0: alua: Detached [ 45.134341] scsi 1:2:5:0: alua: Detached [ 45.860949] ipr: Entering ipr_reset_shutdown_ioa [ 45.860962] ipr: Leaving ipr_reset_shutdown_ioa [ 45.860966] ipr: Entering ipr_reset_alert [ 45.861028] ipr: Entering ipr_reset_start_timer [ 45.861035] ipr: Leaving ipr_reset_alert [ 45.964302] ipr: Entering ipr_reset_start_bist [ 45.964309] ipr: Entering ipr_reset_start_timer [ 45.964313] ipr: Leaving ipr_reset_start_bist [ 46.264301] ipr: Entering ipr_reset_bist_done [ 46.264309] ipr: Leaving ipr_reset_bist_done
During adapter reset, ipr device driver blocks config space access but can't block MMIO access for MSI-X entries. There is very small window:
irqbalance daemon kicks in during adapter reset before ipr driver calls pci_restore_state(pdev) to restore MSI-X table.
irqbalance daemon reads back all 0 for that MSI-X vector in __pci_read_msi_msg().
irqbalance daemon:
msi_domain_set_affinity()
->irq_chip_set_affinity_patent()
->xive_irq_set_affinity()
->irq_chip_compose_msi_msg()
->pseries_msi_compose_msg()
->__pci_read_msi_msg(): read all 0 since didn't call pci_restore_state
->irq_chip_write_msi_msg()
-> pci_write_msg_msi(): write 0 to the msix vector entryWhen ipr driver calls pci_restore_state(pdev) in ipr_reset_restore_cfg_space(), the MSI-X vector entry has been cleared by irqbalance daemon in pci_write_msg_msix().
pci_restore_state()
->__pci_restore_msix_state()
Below is the MSI-X table for ipr adapter after irqbalance daemon kicked in during adapter reset:
Dump MSIx table: index=0 address_lo=c800 address_hi=10000000 msg_data=0 Dump MSIx table: index=1 address_lo=c810 address_hi=10000000 msg_data=0 Dump MSIx table: index=2 address_lo=c820 address_hi=10000000 msg_data=0 Dump MSIx table: index=3 address_lo=c830 address_hi=10000000 msg_data=0 Dump MSIx table: index=4 address_lo=c840 address_hi=10000000 msg_data=0 Dump MSIx table: index=5 address_lo=c850 address_hi=10000000 msg_data=0 Dump MSIx table: index=6 address_lo=c860 address_hi=10000000 msg_data=0 Dump MSIx table: index=7 address_lo=c870 address_hi=10000000 msg_data=0 Dump MSIx table: index=8 address_lo=0 address_hi=0 msg_data=0 ---------> Hit EEH since msix vector of index=8 are 0
Dump MSIx table: index=9 address_lo=c890 address_hi=10000000 msg_data=0 Dump MSIx table: index=10 address_lo=c8a0 address_hi=10000000 msg_data=0 Dump MSIx table: index=11 address_lo=c8b0 address_hi=10000000 msg_data=0 Dump MSIx table: index=12 address_lo=c8c0 address_hi=10000000 msg_data=0 Dump MSIx table: index=13 address_lo=c8d0 address_hi=10000000 msg_data=0 Dump MSIx table: index=14 address_lo=c8e0 address_hi=10000000 msg_data=0 Dump MSIx table: index=15 address_lo=c8f0 address_hi=10000000 msg_data=0
[ 46.264312] ipr: Entering ipr_reset_restore_cfg_space [ 46.267439] ipr: Entering ipr_fail_all_ops [ 46.267447] ipr: Leaving ipr_fail_all_ops [ 46.267451] ipr: Leaving ipr_reset_restore_cfg_space [ 46.267454] ipr: Entering ipr_ioa_bringdown_done [ 46.267458] ipr: Leaving ipr_ioa_bringdown_done [ 46.267467] ipr: Entering ipr_worker_thread [ 46.267470] ipr: Leaving ipr_worker_thread
IRQ balancing is not required during adapter reset.
Enable "IRQ_NO_BALANCING" flag before starting adapter reset and disable it after calling pci_restore_state(). The irqbalance daemon is disabled for this short period of time (~2s).
--- drivers/scsi/ipr.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
drivers/scsi/ipr.c +27 -1
@@ -62,8 +62,8 @@#include <linux/hdreg.h> #include <linux/reboot.h> #include <linux/stringify.h> +#include <linux/irq.h> #include <asm/io.h> -#include <asm/irq.h> #include <asm/processor.h> #include <scsi/scsi.h> #include <scsi/scsi_host.h>
@@ -8665,6 +8665,30 @@ static int ipr_dump_mailbox_wait(struct ipr_cmnd *ipr_cmd)return IPR_RC_JOB_RETURN ; } +/** +* ipr_set_affinity_nobalance +* @ioa_cfg: ipr_ioa_cfg struct for an ipr device +* @flag: bool +* true: ensable "IRQ_NO_BALANCING" bit for msix interrupt +* false: disable "IRQ_NO_BALANCING" bit for msix interrupt +* Description: This function will be called to disable/enable +* "IRQ_NO_BALANCING" to avoid irqbalance daemon +* kicking in during adapter reset. +**/ +static void ipr_set_affinity_nobalance (struct ipr_ioa_cfg *ioa_cfg,bool flag) +{ +int irq, i; + +for (i =0 ; i < ioa_cfg->nvectors; i++) { + irq =pci_irq_vector (ioa_cfg->pdev, i); + +if (flag) +irq_set_status_flags (irq,IRQ_NO_BALANCING ); +else +irq_clear_status_flags (irq,IRQ_NO_BALANCING ); + } +} +/** * ipr_reset_restore_cfg_space - Restore PCI config space. * @ipr_cmd: ipr command struct
@@ -8689,6 +8713,7 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)return IPR_RC_JOB_CONTINUE ; } +ipr_set_affinity_nobalance (ioa_cfg, false);ipr_fail_all_ops (ioa_cfg);if (ioa_cfg->sis64) {
@@ -8768,6 +8793,7 @@ static int ipr_reset_start_bist(struct ipr_cmnd *ipr_cmd) rc =pci_write_config_byte (ioa_cfg->pdev,PCI_BIST ,PCI_BIST_START );if (rc ==PCIBIOS_SUCCESSFUL ) { +ipr_set_affinity_nobalance (ioa_cfg, true); ipr_cmd->job_step = ipr_reset_bist_done;ipr_reset_start_timer (ipr_cmd,IPR_WAIT_FOR_BIST_TIMEOUT ); rc =IPR_RC_JOB_RETURN ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 430/451 scsi: Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed"
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xingui Yang <[email protected]>
[ Upstream commit 278712d20bc8ec29d1ad6ef9bdae9000ef2c220c ]
This reverts commit ab2068a6fb84751836a84c26ca72b3beb349619d.
When probing the exp-attached sata device, libsas/libata will issue a hard reset in sas_probe_sata() -> ata_sas_async_probe(), then a broadcast event will be received after the disk probe fails, and this commit causes the probe will be re-executed on the disk, and a faulty disk may get into an indefinite loop of probe.
Therefore, revert this commit, although it can fix some temporary issues with disk probe failure.
--- drivers/scsi/libsas/sas_internal.h | 14 -------------- 1 file changed, 14 deletions(-)
drivers/scsi/libsas/sas_internal.h +0 -14
@@ -114,20 +114,6 @@ static inline void sas_fail_probe(struct domain_device *dev, const char *func, i func, dev->parent ?"exp-attached" :"direct-attached" , SAS_ADDR(dev->sas_addr), err); - -/* -* If the device probe failed, the expander phy attached address -* needs to be reset so that the phy will not be treated as flutter -* in the next revalidation -*/ -if (dev->parent && !dev_is_expander (dev->dev_type)) { -struct sas_phy *phy = dev->phy; -struct domain_device *parent = dev->parent; -struct ex_phy *ex_phy = &parent->ex_dev.ex_phy[phy->number]; - -memset (ex_phy->attached_sas_addr,0 ,SAS_ADDR_SIZE ); - } -sas_unregister_dev (dev->port, dev); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 431/451 ARM: dts: imx6q-ba16: fix RTC interrupt level
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Ray <[email protected]>
[ Upstream commit e6a4eedd49ce27c16a80506c66a04707e0ee0116 ]
RTC interrupt level should be set to "LOW". This was revealed by the introduction of commit:
f181987ef477 ("rtc: m41t80: use IRQ flags obtained from fwnode")
which changed the way IRQ type is obtained.
--- arch/arm/boot/dts/imx6q-ba16.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6q-ba16.dtsi +1 -1
@@ -320,7 +320,7 @@ rtc@32 { pinctrl-0 = <&pinctrl_rtc>; reg = <0x32>; interrupt-parent = <&gpio4>; - interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <10 IRQ_TYPE_LEVEL_LOW>; }; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 432/451 netfilter: nft_synproxy: avoid possible data-race on update operation
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fernando Fernandez Mancera <[email protected]>
[ Upstream commit 36a3200575642846a96436d503d46544533bb943 ]
During nft_synproxy eval we are reading nf_synproxy_info struct which can be modified on update operation concurrently. As nf_synproxy_info struct fits in 32 bits, use READ_ONCE/WRITE_ONCE annotations.
--- net/netfilter/nft_synproxy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/netfilter/nft_synproxy.c +3 -3
@@ -48,7 +48,7 @@ static void nft_synproxy_eval_v4(const struct nft_synproxy *priv,struct tcphdr *_tcph, struct synproxy_options *opts) { - struct nf_synproxy_info info = priv->info; + struct nf_synproxy_info info = READ_ONCE(priv->info);struct net *net =nft_net (pkt);struct synproxy_net *snet =synproxy_pernet (net);struct sk_buff *skb = pkt->skb;
@@ -79,7 +79,7 @@ static void nft_synproxy_eval_v6(const struct nft_synproxy *priv,struct tcphdr *_tcph, struct synproxy_options *opts) { - struct nf_synproxy_info info = priv->info; + struct nf_synproxy_info info = READ_ONCE(priv->info);struct net *net =nft_net (pkt);struct synproxy_net *snet =synproxy_pernet (net);struct sk_buff *skb = pkt->skb;
@@ -339,7 +339,7 @@ static void nft_synproxy_obj_update(struct nft_object *obj,struct nft_synproxy *newpriv =nft_obj_data (newobj);struct nft_synproxy *priv =nft_obj_data (obj); - priv->info = newpriv->info; +WRITE_ONCE (priv->info, newpriv->info); }static struct nft_object_type nft_synproxy_obj_type;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 433/451 netfilter: nf_conncount: update last_gc only when GC has been performed
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fernando Fernandez Mancera <[email protected]>
[ Upstream commit 7811ba452402d58628e68faedf38745b3d485e3c ]
Currently last_gc is being updated everytime a new connection is tracked, that means that it is updated even if a GC wasn't performed. With a sufficiently high packet rate, it is possible to always bypass the GC, causing the list to grow infinitely.
Update the last_gc value only when a GC has been actually performed.
--- net/netfilter/nf_conncount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_conncount.c +1 -1
@@ -229,6 +229,7 @@ static int __nf_conncount_add(struct net *net,nf_ct_put (found_ct); } + list->last_gc = (u32 )jiffies; add_new_node:if (WARN_ON_ONCE (list->count >INT_MAX )) {
@@ -248,7 +249,6 @@ static int __nf_conncount_add(struct net *net, conn->jiffies32 = (u32 )jiffies;list_add_tail (&conn->node, &list->head); list->count++; - list->last_gc = (u32 )jiffies; out_put:if (refcounted)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 434/451 bridge: fix C-VLAN preservation in 802.1ad vlan_tunnel egress
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandre Knecht <[email protected]>
[ Upstream commit 3128df6be147768fe536986fbb85db1d37806a9f ]
When using an 802.1ad bridge with vlan_tunnel, the C-VLAN tag is incorrectly stripped from frames during egress processing.
br_handle_egress_vlan_tunnel() uses skb_vlan_pop() to remove the S-VLAN from hwaccel before VXLAN encapsulation. However, skb_vlan_pop() also moves any "next" VLAN from the payload into hwaccel:
/* move next vlan tag to hw accel tag */
__skb_vlan_pop(skb, &vlan_tci);
__vlan_hwaccel_put_tag(skb, vlan_proto, vlan_tci);For QinQ frames where the C-VLAN sits in the payload, this moves it to hwaccel where it gets lost during VXLAN encapsulation.
Fix by calling __vlan_hwaccel_clear_tag() directly, which clears only the hwaccel S-VLAN and leaves the payload untouched.
This path is only taken when vlan_tunnel is enabled and tunnel_info is configured, so 802.1Q bridges are unaffected.
Tested with 802.1ad bridge + VXLAN vlan_tunnel, verified C-VLAN preserved in VXLAN payload via tcpdump.
--- net/bridge/br_vlan_tunnel.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
net/bridge/br_vlan_tunnel.c +7 -4
@@ -189,7 +189,6 @@ int br_handle_egress_vlan_tunnel(struct sk_buff *skb, {struct metadata_dst *tunnel_dst;__be64 tunnel_id; -int err;if (!vlan)return 0 ;
@@ -199,9 +198,13 @@ int br_handle_egress_vlan_tunnel(struct sk_buff *skb,return 0 ;skb_dst_drop (skb); - err =skb_vlan_pop (skb); -if (err) -return err; +/* For 802.1ad (QinQ), skb_vlan_pop() incorrectly moves the C-VLAN +* from payload to hwaccel after clearing S-VLAN. We only need to +* clear the hwaccel S-VLAN; the C-VLAN must stay in payload for +* correct VXLAN encapsulation. This is also correct for 802.1Q +* where no C-VLAN exists in payload. +*/ +__vlan_hwaccel_clear_tag (skb); tunnel_dst =rcu_dereference (vlan->tinfo.tunnel_dst);if (tunnel_dst &&dst_hold_safe (&tunnel_dst->dst))
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 435/451 inet: ping: Fix icmp out counting
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: yuan.gao <[email protected]>
[ Upstream commit 4c0856c225b39b1def6c9a6bc56faca79550da13 ]
When the ping program uses an IPPROTO_ICMP socket to send ICMP_ECHO messages, ICMP_MIB_OUTMSGS is counted twice.
ping_v4_sendmsg
ping_v4_push_pending_frames
ip_push_pending_frames
ip_finish_skb
__ip_make_skb
icmp_out_count(net, icmp_type); // first count
icmp_out_count(sock_net(sk), user_icmph.type); // second count
However, when the ping program uses an IPPROTO_RAW socket, ICMP_MIB_OUTMSGS is counted correctly only once.
Therefore, the first count should be removed.
--- net/ipv4/ping.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
net/ipv4/ping.c +1 -3
@@ -842,10 +842,8 @@ static int ping_v4_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) out_free:if (free)kfree (ipc.opt); -if (!err) { -icmp_out_count (sock_net (sk), user_icmph.type); +if (!err)return len; - }return err; do_confirm:
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 436/451 net: sock: fix hardened usercopy panic in sock_recv_errqueue
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Weiming Shi <[email protected]>
[ Upstream commit 2a71a1a8d0ed718b1c7a9ac61f07e5755c47ae20 ]
skbuff_fclone_cache was created without defining a usercopy region,
[1] unlike skbuff_head_cache which properly whitelists the cb[] field.
[2] This causes a usercopy BUG() when CONFIG_HARDENED_USERCOPY is enabled and the kernel attempts to copy sk_buff.cb data to userspace via sock_recv_errqueue() -> put_cmsg().
The crash occurs when: 1. TCP allocates an skb using alloc_skb_fclone()
(from skbuff_fclone_cache) [1]
2. The skb is cloned via skb_clone() using the pre-allocated fclone
[3] 3. The cloned skb is queued to sk_error_queue for timestamp reporting 4. Userspace reads the error queue via recvmsg(MSG_ERRQUEUE)
5. sock_recv_errqueue() calls put_cmsg() to copy serr->ee from skb->cb
[4] 6. __check_heap_object() fails because skbuff_fclone_cache has no usercopy whitelist [5]
When cloned skbs allocated from skbuff_fclone_cache are used in the socket error queue, accessing the sock_exterr_skb structure in skb->cb via put_cmsg() triggers a usercopy hardening violation:
[ 5.379589] usercopy: Kernel memory exposure attempt detected from SLUB object 'skbuff_fclone_cache' (offset 296, size 16)! [ 5.382796] kernel BUG at mm/usercopy.c:102! [ 5.383923] Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI [ 5.384903] CPU: 1 UID: 0 PID: 138 Comm: poc_put_cmsg Not tainted 6.12.57 #7 [ 5.384903] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 5.384903] RIP: 0010:usercopy_abort+0x6c/0x80 [ 5.384903] Code: 1a 86 51 48 c7 c2 40 15 1a 86 41 52 48 c7 c7 c0 15 1a 86 48 0f 45 d6 48 c7 c6 80 15 1a 86 48 89 c1 49 0f 45 f3 e8 84 27 88 ff <0f> 0b 490 [ 5.384903] RSP: 0018:ffffc900006f77a8 EFLAGS: 00010246 [ 5.384903] RAX: 000000000000006f RBX: ffff88800f0ad2a8 RCX: 1ffffffff0f72e74 [ 5.384903] RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffffff87b973a0 [ 5.384903] RBP: 0000000000000010 R08: 0000000000000000 R09: fffffbfff0f72e74 [ 5.384903] R10: 0000000000000003 R11: 79706f6372657375 R12: 0000000000000001 [ 5.384903] R13: ffff88800f0ad2b8 R14: ffffea00003c2b40 R15: ffffea00003c2b00 [ 5.384903] FS: 0000000011bc4380(0000) GS:ffff8880bf100000(0000) knlGS:0000000000000000 [ 5.384903] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5.384903] CR2: 000056aa3b8e5fe4 CR3: 000000000ea26004 CR4: 0000000000770ef0 [ 5.384903] PKRU: 55555554 [ 5.384903] Call Trace: [ 5.384903] <TASK> [ 5.384903] __check_heap_object+0x9a/0xd0 [ 5.384903] __check_object_size+0x46c/0x690 [ 5.384903] put_cmsg+0x129/0x5e0 [ 5.384903] sock_recv_errqueue+0x22f/0x380 [ 5.384903] tls_sw_recvmsg+0x7ed/0x1960 [ 5.384903] ? srso_alias_return_thunk+0x5/0xfbef5 [ 5.384903] ? schedule+0x6d/0x270 [ 5.384903] ? srso_alias_return_thunk+0x5/0xfbef5 [ 5.384903] ? mutex_unlock+0x81/0xd0 [ 5.384903] ? __pfx_mutex_unlock+0x10/0x10 [ 5.384903] ? __pfx_tls_sw_recvmsg+0x10/0x10 [ 5.384903] ? _raw_spin_lock_irqsave+0x8f/0xf0 [ 5.384903] ? _raw_read_unlock_irqrestore+0x20/0x40 [ 5.384903] ? srso_alias_return_thunk+0x5/0xfbef5
The crash offset 296 corresponds to skb2->cb within skbuff_fclones:
- sizeof(struct sk_buff) = 232 - offsetof(struct sk_buff, cb) = 40 - offset of skb2.cb in fclones = 232 + 40 = 272 - crash offset 296 = 272 + 24 (inside sock_exterr_skb.ee)
This patch uses a local stack variable as a bounce buffer to avoid the hardened usercopy check failure.
[1] https://elixir.bootlin.com/linux/v6.12.62/source/net/ipv4/tcp.c#L885
[2] https://elixir.bootlin.com/linux/v6.12.62/source/net/core/skbuff.c#L5104
[3] https://elixir.bootlin.com/linux/v6.12.62/source/net/core/skbuff.c#L5566
[4] https://elixir.bootlin.com/linux/v6.12.62/source/net/core/skbuff.c#L5491
[5] https://elixir.bootlin.com/linux/v6.12.62/source/mm/slub.c#L5719
--- net/core/sock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
net/core/sock.c +4 -3
@@ -3226,7 +3226,7 @@ void sock_enable_timestamp(struct sock *sk, enum sock_flags flag)int sock_recv_errqueue (struct sock *sk,struct msghdr *msg,int len,int level,int type) { -struct sock_exterr_skb *serr; +struct sock_extended_err ee;struct sk_buff *skb;int copied, err;
@@ -3246,8 +3246,9 @@ int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,sock_recv_timestamp (msg, sk, skb); - serr =SKB_EXT_ERR (skb); -put_cmsg (msg, level, type,sizeof (serr->ee), &serr->ee); +/* We must use a bounce buffer for CONFIG_HARDENED_USERCOPY=y */ + ee =SKB_EXT_ERR (skb)->ee; +put_cmsg (msg, level, type,sizeof (ee), &ee); msg->msg_flags |=MSG_ERRQUEUE ; err = copied;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 437/451 netdev: preserve NETIF_F_ALL_FOR_ALL across TSO updates
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Di Zhu <[email protected]>
[ Upstream commit 02d1e1a3f9239cdb3ecf2c6d365fb959d1bf39df ]
Directly increment the TSO features incurs a side effect: it will also directly clear the flags in NETIF_F_ALL_FOR_ALL on the master device, which can cause issues such as the inability to enable the nocache copy feature on the bonding driver.
The fix is to include NETIF_F_ALL_FOR_ALL in the update mask, thereby preventing it from being cleared.
--- include/linux/netdevice.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/netdevice.h +2 -1
@@ -4894,7 +4894,8 @@ netdev_features_t netdev_increment_features(netdev_features_t all,static inline netdev_features_t netdev_add_tso_features (netdev_features_t features,netdev_features_t mask) { -return netdev_increment_features (features,NETIF_F_ALL_TSO , mask); +return netdev_increment_features (features,NETIF_F_ALL_TSO | +NETIF_F_ALL_FOR_ALL , mask); }int __netdev_update_features (struct net_device *dev);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 438/451 net/mlx5e: Dont print error message due to invalid module
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gal Pressman <[email protected]>
[ Upstream commit 144297e2a24e3e54aee1180ec21120ea38822b97 ]
Dumping module EEPROM on newer modules is supported through the netlink interface only.
Querying with old userspace ethtool (or other tools, such as 'lshw') which still uses the ioctl interface results in an error message that could flood dmesg (in addition to the expected error return value). The original message was added under the assumption that the driver should be able to handle all module types, but now that such flows are easily triggered from userspace, it doesn't serve its purpose.
Change the log level of the print in mlx5_query_module_eeprom() to debug.
--- drivers/net/ethernet/mellanox/mlx5/core/port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/port.c +2 -1
@@ -381,7 +381,8 @@ int mlx5_query_module_eeprom(struct mlx5_core_dev *dev,mlx5_qsfp_eeprom_params_set (&i2c_addr, &page_num, &offset);break ;default : -mlx5_core_err (dev,"Module ID not recognized: 0x%x\n" , module_id); +mlx5_core_dbg (dev,"Module ID not recognized: 0x%x\n" , + module_id);return -EINVAL ; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 412/451 mei: me: add nova lake point S DID
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Usyskin <[email protected]>
commit 420f423defcf6d0af2263d38da870ca4a20c0990 upstream.
Add Nova Lake S device id.
--- drivers/misc/mei/hw-me-regs.h | 2 ++ drivers/misc/mei/pci-me.c | 2 ++ 2 files changed, 4 insertions(+)
drivers/misc/mei/hw-me-regs.h +2 -0
@@ -122,6 +122,8 @@#define MEI_DEV_ID_WCL_P 0x4D70/* Wildcat Lake P */ +#define MEI_DEV_ID_NVL_S 0x6E68/* Nova Lake Point S */ +/* * MEI HW Section */
drivers/misc/mei/pci-me.c +2 -0
@@ -128,6 +128,8 @@ static const struct pci_device_id mei_me {MEI_PCI_DEVICE(MEI_DEV_ID_WCL_P, MEI_ME_PCH15_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_NVL_S, MEI_ME_PCH15_CFG)}, +/* required last entry */ {0, } };
Greg Kroah-Hartman
maintainerPATCH 439/451 eth: bnxt: move and rename reset helpers
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jakub Kicinski <[email protected]>
[ Upstream commit fea2993aecd74d5d11ede1ebbd60e478ebfed996 ]
Move the reset helpers, subsequent patches will need some of them on the Tx path.
While at it rename bnxt_sched_reset(), on more recent chips it schedules a queue reset, instead of a fuller reset.
Stable-dep-of: ffeafa65b2b2 ("bnxt_en: Fix potential data corruption with HW GRO/LRO")
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 72 +++++++++++------------ 1 file changed, 36 insertions(+), 36 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +36 -36
@@ -330,6 +330,38 @@ static void bnxt_db_cq(struct bnxt *bp, struct bnxt_db_info *db, u32 idx)BNXT_DB_CQ (db, idx); } +static void bnxt_queue_fw_reset_work (struct bnxt *bp,unsigned long delay) +{ +if (!(test_bit (BNXT_STATE_IN_FW_RESET , &bp->state))) +return ; + +if (BNXT_PF (bp)) +queue_delayed_work (bnxt_pf_wq, &bp->fw_reset_task, delay); +else +schedule_delayed_work (&bp->fw_reset_task, delay); +} + +static void bnxt_queue_sp_work (struct bnxt *bp) +{ +if (BNXT_PF (bp)) +queue_work (bnxt_pf_wq, &bp->sp_task); +else +schedule_work (&bp->sp_task); +} + +static void bnxt_sched_reset_rxr (struct bnxt *bp,struct bnxt_rx_ring_info *rxr) +{ +if (!rxr->bnapi->in_reset) { + rxr->bnapi->in_reset = true; +if (bp->flags &BNXT_FLAG_CHIP_P5 ) +set_bit (BNXT_RESET_TASK_SP_EVENT , &bp->sp_event); +else +set_bit (BNXT_RST_RING_SP_EVENT , &bp->sp_event); +bnxt_queue_sp_work (bp); + } + rxr->rx_next_cons =0xffff ; +} +const u16 bnxt_lhint_arr[] = {TX_BD_FLAGS_LHINT_512_AND_SMALLER ,TX_BD_FLAGS_LHINT_512_TO_1023 ,
@@ -1181,38 +1213,6 @@ static int bnxt_discard_rx(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,return 0 ; } -static void bnxt_queue_fw_reset_work (struct bnxt *bp,unsigned long delay) -{ -if (!(test_bit (BNXT_STATE_IN_FW_RESET , &bp->state))) -return ; - -if (BNXT_PF (bp)) -queue_delayed_work (bnxt_pf_wq, &bp->fw_reset_task, delay); -else -schedule_delayed_work (&bp->fw_reset_task, delay); -} - -static void bnxt_queue_sp_work (struct bnxt *bp) -{ -if (BNXT_PF (bp)) -queue_work (bnxt_pf_wq, &bp->sp_task); -else -schedule_work (&bp->sp_task); -} - -static void bnxt_sched_reset (struct bnxt *bp,struct bnxt_rx_ring_info *rxr) -{ -if (!rxr->bnapi->in_reset) { - rxr->bnapi->in_reset = true; -if (bp->flags &BNXT_FLAG_CHIP_P5 ) -set_bit (BNXT_RESET_TASK_SP_EVENT , &bp->sp_event); -else -set_bit (BNXT_RST_RING_SP_EVENT , &bp->sp_event); -bnxt_queue_sp_work (bp); - } - rxr->rx_next_cons =0xffff ; -} -static u16 bnxt_alloc_agg_idx (struct bnxt_rx_ring_info *rxr,u16 agg_id) {struct bnxt_tpa_idx_map *map = rxr->rx_tpa_idx_map;
@@ -1267,7 +1267,7 @@ static void bnxt_tpa_start(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,netdev_warn (bp->dev,"TPA cons %x, expected cons %x, error code %x\n" , cons, rxr->rx_next_cons,TPA_START_ERROR_CODE (tpa_start1)); -bnxt_sched_reset (bp, rxr); +bnxt_sched_reset_rxr (bp, rxr);return ; }/* Store cfa_code in tpa_info to use in tpa_end
@@ -1785,7 +1785,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,if (rxr->rx_next_cons !=0xffff )netdev_warn (bp->dev,"RX cons %x != expected cons %x\n" , cons, rxr->rx_next_cons); -bnxt_sched_reset (bp, rxr); +bnxt_sched_reset_rxr (bp, rxr);if (rc1)return rc1; goto next_rx_no_prod_no_len;
@@ -1823,7 +1823,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, !(bp->fw_cap & BNXT_FW_CAP_RING_MONITOR)) {netdev_warn_once (bp->dev,"RX buffer error %x\n" , rx_err); -bnxt_sched_reset (bp, rxr); +bnxt_sched_reset_rxr (bp, rxr); } } goto next_rx_no_len;
@@ -2165,7 +2165,7 @@ static int bnxt_async_event_process(struct bnxt *bp, goto async_event_process_exit; } rxr = bp->bnapi[grp_idx]->rx_ring; -bnxt_sched_reset (bp, rxr); +bnxt_sched_reset_rxr (bp, rxr); goto async_event_process_exit; }default :
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 440/451 bnxt_en: Fix potential data corruption with HW GRO/LRO
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Srijit Bose <[email protected]>
[ Upstream commit ffeafa65b2b26df2f5b5a6118d3174f17bd12ec5 ]
Fix the max number of bits passed to find_first_zero_bit() in bnxt_alloc_agg_idx(). We were incorrectly passing the number of long words. find_first_zero_bit() may fail to find a zero bit and cause a wrong ID to be used. If the wrong ID is already in use, this can cause data corruption. Sometimes an error like this can also be seen:
bnxt_en 0000:83:00.0 enp131s0np0: TPA end agg_buf 2 != expected agg_bufs 1
Fix it by passing the correct number of bits MAX_TPA_P5. Use DECLARE_BITMAP() to more cleanly define the bitmap. Add a sanity check to warn if a bit cannot be found and reset the ring [MChan].
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 15 ++++++++++++--- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 +--- 2 files changed, 13 insertions(+), 6 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +12 -3
@@ -1218,9 +1218,11 @@ static u16 bnxt_alloc_agg_idx(struct bnxt_rx_ring_info *rxr, u16 agg_id)struct bnxt_tpa_idx_map *map = rxr->rx_tpa_idx_map;u16 idx = agg_id &MAX_TPA_P5_MASK ; -if (test_bit (idx, map->agg_idx_bmap)) - idx =find_first_zero_bit (map->agg_idx_bmap, -BNXT_AGG_IDX_BMAP_SIZE ); +if (test_bit (idx, map->agg_idx_bmap)) { + idx =find_first_zero_bit (map->agg_idx_bmap,MAX_TPA_P5 ); +if (idx >=MAX_TPA_P5 ) +return INVALID_HW_RING_ID ; + }__set_bit (idx, map->agg_idx_bmap); map->agg_id_tbl[agg_id] = idx;return idx;
@@ -1253,6 +1255,13 @@ static void bnxt_tpa_start(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,if (bp->flags &BNXT_FLAG_CHIP_P5 ) { agg_id =TPA_START_AGG_ID_P5 (tpa_start); agg_id =bnxt_alloc_agg_idx (rxr, agg_id); +if (unlikely (agg_id ==INVALID_HW_RING_ID )) { +netdev_warn (bp->dev,"Unable to allocate agg ID for ring %d, agg 0x%x\n" , + rxr->bnapi->index, +TPA_START_AGG_ID_P5 (tpa_start)); +bnxt_sched_reset_rxr (bp, rxr); +return ; + } }else { agg_id =TPA_START_AGG_ID (tpa_start); }
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -3
@@ -870,11 +870,9 @@ struct bnxt_tpa_info {struct rx_agg_cmp *agg_arr; }; -#define BNXT_AGG_IDX_BMAP_SIZE (MAX_TPA_P5 / BITS_PER_LONG) -struct bnxt_tpa_idx_map {u16 agg_id_tbl[1024 ]; -unsigned long agg_idx_bmap[BNXT_AGG_IDX_BMAP_SIZE ]; + DECLARE_BITMAP(agg_idx_bmap, MAX_TPA_P5); };struct bnxt_rx_ring_info {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 441/451 HID: quirks: work around VID/PID conflict for appledisplay
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: René Rebe <[email protected]>
[ Upstream commit c7fabe4ad9219866c203164a214c474c95b36bf2 ]
For years I wondered why the Apple Cinema Display driver would not just work for me. Turns out the hidraw driver instantly takes it over. Fix by adding appledisplay VID/PIDs to hid_have_special_driver.
--- drivers/hid/hid-quirks.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/hid/hid-quirks.c +9 -0
@@ -220,6 +220,15 @@ static const struct hid_device_id hid_quirks[] = {* used as a driver. See hid_scan_report(). */ static const struct hid_device_id hid_have_special_driver[] = { +#if IS_ENABLED(CONFIG_APPLEDISPLAY) + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9218 ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9219 ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x921c ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x921d ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9222 ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9226 ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9236 ) }, +#endif #if IS_ENABLED(CONFIG_HID_A4TECH) {HID_USB_DEVICE (USB_VENDOR_ID_A4TECH ,USB_DEVICE_ID_A4TECH_WCP32PU ) }, { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 442/451 net/sched: sch_qfq: Fix NULL deref when deactivating inactive aggregate in qfq_reset
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiang Mei <[email protected]>
[ Upstream commit c1d73b1480235731e35c81df70b08f4714a7d095 ]
qfq_class->leaf_qdisc->q.qlen > 0 does not imply that the class itself is active.
Two qfq_class objects may point to the same leaf_qdisc. This happens when:
1. one QFQ qdisc is attached to the dev as the root qdisc, and
2. another QFQ qdisc is temporarily referenced (e.g., via qdisc_get() / qdisc_put()) and is pending to be destroyed, as in function tc_new_tfilter.
When packets are enqueued through the root QFQ qdisc, the shared leaf_qdisc->q.qlen increases. At the same time, the second QFQ qdisc triggers qdisc_put and qdisc_destroy: the qdisc enters qfq_reset() with its own q->q.qlen == 0, but its class's leaf qdisc->q.qlen > 0. Therefore, the qfq_reset would wrongly deactivate an inactive aggregate and trigger a null-deref in qfq_deactivate_agg:
[ 0.903172] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 0.903571] #PF: supervisor write access in kernel mode [ 0.903860] #PF: error_code(0x0002) - not-present page [ 0.904177] PGD 10299b067 P4D 10299b067 PUD 10299c067 PMD 0 [ 0.904502] Oops: Oops: 0002 [#1] SMP NOPTI [ 0.904737] CPU: 0 UID: 0 PID: 135 Comm: exploit Not tainted 6.19.0-rc3+ #2 NONE [ 0.905157] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.17.0-0-gb52ca86e094d-prebuilt.qemu.org 04/01/2014 [ 0.905754] RIP: 0010:qfq_deactivate_agg (include/linux/list.h:992 (discriminator 2) include/linux/list.h:1006 (discriminator 2) net/sched/sch_qfq.c:1367 (discriminator 2) net/sched/sch_qfq.c:1393 (discriminator 2)) [ 0.906046] Code: 0f 84 4d 01 00 00 48 89 70 18 8b 4b 10 48 c7 c2 ff ff ff ff 48 8b 78 08 48 d3 e2 48 21 f2 48 2b 13 48 8b 30 48 d3 ea 8b 4b 18 0
Code starting with the faulting instruction
===========================================
0: 0f 84 4d 01 00 00 je 0x153 6: 48 89 70 18 mov %rsi,0x18(%rax) a: 8b 4b 10 mov 0x10(%rbx),%ecx d: 48 c7 c2 ff ff ff ff mov $0xffffffffffffffff,%rdx 14: 48 8b 78 08 mov 0x8(%rax),%rdi 18: 48 d3 e2 shl %cl,%rdx 1b: 48 21 f2 and %rsi,%rdx 1e: 48 2b 13 sub (%rbx),%rdx 21: 48 8b 30 mov (%rax),%rsi 24: 48 d3 ea shr %cl,%rdx 27: 8b 4b 18 mov 0x18(%rbx),%ecx ... [ 0.907095] RSP: 0018:ffffc900004a39a0 EFLAGS: 00010246 [ 0.907368] RAX: ffff8881043a0880 RBX: ffff888102953340 RCX: 0000000000000000 [ 0.907723] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 0.908100] RBP: ffff888102952180 R08: 0000000000000000 R09: 0000000000000000 [ 0.908451] R10: ffff8881043a0000 R11: 0000000000000000 R12: ffff888102952000 [ 0.908804] R13: ffff888102952180 R14: ffff8881043a0ad8 R15: ffff8881043a0880 [ 0.909179] FS: 000000002a1a0380(0000) GS:ffff888196d8d000(0000) knlGS:0000000000000000 [ 0.909572] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 0.909857] CR2: 0000000000000000 CR3: 0000000102993002 CR4: 0000000000772ef0 [ 0.910247] PKRU: 55555554 [ 0.910391] Call Trace: [ 0.910527] <TASK> [ 0.910638] qfq_reset_qdisc (net/sched/sch_qfq.c:357 net/sched/sch_qfq.c:1485) [ 0.910826] qdisc_reset (include/linux/skbuff.h:2195 include/linux/skbuff.h:2501 include/linux/skbuff.h:3424 include/linux/skbuff.h:3430 net/sched/sch_generic.c:1036) [ 0.911040] __qdisc_destroy (net/sched/sch_generic.c:1076) [ 0.911236] tc_new_tfilter (net/sched/cls_api.c:2447) [ 0.911447] rtnetlink_rcv_msg (net/core/rtnetlink.c:6958) [ 0.911663] ? __pfx_rtnetlink_rcv_msg (net/core/rtnetlink.c:6861) [ 0.911894] netlink_rcv_skb (net/netlink/af_netlink.c:2550) [ 0.912100] netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) [ 0.912296] ? __alloc_skb (net/core/skbuff.c:706) [ 0.912484] netlink_sendmsg (net/netlink/af_netlink.c:1894) [ 0.912682] sock_write_iter (net/socket.c:727 (discriminator 1) net/socket.c:742 (discriminator 1) net/socket.c:1195 (discriminator 1)) [ 0.912880] vfs_write (fs/read_write.c:593 fs/read_write.c:686) [ 0.913077] ksys_write (fs/read_write.c:738) [ 0.913252] do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) arch/x86/entry/syscall_64.c:94 (discriminator 1)) [ 0.913438] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:131) [ 0.913687] RIP: 0033:0x424c34 [ 0.913844] Code: 89 02 48 c7 c0 ff ff ff ff eb bd 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 80 3d 2d 44 09 00 00 74 13 b8 01 00 00 00 0f 05 9
Code starting with the faulting instruction
===========================================
0: 89 02 mov %eax,(%rdx) 2: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax 9: eb bd jmp 0xffffffffffffffc8 b: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 12: 00 00 00 15: 90 nop 16: f3 0f 1e fa endbr64 1a: 80 3d 2d 44 09 00 00 cmpb $0x0,0x9442d(%rip) # 0x9444e 21: 74 13 je 0x36 23: b8 01 00 00 00 mov $0x1,%eax 28: 0f 05 syscall 2a: 09 .byte 0x9 [ 0.914807] RSP: 002b:00007ffea1938b78 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 [ 0.915197] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 0000000000424c34 [ 0.915556] RDX: 000000000000003c RSI: 000000002af378c0 RDI: 0000000000000003 [ 0.915912] RBP: 00007ffea1938bc0 R08: 00000000004b8820 R09: 0000000000000000 [ 0.916297] R10: 0000000000000001 R11: 0000000000000202 R12: 00007ffea1938d28 [ 0.916652] R13: 00007ffea1938d38 R14: 00000000004b3828 R15: 0000000000000001 [ 0.917039] </TASK> [ 0.917158] Modules linked in: [ 0.917316] CR2: 0000000000000000 [ 0.917484] ---[ end trace 0000000000000000 ]--- [ 0.917717] RIP: 0010:qfq_deactivate_agg (include/linux/list.h:992 (discriminator 2) include/linux/list.h:1006 (discriminator 2) net/sched/sch_qfq.c:1367 (discriminator 2) net/sched/sch_qfq.c:1393 (discriminator 2)) [ 0.917978] Code: 0f 84 4d 01 00 00 48 89 70 18 8b 4b 10 48 c7 c2 ff ff ff ff 48 8b 78 08 48 d3 e2 48 21 f2 48 2b 13 48 8b 30 48 d3 ea 8b 4b 18 0
Code starting with the faulting instruction
===========================================
0: 0f 84 4d 01 00 00 je 0x153 6: 48 89 70 18 mov %rsi,0x18(%rax) a: 8b 4b 10 mov 0x10(%rbx),%ecx d: 48 c7 c2 ff ff ff ff mov $0xffffffffffffffff,%rdx 14: 48 8b 78 08 mov 0x8(%rax),%rdi 18: 48 d3 e2 shl %cl,%rdx 1b: 48 21 f2 and %rsi,%rdx 1e: 48 2b 13 sub (%rbx),%rdx 21: 48 8b 30 mov (%rax),%rsi 24: 48 d3 ea shr %cl,%rdx 27: 8b 4b 18 mov 0x18(%rbx),%ecx ... [ 0.918902] RSP: 0018:ffffc900004a39a0 EFLAGS: 00010246 [ 0.919198] RAX: ffff8881043a0880 RBX: ffff888102953340 RCX: 0000000000000000 [ 0.919559] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 0.919908] RBP: ffff888102952180 R08: 0000000000000000 R09: 0000000000000000 [ 0.920289] R10: ffff8881043a0000 R11: 0000000000000000 R12: ffff888102952000 [ 0.920648] R13: ffff888102952180 R14: ffff8881043a0ad8 R15: ffff8881043a0880 [ 0.921014] FS: 000000002a1a0380(0000) GS:ffff888196d8d000(0000) knlGS:0000000000000000 [ 0.921424] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 0.921710] CR2: 0000000000000000 CR3: 0000000102993002 CR4: 0000000000772ef0 [ 0.922097] PKRU: 55555554 [ 0.922240] Kernel panic - not syncing: Fatal exception [ 0.922590] Kernel Offset: disabled
--- net/sched/sch_qfq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sched/sch_qfq.c +1 -1
@@ -1490,7 +1490,7 @@ static void qfq_reset_qdisc(struct Qdisc *sch)for (i =0 ; i < q->clhash.hashsize; i++) {hlist_for_each_entry (cl, &q->clhash.hash[i], common.hnode) { -if (cl->qdisc->q.qlen >0 ) +if (cl_is_active (cl))qfq_deactivate_class (q, cl);qdisc_reset (cl->qdisc);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 443/451 net: usb: pegasus: fix memory leak in update_eth_regs_async()
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Petko Manolov <[email protected]>
[ Upstream commit afa27621a28af317523e0836dad430bec551eb54 ]
When asynchronously writing to the device registers and if usb_submit_urb() fail, the code fail to release allocated to this point resources.
--- drivers/net/usb/pegasus.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/usb/pegasus.c +2 -0
@@ -193,6 +193,8 @@ static int update_eth_regs_async(pegasus_t *pegasus)netif_device_detach (pegasus->net);netif_err (pegasus, drv, pegasus->net,"%s returned %d\n" , __func__, ret); +usb_free_urb (async_urb); +kfree (req); }return ret; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 444/451 arp: do not assume dev_hard_header() does not change skb->head
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit c92510f5e3f82ba11c95991824a41e59a9c5ed81 ]
arp_create() is the only dev_hard_header() caller making assumption about skb->head being unchanged.
A recent commit broke this assumption.
Initialize @arp pointer after dev_hard_header() call.
--- net/ipv4/arp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
net/ipv4/arp.c +4 -3
@@ -542,7 +542,7 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,skb_reserve (skb, hlen);skb_reset_network_header (skb); - arp =skb_put (skb,arp_hdr_len (dev)); +skb_put (skb,arp_hdr_len (dev)); skb->dev = dev; skb->protocol =htons (ETH_P_ARP );if (!src_hw)
@@ -550,12 +550,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,if (!dest_hw) dest_hw = dev->broadcast; -/* -* Fill the device header for the ARP frame +/* Fill the device header for the ARP frame. +* Note: skb->head can be changed. */ if (dev_hard_header (skb, dev, ptype, dest_hw, src_hw, skb->len) <0 ) goto out; + arp =arp_hdr (skb);/* * Fill out the arp protocol part. *
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 413/451 lib/crypto: aes: Fix missing MMU protection for AES S-box
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Biggers <[email protected]>
commit 74d74bb78aeccc9edc10db216d6be121cf7ec176 upstream.
__cacheline_aligned puts the data in the ".data..cacheline_aligned" section, which isn't marked read-only i.e. it doesn't receive MMU protection. Replace it with ____cacheline_aligned which does the right thing and just aligns the data while keeping it in ".rodata".
--- lib/crypto/aes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/crypto/aes.c +2 -2
@@ -12,7 +12,7 @@* Emit the sbox as volatile const to prevent the compiler from doing * constant folding on sbox references involving fixed indexes. */ -static volatile const u8 __cacheline_aligned aes_sbox[] = { +static volatile const u8 ____cacheline_aligned aes_sbox[] = {0x63 ,0x7c ,0x77 ,0x7b ,0xf2 ,0x6b ,0x6f ,0xc5 ,0x30 ,0x01 ,0x67 ,0x2b ,0xfe ,0xd7 ,0xab ,0x76 ,0xca ,0x82 ,0xc9 ,0x7d ,0xfa ,0x59 ,0x47 ,0xf0 ,
@@ -47,7 +47,7 @@ static volatile const u8 __cacheline_ali 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16, }; -static volatile const u8 __cacheline_aligned aes_inv_sbox[] = { +static volatile const u8 ____cacheline_aligned aes_inv_sbox[] = {0x52 ,0x09 ,0x6a ,0xd5 ,0x30 ,0x36 ,0xa5 ,0x38 ,0xbf ,0x40 ,0xa3 ,0x9e ,0x81 ,0xf3 ,0xd7 ,0xfb ,0x7c ,0xe3 ,0x39 ,0x82 ,0x9b ,0x2f ,0xff ,0x87 ,
Greg Kroah-Hartman
maintainerPATCH 414/451 drm/pl111: Fix error handling in pl111_amba_probe
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miaoqian Lin <[email protected]>
commit 0ddd3bb4b14c9102c0267b3fd916c81fe5ab89c1 upstream.
Jump to the existing dev_put label when devm_request_irq() fails so drm_dev_put() and of_reserved_mem_device_release() run instead of returning early and leaking resources.
Found via static analysis and code review.
--- drivers/gpu/drm/pl111/pl111_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/pl111/pl111_drv.c +1 -1
@@ -302,7 +302,7 @@ static int pl111_amba_probe(struct amba_ variant->name, priv);if (ret !=0 ) {dev_err (dev,"%s failed irq %d\n" , __func__, ret); -return ret; + goto dev_put; } ret =pl111_modeset_init (drm);
Greg Kroah-Hartman
maintainerPATCH 415/451 wifi: avoid kernel-infoleak from struct iw_point
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
commit 21cbf883d073abbfe09e3924466aa5e0449e7261 upstream.
struct iw_point has a 32bit hole on 64bit arches.
struct iw_point {
void __user *pointer; /* Pointer to the data (in user space) */ __u16 length; /* number of fields or size in bytes */ __u16 flags; /* Optional params */
};
Make sure to zero the structure to avoid disclosing 32bits of kernel data to user space.
--- net/wireless/wext-core.c | 4 ++++ net/wireless/wext-priv.c | 4 ++++ 2 files changed, 8 insertions(+)
net/wireless/wext-core.c +4 -0
@@ -1081,6 +1081,10 @@ static int compat_standard_call(struct nreturn ioctl_standard_call (dev, iwr, cmd, info, handler); iwp_compat = (struct compat_iw_point *) &iwr->u.data; + +/* struct iw_point has a 32bit hole on 64bit arches. */ +memset (&iwp,0 ,sizeof (iwp)); + iwp.pointer =compat_ptr (iwp_compat->pointer); iwp.length = iwp_compat->length; iwp.flags = iwp_compat->flags;
net/wireless/wext-priv.c +4 -0
@@ -228,6 +228,10 @@ int compat_private_call(struct net_devicstruct iw_point iwp; iwp_compat = (struct compat_iw_point *) &iwr->u.data; + +/* struct iw_point has a 32bit hole on 64bit arches. */ +memset (&iwp,0 ,sizeof (iwp)); + iwp.pointer =compat_ptr (iwp_compat->pointer); iwp.length = iwp_compat->length; iwp.flags = iwp_compat->flags;
Greg Kroah-Hartman
maintainerPATCH 416/451 libceph: replace overzealous BUG_ON in osdmap_apply_incremental()
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilya Dryomov <[email protected]>
commit e00c3f71b5cf75681dbd74ee3f982a99cb690c2b upstream.
If the osdmap is (maliciously) corrupted such that the incremental osdmap epoch is different from what is expected, there is no need to BUG. Instead, just declare the incremental osdmap to be invalid.
--- net/ceph/osdmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/ceph/osdmap.c +3 -1
@@ -1940,11 +1940,13 @@ struct ceph_osdmap *osdmap_apply_increme sizeof(u64) + sizeof(u32), e_inval);ceph_decode_copy (p, &fsid,sizeof (fsid)); epoch =ceph_decode_32 (p); -BUG_ON (epoch != map->epoch+1 );ceph_decode_copy (p, &modified,sizeof (modified)); new_pool_max =ceph_decode_64 (p); new_flags =ceph_decode_32 (p); +if (epoch != map->epoch +1 ) + goto e_inval; +/* full map? */ ceph_decode_32_safe (p, end, len, e_inval);if (len >0 ) {
Greg Kroah-Hartman
maintainerPATCH 417/451 libceph: make free_choose_arg_map() resilient to partial allocation
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tuo Li <[email protected]>
commit e3fe30e57649c551757a02e1cad073c47e1e075e upstream.
free_choose_arg_map() may dereference a NULL pointer if its caller fails after a partial allocation.
For example, in decode_choose_args(), if allocation of arg_map->args fails, execution jumps to the fail label and free_choose_arg_map() is called. Since arg_map->size is updated to a non-zero value before memory allocation, free_choose_arg_map() will iterate over arg_map->args and dereference a NULL pointer.
To prevent this potential NULL pointer dereference and make free_choose_arg_map() more resilient, add checks for pointers before iterating.
--- net/ceph/osdmap.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
net/ceph/osdmap.c +12 -8
@@ -225,22 +225,26 @@ static struct crush_choose_arg_map *allostatic void free_choose_arg_map (struct crush_choose_arg_map *arg_map) { -if (arg_map) { -int i, j; +int i, j; -WARN_ON (!RB_EMPTY_NODE (&arg_map->node)); +if (!arg_map) +return ; +WARN_ON (!RB_EMPTY_NODE (&arg_map->node)); + +if (arg_map->args) {for (i =0 ; i < arg_map->size; i++) {struct crush_choose_arg *arg = &arg_map->args[i]; - -for (j =0 ; j < arg->weight_set_size; j++) -kfree (arg->weight_set[j].weights); -kfree (arg->weight_set); +if (arg->weight_set) { +for (j =0 ; j < arg->weight_set_size; j++) +kfree (arg->weight_set[j].weights); +kfree (arg->weight_set); + }kfree (arg->ids); }kfree (arg_map->args); -kfree (arg_map); } +kfree (arg_map); } DEFINE_RB_FUNCS(choose_arg_map, struct crush_choose_arg_map, choose_args_index,
Greg Kroah-Hartman
maintainerPATCH 418/451 libceph: make calc_target() set t->paused, not just clear it
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilya Dryomov <[email protected]>
commit c0fe2994f9a9d0a2ec9e42441ea5ba74b6a16176 upstream.
Currently calc_target() clears t->paused if the request shouldn't be paused anymore, but doesn't ever set t->paused even though it's able to determine when the request should be paused. Setting t->paused is left to __submit_request() which is fine for regular requests but doesn't work for linger requests -- since __submit_request() doesn't operate on linger requests, there is nowhere for lreq->t.paused to be set. One consequence of this is that watches don't get reestablished on paused -> unpaused transitions in cases where requests have been paused long enough for the (paused) unwatch request to time out and for the subsequent (re)watch request to enter the paused state. On top of the watch not getting reestablished, rbd_reregister_watch() gets stuck with rbd_dev->watch_mutex held:
rbd_register_watch
__rbd_register_watch
ceph_osdc_watch
linger_reg_commit_wait
It's waiting for lreq->reg_commit_wait to be completed, but for that to happen the respective request needs to end up on need_resend_linger list and be kicked when requests are unpaused. There is no chance for that if the request in question is never marked paused in the first place.
The fact that rbd_dev->watch_mutex remains taken out forever then prevents the image from getting unmapped -- "rbd unmap" would inevitably hang in D state on an attempt to grab the mutex.
--- net/ceph/osd_client.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
net/ceph/osd_client.c +9 -2
@@ -1529,6 +1529,7 @@ static enum calc_target_result calc_targstruct ceph_pg_pool_info *pi;struct ceph_pg pgid, last_pgid;struct ceph_osds up, acting; +bool should_be_paused;bool is_read = t->flags &CEPH_OSD_FLAG_READ ;bool is_write = t->flags &CEPH_OSD_FLAG_WRITE ;bool force_resend = false;
@@ -1597,10 +1598,16 @@ static enum calc_target_result calc_targ &last_pgid)) force_resend = true; -if (t->paused && !target_should_be_paused (osdc, t, pi)) { - t->paused = false; + should_be_paused =target_should_be_paused (osdc, t, pi); +if (t->paused && !should_be_paused) { unpaused = true; } +if (t->paused != should_be_paused) { +dout ("%s t %p paused %d -> %d\n" , __func__, t, t->paused, + should_be_paused); + t->paused = should_be_paused; + } + legacy_change =ceph_pg_compare (&t->pgid, &pgid) ||ceph_osds_changed (&t->acting, &acting, t->used_replica || any_change);
Greg Kroah-Hartman
maintainerPATCH 409/451 usb: gadget: lpc32xx_udc: fix clock imbalance in error path
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 782be79e4551550d7a82b1957fc0f7347e6d461f upstream.
A recent change fixing a device reference leak introduced a clock imbalance by reusing an error path so that the clock may be disabled before having been enabled.
Note that the clock framework allows for passing in NULL clocks so there is no risk for a NULL pointer dereference.
Also drop the bogus I2C client NULL check added by the offending commit as the pointer has already been verified to be non-NULL.
--- drivers/usb/gadget/udc/lpc32xx_udc.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
drivers/usb/gadget/udc/lpc32xx_udc.c +9 -10
@@ -3026,7 +3026,7 @@ static int lpc32xx_udc_probe(struct plat pdev->dev.dma_mask = &lpc32xx_usbd_dmamask; retval =dma_set_coherent_mask (&pdev->dev,DMA_BIT_MASK (32 ));if (retval) - goto i2c_fail; + goto err_put_client; udc->board = &lpc32xx_usbddata;
@@ -3046,7 +3046,7 @@ static int lpc32xx_udc_probe(struct plat udc->udp_irq[i] =platform_get_irq (pdev, i);if (udc->udp_irq[i] <0 ) { retval = udc->udp_irq[i]; - goto i2c_fail; + goto err_put_client; } }
@@ -3054,7 +3054,7 @@ static int lpc32xx_udc_probe(struct platif (IS_ERR (udc->udp_baseaddr)) {dev_err (udc->dev,"IO map failure\n" ); retval =PTR_ERR (udc->udp_baseaddr); - goto i2c_fail; + goto err_put_client; }/* Get USB device clock */
@@ -3062,14 +3062,14 @@ static int lpc32xx_udc_probe(struct platif (IS_ERR (udc->usb_slv_clk)) {dev_err (udc->dev,"failed to acquire USB device clock\n" ); retval =PTR_ERR (udc->usb_slv_clk); - goto i2c_fail; + goto err_put_client; }/* Enable USB device clock */ retval =clk_prepare_enable (udc->usb_slv_clk);if (retval <0 ) {dev_err (udc->dev,"failed to start USB device clock\n" ); - goto i2c_fail; + goto err_put_client; }/* Setup deferred workqueue data */
@@ -3171,9 +3171,10 @@ dma_alloc_fail:dma_free_coherent (&pdev->dev,UDCA_BUFF_SIZE , udc->udca_v_base, udc->udca_p_base); i2c_fail: -if (udc->isp1301_i2c_client) -put_device (&udc->isp1301_i2c_client->dev);clk_disable_unprepare (udc->usb_slv_clk); +err_put_client: +put_device (&udc->isp1301_i2c_client->dev); +dev_err (udc->dev,"%s probe failed, %d\n" , driver_name, retval);return retval;
@@ -3198,11 +3199,9 @@ static int lpc32xx_udc_remove(struct pladma_free_coherent (&pdev->dev,UDCA_BUFF_SIZE , udc->udca_v_base, udc->udca_p_base); -if (udc->isp1301_i2c_client) -put_device (&udc->isp1301_i2c_client->dev); -clk_disable_unprepare (udc->usb_slv_clk); +put_device (&udc->isp1301_i2c_client->dev);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 446/451 nfsd: provide locking for v4_end_grace
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
[ Upstream commit 2857bd59feb63fcf40fe4baf55401baea6b4feb4 ]
Writing to v4_end_grace can race with server shutdown and result in memory being accessed after it was freed - reclaim_str_hashtbl in particularly.
We cannot hold nfsd_mutex across the nfsd4_end_grace() call as that is held while client_tracking_op->init() is called and that can wait for an upcall to nfsdcltrack which can write to v4_end_grace, resulting in a deadlock.
nfsd4_end_grace() is also called by the landromat work queue and this doesn't require locking as server shutdown will stop the work and wait for it before freeing anything that nfsd4_end_grace() might access.
However, we must be sure that writing to v4_end_grace doesn't restart the work item after shutdown has already waited for it. For this we add a new flag protected with nn->client_lock. It is set only while it is safe to make client tracking calls, and v4_end_grace only schedules work while the flag is set with the spinlock held.
So this patch adds a nfsd_net field "client_tracking_active" which is set as described. Another field "grace_end_forced", is set when v4_end_grace is written. After this is set, and providing client_tracking_active is set, the laundromat is scheduled. This "grace_end_forced" field bypasses other checks for whether the grace period has finished.
This resolves a race which can result in use-after-free.
--- fs/nfsd/netns.h | 2 ++ fs/nfsd/nfs4state.c | 42 ++++++++++++++++++++++++++++++++++++++++-- fs/nfsd/nfsctl.c | 3 +-- fs/nfsd/state.h | 2 +- 4 files changed, 44 insertions(+), 5 deletions(-)
fs/nfsd/netns.h +2 -0
@@ -64,6 +64,8 @@ struct nfsd_net {struct lock_manager nfsd4_manager;bool grace_ended; +bool grace_end_forced; +bool client_tracking_active;time64_t boot_time;struct dentry *nfsd_client_dir;
fs/nfsd/nfs4state.c +40 -2
84 lines not on this page · raw message
fs/nfsd/nfsctl.c +1 -2
@@ -1117,9 +1117,8 @@ static ssize_t write_v4_end_grace(structcase 'Y' :case 'y' :case '1' : -if (!nn->nfsd_serv) +if (!nfsd4_force_end_grace (nn))return -EBUSY ; -nfsd4_end_grace (nn);break ;default :return -EINVAL ;
fs/nfsd/state.h +1 -1
@@ -719,7 +719,7 @@ static inline void get_nfs4_file(structstruct nfsd_file *find_any_file (struct nfs4_file *f);/* grace period management */ -void nfsd4_end_grace (struct nfsd_net *nn); +bool nfsd4_force_end_grace (struct nfsd_net *nn);/* nfs4recover operations */ extern int nfsd4_client_tracking_init (struct net *net);
Greg Kroah-Hartman
maintainerPATCH 447/451 powercap: fix race condition in register_control_type()
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sumeet Pawnikar <[email protected]>
[ Upstream commit 7bda1910c4bccd4b8d4726620bb3d6bbfb62286e ]
The device becomes visible to userspace via device_register() even before it fully initialized by idr_init(). If userspace or another thread tries to register a zone immediately after device_register(), the control_type_valid() will fail because the control_type is not yet in the list. The IDR is not yet initialized, so this race condition causes zone registration failure.
Move idr_init() and list addition before device_register() fix the race condition.
--- drivers/powercap/powercap_sys.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/powercap/powercap_sys.c +11 -5
@@ -625,17 +625,23 @@ struct powercap_control_type *powercap_register_control_type(INIT_LIST_HEAD (&control_type->node); control_type->dev.class = &powercap_class;dev_set_name (&control_type->dev,"%s" , name); - result =device_register (&control_type->dev); -if (result) { -put_device (&control_type->dev); -return ERR_PTR (result); - }idr_init (&control_type->idr);mutex_lock (&powercap_cntrl_list_lock);list_add_tail (&control_type->node, &powercap_cntrl_list);mutex_unlock (&powercap_cntrl_list_lock); + result =device_register (&control_type->dev); +if (result) { +mutex_lock (&powercap_cntrl_list_lock); +list_del (&control_type->node); +mutex_unlock (&powercap_cntrl_list_lock); + +idr_destroy (&control_type->idr); +put_device (&control_type->dev); +return ERR_PTR (result); + } +return control_type; }EXPORT_SYMBOL_GPL (powercap_register_control_type);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 448/451 powercap: fix sscanf() error return value handling
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sumeet Pawnikar <[email protected]>
[ Upstream commit efc4c35b741af973de90f6826bf35d3b3ac36bf1 ]
Fix inconsistent error handling for sscanf() return value check.
Implicit boolean conversion is used instead of explicit return value checks. The code checks if (!sscanf(...)) which is incorrect because:
1. sscanf returns the number of successfully parsed items
2. On success, it returns 1 (one item passed)
3. On failure, it returns 0 or EOF
4. The check 'if (!sscanf(...))' is wrong because it treats success (1) as failure
All occurrences of sscanf() now uses explicit return value check. With this behavior it returns '-EINVAL' when parsing fails (returns 0 or EOF), and continues when parsing succeeds (returns 1).
--- drivers/powercap/powercap_sys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/powercap/powercap_sys.c +3 -3
@@ -67,7 +67,7 @@ static ssize_t show_constraint_##_attr(struct device *dev, \int id; \struct powercap_zone_constraint *pconst;\ \ -if (!sscanf (dev_attr->attr.name,"constraint_%d_" , &id)) \ +if (sscanf (dev_attr->attr.name,"constraint_%d_" , &id) !=1 ) \return -EINVAL ; \if (id >= power_zone->const_id_cnt) \return -EINVAL ; \
@@ -92,7 +92,7 @@ static ssize_t store_constraint_##_attr(struct device *dev,\int id; \struct powercap_zone_constraint *pconst;\ \ -if (!sscanf (dev_attr->attr.name,"constraint_%d_" , &id)) \ +if (sscanf (dev_attr->attr.name,"constraint_%d_" , &id) !=1 ) \return -EINVAL ; \if (id >= power_zone->const_id_cnt) \return -EINVAL ; \
@@ -161,7 +161,7 @@ static ssize_t show_constraint_name(struct device *dev,ssize_t len = -ENODATA ;struct powercap_zone_constraint *pconst; -if (!sscanf (dev_attr->attr.name,"constraint_%d_" , &id)) +if (sscanf (dev_attr->attr.name,"constraint_%d_" , &id) !=1 )return -EINVAL ;if (id >= power_zone->const_id_cnt)return -EINVAL ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 449/451 can: j1939: make j1939_session_activate() fail if device is no longer registered
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tetsuo Handa <[email protected]>
[ Upstream commit 5d5602236f5db19e8b337a2cd87a90ace5ea776d ]
syzbot is still reporting
unregister_netdevice: waiting for vcan0 to become free. Usage count = 2
even after commit 93a27b5891b8 ("can: j1939: add missing calls in NETDEV_UNREGISTER notification handler") was added. A debug printk() patch found that j1939_session_activate() can succeed even after j1939_cancel_active_session() from j1939_netdev_notify(NETDEV_UNREGISTER) has completed.
Since j1939_cancel_active_session() is processed with the session list lock held, checking ndev->reg_state in j1939_session_activate() with the session list lock held can reliably close the race window.
--- net/can/j1939/transport.c | 2 ++ 1 file changed, 2 insertions(+)
net/can/j1939/transport.c +2 -0
@@ -1555,6 +1555,8 @@ int j1939_session_activate(struct j1939_session *session)if (active) {j1939_session_put (active); ret = -EAGAIN ; + }else if (priv->ndev->reg_state !=NETREG_REGISTERED ) { + ret = -ENODEV ; }else {WARN_ON_ONCE (session->state !=J1939_SESSION_NEW ); list_add_tail(&session->active_session_list_entry,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 450/451 ASoC: fsl_sai: Add missing registers to cache default
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Stein <[email protected]>
[ Upstream commit 90ed688792a6b7012b3e8a2f858bc3fe7454d0eb ]
Drivers does cache sync during runtime resume, setting all writable registers. Not all writable registers are set in cache default, resulting in the erorr message:
fsl-sai 30c30000.sai: using zero-initialized flat cache, this may cause unexpected behavior
Fix this by adding missing writable register defaults.
--- sound/soc/fsl/fsl_sai.c | 3 +++ 1 file changed, 3 insertions(+)
sound/soc/fsl/fsl_sai.c +3 -0
@@ -773,6 +773,7 @@ static struct reg_default fsl_sai_reg_defaults_ofs0[] = { {FSL_SAI_TDR6, 0}, {FSL_SAI_TDR7, 0}, {FSL_SAI_TMR, 0}, + {FSL_SAI_TTCTL, 0}, {FSL_SAI_RCR1(0), 0}, {FSL_SAI_RCR2(0), 0}, {FSL_SAI_RCR3(0), 0},
@@ -796,12 +797,14 @@ static struct reg_default fsl_sai_reg_defaults_ofs8[] = { {FSL_SAI_TDR6, 0}, {FSL_SAI_TDR7, 0}, {FSL_SAI_TMR, 0}, + {FSL_SAI_TTCTL, 0}, {FSL_SAI_RCR1(8), 0}, {FSL_SAI_RCR2(8), 0}, {FSL_SAI_RCR3(8), 0}, {FSL_SAI_RCR4(8), 0}, {FSL_SAI_RCR5(8), 0}, {FSL_SAI_RMR, 0}, + {FSL_SAI_RTCTL, 0}, {FSL_SAI_MCTL, 0}, {FSL_SAI_MDIV, 0}, };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 451/451 scsi: sg: Fix occasional bogus elapsed time that exceeds timeout
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Rábek <[email protected]>
[ Upstream commit 0e1677654259a2f3ccf728de1edde922a3c4ba57 ]
A race condition was found in sg_proc_debug_helper(). It was observed on a system using an IBM LTO-9 SAS Tape Drive (ULTRIUM-TD9) and monitoring /proc/scsi/sg/debug every second. A very large elapsed time would sometimes appear. This is caused by two race conditions.
We reproduced the issue with an IBM ULTRIUM-HH9 tape drive on an x86_64 architecture. A patched kernel was built, and the race condition could not be observed anymore after the application of this patch. A reproducer C program utilising the scsi_debug module was also built by Changhui Zhong and can be viewed here:
https://github.com/MichaelRabek/linux-tests/blob/master/drivers/scsi/sg/sg_race_trigger.c
The first race happens between the reading of hp->duration in sg_proc_debug_helper() and request completion in sg_rq_end_io(). The hp->duration member variable may hold either of two types of information:
#1 - The start time of the request. This value is present while
the request is not yet finished.
#2 - The total execution time of the request (end_time - start_time).
If sg_proc_debug_helper() executes *after* the value of hp->duration was changed from #1 to #2, but *before* srp->done is set to 1 in sg_rq_end_io(), a fresh timestamp is taken in the else branch, and the elapsed time (value type #2) is subtracted from a timestamp, which cannot yield a valid elapsed time (which is a type #2 value as well).
To fix this issue, the value of hp->duration must change under the protection of the sfp->rq_list_lock in sg_rq_end_io(). Since sg_proc_debug_helper() takes this read lock, the change to srp->done and srp->header.duration will happen atomically from the perspective of sg_proc_debug_helper() and the race condition is thus eliminated.
The second race condition happens between sg_proc_debug_helper() and sg_new_write(). Even though hp->duration is set to the current time stamp in sg_add_request() under the write lock's protection, it gets overwritten by a call to get_sg_io_hdr(), which calls copy_from_user() to copy struct sg_io_hdr from userspace into kernel space. hp->duration is set to the start time again in sg_common_write(). If sg_proc_debug_helper() is called between these two calls, an arbitrary value set by userspace (usually zero) is used to compute the elapsed time.
To fix this issue, hp->duration must be set to the current timestamp again after get_sg_io_hdr() returns successfully. A small race window still exists between get_sg_io_hdr() and setting hp->duration, but this window is only a few instructions wide and does not result in observable issues in practice, as confirmed by testing.
Additionally, we fix the format specifier from %d to %u for printing unsigned int values in sg_proc_debug_helper().
--- drivers/scsi/sg.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/scsi/sg.c +13 -7
@@ -732,6 +732,8 @@ sg_new_write(Sg_fd *sfp, struct file *file, const char __user *buf,sg_remove_request (sfp, srp);return -EFAULT ; } + hp->duration =jiffies_to_msecs (jiffies); +if (hp->interface_id !='S' ) {sg_remove_request (sfp, srp);return -ENOSYS ;
@@ -817,7 +819,6 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,return -ENODEV ; } - hp->duration =jiffies_to_msecs (jiffies);if (hp->interface_id !='\0' &&/* v3 (or later) interface */ (SG_FLAG_Q_AT_TAIL & hp->flags)) at_head =0 ;
@@ -1361,9 +1362,6 @@ sg_rq_end_io(struct request *rq, blk_status_t status)"sg_cmd_done: pack_id=%d, res=0x%x\n" , srp->header.pack_id, result)); srp->header.resid = resid; - ms =jiffies_to_msecs (jiffies); - srp->header.duration = (ms > srp->header.duration) ? - (ms - srp->header.duration) :0 ;if (0 != result) {struct scsi_sense_hdr sshdr;
@@ -1413,6 +1411,9 @@ sg_rq_end_io(struct request *rq, blk_status_t status) done =0 ; } srp->done = done; + ms =jiffies_to_msecs (jiffies); + srp->header.duration = (ms > srp->header.duration) ? + (ms - srp->header.duration) :0 ;write_unlock_irqrestore (&sfp->rq_list_lock, iflags);if (likely (done)) {
@@ -2560,6 +2561,7 @@ static void sg_proc_debug_helper(struct seq_file *s, Sg_device * sdp)const sg_io_hdr_t *hp;const char * cp;unsigned int ms; +unsigned int duration; k =0 ;list_for_each_entry (fp, &sdp->sfds, sfd_siblings) {
@@ -2598,13 +2600,17 @@ static void sg_proc_debug_helper(struct seq_file *s, Sg_device * sdp)seq_printf (s," id=%d blen=%d" , srp->header.pack_id, blen);if (srp->done) -seq_printf (s," dur=%d" , hp->duration); +seq_printf (s," dur=%u" , hp->duration);else { ms =jiffies_to_msecs (jiffies); -seq_printf (s," t_o/elap=%d/%d" , + duration =READ_ONCE (hp->duration); +if (duration) + duration = (ms > duration ? + ms - duration :0 ); +seq_printf (s," t_o/elap=%u/%u" , (new_interface ? hp->timeout :jiffies_to_msecs (fp->timeout)), - (ms > hp->duration ? ms - hp->duration :0 )); + duration); }seq_printf (s,"ms sgat=%d op=0x%02x\n" , usg, (int ) srp->data.cmd_opcode);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 445/451 blk-throttle: Set BIO_THROTTLED when bio has been throttled
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laibin Qiu <[email protected]>
[ Upstream commit 5a011f889b4832aa80c2a872a5aade5c48d2756f ]
1.In current process, all bio will set the BIO_THROTTLED flag after __blk_throtl_bio().
2.If bio needs to be throttled, it will start the timer and stop submit bio directly. Bio will submit in blk_throtl_dispatch_work_fn() when the timer expires.But in the current process, if bio is throttled. The BIO_THROTTLED will be set to bio after timer start. If the bio has been completed, it may cause use-after-free blow.
BUG: KASAN: use-after-free in blk_throtl_bio+0x12f0/0x2c70 Read of size 2 at addr ffff88801b8902d4 by task fio/26380 dump_stack+0x9b/0xce print_address_description.constprop.6+0x3e/0x60 kasan_report.cold.9+0x22/0x3a blk_throtl_bio+0x12f0/0x2c70 submit_bio_checks+0x701/0x1550 submit_bio_noacct+0x83/0xc80 submit_bio+0xa7/0x330 mpage_readahead+0x380/0x500 read_pages+0x1c1/0xbf0 page_cache_ra_unbounded+0x471/0x6f0 do_page_cache_ra+0xda/0x110 ondemand_readahead+0x442/0xae0 page_cache_async_ra+0x210/0x300 generic_file_buffered_read+0x4d9/0x2130 generic_file_read_iter+0x315/0x490 blkdev_read_iter+0x113/0x1b0 aio_read+0x2ad/0x450 io_submit_one+0xc8e/0x1d60 __se_sys_io_submit+0x125/0x350 do_syscall_64+0x2d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Allocated by task 26380: kasan_save_stack+0x19/0x40 __kasan_kmalloc.constprop.2+0xc1/0xd0 kmem_cache_alloc+0x146/0x440 mempool_alloc+0x125/0x2f0 bio_alloc_bioset+0x353/0x590 mpage_alloc+0x3b/0x240 do_mpage_readpage+0xddf/0x1ef0 mpage_readahead+0x264/0x500 read_pages+0x1c1/0xbf0 page_cache_ra_unbounded+0x471/0x6f0 do_page_cache_ra+0xda/0x110 ondemand_readahead+0x442/0xae0 page_cache_async_ra+0x210/0x300 generic_file_buffered_read+0x4d9/0x2130 generic_file_read_iter+0x315/0x490 blkdev_read_iter+0x113/0x1b0 aio_read+0x2ad/0x450 io_submit_one+0xc8e/0x1d60 __se_sys_io_submit+0x125/0x350 do_syscall_64+0x2d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 0: kasan_save_stack+0x19/0x40 kasan_set_track+0x1c/0x30 kasan_set_free_info+0x1b/0x30 __kasan_slab_free+0x111/0x160 kmem_cache_free+0x94/0x460 mempool_free+0xd6/0x320 bio_free+0xe0/0x130 bio_put+0xab/0xe0 bio_endio+0x3a6/0x5d0 blk_update_request+0x590/0x1370 scsi_end_request+0x7d/0x400 scsi_io_completion+0x1aa/0xe50 scsi_softirq_done+0x11b/0x240 blk_mq_complete_request+0xd4/0x120 scsi_mq_done+0xf0/0x200 virtscsi_vq_done+0xbc/0x150 vring_interrupt+0x179/0x390 __handle_irq_event_percpu+0xf7/0x490 handle_irq_event_percpu+0x7b/0x160 handle_irq_event+0xcc/0x170 handle_edge_irq+0x215/0xb20 common_interrupt+0x60/0x120 asm_common_interrupt+0x1e/0x40
Fix this by move BIO_THROTTLED set into the queue_lock.
--- block/blk-throttle.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
block/blk-throttle.c +10 -6
@@ -2216,8 +2216,10 @@ bool blk_throtl_bio(struct bio *bio)rcu_read_lock ();/* see throtl_charge_bio() */ -if (bio_flagged (bio,BIO_THROTTLED )) - goto out; +if (bio_flagged (bio,BIO_THROTTLED )) { +rcu_read_unlock (); +return false; + }if (!cgroup_subsys_on_dfl (io_cgrp_subsys)) { blkg_rwstat_add(&tg->stat_bytes, bio->bi_opf,
@@ -2225,8 +2227,10 @@ bool blk_throtl_bio(struct bio *bio)blkg_rwstat_add (&tg->stat_ios, bio->bi_opf,1 ); } -if (!tg->has_rules[rw]) - goto out; +if (!tg->has_rules[rw]) { +rcu_read_unlock (); +return false; + }spin_lock_irq (&q->queue_lock);
@@ -2310,14 +2314,14 @@ again: } out_unlock: -spin_unlock_irq (&q->queue_lock); -out:bio_set_flag (bio,BIO_THROTTLED );#ifdef CONFIG_BLK_DEV_THROTTLING_LOW if (throttled || !td->track_bio_latency) bio->bi_issue.value |=BIO_ISSUE_THROTL_SKIP_LATENCY ;#endif +spin_unlock_irq (&q->queue_lock); +rcu_read_unlock ();return throttled; }
# Librecast Test Results
020/020 [ OK ] liblcrq
010/010 [ OK ] libmld
120/120 [ OK ] liblibrecast
CPU/kernel: Linux auntie 5.10.248-rc1-00452-g48eff3b1f60c #1 SMP Thu Jan 15 18:13:51 -00 2026 x86_64 AMD Ryzen 9 9950X 16-Core Processor AuthenticAMD GNU/Linux
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.248 release. There are 451 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 17 Jan 2026 16:41:26 +0000. Anything received after that time might be too late.
5.10.248-rc1 built and run on my x86_64 test system (AMD Ryzen 9 9900X, System76 thelio-mira-r4-n3). No errors or regressions.
Thanks,
Slade
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.248 release. There are 451 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 17 Jan 2026 16:41:26 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.248-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.248 release. There are 451 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Limited-features 32-bit i386 5.10.248-rc1 compiled without problems and run ok on a test device. No regressions noticed.
The VT console fbdev bug seems fixed. Hurray!
Thanks, Woody
Greg Kroah-Hartman wrote on Thu, Jan 15, 2026 at 05:43:21PM +0100:
Quoted 5 lines
This is the start of the stable review cycle for the 5.10.248 release. There are 451 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Responses should be made by Sat, 17 Jan 2026 16:41:26 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.248-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.
Tested 48eff3b1f60c ("Linux 5.10.248-rc1") on:
- arm i.MX6ULL (Armadillo 640)
- arm64 i.MX8MP (Armadillo G4)
No obvious regression in dmesg or basic tests:
Signature · 1 line
Dominique Martinet
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.248 release. There are 451 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 17 Jan 2026 16:41:26 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.248-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.10:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
67 tests: 67 pass, 0 failLinux version: 5.10.248-rc1-g48eff3b1f60c
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Re: [PATCH 5.10 023/451] samples: work around glibc redefining some of our defines wrong
In reply to Greg Kroah-HartmanQuoted 10 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <[email protected]>
[ Upstream commit
a48f822908982353c3256e35a089e9e7d0d61580]Apparently as of version 2.42, glibc headers define
AT_RENAME_NOREPLACEand some of the other flags forrenameat2()and friends in <stdio.h>.
This is not relevant to 5.10 or any branch older than 6.12, because <linux/fcntl.h> only started defining these macros in 6.12.
Ben.
Quoted 79 lines
Which would all be fine, except for inexplicable reasons glibc decided to define them _differently_ from the kernel definitions, which then makes some of our sample code that includes both kernel headers and user space headers unhappy, because the compiler will (correctly) complain about redefining things.
Now, mixing kernel headers and user space headers is always a somewhat iffy proposition due to namespacing issues, but it's kind of inevitable in our sample and selftest code. And this is just glibc being stupid.
Those defines come from the kernel, glibc is exposing the kernel interfaces, and glibc shouldn't make up some random new expressions for these values.
It's not like glibc headers changed the actual result values, but they arbitrarily just decided to use a different expression to describe those values. The kernel just does
#define AT_RENAME_NOREPLACE 0x0001while glibc does
# define RENAME_NOREPLACE (1 << 0) # define AT_RENAME_NOREPLACE RENAME_NOREPLACEinstead. Same value in the end, but very different macro definition.
For absolutely no reason.
This has since been fixed in the glibc development tree, so eventually we'll end up with the canonical expressions and no clashes. But in the meantime the broken headers are in the glibc-2.42 release and have made it out into distributions.
Do a minimal work-around to make the samples build cleanly by just undefining the affected macros in between the user space header include and the kernel header includes.
Signed-off-by Linus Torvalds <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- samples/vfs/test-statx.c | 6 ++++++ samples/watch_queue/watch_test.c | 6 ++++++ 2 files changed, 12 insertions(+)samples/vfs/test-statx.c +6
-0@@ -19,6 +19,12 @@#include <time.h> #include <sys/syscall.h> #include <sys/types.h> + +// Work around glibc header silliness +#undef AT_RENAME_NOREPLACE +#undef AT_RENAME_EXCHANGE +#undef AT_RENAME_WHITEOUT +#include <linux/stat.h> #include <linux/fcntl.h> #define statx foosamples/watch_queue/watch_test.c +6
-0@@ -16,6 +16,12 @@#include <errno.h> #include <sys/ioctl.h> #include <limits.h> + +// Work around glibc header silliness +#undef AT_RENAME_NOREPLACE +#undef AT_RENAME_EXCHANGE +#undef AT_RENAME_WHITEOUT +#include <linux/watch_queue.h> #include <linux/unistd.h> #include <linux/keyctl.h>
Signature · 3 lines
Ben Hutchings
Experience is directly proportional to the value of equipment destroyed
- Carolyn ScheppnerQuoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.248 release. There are 451 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.248 release. There are 451 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 17 Jan 2026 16:41:26 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.248-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
5.10.248-rc1 has been running fine on a physical amd64 system for roughly a day now, doing several tasks including running some KVM guests (also running 5.10.248-rc1 successfully) and compiling other stable kernel rc's. I can confirm it fixes the virtual console regression from 5.10.247, and I have not seen any new regressions.
(As I described in a previous email, linked below, the 5.10.248-rc1 fbdev patches allow two additional patches -- previously applied to 5.15.y -- to apply cleanly to 5.10.y. It seems to me these are not important/urgent enough to delay 5.10.248 and they could go into the queue for 5.10.249.)
https://lore.kernel.org/stable/[email protected]/
Signature · 1 line
-Barry K. Nathan <[email protected]>
Re: [PATCH 5.10 048/451] i3c: remove i2c board info from i2c_dev_desc
In reply to Greg Kroah-HartmanQuoted 13 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jamie Iles <[email protected]>
[ Upstream commit
31b9887c7258ca47d9c665a80f19f006c86756b1]I2C board info is only required during adapter setup so there is no requirement to keeping a pointer to it once running. To support dynamic device addition we can't rely on board info - user-space creation through sysfs won't have a boardinfo.
Quoted 5 lines
Cc Alexandre Belloni <[email protected]>Signed-off-by Jamie Iles <[email protected]>Signed-off-by Alexandre Belloni <[email protected]>Stable-dep-of:
9d4f219807d5("i3c: fix refcount inconsistency ini3c_master_register")
[...]
Commit 9d4f219807d5 is a legitimate fix, but it does *not* depend on any of these other i3c changes.
Ben.
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 069/451] clk: renesas: r9a06g032: Export function to set dmamux
In reply to Greg Kroah-HartmanQuoted 13 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miquel Raynal <[email protected]>
[ Upstream commit
885525c1e7e27ea6207d648a8db20dfbbd9e4238]The dmamux register is located within the system controller.
Without syscon, we need an extra helper in order to give write access to this register to a dmamux driver.
Quoted 7 lines
Signed-off-by Miquel Raynal <[email protected]>Acked-by Stephen Boyd <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>Signed-off-by Vinod Koul <[email protected]>Stable-dep-of:
f8def051bbcf("clk: renesas: r9a06g032: Fix memory leak in error path")
[...]
Similarly, commit f8def051bbcf is a real fix but doesn't actually depend on these supposed dependencies.
Ben.
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesGreg Kroah-Hartman
maintainerRe: [PATCH 5.10 048/451] i3c: remove i2c board info from i2c_dev_desc
In reply to Ben HutchingsQuoted 19 lines · Ben Hutchings
Quoted 13 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jamie Iles <[email protected]>
[ Upstream commit
31b9887c7258ca47d9c665a80f19f006c86756b1]I2C board info is only required during adapter setup so there is no requirement to keeping a pointer to it once running. To support dynamic device addition we can't rely on board info - user-space creation through sysfs won't have a boardinfo.
Quoted 5 lines
Cc Alexandre Belloni <[email protected]>Signed-off-by Jamie Iles <[email protected]>Signed-off-by Alexandre Belloni <[email protected]>Stable-dep-of:
9d4f219807d5("i3c: fix refcount inconsistency ini3c_master_register")
Quoted 4 lines
[...]
Commit
9d4f219807d5is a legitimate fix, but it does *not* depend on any of these other i3c changes.
From a "does this patch apply cleanly" point of view, yes, it did need those other changes. But from a "does this patch do the same thing" point of view, you are correct, it didn't. I'll go drop the others and fix the real one up by hand here.
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 023/451] samples: work around glibc redefining some of our defines wrong
In reply to Ben HutchingsQuoted 7 lines · Ben Hutchings
Quoted 6 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <[email protected]>
Quoted 7 lines
Quoted 4 lines
[ Upstream commit
a48f822908982353c3256e35a089e9e7d0d61580]Apparently as of version 2.42, glibc headers define
AT_RENAME_NOREPLACEand some of the other flags forrenameat2()and friends in <stdio.h>.This is not relevant to 5.10 or any branch older than 6.12, because <
linux/fcntl.h> only started defining these macros in 6.12.
thanks, now dropped.
greg k-h
Re: [PATCH 5.10 110/451] netfilter: nft_connlimit: move stateful fields out of expression data
In reply to Greg Kroah-HartmanQuoted 9 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <[email protected]>
[ Upstream commit
37f319f37d9005693dff085bb72852eeebc803ef]In preparation for the rule blob representation.
[...]
net/netfilter/nft_connlimit.c static int nft_connlimit_clone(struct nft_expr *dst, const struct nft_expr *src, · line 210
Quoted 8 lines
net/netfilter/nft_connlimit.c +3
-1@@ -200,7 +205,11 @@ static int nft_connlimit_clone(struct nft_expr *dst, const struct nft_expr *src,struct nft_connlimit *priv_dst =nft_expr_priv (dst);struct nft_connlimit *priv_src =nft_expr_priv (src); -nf_conncount_list_init (&priv_dst->list); + priv_dst->list =kmalloc (sizeof (*priv_dst->list),GFP_ATOMIC ); +if (priv_dst->list) +return -ENOMEM ;
[...]
This condition is inverted. Fixed upstream by:
commit 51edb2ff1c6fc27d3fa73f0773a31597ecd8e230
Author: Pablo Neira Ayuso <[email protected]> Date: Mon Jan 10 20:48:17 2022 +0100
netfilter: nf_tables: typo NULL check in _clone() function
but that won't apply directly.
Ben.
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesGreg Kroah-Hartman
maintainerRe: [PATCH 5.10 069/451] clk: renesas: r9a06g032: Export function to set dmamux
In reply to Ben HutchingsQuoted 21 lines · Ben Hutchings
Quoted 13 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miquel Raynal <[email protected]>
[ Upstream commit
885525c1e7e27ea6207d648a8db20dfbbd9e4238]The dmamux register is located within the system controller.
Without syscon, we need an extra helper in order to give write access to this register to a dmamux driver.
Quoted 7 lines
Signed-off-by Miquel Raynal <[email protected]>Acked-by Stephen Boyd <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>Signed-off-by Vinod Koul <[email protected]>Stable-dep-of:
f8def051bbcf("clk: renesas: r9a06g032: Fix memory leak in error path")
Quoted 4 lines
[...]
Similarly, commit
f8def051bbcfis a real fix but doesn't actually depend on these supposed dependencies.
To apply cleanly, yes it did. I've dropped the dependancies now and fixed this up by hand.
thanks,
greg k-h
Re: [PATCH 5.10 114/451] mtd: lpddr_cmds: fix signed shifts in lpddr_cmds
In reply to Greg Kroah-HartmanQuoted 8 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ivan Stepchenko <[email protected]>
[ Upstream commit
c909fec69f84b39e63876c69b9df2c178c6b76ba]
Quoted 8 lines
There are several places where a value of type 'int' is shifted by
lpddr->chipshift.lpddr->chipshiftis derived from QINFO geometry and might reach 31 when QINFO reports a 2 GiB size - the maximum supported by LPDDR(1) compliant chips. This may cause unexpected sign-extensions when casting the integer value to the type of 'unsigned long'.Use '1UL <<
lpddr->chipshift' and cast 'j' to unsigned long before shifting so the computation is performed at the destination width.
[...]
In lpddr_point() and lpddr_unpoint(), chipnum is also shifted left by lpddr->chipshift. Don't those expressions also need to be changed?
Ben.
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 122/451] NFS: Label the dentry with a verifier in nfs_rmdir() and nfs_unlink()
In reply to Greg Kroah-HartmanQuoted 8 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit
9019fb391de02cbff422090768b73afe9f6174df]
Quoted 8 lines
After the success of an operation such as
rmdir()orunlink(), we expect to add the dentry back to the dcache as an ordinary negative dentry. However in NFS, unless it is labelled with the appropriate verifier for the parent directory state, thennfs_lookup_revalidatewill end up discarding that dentry and forcing a new lookup.The fix is to ensure that we relabel the dentry appropriately on success.
[...]
It looks like we would need a further fix on top of this:
commit f16857e62bac60786104c020ad7c86e2163b2c5b
Author: NeilBrown <[email protected]> Date: Fri Aug 19 09:55:59 2022 +1000
NFS: unlink/rmdir shouldn't call d_delete() twice on ENOENT
Ben.
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 123/451] NFS: dont unhash dentry during unlink/rename
In reply to Greg Kroah-HartmanQuoted 4 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
Quoted 8 lines
From: NeilBrown <[email protected]>
[ Upstream commit
3c59366c207e4c6c6569524af606baf017a55c61]NFS
unlink()(and rename over existing target) must determine if the file is open, and must perform a "silly rename" instead of an unlink (or before rename) if it is. Otherwise the client might hold a file open which has been removed on the server.
[...]
It looks like we need yet another fix after this:
commit 99bc9f2eb3f79a2b4296d9bf43153e1d10ca50d3
Author: NeilBrown <[email protected]> Date: Tue May 28 13:27:17 2024 +1000
NFS: add barriers when testing for NFS_FSDATA_BLOCKED
Ben.
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 183/451] ethtool: Avoid overflowing userspace buffer on stats query
In reply to Greg Kroah-HartmanQuoted 8 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gal Pressman <[email protected]>
[ Upstream commit
7b07be1ff1cb6c49869910518650e8d0abc7d25f]
Quoted 7 lines
The ethtool -S command operates across three ioctl calls:
ETHTOOL_GSSET_INFOfor the size,ETHTOOL_GSTRINGSfor the names, andETHTOOL_GSTATSfor the values.If the number of stats changes between these calls (e.g., due to device reconfiguration), userspace's buffer allocation will be incorrect, potentially leading to buffer overflow.
[...]
This seems like it could cause a regression for the DPDK driver for mlx5, which sets ethtool_stats::n_stats to a "maximum" value:
https://sources.debian.org/src/dpdk/25.11-2/drivers/net/mlx5/linux/mlx5_ethdev_os.c?hl=1324#L1324
Everything else I could find with Debian codesearch does seem to initialise ethtool_gstrings::len and ethtool_stats::n_stats as you expect, though.
This change should be documented in include/uapi/linux/ethtool.h, which currently specifies these fields as output only.
Ben.
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 205/451] firmware: imx: scu-irq: Init workqueue before request mbox channel
In reply to Greg Kroah-HartmanQuoted 11 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <[email protected]>
[ Upstream commit
81fb53feb66a3aefbf6fcab73bb8d06f5b0c54ad]With mailbox channel requested, there is possibility that interrupts may come in, so need to make sure the workqueue is initialized before the queue is scheduled by mailbox rx callback.
[...]
This is an incomplete fix; you also need to pick:
commit ff3f9913bc0749364fbfd86ea62ba2d31c6136c8
Author: Peng Fan <[email protected]> Date: Fri Oct 17 09:56:27 2025 +0800
firmware: imx: scu-irq: Set mu_resource_id before get handle
Ben.
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 212/451] reset: fix BIT macro reference
In reply to Greg Kroah-HartmanQuoted 6 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Encrow Thorne <[email protected]>
Quoted 7 lines
[ Upstream commit
f3d8b64ee46c9b4b0b82b1a4642027728bac95b8]RESET_CONTROL_FLAGS_BIT_* macros use
BIT(), butreset.hdoes not includebits.h. This causes compilation errors when includingreset.hstandalone.Include
bits.hto makereset.hself-contained.
[...]
This should have had:
That commit went into 6.13, so only the 6.18-stable branch needed this.
Ben.
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 219/451] nvme-fc: dont hold rport lock when putting ctrl
In reply to Greg Kroah-HartmanQuoted 11 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Wagner <[email protected]>
[ Upstream commit
b71cbcf7d170e51148d5467820ae8a72febcb651]
nvme_fc_ctrl_putcan acquire the rport lock when freeing the ctrl object:
Quoted 8 lines
nvme_fc_ctrl_put
nvme_fc_ctrl_freespin_lock_irqsave(rport->lock)Thus we can't hold the rport lock when calling
nvme_fc_ctrl_put.Justin suggested use the safe list iterator variant because
nvme_fc_ctrl_putwill also modify therport->list.
The "safe" list iterator macros do protect against deletion of the current node within the loop body, but they assume the next node won't also be deleted.
[...]
drivers/nvme/host/fc.c nvme_fc_match_disconn_ls(struct nvme_fc_rport *rport, · line 1525
Quoted 12 lines
drivers/nvme/host/fc.c +3
-1-list_for_each_entry (ctrl, &rport->ctrl_list, ctrl_list) { +list_for_each_entry_safe (ctrl, tmp, &rport->ctrl_list, ctrl_list) {if (!nvme_fc_ctrl_get (ctrl))continue ;spin_lock (&ctrl->lock);@@ -1520,7 +1520,9 @@ nvme_fc_match_disconn_ls(struct nvme_fc_rport *rport,if (ret)/* leave the ctrl get reference */ break ; +spin_unlock_irqrestore (&rport->lock, flags);nvme_fc_ctrl_put (ctrl); +spin_lock_irqsave (&rport->lock, flags);
Does anything prevent the next node (*tmp) being removed by another thread while the lock is dropped here?
Ben.
Quoted 3 lines
drivers/nvme/host/fc.c +0
-0}spin_unlock_irqrestore (&rport->lock, flags);
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 234/451] usb: phy: fsl-usb: Fix use-after-free in delayed work during device removal
In reply to Greg Kroah-HartmanQuoted 26 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Duoming Zhou <[email protected]>
commit
41ca62e3e21e48c2903b3b45e232cf4f2ff7434fupstream.The delayed work item
otg_eventis initialized infsl_otg_conf()and scheduled under two conditions:
1. When a host controller binds to the OTG controller.
2. When the USB ID pin state changes (cable insertion/removal).A race condition occurs when the device is removed via
fsl_otg_remove():
thefsl_otginstance may be freed while the delayed work is still pending or executing. This leads to use-after-free when the work functionfsl_otg_event()accesses the already freed memory.The problematic scenario:
(detach thread) | (delayed work) fsl_otg_remove() | kfree(fsl_otg_dev) //FREE| fsl_otg_event() | og = container_of(...) //USE | og-> //USE
Quoted 3 lines
Fix this by calling
disable_delayed_work_sync()infsl_otg_remove()before deallocating thefsl_otgstructure. This ensures the delayed work is properly canceled and completes execution prior to memory deallocation.
[...]
The disable_delayed_work_sync() function was only added in 6.10 and has not (yet) been backported anywhere.
So for older branches, either this fix needs to be changed to use cancel_delayed_work_sync() (which I suspect requires reordering some of the cleanup, to be safe) or disable_delayed_work_sync() needs to be backported first.
Ben.
Signature · 4 lines
Ben Hutchings
The obvious mathematical breakthrough [to break modern encryption]
would be development of an easy way to factor large prime numbers.
- Bill GatesRe: [PATCH 5.10 183/451] ethtool: Avoid overflowing userspace buffer on stats query
In reply to Ben HutchingsQuoted 13 lines · Ben Hutchings
Quoted 12 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gal Pressman <[email protected]>
[ Upstream commit
7b07be1ff1cb6c49869910518650e8d0abc7d25f]The ethtool -S command operates across three ioctl calls:
ETHTOOL_GSSET_INFOfor the size,ETHTOOL_GSTRINGSfor the names, andETHTOOL_GSTATSfor the values.
Quoted 8 lines
Quoted 3 lines
If the number of stats changes between these calls (e.g., due to device reconfiguration), userspace's buffer allocation will be incorrect, potentially leading to buffer overflow.
[...]
This seems like it could cause a regression for the DPDK driver for mlx5, which sets
ethtool_stats::n_statsto a "maximum" value:
https://sources.debian.org/src/dpdk/25.11-2/drivers/net/mlx5/linux/mlx5_ethdev_os.c?hl=1324#L1324
The maximum value is actually the number of stats returned by the driver (see mlx5_os_get_stats_n()). I also verified my change with the DPDK team.
Quoted 7 lines
Everything else I could find with Debian codesearch does seem to initialise
ethtool_gstrings::lenandethtool_stats::n_statsas you expect, though.This change should be documented in
include/uapi/linux/ethtool.h, which currently specifies these fields as output only.
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 205/451] firmware: imx: scu-irq: Init workqueue before request mbox channel
In reply to Ben HutchingsQuoted 14 lines · Ben Hutchings
Quoted 11 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <[email protected]>
[ Upstream commit
81fb53feb66a3aefbf6fcab73bb8d06f5b0c54ad]With mailbox channel requested, there is possibility that interrupts may come in, so need to make sure the workqueue is initialized before the queue is scheduled by mailbox rx callback.
[...]
Quoted 7 lines
This is an incomplete fix; you also need to pick:
commit
ff3f9913bc0749364fbfd86ea62ba2d31c6136c8Author: Peng Fan <[email protected]> Date: Fri Oct 17 09:56:27 2025 +0800firmware: imx: scu-irq: Set
mu_resource_idbefore get handle
How did you determine this? There's no "Fixes:" tag to give us a clue as to if it's needed anywhere or not.
thanks,
greg k-h
Re: [PATCH 5.10 205/451] firmware: imx: scu-irq: Init workqueue before request mbox channel
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Ben Hutchings
Quoted 11 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <[email protected]>
[ Upstream commit
81fb53feb66a3aefbf6fcab73bb8d06f5b0c54ad]With mailbox channel requested, there is possibility that interrupts may come in, so need to make sure the workqueue is initialized before the queue is scheduled by mailbox rx callback.
[...]
This is an incomplete fix; you also need to pick:
Quoted 8 lines
Quoted 5 lines
commit
ff3f9913bc0749364fbfd86ea62ba2d31c6136c8Author: Peng Fan <[email protected]> Date: Fri Oct 17 09:56:27 2025 +0800firmware: imx: scu-irq: Set
mu_resource_idbefore get handleHow did you determine this? There's no "Fixes:" tag to give us a clue as to if it's needed anywhere or not.
I looked at the first fix and asked myself "what other initialisation does the interrupt handler depend on?", and then I found this. I think all versions of the driver need both fixes.
Ben.
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 183/451] ethtool: Avoid overflowing userspace buffer on stats query
In reply to Gal PressmanQuoted 1 line · Gal Pressman
On 17/01/2026 21:58, Ben Hutchings wrote:
[...]
Quoted 9 lines
Quoted 6 lines
Everything else I could find with Debian codesearch does seem to initialise
ethtool_gstrings::lenandethtool_stats::n_statsas you expect, though.This change should be documented in
include/uapi/linux/ethtool.h, which currently specifies these fields as output only.
Thank you. Please add:
so that the documentation update will also get into the stable kernel branches.
Ben.
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 262/451] io_uring: fix filename leak in __io_openat_prep()
In reply to Greg Kroah-HartmanQuoted 4 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
Quoted 8 lines
From: Prithvi Tambewagh <[email protected]>
__io_openat_prep()allocates a struct filename usinggetname(). However,
for the condition of the file being installed in the fixed file table as well as havingO_CLOEXECflag set, the function returns early. At that point, the request doesn't haveREQ_F_NEED_CLEANUPflag set. Due to this, the memory for the newly allocated struct filename is not cleaned up, causing a memory leak.
[...]
This patch is missing a reference to the upstream commit (b14fad555302a2104948feaff70503b64c80ac01).
Ben.
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 183/451] ethtool: Avoid overflowing userspace buffer on stats query
In reply to Ben HutchingsQuoted 13 lines · Ben Hutchings
Quoted 1 line · Gal Pressman
On 17/01/2026 21:58, Ben Hutchings wrote:
[...]
Quoted 9 lines
Quoted 6 lines
Everything else I could find with Debian codesearch does seem to initialise
ethtool_gstrings::lenandethtool_stats::n_statsas you expect, though.This change should be documented in
include/uapi/linux/ethtool.h, which currently specifies these fields as output only.
Quoted 6 lines
Thank you. Please add:
Fixes 7b07be1ff1cb ("ethtool: Avoid overflowing userspace buffer on stats query")so that the documentation update will also get into the stable kernel branches.
Sorry, this was merged already..
Re: [PATCH 5.10 324/451] media: TDA1997x: Remove redundant cancel_delayed_work in probe
In reply to Greg Kroah-HartmanQuoted 11 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Duoming Zhou <[email protected]>
commit
29de195ca39fc2ac0af6fd45522994df9f431f80upstream.The
delayed_workdelayed_work_enable_hpdis initialized withINIT_DELAYED_WORK(), but it is never scheduled intda1997x_probe().
It seems like it can be scheduled as soon as the probe function calls v4l2_async_register_subdev().
Quoted 6 lines
Calling
cancel_delayed_work()on a work that has never been scheduled is redundant and unnecessary, as there is no pending work to cancel.Remove the redundant
cancel_delayed_work()from error handling path intda1997x_probe()to avoid potential confusion.
I don't believe this is redundant at all.
In any case, this doesn't seem to be a candidate for stable since a redundant cancel_delayed_work() is harmless.
Ben.
Quoted 21 lines
Fixes 9ac0038db9a7 ("media: i2c: Add TDA1997x HDMI receiver driver")Signed-off-by Duoming Zhou <[email protected]>Signed-off-by Hans Verkuil <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/media/i2c/tda1997x.c | 1 - 1 file changed, 1 deletion(-)drivers/media/i2c/tda1997x.c +0
-1@@ -2779,7 +2779,6 @@ err_free_media: err_free_handler:v4l2_ctrl_handler_free (&state->hdl); err_free_mutex: -cancel_delayed_work (&state->delayed_work_enable_hpd);mutex_destroy (&state->page_lock);mutex_destroy (&state->lock); err_free_state:
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 326/451] media: i2c: adv7842: Remove redundant cancel_delayed_work in probe
In reply to Greg Kroah-HartmanQuoted 12 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Duoming Zhou <[email protected]>
commit
e66a5cc606c58e72f18f9cdd868a3672e918f9f8upstream.The
delayed_workdelayed_work_enable_hotplugis initialized withINIT_DELAYED_WORK()inadv7842_probe(), but it is never scheduled anywhere in the probe function.
Quoted 7 lines
Calling
cancel_delayed_work()on a work that has never been scheduled is redundant and unnecessary, as there is no pending work to cancel.Remove the redundant
cancel_delayed_work()from error handling path and adjust the goto label accordingly to simplify the code and avoid potential confusion.
I think this may have the same problem as #324, though I can't see exactly at what point the subdev is registered.
Ben.
Quoted 31 lines
Fixes a89bcd4c6c20 ("[media] adv7842: add new video decoder driver")Signed-off-by Duoming Zhou <[email protected]>Signed-off-by Hans Verkuil <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/media/i2c/adv7842.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/media/i2c/adv7842.c +1
-3@@ -3552,7 +3552,7 @@ static int adv7842_probe(struct i2c_clie state->pad.flags =MEDIA_PAD_FL_SOURCE ; err =media_entity_pads_init (&sd->entity,1 , &state->pad);if (err) - goto err_work_queues; + goto err_i2c; err =adv7842_core_init (sd);if (err)@@ -3573,8 +3573,6 @@ static int adv7842_probe(struct i2c_clie err_entity:media_entity_cleanup (&sd->entity); -err_work_queues: -cancel_delayed_work (&state->delayed_work_enable_hotplug); err_i2c:adv7842_unregister_clients (sd); err_hdl:
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 335/451] net: macb: Relocate mog_init_rings() callback from macb_mac_link_up() to macb_open()
In reply to Greg Kroah-HartmanQuoted 7 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiaolei Wang <[email protected]>
commit
99537d5c476cada9cf75aef9fa75579a31faadb9upstream.
[...]
Quoted 11 lines
drivers/net/ethernet/cadence/macb_main.c +0
-1@@ -654,7 +654,6 @@ static void macb_mac_link_up(struct phyl/* Initialize rings & buffers as clearing MACB_BIT(TE) in link down * cleared the pipeline and control registers. */ - bp->macbgem_ops.mog_init_rings (bp);macb_init_buffers (bp);for (q =0 , queue = bp->queues; q < bp->num_queues; ++q, ++queue)
drivers/net/ethernet/cadence/macb_main.c static void gem_init_rings(struct macb * · line 2290
Quoted 5 lines
drivers/net/ethernet/cadence/macb_main.c +2
-0@@ -2287,6 +2286,8 @@ static void gem_init_rings(struct macb *unsigned int q;int i; + bp->macbgem_ops.mog_init_rings (bp); +
This is in the wrong function; it needs to be inserted in macb_open() as in the upstream version.
Ben.
Quoted 5 lines
drivers/net/ethernet/cadence/macb_main.c +0
-0for (q =0 , queue = bp->queues; q < bp->num_queues; ++q, ++queue) {for (i =0 ; i < bp->tx_ring_size; i++) { desc =macb_tx_desc (queue, i);
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 337/451] drm/nouveau/dispnv50: Dont call drm_atomic_get_crtc_state() in prepare_fb
In reply to Greg Kroah-HartmanQuoted 15 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lyude Paul <[email protected]>
commit
560271e10b2c86e95ea35afa9e79822e4847f07aupstream.Since we recently started warning about uses of this function after the atomic check phase completes, we've started getting warnings about this in nouveau. It appears a misplaced
drm_atomic_get_crtc_state()call has been hiding in our .prepare_fb callback for a while.So, fix this by adding a new
nv50_head_atom_get_new()function and use that in our .prepare_fb callback instead.
[...]
Quoted 14 lines
drivers/gpu/drm/nouveau/dispnv50/atom.h +8
-0+static inline struct nv50_head_atom * +nv50_head_atom_get_new (struct drm_atomic_state *state,struct drm_crtc *crtc) +{ +struct drm_crtc_state *statec =drm_atomic_get_new_crtc_state (state, crtc); + +if (!statec) +return NULL ; +return nv50_head_atom (statec); }
drivers/gpu/drm/nouveau/dispnv50/wndw.c nv50_wndw_prepare_fb(struct drm_plane *p · line 566
Quoted 7 lines
drivers/gpu/drm/nouveau/dispnv50/wndw.c +1
-1@@ -561,7 +561,7 @@ nv50_wndw_prepare_fb(struct drm_plane *p asyw->image.offset[0 ] = nvbo->offset;if (wndw->func->prepare) { - asyh =nv50_head_atom_get (asyw->state.state, asyw->state.crtc); + asyh =nv50_head_atom_get_new (asyw->state.state, asyw->state.crtc);if (IS_ERR (asyh))return PTR_ERR (asyh);
But now the error check here doesn't work.
Ben.
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 372/451] hwmon: (max16065) Use local variable to avoid TOCTOU
In reply to Greg Kroah-HartmanQuoted 8 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gui-Dong Han <[email protected]>
[ Upstream commit
b8d5acdcf525f44e521ca4ef51dce4dac403dab4]
Quoted 7 lines
In
max16065_current_show,data->curr_senseis read twice: once for the error check and again for the calculation. Sincei2c_smbus_read_byte_datareturns negative error codes on failure, if the data changes to an error code between the check and the use,ADC_TO_CURRresults in an incorrect calculation.Read
data->curr_senseinto a local variable to ensure consistency.
Simply copying shared data to a local variable before using it cannot fix a data race. The compiler is allowed to optimise away that copy and keep using data->curr_sense, since it can see that the current thread does not change data->curr_sense.
You have to, at minimum, use READ_ONCE() here and WRITE_ONCE() when writing to max16065_data::curr_sense to ensure that the compiler does not optimise away the copy.
Quoted 5 lines
Note
thatdata->curr_gainis constant and safe to access directly.This aligns
max16065_current_showwithmax16065_input_show, which already uses a local variable for the same reason.
Then there are 2 functions that need a further fix...
Ben.
Quoted 33 lines
Link https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ open hereFixes f5bae2642e3d ("hwmon: Driver for MAX16065 System Manager and compatibles")Signed-off-by Gui-Dong Han <[email protected]>Signed-off-by Guenter Roeck <[email protected]>Signed-off-by Sasha Levin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/hwmon/max16065.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/hwmon/max16065.c +4
-3@@ -216,12 +216,13 @@ static ssize_t max16065_current_show(str struct device_attribute *da, char *buf) { struct max16065_data *data = max16065_update_device(dev); +int curr_sense = data->curr_sense; -if (unlikely (data->curr_sense <0 )) -return data->curr_sense; +if (unlikely (curr_sense <0 )) +return curr_sense;return sysfs_emit (buf,"%d\n" , -ADC_TO_CURR (data->curr_sense, data->curr_gain)); +ADC_TO_CURR (curr_sense, data->curr_gain)); } static ssize_t max16065_limit_store(struct device *dev,
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 374/451] ARM: dts: microchip: sama5d2: fix spi flexcom fifo size to 32
In reply to Greg Kroah-HartmanQuoted 24 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Ferre <[email protected]>
[ Upstream commit
7d5864dc5d5ea6a35983dd05295fb17f2f2f44ce]Unlike standalone spi peripherals, on sama5d2, the flexcom spi have fifo size of 32 data. Fix flexcom/spi nodes where this property is wrong.
Fixes 6b9a3584c7ed ("ARM: dts: at91: sama5d2: Add missing flexcom definitions")Cc [email protected] # 5.8+Signed-off-by Nicolas Ferre <[email protected]>Signed-off-by Claudiu Beznea <[email protected]>Signed-off-by Sasha Levin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- arch/arm/boot/dts/sama5d2.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)arch/arm/boot/dts/sama5d2.dtsi +0
-0
[...]
arch/arm/boot/dts/sama5d2.dtsi line 931
Quoted 9 lines
arch/arm/boot/dts/sama5d2.dtsi +1
-1@@ -925,7 +925,7 @@ AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(18))>; dma-names = "tx", "rx"; - atmel,fifo-size = <16>; + atmel,fifo-size = <32>; status = "disabled"; };
[...]
This hunk (only) of the backport ends up changing the wrong node - it should be applied to spi5, not i2c5. The starting line should be 905, not 925.
Ben.
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 393/451] NFSD: NFSv4 file creation neglects setting ACL
In reply to Greg Kroah-HartmanQuoted 24 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
[ Upstream commit
913f7cf77bf14c13cfea70e89bcb6d0b22239562]An NFSv4 client that sets an ACL with a named principal during file creation retrieves the ACL afterwards, and finds that it is only a default ACL (based on the mode bits) and not the ACL that was requested during file creation. This violates RFC 8881 section 6.4.1.3: "the ACL attribute is set as given".
The issue occurs in
nfsd_create_setattr(). On 6.1.y, the check to determine whethernfsd_setattr()should be called is simply "iap->ia_valid", which only accounts for iattr changes. When only an ACL is present (and no iattr fields are set),nfsd_setattr()is skipped and the POSIX ACL is never applied to the inode.Subsequently, when the client retrieves the ACL, the server finds no POSIX ACL on the inode and returns one generated from the file's mode bits rather than returning the originally-specified ACL.
Quoted 5 lines
Reported-by Aurelien Couderc <[email protected]>Fixes c0cbe70742f4 ("NFSD: add posix ACLs to struct nfsd_attrs")[ cel: Adjust nfsd_create_setattr() instead of nfsd_attrs_valid() ]Signed-off-by Chuck Lever <[email protected]>
Would it make sense to also backport:
commit 442d27ff09a218b61020ab56387dbc508ad6bfa6
Author: Stephen Smalley <[email protected]> Date: Fri May 3 09:09:06 2024 -0400
nfsd: set security label during create operations
? It seems like that's fixing a similar kind of bug, and would also make the upstream version of this apply cleanly.
Ben.
Quoted 18 lines
Signed-off-by Greg Kroah-Hartman <[email protected]>--- fs/nfsd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/vfs.c +1
-1@@ -1335,7 +1335,7 @@ nfsd_create_setattr(struct svc_rqst *rqs* Callers expect new file metadata to be committed even * if the attributes have not changed. */ -if (iap->ia_valid) +if (iap->ia_valid || attrs->na_pacl || attrs->na_dpacl) status =nfsd_setattr (rqstp, resfhp, attrs,0 , (time64_t )0 );else status =nfserrno (commit_metadata (resfhp));
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 393/451] NFSD: NFSv4 file creation neglects setting ACL
Quoted 33 lines · Ben Hutchings
Quoted 24 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
[ Upstream commit
913f7cf77bf14c13cfea70e89bcb6d0b22239562]An NFSv4 client that sets an ACL with a named principal during file creation retrieves the ACL afterwards, and finds that it is only a default ACL (based on the mode bits) and not the ACL that was requested during file creation. This violates RFC 8881 section 6.4.1.3: "the ACL attribute is set as given".
The issue occurs in
nfsd_create_setattr(). On 6.1.y, the check to determine whethernfsd_setattr()should be called is simply "iap->ia_valid", which only accounts for iattr changes. When only an ACL is present (and no iattr fields are set),nfsd_setattr()is skipped and the POSIX ACL is never applied to the inode.Subsequently, when the client retrieves the ACL, the server finds no POSIX ACL on the inode and returns one generated from the file's mode bits rather than returning the originally-specified ACL.
Quoted 5 lines
Reported-by Aurelien Couderc <[email protected]>Fixes c0cbe70742f4 ("NFSD: add posix ACLs to struct nfsd_attrs")[ cel: Adjust nfsd_create_setattr() instead of nfsd_attrs_valid() ]Signed-off-by Chuck Lever <[email protected]>Would it make sense to also backport:
Quoted 8 lines
commit
442d27ff09a218b61020ab56387dbc508ad6bfa6Author: Stephen Smalley <[email protected]> Date: Fri May 3 09:09:06 2024 -0400nfsd: set security label during create operations
? It seems like that's fixing a similar kind of bug, and would also make the upstream version of this apply cleanly.
I'll have another look. I think 442d27ff09a218b61020ab56387dbc508ad6bfa6 had some significant pre-requisites.
Quoted 19 lines
Quoted 18 lines
Signed-off-by Greg Kroah-Hartman <[email protected]>--- fs/nfsd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/vfs.c +1
-1@@ -1335,7 +1335,7 @@ nfsd_create_setattr(struct svc_rqst *rqs* Callers expect new file metadata to be committed even * if the attributes have not changed. */ -if (iap->ia_valid) +if (iap->ia_valid || attrs->na_pacl || attrs->na_dpacl) status =nfsd_setattr (rqstp, resfhp, attrs,0 , (time64_t )0 );else status =nfserrno (commit_metadata (resfhp));
Signature · 1 line
Chuck Lever
Re: [PATCH 5.10 394/451] mm/mprotect: use long for page accountings and retval
In reply to Greg Kroah-HartmanQuoted 10 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Xu <[email protected]>
commit
a79390f5d6a78647fd70856bd42b22d994de0ba2upstream.Switch to use type "long" for page accountings and retval across the whole procedure of
change_protection().
[...]
This was a dependency for a backport of commit 670ddd8cdcbd "mm/mprotect: delete pmd_none_or_clear_bad_unless_trans_huge()", but that's not in the queue. It seems pointless to apply this by itself.
Ben.
Signature · 2 lines
Ben Hutchings Larkinson's Law: All laws are basically false.
Re: [PATCH 5.10 423/451] tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
In reply to Greg Kroah-HartmanQuoted 11 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuniyuki Iwashima <[email protected]>
[ Upstream commit
c65f27b9c3be2269918e1cbad6d8884741f835c5]
get_netdev_for_sock()is called duringsetsockopt(), so not under RCU.
Quoted 6 lines
Using sk_dst_get(sk)->dev could trigger UAF.
Let's use
__sk_dst_get()anddst_dev_rcu().Note that the only ->ndo_sk_get_lower_dev() user is
bond_sk_get_lower_dev(), which uses RCU.
[...]
So should 5.10 also have a backport of commit 007feb87fb15 ("net/bonding: Implement ndo_sk_get_lower_dev")? Or is the use of netdev_sk_get_lowest_dev() here not actually that important?
It seems kind of wrong to add the netdev operation and a caller for it, but no implementation.
Ben.
Signature · 2 lines
Ben Hutchings Power corrupts. Absolute power is kind of neat. - John Lehman
Re: [PATCH 5.10 423/451] tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
Quoted 19 lines · Ben Hutchings
Quoted 1 line · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me
know.
Quoted 10 lines
------------------
From: Kuniyuki Iwashima <[email protected]>
[ Upstream commit
c65f27b9c3be2269918e1cbad6d8884741f835c5]
get_netdev_for_sock()is called duringsetsockopt(), so not under RCU.Quoted 6 lines
Using sk_dst_get(sk)->dev could trigger UAF.
Let's use
__sk_dst_get()anddst_dev_rcu().Note that the only ->ndo_sk_get_lower_dev() user is
bond_sk_get_lower_dev(), which uses RCU.
Quoted 10 lines
[...]
So should 5.10 also have a backport of commit
007feb87fb15("net/bonding: Implementndo_sk_get_lower_dev")? Or is the use ofnetdev_sk_get_lowest_dev()here not actually that important?It seems kind of wrong to add the netdev operation and a caller for it, but no implementation.
Hi Ben,
Thank you for catching this issue.
I agree that we should also add commit 007feb87fb15 ("net/bonding:
Implement ndo_sk_get_lower_dev") to the 5.10.y tree to ensure the implementation is complete. I will send an updated patch soon.
- Keerthana
Ben.
Quoted 6 lines
--
Ben Hutchings
Power corrupts. Absolute power is kind of neat. - John Lehman
Re: [PATCH 5.10 423/451] tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
Hi Greg,
I have backported the two additional patches required for the 5.10.y tree and submitted a v2 series. You can find the updated patches here:
https://lore.kernel.org/stable/[email protected]/T/#t
Could you please consume these in the next version, or alternatively, add the two missed patches (commit IDs 5b998545 and 719a402cf) to the current queue?
- Keerthana K
Quoted 47 lines · Keerthana Kalyanasundaram
Quoted 19 lines · Ben Hutchings
Quoted 1 line · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me
know.
Quoted 10 lines
------------------
From: Kuniyuki Iwashima <[email protected]>
[ Upstream commit
c65f27b9c3be2269918e1cbad6d8884741f835c5]
get_netdev_for_sock()is called duringsetsockopt(), so not under RCU.Quoted 6 lines
Using sk_dst_get(sk)->dev could trigger UAF.
Let's use
__sk_dst_get()anddst_dev_rcu().Note that the only ->ndo_sk_get_lower_dev() user is
bond_sk_get_lower_dev(), which uses RCU.Quoted 10 lines
[...]
So should 5.10 also have a backport of commit
007feb87fb15("net/bonding: Implementndo_sk_get_lower_dev")? Or is the use ofnetdev_sk_get_lowest_dev()here not actually that important?It seems kind of wrong to add the netdev operation and a caller for it, but no implementation.
Hi Ben,
Thank you for catching this issue.
I agree that we should also add commit007feb87fb15("net/bonding:
Implementndo_sk_get_lower_dev") to the 5.10.y tree to ensure the implementation is complete. I will send an updated patch soon.
- KeerthanaBen.
Quoted 6 lines
--
Ben Hutchings
Power corrupts. Absolute power is kind of neat. - John Lehman
Greg KH
maintainerRe: [PATCH 5.10 423/451] tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
Quoted 10 lines · Keerthana Kalyanasundaram
Hi Greg,
I have backported the two additional patches required for the 5.10.y tree and submitted a v2 series. You can find the updated patches here:
https://lore.kernel.org/stable/[email protected]/T/#tCould you please consume these in the next version, or alternatively, add the two missed patches (commit IDs
5b998545and719a402cf) to the current queue?
I've dropped them all from the 5.10.y tree now, and from the 5.15.y tree. Can you also resend that series?
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 394/451] mm/mprotect: use long for page accountings and retval
In reply to Ben HutchingsQuoted 9 lines · Ben Hutchings
Quoted 8 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Xu <[email protected]>
commit
a79390f5d6a78647fd70856bd42b22d994de0ba2upstream.
Quoted 7 lines
Quoted 2 lines
Switch to use type "long" for page accountings and retval across the whole procedure of
change_protection().[...]
This was a dependency for a backport of commit
670ddd8cdcbd"mm/mprotect: deletepmd_none_or_clear_bad_unless_trans_huge()", but that's not in the queue. It seems pointless to apply this by itself.
Now dropped, thanks.
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 374/451] ARM: dts: microchip: sama5d2: fix spi flexcom fifo size to 32
In reply to Ben HutchingsQuoted 37 lines · Ben Hutchings
Quoted 24 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Ferre <[email protected]>
[ Upstream commit
7d5864dc5d5ea6a35983dd05295fb17f2f2f44ce]Unlike standalone spi peripherals, on sama5d2, the flexcom spi have fifo size of 32 data. Fix flexcom/spi nodes where this property is wrong.
Fixes 6b9a3584c7ed ("ARM: dts: at91: sama5d2: Add missing flexcom definitions")Cc [email protected] # 5.8+Signed-off-by Nicolas Ferre <[email protected]>Signed-off-by Claudiu Beznea <[email protected]>Signed-off-by Sasha Levin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- arch/arm/boot/dts/sama5d2.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)arch/arm/boot/dts/sama5d2.dtsi +0
-0[...]
Quoted 9 lines
arch/arm/boot/dts/sama5d2.dtsi +1
-1@@ -925,7 +925,7 @@ AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(18))>; dma-names = "tx", "rx"; - atmel,fifo-size = <16>; + atmel,fifo-size = <32>; status = "disabled"; };[...]
Quoted 3 lines
This hunk (only) of the backport ends up changing the wrong node - it should be applied to spi5, not i2c5. The starting line should be 905, not 925.
Yeah, something went wrong with the backport, I'll drop this from all queues.
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 212/451] reset: fix BIT macro reference
In reply to Ben HutchingsQuoted 13 lines · Ben Hutchings
Quoted 12 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Encrow Thorne <[email protected]>
[ Upstream commit
f3d8b64ee46c9b4b0b82b1a4642027728bac95b8]RESET_CONTROL_FLAGS_BIT_* macros use
BIT(), butreset.hdoes not includebits.h. This causes compilation errors when includingreset.hstandalone.
Quoted 8 lines
Quoted 1 line
Include
bits.hto makereset.hself-contained.[...]
This should have had:
Fixes dad35f7d2fc1 ("reset: replace boolean parameters with flags parameter")That commit went into 6.13, so only the 6.18-stable branch needed this.
Now dropped, thanks.
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 234/451] usb: phy: fsl-usb: Fix use-after-free in delayed work during device removal
In reply to Ben HutchingsQuoted 32 lines · Ben Hutchings
Quoted 29 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Duoming Zhou <[email protected]>
commit
41ca62e3e21e48c2903b3b45e232cf4f2ff7434fupstream.The delayed work item
otg_eventis initialized infsl_otg_conf()and scheduled under two conditions:
1. When a host controller binds to the OTG controller.
2. When the USB ID pin state changes (cable insertion/removal).A race condition occurs when the device is removed via
fsl_otg_remove():
thefsl_otginstance may be freed while the delayed work is still pending or executing. This leads to use-after-free when the work functionfsl_otg_event()accesses the already freed memory.The problematic scenario:
(detach thread) | (delayed work) fsl_otg_remove() | kfree(fsl_otg_dev) //FREE| fsl_otg_event() | og = container_of(...) //USE | og-> //USEFix this by calling
disable_delayed_work_sync()infsl_otg_remove()before deallocating thefsl_otgstructure. This ensures the delayed work is properly canceled and completes execution prior to memory deallocation.[...]
Quoted 7 lines
The
disable_delayed_work_sync()function was only added in 6.10 and has not (yet) been backported anywhere.So for older branches, either this fix needs to be changed to use
cancel_delayed_work_sync()(which I suspect requires reordering some of the cleanup, to be safe) ordisable_delayed_work_sync()needs to be backported first.
As no build tests seem to be picking this up, odds are no one uses it :)
I've dropped this now, thanks!
greg k-h
Re: [PATCH 5.10 423/451] tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
In reply to Greg KHQuoted 9 lines · Greg KH
Quoted 5 lines · Keerthana Kalyanasundaram
Hi Greg,
I have backported the two additional patches required for the 5.10.y tree and submitted a v2 series. You can find the updated patches here:
https://lore.kernel.org/stable/[email protected]/T/#t
Quoted 2 lines
Quoted 7 lines
Quoted 3 lines
Could you please consume these in the next version, or alternatively, add the two missed patches (commit IDs
5b998545and719a402cf) to the current queue?I've dropped them all from the 5.10.y tree now, and from the 5.15.y tree. Can you also resend that series?
Hi Greg,
The other two commits are already part of the stable 5.15.y tree, so changes are only needed for the 5.10.y tree.
Please check my latest v2 patchset : (
https://lore.kernel.org/stable/[email protected]/T/#t
)
Thanks,
Keerthana K
Quoted 5 lines
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 262/451] io_uring: fix filename leak in __io_openat_prep()
In reply to Ben HutchingsQuoted 13 lines · Ben Hutchings
Quoted 4 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
Quoted 8 lines
From: Prithvi Tambewagh <[email protected]>
__io_openat_prep()allocates a struct filename usinggetname(). However,
for the condition of the file being installed in the fixed file table as well as havingO_CLOEXECflag set, the function returns early. At that point, the request doesn't haveREQ_F_NEED_CLEANUPflag set. Due to this, the memory for the newly allocated struct filename is not cleaned up, causing a memory leak.
Quoted 4 lines
[...]
This patch is missing a reference to the upstream commit (
b14fad555302a2104948feaff70503b64c80ac01).
Oops, don't know where that went, will go add it now, thanks!
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 205/451] firmware: imx: scu-irq: Init workqueue before request mbox channel
In reply to Ben HutchingsQuoted 22 lines · Ben Hutchings
Quoted 21 lines · Greg Kroah-Hartman
Quoted 20 lines · Ben Hutchings
Quoted 11 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <[email protected]>
[ Upstream commit
81fb53feb66a3aefbf6fcab73bb8d06f5b0c54ad]With mailbox channel requested, there is possibility that interrupts may come in, so need to make sure the workqueue is initialized before the queue is scheduled by mailbox rx callback.
[...]
This is an incomplete fix; you also need to pick:
commit
ff3f9913bc0749364fbfd86ea62ba2d31c6136c8Author: Peng Fan <[email protected]> Date: Fri Oct 17 09:56:27 2025 +0800
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
firmware: imx: scu-irq: Set
mu_resource_idbefore get handleHow did you determine this? There's no "Fixes:" tag to give us a clue as to if it's needed anywhere or not.
I looked at the first fix and asked myself "what other initialisation does the interrupt handler depend on?", and then I found this. I think all versions of the driver need both fixes.
Ok, now queued up, thanks.
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 324/451] media: TDA1997x: Remove redundant cancel_delayed_work in probe
In reply to Ben HutchingsQuoted 20 lines · Ben Hutchings
Quoted 11 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Duoming Zhou <[email protected]>
commit
29de195ca39fc2ac0af6fd45522994df9f431f80upstream.The
delayed_workdelayed_work_enable_hpdis initialized withINIT_DELAYED_WORK(), but it is never scheduled intda1997x_probe().It seems like it can be scheduled as soon as the probe function calls
v4l2_async_register_subdev().Quoted 4 lines
Calling
cancel_delayed_work()on a work that has never been scheduled is redundant and unnecessary, as there is no pending work to cancel.
Quoted 7 lines
Quoted 2 lines
Remove the redundant
cancel_delayed_work()from error handling path intda1997x_probe()to avoid potential confusion.I don't believe this is redundant at all.
In any case, this doesn't seem to be a candidate for stable since a redundant
cancel_delayed_work()is harmless.
Let's leave this as that's what is in Linus's tree, and the other stable releases.
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 326/451] media: i2c: adv7842: Remove redundant cancel_delayed_work in probe
In reply to Ben HutchingsQuoted 17 lines · Ben Hutchings
Quoted 16 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Duoming Zhou <[email protected]>
commit
e66a5cc606c58e72f18f9cdd868a3672e918f9f8upstream.The
delayed_workdelayed_work_enable_hotplugis initialized withINIT_DELAYED_WORK()inadv7842_probe(), but it is never scheduled anywhere in the probe function.Calling
cancel_delayed_work()on a work that has never been scheduled is redundant and unnecessary, as there is no pending work to cancel.
Quoted 6 lines
Quoted 3 lines
Remove the redundant
cancel_delayed_work()from error handling path and adjust the goto label accordingly to simplify the code and avoid potential confusion.I think this may have the same problem as #324, though I can't see exactly at what point the subdev is registered.
Again, I'll leave this for now, thanks.
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 335/451] net: macb: Relocate mog_init_rings() callback from macb_mac_link_up() to macb_open()
In reply to Ben HutchingsQuoted 23 lines · Ben Hutchings
Quoted 7 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiaolei Wang <[email protected]>
commit
99537d5c476cada9cf75aef9fa75579a31faadb9upstream.[...]
Quoted 14 lines
drivers/net/ethernet/cadence/macb_main.c +0
-1@@ -654,7 +654,6 @@ static void macb_mac_link_up(struct phyl/* Initialize rings & buffers as clearing MACB_BIT(TE) in link down * cleared the pipeline and control registers. */ - bp->macbgem_ops.mog_init_rings (bp);macb_init_buffers (bp);for (q =0 , queue = bp->queues; q < bp->num_queues; ++q, ++queue)@@ -2287,6 +2286,8 @@ static void gem_init_rings(struct macb *unsigned int q;int i;
Quoted 5 lines
drivers/net/ethernet/cadence/macb_main.c static void gem_init_rings(struct macb * · line 2290
Quoted 2 lines
drivers/net/ethernet/cadence/macb_main.c +2
-0+ bp->macbgem_ops.mog_init_rings (bp); +This is in the wrong function; it needs to be inserted in
macb_open()as in the upstream version.
Now dropped.
thanks,
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 122/451] NFS: Label the dentry with a verifier in nfs_rmdir() and nfs_unlink()
In reply to Ben HutchingsQuoted 19 lines · Ben Hutchings
Quoted 16 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit
9019fb391de02cbff422090768b73afe9f6174df]After the success of an operation such as
rmdir()orunlink(), we expect to add the dentry back to the dcache as an ordinary negative dentry. However in NFS, unless it is labelled with the appropriate verifier for the parent directory state, thennfs_lookup_revalidatewill end up discarding that dentry and forcing a new lookup.The fix is to ensure that we relabel the dentry appropriately on success.
[...]
Quoted 7 lines
It looks like we would need a further fix on top of this:
commit
f16857e62bac60786104c020ad7c86e2163b2c5bAuthor: NeilBrown <[email protected]> Date: Fri Aug 19 09:55:59 2022 +1000NFS: unlink/rmdir shouldn't call
d_delete()twice on ENOENT
Yes, I had tried it, but it didn't apply properly. I've fixed it up now by hand as it should be added there, thanks.
greg k-h
Greg Kroah-Hartman
maintainerRe: [PATCH 5.10 123/451] NFS: dont unhash dentry during unlink/rename
In reply to Ben HutchingsQuoted 15 lines · Ben Hutchings
Quoted 12 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
[ Upstream commit
3c59366c207e4c6c6569524af606baf017a55c61]NFS
unlink()(and rename over existing target) must determine if the file is open, and must perform a "silly rename" instead of an unlink (or before rename) if it is. Otherwise the client might hold a file open which has been removed on the server.[...]
Quoted 7 lines
It looks like we need yet another fix after this:
commit
99bc9f2eb3f79a2b4296d9bf43153e1d10ca50d3Author: NeilBrown <[email protected]> Date: Tue May 28 13:27:17 2024 +1000NFS: add barriers when testing for
NFS_FSDATA_BLOCKED
Yes, I had tried it, it had failed. But I fixed it up by hand now, thanks.
greg k-h
hello
Compiled and booted 5.10.248-rc1+
dmesg -l err shows:
[ 10.672706] snd_pci_acp3x 0000:04:00.5: Invalid ACP audio mode : 1
As per dmidecode command.
Version: AMD Ryzen 3 3250U with Radeon Graphics
Processor Information
Socket Designation: FP5
Type: Central Processor
Family: Zen
Manufacturer: Advanced Micro Devices, Inc.
ID: 81 0F 81 00 FF FB 8B 17
Signature: Family 23, Model 24, Stepping 1
--
software engineer
rajagiri school of engineering and technology
Greg KH
maintainerRe: [PATCH 5.10 423/451] tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
In reply to Keerthana KalyanasundaramQuoted 19 lines · Keerthana Kalyanasundaram
Quoted 9 lines · Greg KH
Quoted 5 lines · Keerthana Kalyanasundaram
Hi Greg,
I have backported the two additional patches required for the 5.10.y tree and submitted a v2 series. You can find the updated patches here:
https://lore.kernel.org/stable/[email protected]/T/#t
Quoted 2 lines
Quoted 7 lines
Quoted 3 lines
Could you please consume these in the next version, or alternatively, add the two missed patches (commit IDs
5b998545and719a402cf) to the current queue?I've dropped them all from the 5.10.y tree now, and from the 5.15.y tree. Can you also resend that series?
Quoted 8 lines
Hi Greg,
The other two commits are already part of the stable 5.15.y tree, so changes are only needed for the 5.10.y tree.
Please check my latest v2 patchset : (
https://lore.kernel.org/stable/[email protected]/T/#t
)
I see the series, sorry, they are now dropped. Can you resend them for 5.15?
thanks,
greg k-h
Re: [PATCH 5.10 423/451] tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
Quoted 31 lines · Greg KH
Quoted 1 line · Keerthana Kalyanasundaram
On Mon, Jan 19, 2026 at 3:36 PM Greg KH <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
On Mon, Jan 19, 2026 at 03:09:32PM +0530, Keerthana Kalyanasundaram
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Hi Greg,
I have backported the two additional patches required for the 5.10.y
tree
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
and submitted a v2 series. You can find the updated patches here:
https://lore.kernel.org/stable/[email protected]/T/#t
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Could you please consume these in the next version, or
alternatively, add
Quoted 1 line
Quoted 1 line
Quoted 1 line
the two missed patches (commit IDs
5b998545and719a402cf) to thecurrent
Quoted 11 lines
Quoted 5 lines
Quoted 1 line
queue?
I've dropped them all from the 5.10.y tree now, and from the 5.15.y tree. Can you also resend that series?
Hi Greg,
The other two commits are already part of the stable 5.15.y tree, so changes are only needed for the 5.10.y tree.
Quoted 8 lines
Quoted 2 lines
Please check my latest v2 patchset : (
https://lore.kernel.org/stable/[email protected]/T/#t
Quoted 1 line
)
I see the series, sorry, they are now dropped. Can you resend them for 5.15?
Hi Greg,
I have resent the patches for 5.15.y. You can find them here: (
https://lore.kernel.org/lkml/[email protected]/
)
Thank you,
Keerthana K
Quoted 5 lines
thanks,
greg k-h
Re: [PATCH 5.10 219/451] nvme-fc: dont hold rport lock when putting ctrl
In reply to Ben HutchingsHi Ben,
Quoted 8 lines · Ben Hutchings
Quoted 2 lines
Justin suggested use the safe list iterator variant because
nvme_fc_ctrl_putwill also modify therport->list.The "safe" list iterator macros do protect against deletion of the current node within the loop body, but they assume the next node won't also be deleted.
[...]
Quoted 15 lines
drivers/nvme/host/fc.c nvme_fc_match_disconn_ls(struct nvme_fc_rport *rport, · line 1525
Quoted 12 lines
drivers/nvme/host/fc.c +3
-1-list_for_each_entry (ctrl, &rport->ctrl_list, ctrl_list) { +list_for_each_entry_safe (ctrl, tmp, &rport->ctrl_list, ctrl_list) {if (!nvme_fc_ctrl_get (ctrl))continue ;spin_lock (&ctrl->lock);@@ -1520,7 +1520,9 @@ nvme_fc_match_disconn_ls(struct nvme_fc_rport *rport,if (ret)/* leave the ctrl get reference */ break ; +spin_unlock_irqrestore (&rport->lock, flags);nvme_fc_ctrl_put (ctrl); +spin_lock_irqsave (&rport->lock, flags);Does anything prevent the next node (*tmp) being removed by another thread while the lock is dropped here?
Thanks for looking at this. There is nothing in place to prevent LS requests running in parallel, e.g. two dissociating controllers LS for one rport,
schedule_work(&rport->lsrcv_work)
nvme_fc_handle_ls_rqst_work
nvme_fc_handle_ls_rqst
nvme_fc_ls_disconnect_assocWhat's the proper way to address this? I saw there is a list_safe_reset_next:
list_for_each_entry_safe(ctrl, tmp, &rport->ctrl_list, ctrl_list) {
[...]
spin_unlock_irqrestore(&rport->lock, flags);
nvme_fc_ctrl_put(ctrl);
spin_lock_irqsave(&rport->lock, flags);
list_safe_reset_next(ctrl, tmp, ctrl_list);
}Is there another common pattern? Normally, I would use the list swap approach but here it doesn't work, at least without a lot of changes I think.
Thanks,
Daniel
Re: [PATCH 5.10 393/451] NFSD: NFSv4 file creation neglects setting ACL
In reply to Ben HutchingsQuoted 33 lines · Ben Hutchings
Quoted 24 lines · Greg Kroah-Hartman
5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
[ Upstream commit
913f7cf77bf14c13cfea70e89bcb6d0b22239562]An NFSv4 client that sets an ACL with a named principal during file creation retrieves the ACL afterwards, and finds that it is only a default ACL (based on the mode bits) and not the ACL that was requested during file creation. This violates RFC 8881 section 6.4.1.3: "the ACL attribute is set as given".
The issue occurs in
nfsd_create_setattr(). On 6.1.y, the check to determine whethernfsd_setattr()should be called is simply "iap->ia_valid", which only accounts for iattr changes. When only an ACL is present (and no iattr fields are set),nfsd_setattr()is skipped and the POSIX ACL is never applied to the inode.Subsequently, when the client retrieves the ACL, the server finds no POSIX ACL on the inode and returns one generated from the file's mode bits rather than returning the originally-specified ACL.
Quoted 5 lines
Reported-by Aurelien Couderc <[email protected]>Fixes c0cbe70742f4 ("NFSD: add posix ACLs to struct nfsd_attrs")[ cel: Adjust nfsd_create_setattr() instead of nfsd_attrs_valid() ]Signed-off-by Chuck Lever <[email protected]>Would it make sense to also backport:
Quoted 8 lines
commit
442d27ff09a218b61020ab56387dbc508ad6bfa6Author: Stephen Smalley <[email protected]> Date: Fri May 3 09:09:06 2024 -0400nfsd: set security label during create operations
? It seems like that's fixing a similar kind of bug, and would also make the upstream version of this apply cleanly.
"nfsd: set security label during create operations" does not itself apply cleanly to v5.10.y, and neither do at least four of its pre- requisites. There is enough missing context and functionality that I decided it was better to simply apply "neglects setting ACL" with adjustments.
The question of whether "set security label" also needs to be applied to v5.10 seems independent to me (but is still a valid question).
Quoted 21 lines
Ben.
Quoted 18 lines
Signed-off-by Greg Kroah-Hartman <[email protected]>--- fs/nfsd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/vfs.c +1
-1@@ -1335,7 +1335,7 @@ nfsd_create_setattr(struct svc_rqst *rqs* Callers expect new file metadata to be committed even * if the attributes have not changed. */ -if (iap->ia_valid) +if (iap->ia_valid || attrs->na_pacl || attrs->na_dpacl) status =nfsd_setattr (rqstp, resfhp, attrs,0 , (time64_t )0 );else status =nfserrno (commit_metadata (resfhp));
Signature · 1 line
Chuck Lever