]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2026 09:27:47 +0000 (11:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2026 09:27:47 +0000 (11:27 +0200)
added patches:
bluetooth-btrtl-validate-firmware-patch-bounds.patch
ipvs-fix-more-places-with-wrong-ipv6-transport-offsets.patch
ipvs-reload-ip-header-after-head-reallocation.patch
llc-fix-sap-refcount-leak-when-creating-incoming-sockets.patch
macsec-fix-promiscuity-refcount-leak-in-macsec_dev_open.patch
memstick-ms_block-reject-a-card-that-reports-too-many-blocks.patch
net-openvswitch-reject-oversized-nested-action-attrs.patch
pmdomain-imx-fix-i.mx8mp-power-notifier.patch
pmdomain-imx-fix-i.mx8mp-vc8000e-power-up-sequence.patch
powerpc-pseries-fix-memory-leak-on-krealloc-failure-in-papr_init.patch
regulator-ltc3676-fix-incorrect-irqstat-bit-offsets.patch
reset-imx7-correct-polarity-of-mipi-csi-resets-on-i.mx8mq.patch
reset-sunxi-fix-memory-region-leak-on-ioremap-failure.patch
wifi-mac80211-fix-memory-leak-in-ieee80211_register_hw.patch
wifi-rt2x00-avoid-full-teardown-before-work-setup-in-probe.patch

16 files changed:
queue-6.6/bluetooth-btrtl-validate-firmware-patch-bounds.patch [new file with mode: 0644]
queue-6.6/ipvs-fix-more-places-with-wrong-ipv6-transport-offsets.patch [new file with mode: 0644]
queue-6.6/ipvs-reload-ip-header-after-head-reallocation.patch [new file with mode: 0644]
queue-6.6/llc-fix-sap-refcount-leak-when-creating-incoming-sockets.patch [new file with mode: 0644]
queue-6.6/macsec-fix-promiscuity-refcount-leak-in-macsec_dev_open.patch [new file with mode: 0644]
queue-6.6/memstick-ms_block-reject-a-card-that-reports-too-many-blocks.patch [new file with mode: 0644]
queue-6.6/net-openvswitch-reject-oversized-nested-action-attrs.patch [new file with mode: 0644]
queue-6.6/pmdomain-imx-fix-i.mx8mp-power-notifier.patch [new file with mode: 0644]
queue-6.6/pmdomain-imx-fix-i.mx8mp-vc8000e-power-up-sequence.patch [new file with mode: 0644]
queue-6.6/powerpc-pseries-fix-memory-leak-on-krealloc-failure-in-papr_init.patch [new file with mode: 0644]
queue-6.6/regulator-ltc3676-fix-incorrect-irqstat-bit-offsets.patch [new file with mode: 0644]
queue-6.6/reset-imx7-correct-polarity-of-mipi-csi-resets-on-i.mx8mq.patch [new file with mode: 0644]
queue-6.6/reset-sunxi-fix-memory-region-leak-on-ioremap-failure.patch [new file with mode: 0644]
queue-6.6/series
queue-6.6/wifi-mac80211-fix-memory-leak-in-ieee80211_register_hw.patch [new file with mode: 0644]
queue-6.6/wifi-rt2x00-avoid-full-teardown-before-work-setup-in-probe.patch [new file with mode: 0644]

diff --git a/queue-6.6/bluetooth-btrtl-validate-firmware-patch-bounds.patch b/queue-6.6/bluetooth-btrtl-validate-firmware-patch-bounds.patch
new file mode 100644 (file)
index 0000000..88b884b
--- /dev/null
@@ -0,0 +1,41 @@
+From 609c5b04a28dc1b0f3af6a7bc93055135b2d2059 Mon Sep 17 00:00:00 2001
+From: Laxman Acharya Padhya <acharyalaxman8848@gmail.com>
+Date: Fri, 10 Jul 2026 23:10:03 +0545
+Subject: Bluetooth: btrtl: validate firmware patch bounds
+
+From: Laxman Acharya Padhya <acharyalaxman8848@gmail.com>
+
+commit 609c5b04a28dc1b0f3af6a7bc93055135b2d2059 upstream.
+
+rtlbt_parse_firmware() copies patch_length - 4 bytes before appending the
+firmware version. A malformed firmware patch shorter than the version field
+can make this subtraction underflow and turn the copy into an oversized
+read and write during Bluetooth setup.
+
+The existing patch_offset + patch_length check can also wrap on 32-bit
+architectures. Validate the patch length and range without arithmetic
+overflow before allocating or copying the patch.
+
+Fixes: db33c77dddc2 ("Bluetooth: btrtl: Create separate module for Realtek BT driver")
+Cc: stable@vger.kernel.org
+Signed-off-by: Laxman Acharya Padhya <acharyalaxman8848@gmail.com>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/bluetooth/btrtl.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/bluetooth/btrtl.c
++++ b/drivers/bluetooth/btrtl.c
+@@ -763,8 +763,9 @@ static int rtlbt_parse_firmware(struct h
+       }
+       BT_DBG("length=%x offset=%x index %d", patch_length, patch_offset, i);
+-      min_size = patch_offset + patch_length;
+-      if (btrtl_dev->fw_len < min_size)
++      if (patch_length < sizeof(epatch_info->fw_version) ||
++          patch_offset > btrtl_dev->fw_len ||
++          patch_length > btrtl_dev->fw_len - patch_offset)
+               return -EINVAL;
+       /* Copy the firmware into a new buffer and write the version at
diff --git a/queue-6.6/ipvs-fix-more-places-with-wrong-ipv6-transport-offsets.patch b/queue-6.6/ipvs-fix-more-places-with-wrong-ipv6-transport-offsets.patch
new file mode 100644 (file)
index 0000000..df39701
--- /dev/null
@@ -0,0 +1,82 @@
+From b3fe4cbd583895987935a9bdad01c8f9d3a02310 Mon Sep 17 00:00:00 2001
+From: Julian Anastasov <ja@ssi.bg>
+Date: Wed, 8 Jul 2026 21:03:15 +0300
+Subject: ipvs: fix more places with wrong ipv6 transport offsets
+
+From: Julian Anastasov <ja@ssi.bg>
+
+commit b3fe4cbd583895987935a9bdad01c8f9d3a02310 upstream.
+
+Sashiko reports for more incorrect IPv6 transport offsets.
+
+The app code for TCP was assuming IPv4 network header
+even after the ipvsh argument was provided. This can
+cause problems with apps over IPv6. As for the only
+official app in the kernel tree (FTP) this problem is
+harmless because we use Netfilter to mangle the FTP
+ports and we do not adjust the TCP seq numbers.
+
+Also, provide correct offset of the ICMPV6 header in
+ip_vs_out_icmp_v6() for correct checksum checks when
+the IPv6 packet has extension headers.
+
+Fixes: d12e12299a69 ("ipvs: add ipv6 support to ftp")
+Fixes: 2a3b791e6e11 ("IPVS: Add/adjust Netfilter hook functions and helpers for v6")
+Cc: stable@vger.kernel.org
+Link: https://sashiko.dev/#/patchset/20260706101624.69471-1-zhaoyz24%40mails.tsinghua.edu.cn
+Signed-off-by: Julian Anastasov <ja@ssi.bg>
+Signed-off-by: Florian Westphal <fw@strlen.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/netfilter/ipvs/ip_vs_app.c  |   10 ++++------
+ net/netfilter/ipvs/ip_vs_core.c |    3 +--
+ 2 files changed, 5 insertions(+), 8 deletions(-)
+
+--- a/net/netfilter/ipvs/ip_vs_app.c
++++ b/net/netfilter/ipvs/ip_vs_app.c
+@@ -362,14 +362,13 @@ static inline int app_tcp_pkt_out(struct
+                                 struct ip_vs_iphdr *ipvsh)
+ {
+       int diff;
+-      const unsigned int tcp_offset = ip_hdrlen(skb);
+       struct tcphdr *th;
+       __u32 seq;
+-      if (skb_ensure_writable(skb, tcp_offset + sizeof(*th)))
++      if (skb_ensure_writable(skb, ipvsh->len + sizeof(*th)))
+               return 0;
+-      th = (struct tcphdr *)(skb_network_header(skb) + tcp_offset);
++      th = (struct tcphdr *)(skb_network_header(skb) + ipvsh->len);
+       /*
+        *      Remember seq number in case this pkt gets resized
+@@ -439,14 +438,13 @@ static inline int app_tcp_pkt_in(struct
+                                struct ip_vs_iphdr *ipvsh)
+ {
+       int diff;
+-      const unsigned int tcp_offset = ip_hdrlen(skb);
+       struct tcphdr *th;
+       __u32 seq;
+-      if (skb_ensure_writable(skb, tcp_offset + sizeof(*th)))
++      if (skb_ensure_writable(skb, ipvsh->len + sizeof(*th)))
+               return 0;
+-      th = (struct tcphdr *)(skb_network_header(skb) + tcp_offset);
++      th = (struct tcphdr *)(skb_network_header(skb) + ipvsh->len);
+       /*
+        *      Remember seq number in case this pkt gets resized
+--- a/net/netfilter/ipvs/ip_vs_core.c
++++ b/net/netfilter/ipvs/ip_vs_core.c
+@@ -1041,8 +1041,7 @@ static int ip_vs_out_icmp_v6(struct netn
+       snet.in6 = ciph.saddr.in6;
+       offset = ciph.len;
+       return handle_response_icmp(AF_INET6, skb, &snet, ciph.protocol, cp,
+-                                  pp, offset, sizeof(struct ipv6hdr),
+-                                  hooknum);
++                                  pp, offset, ipvsh->len, hooknum);
+ }
+ #endif
diff --git a/queue-6.6/ipvs-reload-ip-header-after-head-reallocation.patch b/queue-6.6/ipvs-reload-ip-header-after-head-reallocation.patch
new file mode 100644 (file)
index 0000000..32d48b2
--- /dev/null
@@ -0,0 +1,40 @@
+From a2f57827bf7c695b8c72dc4511cae8e86582369d Mon Sep 17 00:00:00 2001
+From: Florian Westphal <fw@strlen.de>
+Date: Wed, 8 Jul 2026 16:21:30 +0200
+Subject: ipvs: reload ip header after head reallocation
+
+From: Florian Westphal <fw@strlen.de>
+
+commit a2f57827bf7c695b8c72dc4511cae8e86582369d upstream.
+
+__ip_vs_get_out_rt() calls skb_ensure_writable() which may
+reallocate skb->head.
+
+Fixes: 8d8e20e2d7bb ("ipvs: Decrement ttl")
+Cc: stable@vger.kernel.org
+Assisted-by: Claude:claude-sonnet-4-6
+Acked-by: Julian Anastasov <ja@ssi.bg>
+Signed-off-by: Florian Westphal <fw@strlen.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/netfilter/ipvs/ip_vs_xmit.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/net/netfilter/ipvs/ip_vs_xmit.c
++++ b/net/netfilter/ipvs/ip_vs_xmit.c
+@@ -707,13 +707,11 @@ int
+ ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
+                 struct ip_vs_protocol *pp, struct ip_vs_iphdr *ipvsh)
+ {
+-      struct iphdr  *iph = ip_hdr(skb);
+-
+-      if (__ip_vs_get_out_rt(cp->ipvs, cp->af, skb, NULL, iph->daddr,
++      if (__ip_vs_get_out_rt(cp->ipvs, cp->af, skb, NULL, ip_hdr(skb)->daddr,
+                              IP_VS_RT_MODE_NON_LOCAL, NULL, ipvsh) < 0)
+               goto tx_error;
+-      ip_send_check(iph);
++      ip_send_check(ip_hdr(skb));
+       /* Another hack: avoid icmp_send in ip_fragment */
+       skb->ignore_df = 1;
diff --git a/queue-6.6/llc-fix-sap-refcount-leak-when-creating-incoming-sockets.patch b/queue-6.6/llc-fix-sap-refcount-leak-when-creating-incoming-sockets.patch
new file mode 100644 (file)
index 0000000..0a8842d
--- /dev/null
@@ -0,0 +1,42 @@
+From 2c72eb6286347d05a885412fb076993bd5286b53 Mon Sep 17 00:00:00 2001
+From: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
+Date: Sun, 12 Jul 2026 21:03:43 +0800
+Subject: llc: fix SAP refcount leak when creating incoming sockets
+
+From: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
+
+commit 2c72eb6286347d05a885412fb076993bd5286b53 upstream.
+
+llc_sap_add_socket() takes a SAP reference for each socket added to a SAP,
+and llc_sap_remove_socket() releases it. llc_create_incoming_sock() takes
+an additional SAP reference after adding the child socket.
+
+This extra reference was balanced by an explicit llc_sap_put() in
+llc_ui_release() until commit 3100aa9d74db ("llc: fix SAP reference
+counting w.r.t. socket handling") removed that put. The corresponding hold
+in the accept path was left behind.
+
+When such a child socket is removed, only the reference taken by
+llc_sap_add_socket() is released. The extra reference keeps the SAP alive
+after its last socket is removed. Remove the obsolete hold.
+
+Fixes: 3100aa9d74db ("llc: fix SAP reference counting w.r.t. socket handling")
+Cc: stable@vger.kernel.org
+Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
+Link: https://patch.msgid.link/20260712130343.518797-1-xuanqiang.luo@linux.dev
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/llc/llc_conn.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/net/llc/llc_conn.c
++++ b/net/llc/llc_conn.c
+@@ -773,7 +773,6 @@ static struct sock *llc_create_incoming_
+       newllc->dev = dev;
+       dev_hold(dev);
+       llc_sap_add_socket(llc->sap, newsk);
+-      llc_sap_hold(llc->sap);
+ out:
+       return newsk;
+ }
diff --git a/queue-6.6/macsec-fix-promiscuity-refcount-leak-in-macsec_dev_open.patch b/queue-6.6/macsec-fix-promiscuity-refcount-leak-in-macsec_dev_open.patch
new file mode 100644 (file)
index 0000000..db3b232
--- /dev/null
@@ -0,0 +1,61 @@
+From 7410d11460eb90d6c9281162ccc6a128534d897d Mon Sep 17 00:00:00 2001
+From: James Raphael Tiovalen <jamestiotio@gmail.com>
+Date: Sun, 5 Jul 2026 19:36:29 +0800
+Subject: macsec: fix promiscuity refcount leak in macsec_dev_open()
+
+From: James Raphael Tiovalen <jamestiotio@gmail.com>
+
+commit 7410d11460eb90d6c9281162ccc6a128534d897d upstream.
+
+When a MACsec interface with IFF_PROMISC set is brought up on top of a
+device that has hardware offload enabled, macsec_dev_open() first calls
+dev_set_promiscuity(real_dev, 1) and then propagates the open to the
+offload device. If that propagation fails, the error path jumps to the
+clear_allmulti label, which only reverts allmulti and the unicast
+address. The promiscuity taken on the lower device is never dropped, so
+real_dev is left permanently stuck in promiscuous mode. Its promiscuity
+count can no longer be balanced from software.
+
+Add a clear_promisc label that drops the promiscuity reference and
+route the two offload failure paths to it. The dev_set_promiscuity()
+failure itself still jumps to clear_allmulti, since on that failure the
+count was not incremented.
+
+Fixes: 3cf3227a21d1 ("net: macsec: hardware offloading infrastructure")
+Cc: stable@vger.kernel.org
+Signed-off-by: James Raphael Tiovalen <jamestiotio@gmail.com>
+Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
+Link: https://patch.msgid.link/20260705113629.187490-1-jamestiotio@gmail.com
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/macsec.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/macsec.c
++++ b/drivers/net/macsec.c
+@@ -3558,19 +3558,22 @@ static int macsec_dev_open(struct net_de
+               ops = macsec_get_ops(netdev_priv(dev), &ctx);
+               if (!ops) {
+                       err = -EOPNOTSUPP;
+-                      goto clear_allmulti;
++                      goto clear_promisc;
+               }
+               ctx.secy = &macsec->secy;
+               err = macsec_offload(ops->mdo_dev_open, &ctx);
+               if (err)
+-                      goto clear_allmulti;
++                      goto clear_promisc;
+       }
+       if (netif_carrier_ok(real_dev))
+               netif_carrier_on(dev);
+       return 0;
++clear_promisc:
++      if (dev->flags & IFF_PROMISC)
++              dev_set_promiscuity(real_dev, -1);
+ clear_allmulti:
+       if (dev->flags & IFF_ALLMULTI)
+               dev_set_allmulti(real_dev, -1);
diff --git a/queue-6.6/memstick-ms_block-reject-a-card-that-reports-too-many-blocks.patch b/queue-6.6/memstick-ms_block-reject-a-card-that-reports-too-many-blocks.patch
new file mode 100644 (file)
index 0000000..ca54f8d
--- /dev/null
@@ -0,0 +1,54 @@
+From 718178f524b98bc920d74bc771aed823c8b81425 Mon Sep 17 00:00:00 2001
+From: Maoyi Xie <maoyixie.tju@gmail.com>
+Date: Thu, 2 Jul 2026 16:27:45 +0800
+Subject: memstick: ms_block: reject a card that reports too many blocks
+
+From: Maoyi Xie <maoyixie.tju@gmail.com>
+
+commit 718178f524b98bc920d74bc771aed823c8b81425 upstream.
+
+msb_ftl_initialize() computes the zone count from the card block count
+with no bound:
+
+       msb->zone_count = msb->block_count / MS_BLOCKS_IN_ZONE;
+       ...
+       for (i = 0; i < msb->zone_count; i++)
+               msb->free_block_count[i] = MS_BLOCKS_IN_ZONE;
+
+msb->block_count is a card value. msb_read_boot_blocks() reads
+number_of_blocks from the card boot page and byte swaps it.
+free_block_count is a fixed int[MS_MAX_ZONES]. MS_MAX_ZONES is 16, so the
+valid indices are 0 to 15. The init loop above indexes it by zone_count.
+msb_mark_block_used() and msb_mark_block_unused() index it by
+pba / MS_BLOCKS_IN_ZONE, for pba up to block_count - 1. A card may report
+up to 65535 blocks. A block_count above 8192 (MS_MAX_ZONES *
+MS_BLOCKS_IN_ZONE) lets the pba index reach 16. That writes past
+free_block_count[] and corrupts struct msb_data. A larger count runs the
+init loop past the end too.
+
+A real Memory Stick has at most 16 zones. So it has at most 8192 blocks.
+msb_ftl_initialize() now rejects a card that reports more than
+MS_MAX_ZONES * MS_BLOCKS_IN_ZONE blocks.
+
+Fixes: 0ab30494bc4f ("memstick: add support for legacy memorysticks")
+Cc: stable@vger.kernel.org
+Signed-off-by: Maoyi Xie <maoyixie.tju@gmail.com>
+Signed-off-by: Ulf Hansson <ulfh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/memstick/core/ms_block.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/memstick/core/ms_block.c
++++ b/drivers/memstick/core/ms_block.c
+@@ -1339,6 +1339,10 @@ static int msb_ftl_initialize(struct msb
+               return 0;
+       msb->zone_count = msb->block_count / MS_BLOCKS_IN_ZONE;
++      if (msb->block_count > MS_MAX_ZONES * MS_BLOCKS_IN_ZONE) {
++              pr_err("Too many blocks: %d\n", msb->block_count);
++              return -EINVAL;
++      }
+       msb->logical_block_count = msb->zone_count * 496 - 2;
+       msb->used_blocks_bitmap = bitmap_zalloc(msb->block_count, GFP_KERNEL);
diff --git a/queue-6.6/net-openvswitch-reject-oversized-nested-action-attrs.patch b/queue-6.6/net-openvswitch-reject-oversized-nested-action-attrs.patch
new file mode 100644 (file)
index 0000000..5e4c643
--- /dev/null
@@ -0,0 +1,393 @@
+From 3f1f755366687d051174739fb99f7d560202f60b Mon Sep 17 00:00:00 2001
+From: Asim Viladi Oglu Manizada <manizada@pm.me>
+Date: Mon, 6 Jul 2026 09:44:10 +0000
+Subject: net: openvswitch: reject oversized nested action attrs
+
+From: Asim Viladi Oglu Manizada <manizada@pm.me>
+
+commit 3f1f755366687d051174739fb99f7d560202f60b upstream.
+
+Open vSwitch stores generated flow actions as nlattrs, whose nla_len
+field is u16. Commit a1e64addf3ff ("net: openvswitch: remove
+misbehaving actions length check") allowed the total sw_flow_actions
+stream to grow beyond 64 KiB, which is valid, but also removed the last
+guard preventing a generated nested action attribute from exceeding
+U16_MAX.
+
+An oversized generated container can thus be closed with a truncated
+nla_len. A later dump or teardown then walks a structurally different
+stream than the one that was validated. In particular, an oversized
+nested CLONE/CT action may cause subsequent bytes in the generated
+stream to be interpreted as independent actions.
+
+Keep the larger total-action-stream behavior, but make nested action
+close reject generated containers that do not fit in nla_len, and return
+the error through all callers. For recursive SAMPLE, CLONE, DEC_TTL, and
+CHECK_PKT_LEN builders, trim resource-owning action-list tails in reverse
+construction order before discarding failed wrappers, so resources copied
+into the rejected tails are released before the wrappers are removed.
+
+Most failed outer wrappers are discarded by truncating actions_len after
+child resources have been released. CHECK_PKT_LEN also trims its parent
+after branch resources are gone. SET/TUNNEL close failures unwind their
+known tun_dst ownership directly, and SET_TO_MASKED has no external
+ownership and truncates on close failure.
+
+Fixes: a1e64addf3ff ("net: openvswitch: remove misbehaving actions length check")
+Cc: stable@vger.kernel.org
+Assisted-by: avom-custom-harness:gpt-5.5-qwen3.6-mod-mix
+Signed-off-by: Asim Viladi Oglu Manizada <manizada@pm.me>
+Reviewed-by: Eelco Chaudron <echaudro@redhat.com>
+Reviewed-by: Aaron Conole <aconole@redhat.com>
+Reviewed-by: Ilya Maximets <i.maximets@ovn.org>
+Link: https://patch.msgid.link/20260706094336.38639-1-manizada@pm.me
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/openvswitch/flow_netlink.c |  201 ++++++++++++++++++++++++++++++++---------
+ 1 file changed, 157 insertions(+), 44 deletions(-)
+
+--- a/net/openvswitch/flow_netlink.c
++++ b/net/openvswitch/flow_netlink.c
+@@ -2483,13 +2483,56 @@ static inline int add_nested_action_star
+       return used;
+ }
+-static inline void add_nested_action_end(struct sw_flow_actions *sfa,
+-                                       int st_offset)
++static inline int add_nested_action_end(struct sw_flow_actions *sfa,
++                                      int st_offset)
+ {
+-      struct nlattr *a = (struct nlattr *) ((unsigned char *)sfa->actions +
+-                                                             st_offset);
++      struct nlattr *a;
++      u32 attr_len;
++
++      if (WARN_ON_ONCE(st_offset < 0 ||
++                       (u32)st_offset > sfa->actions_len))
++              return -EINVAL;
++
++      attr_len = sfa->actions_len - (u32)st_offset;
++      if (WARN_ON_ONCE(attr_len < NLA_HDRLEN))
++              return -EINVAL;
++
++      if (attr_len > U16_MAX)
++              return -EMSGSIZE;
++
++      a = (struct nlattr *)((u8 *)sfa->actions + st_offset);
++      a->nla_len = attr_len;
++      return 0;
++}
++
++/* Free the generated action-list tail at @start and truncate it.
++ * If @nested, @start points to its containing nlattr header.
++ */
++static void ovs_nla_trim(struct sw_flow_actions *sfa, int start, bool nested)
++{
++      const struct nlattr *actions;
++      u32 len;
++
++      if (start < 0)
++              return;
++
++      if (WARN_ON_ONCE((u32)start > sfa->actions_len))
++              return;
+-      a->nla_len = sfa->actions_len - st_offset;
++      actions = (const struct nlattr *)((u8 *)sfa->actions + start);
++      len = sfa->actions_len - (u32)start;
++
++      if (nested) {
++              if (len < NLA_HDRLEN)
++                      goto out;
++
++              actions = (const struct nlattr *)((u8 *)actions + NLA_HDRLEN);
++              len -= NLA_HDRLEN;
++      }
++
++      ovs_nla_free_nested_actions(actions, len);
++out:
++      sfa->actions_len = start;
+ }
+ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
+@@ -2509,6 +2552,7 @@ static int validate_and_copy_sample(stru
+       const struct nlattr *attrs[OVS_SAMPLE_ATTR_MAX + 1];
+       const struct nlattr *probability, *actions;
+       const struct nlattr *a;
++      int actions_start;
+       int rem, start, err;
+       struct sample_arg arg;
+@@ -2552,18 +2596,27 @@ static int validate_and_copy_sample(stru
+       err = ovs_nla_add_action(sfa, OVS_SAMPLE_ATTR_ARG, &arg, sizeof(arg),
+                                log);
+       if (err)
+-              return err;
++              goto err;
++      actions_start = (*sfa)->actions_len;
+       err = __ovs_nla_copy_actions(net, actions, key, sfa,
+                                    eth_type, vlan_tci, mpls_label_count, log,
+                                    depth + 1);
+       if (err)
+-              return err;
++              goto err_free;
+-      add_nested_action_end(*sfa, start);
++      err = add_nested_action_end(*sfa, start);
++      if (err)
++              goto err_free;
+       return 0;
++
++err_free:
++      ovs_nla_trim(*sfa, actions_start, false);
++err:
++      (*sfa)->actions_len = start;
++      return err;
+ }
+ static int validate_and_copy_dec_ttl(struct net *net,
+@@ -2611,18 +2664,31 @@ static int validate_and_copy_dec_ttl(str
+               return start;
+       action_start = add_nested_action_start(sfa, OVS_DEC_TTL_ATTR_ACTION, log);
+-      if (action_start < 0)
+-              return action_start;
++      if (action_start < 0) {
++              err = action_start;
++              goto err;
++      }
+       err = __ovs_nla_copy_actions(net, actions, key, sfa, eth_type,
+                                    vlan_tci, mpls_label_count, log,
+                                    depth + 1);
+       if (err)
+-              return err;
++              goto err_free;
+-      add_nested_action_end(*sfa, action_start);
+-      add_nested_action_end(*sfa, start);
++      err = add_nested_action_end(*sfa, action_start);
++      if (err)
++              goto err_free;
++
++      err = add_nested_action_end(*sfa, start);
++      if (err)
++              goto err_free;
+       return 0;
++
++err_free:
++      ovs_nla_trim(*sfa, action_start, true);
++err:
++      (*sfa)->actions_len = start;
++      return err;
+ }
+ static int validate_and_copy_clone(struct net *net,
+@@ -2633,6 +2699,7 @@ static int validate_and_copy_clone(struc
+                                  u32 mpls_label_count, bool log, bool last,
+                                  u32 depth)
+ {
++      int actions_start;
+       int start, err;
+       u32 exec;
+@@ -2648,17 +2715,26 @@ static int validate_and_copy_clone(struc
+       err = ovs_nla_add_action(sfa, OVS_CLONE_ATTR_EXEC, &exec,
+                                sizeof(exec), log);
+       if (err)
+-              return err;
++              goto err;
++      actions_start = (*sfa)->actions_len;
+       err = __ovs_nla_copy_actions(net, attr, key, sfa,
+                                    eth_type, vlan_tci, mpls_label_count, log,
+                                    depth + 1);
+       if (err)
+-              return err;
++              goto err_free;
+-      add_nested_action_end(*sfa, start);
++      err = add_nested_action_end(*sfa, start);
++      if (err)
++              goto err_free;
+       return 0;
++
++err_free:
++      ovs_nla_trim(*sfa, actions_start, false);
++err:
++      (*sfa)->actions_len = start;
++      return err;
+ }
+ void ovs_match_init(struct sw_flow_match *match,
+@@ -2749,20 +2825,20 @@ static int validate_and_copy_set_tun(con
+       tun_dst = metadata_dst_alloc(key.tun_opts_len, METADATA_IP_TUNNEL,
+                                    GFP_KERNEL);
+-      if (!tun_dst)
+-              return -ENOMEM;
++      if (!tun_dst) {
++              err = -ENOMEM;
++              goto err;
++      }
+       err = dst_cache_init(&tun_dst->u.tun_info.dst_cache, GFP_KERNEL);
+-      if (err) {
+-              dst_release((struct dst_entry *)tun_dst);
+-              return err;
+-      }
++      if (err)
++              goto err_free_tun_dst;
+       a = __add_action(sfa, OVS_KEY_ATTR_TUNNEL_INFO, NULL,
+                        sizeof(*ovs_tun), log);
+       if (IS_ERR(a)) {
+-              dst_release((struct dst_entry *)tun_dst);
+-              return PTR_ERR(a);
++              err = PTR_ERR(a);
++              goto err_free_tun_dst;
+       }
+       ovs_tun = nla_data(a);
+@@ -2783,8 +2859,16 @@ static int validate_and_copy_set_tun(con
+       ip_tunnel_info_opts_set(tun_info,
+                               TUN_METADATA_OPTS(&key, key.tun_opts_len),
+                               key.tun_opts_len, dst_opt_type);
+-      add_nested_action_end(*sfa, start);
++      err = add_nested_action_end(*sfa, start);
++      if (WARN_ON_ONCE(err))
++              goto err_free_tun_dst;
++
++      return 0;
++err_free_tun_dst:
++      dst_release((struct dst_entry *)tun_dst);
++err:
++      (*sfa)->actions_len = start;
+       return err;
+ }
+@@ -2957,7 +3041,7 @@ static int validate_set(const struct nla
+       /* Convert non-masked non-tunnel set actions to masked set actions. */
+       if (!masked && key_type != OVS_KEY_ATTR_TUNNEL) {
+-              int start, len = key_len * 2;
++              int err, start, len = key_len * 2;
+               struct nlattr *at;
+               *skip_copy = true;
+@@ -2969,8 +3053,11 @@ static int validate_set(const struct nla
+                       return start;
+               at = __add_action(sfa, key_type, NULL, len, log);
+-              if (IS_ERR(at))
+-                      return PTR_ERR(at);
++              if (IS_ERR(at)) {
++                      err = PTR_ERR(at);
++                      (*sfa)->actions_len = start;
++                      return err;
++              }
+               memcpy(nla_data(at), nla_data(ovs_key), key_len); /* Key. */
+               memset(nla_data(at) + key_len, 0xff, key_len);    /* Mask. */
+@@ -2980,7 +3067,11 @@ static int validate_set(const struct nla
+                       mask->ipv6_label &= htonl(0x000FFFFF);
+               }
+-              add_nested_action_end(*sfa, start);
++              err = add_nested_action_end(*sfa, start);
++              if (WARN_ON_ONCE(err)) {
++                      (*sfa)->actions_len = start;
++                      return err;
++              }
+       }
+       return 0;
+@@ -3025,7 +3116,8 @@ static int validate_and_copy_check_pkt_l
+       const struct nlattr *acts_if_greater, *acts_if_lesser_eq;
+       struct nlattr *a[OVS_CHECK_PKT_LEN_ATTR_MAX + 1];
+       struct check_pkt_len_arg arg;
+-      int nested_acts_start;
++      int greater_acts_start = -1;
++      int lesser_acts_start = -1;
+       int start, err;
+       err = nla_parse_deprecated_strict(a, OVS_CHECK_PKT_LEN_ATTR_MAX,
+@@ -3060,37 +3152,58 @@ static int validate_and_copy_check_pkt_l
+       err = ovs_nla_add_action(sfa, OVS_CHECK_PKT_LEN_ATTR_ARG, &arg,
+                                sizeof(arg), log);
+       if (err)
+-              return err;
++              goto err_free;
+-      nested_acts_start = add_nested_action_start(sfa,
+-              OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL, log);
+-      if (nested_acts_start < 0)
+-              return nested_acts_start;
++      lesser_acts_start =
++              add_nested_action_start(sfa,
++                                      OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL,
++                                      log);
++      if (lesser_acts_start < 0) {
++              err = lesser_acts_start;
++              goto err_free;
++      }
+       err = __ovs_nla_copy_actions(net, acts_if_lesser_eq, key, sfa,
+                                    eth_type, vlan_tci, mpls_label_count, log,
+                                    depth + 1);
+       if (err)
+-              return err;
++              goto err_free;
+-      add_nested_action_end(*sfa, nested_acts_start);
++      err = add_nested_action_end(*sfa, lesser_acts_start);
++      if (err)
++              goto err_free;
+-      nested_acts_start = add_nested_action_start(sfa,
+-              OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER, log);
+-      if (nested_acts_start < 0)
+-              return nested_acts_start;
++      greater_acts_start =
++              add_nested_action_start(sfa,
++                                      OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER,
++                                      log);
++      if (greater_acts_start < 0) {
++              err = greater_acts_start;
++              goto err_free;
++      }
+       err = __ovs_nla_copy_actions(net, acts_if_greater, key, sfa,
+                                    eth_type, vlan_tci, mpls_label_count, log,
+                                    depth + 1);
+       if (err)
+-              return err;
++              goto err_free;
++
++      err = add_nested_action_end(*sfa, greater_acts_start);
++      if (err)
++              goto err_free;
+-      add_nested_action_end(*sfa, nested_acts_start);
+-      add_nested_action_end(*sfa, start);
++      err = add_nested_action_end(*sfa, start);
++      if (err)
++              goto err_free;
+       return 0;
++
++err_free:
++      ovs_nla_trim(*sfa, greater_acts_start, true);
++      ovs_nla_trim(*sfa, lesser_acts_start, true);
++      ovs_nla_trim(*sfa, start, false);
++      return err;
+ }
+ static int copy_action(const struct nlattr *from,
diff --git a/queue-6.6/pmdomain-imx-fix-i.mx8mp-power-notifier.patch b/queue-6.6/pmdomain-imx-fix-i.mx8mp-power-notifier.patch
new file mode 100644 (file)
index 0000000..e6856f3
--- /dev/null
@@ -0,0 +1,62 @@
+From 72422525f641f68bed6ca3389d29ee3f41fdea33 Mon Sep 17 00:00:00 2001
+From: Peng Fan <peng.fan@nxp.com>
+Date: Wed, 10 Jun 2026 22:39:10 +0800
+Subject: pmdomain: imx: Fix i.MX8MP power notifier
+
+From: Peng Fan <peng.fan@nxp.com>
+
+commit 72422525f641f68bed6ca3389d29ee3f41fdea33 upstream.
+
+Using imx8mm_vpu_power_notifier() for i.MX8MP is wrong, as it ungates
+the VPU clocks to provide the ADB clock, which is necessary on i.MX8MM,
+but on i.MX8MP there is a separate gate (bit 3) for the NoC. So add
+imx8mp_vpu_power_notifier() for i.MX8MP.
+
+Fixes: a1a5f15f7f6cb ("soc: imx: imx8m-blk-ctrl: add i.MX8MP VPU blk ctrl")
+Cc: stable@vger.kernel.org
+Reviewed-by: Frank Li <Frank.Li@nxp.com>
+Signed-off-by: Peng Fan <peng.fan@nxp.com>
+Signed-off-by: Ulf Hansson <ulfh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pmdomain/imx/imx8m-blk-ctrl.c |   27 ++++++++++++++++++++++++++-
+ 1 file changed, 26 insertions(+), 1 deletion(-)
+
+--- a/drivers/pmdomain/imx/imx8m-blk-ctrl.c
++++ b/drivers/pmdomain/imx/imx8m-blk-ctrl.c
+@@ -513,9 +513,34 @@ static const struct imx8m_blk_ctrl_domai
+       },
+ };
++static int imx8mp_vpu_power_notifier(struct notifier_block *nb,
++                                   unsigned long action, void *data)
++{
++      struct imx8m_blk_ctrl *bc = container_of(nb, struct imx8m_blk_ctrl,
++                                               power_nb);
++
++      if (action == GENPD_NOTIFY_ON) {
++              /*
++               * On power up we have no software backchannel to the GPC to
++               * wait for the ADB handshake to happen, so we just delay for a
++               * bit. On power down the GPC driver waits for the handshake.
++               */
++
++              udelay(5);
++
++              /* set "fuse" bits to enable the VPUs */
++              regmap_set_bits(bc->regmap, 0x8, 0xffffffff);
++              regmap_set_bits(bc->regmap, 0xc, 0xffffffff);
++              regmap_set_bits(bc->regmap, 0x10, 0xffffffff);
++              regmap_set_bits(bc->regmap, 0x14, 0xffffffff);
++      }
++
++      return NOTIFY_OK;
++}
++
+ static const struct imx8m_blk_ctrl_data imx8mp_vpu_blk_ctl_dev_data = {
+       .max_reg = 0x18,
+-      .power_notifier_fn = imx8mm_vpu_power_notifier,
++      .power_notifier_fn = imx8mp_vpu_power_notifier,
+       .domains = imx8mp_vpu_blk_ctl_domain_data,
+       .num_domains = ARRAY_SIZE(imx8mp_vpu_blk_ctl_domain_data),
+ };
diff --git a/queue-6.6/pmdomain-imx-fix-i.mx8mp-vc8000e-power-up-sequence.patch b/queue-6.6/pmdomain-imx-fix-i.mx8mp-vc8000e-power-up-sequence.patch
new file mode 100644 (file)
index 0000000..464e922
--- /dev/null
@@ -0,0 +1,85 @@
+From 25e252bcf1593b420b12a7231d9dd64b885a2ae2 Mon Sep 17 00:00:00 2001
+From: Peng Fan <peng.fan@nxp.com>
+Date: Wed, 10 Jun 2026 22:39:11 +0800
+Subject: pmdomain: imx: Fix i.MX8MP VC8000E power up sequence
+
+From: Peng Fan <peng.fan@nxp.com>
+
+commit 25e252bcf1593b420b12a7231d9dd64b885a2ae2 upstream.
+
+Per errata[1]:
+ERR050531: VPU_NOC power down handshake may hang during VC8000E/VPUMIX
+power up/down cycling.
+Description: VC8000E reset de-assertion edge and AXI clock may have a
+timing issue.
+Workaround: Set bit2 (vc8000e_clk_en) of BLK_CLK_EN_CSR to 0 to gate off
+both AXI clock and VC8000E clock sent to VC8000E and AXI clock sent to
+VPU_NOC m_v_2 interface during VC8000E power up(VC8000E reset is
+de-asserted by HW)
+
+Add a bool variable is_errata_err050531 in
+'struct imx8m_blk_ctrl_domain_data' to represent whether the workaround
+is needed. If is_errata_err050531 is true, first clear the clk before
+powering up gpc, then enable the clk after powering up gpc.
+
+[1] https://www.nxp.com/webapp/Download?colCode=IMX8MP_1P33A
+
+Fixes: a1a5f15f7f6cb ("soc: imx: imx8m-blk-ctrl: add i.MX8MP VPU blk ctrl")
+Cc: stable@vger.kernel.org
+Signed-off-by: Peng Fan <peng.fan@nxp.com>
+Reviewed-by: Frank Li <Frank.Li@nxp.com>
+Signed-off-by: Ulf Hansson <ulfh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pmdomain/imx/imx8m-blk-ctrl.c |   19 ++++++++++++++++++-
+ 1 file changed, 18 insertions(+), 1 deletion(-)
+
+--- a/drivers/pmdomain/imx/imx8m-blk-ctrl.c
++++ b/drivers/pmdomain/imx/imx8m-blk-ctrl.c
+@@ -54,6 +54,15 @@ struct imx8m_blk_ctrl_domain_data {
+        * register.
+        */
+       u32 mipi_phy_rst_mask;
++
++      /*
++       * VC8000E reset de-assertion edge and AXI clock may have a timing issue.
++       * Workaround: Set bit2 (vc8000e_clk_en) of BLK_CLK_EN_CSR to 0 to gate off
++       * both AXI clock and VC8000E clock sent to VC8000E and AXI clock sent to
++       * VPU_NOC m_v_2 interface during VC8000E power up(VC8000E reset is
++       * de-asserted by HW)
++       */
++      bool is_errata_err050531;
+ };
+ #define DOMAIN_MAX_CLKS 4
+@@ -108,7 +117,11 @@ static int imx8m_blk_ctrl_power_on(struc
+               dev_err(bc->dev, "failed to enable clocks\n");
+               goto bus_put;
+       }
+-      regmap_set_bits(bc->regmap, BLK_CLK_EN, data->clk_mask);
++
++      if (data->is_errata_err050531)
++              regmap_clear_bits(bc->regmap, BLK_CLK_EN, data->clk_mask);
++      else
++              regmap_set_bits(bc->regmap, BLK_CLK_EN, data->clk_mask);
+       /* power up upstream GPC domain */
+       ret = pm_runtime_get_sync(domain->power_dev);
+@@ -117,6 +130,9 @@ static int imx8m_blk_ctrl_power_on(struc
+               goto clk_disable;
+       }
++      if (data->is_errata_err050531)
++              regmap_set_bits(bc->regmap, BLK_CLK_EN, data->clk_mask);
++
+       /* wait for reset to propagate */
+       udelay(5);
+@@ -510,6 +526,7 @@ static const struct imx8m_blk_ctrl_domai
+               .clk_mask = BIT(2),
+               .path_names = (const char *[]){"vc8000e"},
+               .num_paths = 1,
++              .is_errata_err050531 = true,
+       },
+ };
diff --git a/queue-6.6/powerpc-pseries-fix-memory-leak-on-krealloc-failure-in-papr_init.patch b/queue-6.6/powerpc-pseries-fix-memory-leak-on-krealloc-failure-in-papr_init.patch
new file mode 100644 (file)
index 0000000..d3e4c11
--- /dev/null
@@ -0,0 +1,39 @@
+From bd83c98b988d2c560531084e296dbfb530aff829 Mon Sep 17 00:00:00 2001
+From: Thorsten Blum <thorsten.blum@linux.dev>
+Date: Sun, 14 Jun 2026 16:23:56 +0200
+Subject: powerpc/pseries: fix memory leak on krealloc failure in papr_init
+
+From: Thorsten Blum <thorsten.blum@linux.dev>
+
+commit bd83c98b988d2c560531084e296dbfb530aff829 upstream.
+
+When krealloc() fails, free the original esi_buf before returning to
+avoid a memory leak.
+
+Fixes: 3c14b73454cf ("powerpc/pseries: Interface to represent PAPR firmware attributes")
+Cc: stable@vger.kernel.org
+Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
+Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
+Link: https://patch.msgid.link/20260614142356.658212-2-thorsten.blum@linux.dev
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/platforms/pseries/papr_platform_attributes.c |    8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+--- a/arch/powerpc/platforms/pseries/papr_platform_attributes.c
++++ b/arch/powerpc/platforms/pseries/papr_platform_attributes.c
+@@ -271,11 +271,9 @@ retry:
+               esi_buf_size = ESI_HDR_SIZE + (CURR_MAX_ESI_ATTRS * max_esi_attrs);
+               temp_esi_buf = krealloc(esi_buf, esi_buf_size, GFP_KERNEL);
+-              if (temp_esi_buf)
+-                      esi_buf = temp_esi_buf;
+-              else
+-                      return -ENOMEM;
+-
++              if (!temp_esi_buf)
++                      goto out_free_esi_buf;
++              esi_buf = temp_esi_buf;
+               goto retry;
+       }
diff --git a/queue-6.6/regulator-ltc3676-fix-incorrect-irqstat-bit-offsets.patch b/queue-6.6/regulator-ltc3676-fix-incorrect-irqstat-bit-offsets.patch
new file mode 100644 (file)
index 0000000..a3f8401
--- /dev/null
@@ -0,0 +1,58 @@
+From 50dce2e2f84b56d8b4b406d97a1543709e8a87f5 Mon Sep 17 00:00:00 2001
+From: Abhishek Ojha <Abhishek.ojha@savoirfairelinux.com>
+Date: Wed, 15 Jul 2026 13:04:08 -0400
+Subject: regulator: ltc3676: Fix incorrect IRQSTAT bit offsets
+
+From: Abhishek Ojha <Abhishek.ojha@savoirfairelinux.com>
+
+commit 50dce2e2f84b56d8b4b406d97a1543709e8a87f5 upstream.
+
+The LTC3676_IRQSTAT_* bit definitions do not match the IRQSTAT
+(Interrupt Request Status) register layout documented in Table 15
+of the LTC3676/LTC3676-1 datasheet:
+
+  bit 0 - Pushbutton Status Active
+  bit 1 - Hard Reset Occurred
+  bit 2 - PGOOD Timeout Occurred
+  bit 3 - Undervoltage Warning
+  bit 4 - Undervoltage Standby (Fault) Occurred
+  bit 5 - Overtemperature Warning
+  bit 6 - Overtemperature Standby (Fault) Occurred
+  bit 7 - Reserved
+
+The driver instead defines these starting at bit 3, one bit higher
+than the datasheet specifies, which causes ltc3676_regulator_isr()
+to check the wrong status bits and misreport (or miss) PGOOD
+timeout, undervoltage and thermal warning/fault conditions.
+
+Fix the bit offsets to match the datasheet.
+
+Fixes: 37b918a034fe ("regulator: Add LTC3676 support")
+Cc: stable@vger.kernel.org
+Signed-off-by: Abhishek Ojha <Abhishek.ojha@savoirfairelinux.com>
+Link: https://patch.msgid.link/20260715170408.295552-1-Abhishek.ojha@savoirfairelinux.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/regulator/ltc3676.c |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/drivers/regulator/ltc3676.c
++++ b/drivers/regulator/ltc3676.c
+@@ -45,11 +45,11 @@
+ #define LTC3676_DVBxA_REF_SELECT      BIT(5)
+ #define LTC3676_DVBxB_PGOOD_MASK      BIT(5)
+-#define LTC3676_IRQSTAT_PGOOD_TIMEOUT BIT(3)
+-#define LTC3676_IRQSTAT_UNDERVOLT_WARN        BIT(4)
+-#define LTC3676_IRQSTAT_UNDERVOLT_FAULT       BIT(5)
+-#define LTC3676_IRQSTAT_THERMAL_WARN  BIT(6)
+-#define LTC3676_IRQSTAT_THERMAL_FAULT BIT(7)
++#define LTC3676_IRQSTAT_PGOOD_TIMEOUT BIT(2)
++#define LTC3676_IRQSTAT_UNDERVOLT_WARN        BIT(3)
++#define LTC3676_IRQSTAT_UNDERVOLT_FAULT       BIT(4)
++#define LTC3676_IRQSTAT_THERMAL_WARN  BIT(5)
++#define LTC3676_IRQSTAT_THERMAL_FAULT BIT(6)
+ enum ltc3676_reg {
+       LTC3676_SW1,
diff --git a/queue-6.6/reset-imx7-correct-polarity-of-mipi-csi-resets-on-i.mx8mq.patch b/queue-6.6/reset-imx7-correct-polarity-of-mipi-csi-resets-on-i.mx8mq.patch
new file mode 100644 (file)
index 0000000..97c57fc
--- /dev/null
@@ -0,0 +1,48 @@
+From 71827776667f4e4677a4fa806bcfb24d4b8dd9d7 Mon Sep 17 00:00:00 2001
+From: Robby Cai <robby.cai@nxp.com>
+Date: Fri, 19 Jun 2026 15:31:15 +0800
+Subject: reset: imx7: Correct polarity of MIPI CSI resets on i.MX8MQ
+
+From: Robby Cai <robby.cai@nxp.com>
+
+commit 71827776667f4e4677a4fa806bcfb24d4b8dd9d7 upstream.
+
+On i.MX8MQ, the MIPI CSI reset lines are active-low and not self-clearing.
+Writing '0' asserts reset and it remains asserted until explicitly
+deasserted by software.
+
+This driver previously treated the MIPI CSI reset signals as active-high,
+which led to incorrect reset assert/deassert sequencing. This issue was
+exposed by commit 6d79bb8fd2aa ("media: imx8mq-mipi-csi2: Explicitly
+release reset").
+
+Fix this by reflecting the correct reset polarity and ensuring proper
+reset handling.
+
+Fixes: c979dbf59987 ("reset: imx7: Add support for i.MX8MQ IP block variant")
+Cc: stable@vger.kernel.org # 6d79bb8fd2aa: media: imx8mq-mipi-csi2: Explicitly release reset
+Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
+Signed-off-by: Robby Cai <robby.cai@nxp.com>
+Reviewed-by: Guoniu Zhou <guoniu.zhou@oss.nxp.com>
+Reviewed-by: Frank Li <Frank.Li@nxp.com>
+Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/reset/reset-imx7.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/reset/reset-imx7.c
++++ b/drivers/reset/reset-imx7.c
+@@ -236,6 +236,12 @@ static int imx8mq_reset_set(struct reset
+       case IMX8MQ_RESET_PCIE_CTRL_APPS_EN:
+       case IMX8MQ_RESET_PCIE2_CTRL_APPS_EN:
++      case IMX8MQ_RESET_MIPI_CSI1_CORE_RESET:
++      case IMX8MQ_RESET_MIPI_CSI1_PHY_REF_RESET:
++      case IMX8MQ_RESET_MIPI_CSI1_ESC_RESET:
++      case IMX8MQ_RESET_MIPI_CSI2_CORE_RESET:
++      case IMX8MQ_RESET_MIPI_CSI2_PHY_REF_RESET:
++      case IMX8MQ_RESET_MIPI_CSI2_ESC_RESET:
+       case IMX8MQ_RESET_MIPI_DSI_PCLK_RESET_N:
+       case IMX8MQ_RESET_MIPI_DSI_ESC_RESET_N:
+       case IMX8MQ_RESET_MIPI_DSI_DPI_RESET_N:
diff --git a/queue-6.6/reset-sunxi-fix-memory-region-leak-on-ioremap-failure.patch b/queue-6.6/reset-sunxi-fix-memory-region-leak-on-ioremap-failure.patch
new file mode 100644 (file)
index 0000000..56eb900
--- /dev/null
@@ -0,0 +1,46 @@
+From 1a8c89f8c112c75e84ff9a140f969e372aed0c9a Mon Sep 17 00:00:00 2001
+From: Zhao Dongdong <zhaodongdong@kylinos.cn>
+Date: Wed, 17 Jun 2026 11:16:27 +0800
+Subject: reset: sunxi: fix memory region leak on ioremap failure
+
+From: Zhao Dongdong <zhaodongdong@kylinos.cn>
+
+commit 1a8c89f8c112c75e84ff9a140f969e372aed0c9a upstream.
+
+In sunxi_reset_init(), when ioremap() fails, the memory region obtained
+via request_mem_region() is not released, leading to a resource leak.
+
+Add an err_mem_region label to properly release the memory region before
+freeing the data structure.
+
+Fixes: 8f1ae77f4666 ("reset: Add Allwinner SoCs Reset Controller Driver")
+Cc: stable@vger.kernel.org
+Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn>
+Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
+Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
+Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/reset/reset-sunxi.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/reset/reset-sunxi.c
++++ b/drivers/reset/reset-sunxi.c
+@@ -44,7 +44,7 @@ static int sunxi_reset_init(struct devic
+       data->membase = ioremap(res.start, size);
+       if (!data->membase) {
+               ret = -ENOMEM;
+-              goto err_alloc;
++              goto err_mem_region;
+       }
+       spin_lock_init(&data->lock);
+@@ -57,6 +57,8 @@ static int sunxi_reset_init(struct devic
+       return reset_controller_register(&data->rcdev);
++err_mem_region:
++      release_mem_region(res.start, size);
+ err_alloc:
+       kfree(data);
+       return ret;
index 2cb129d2cee24aab2dfbbdd5b94810febba0f979..397ce5b67cb6030da73347d65255d396d541413b 100644 (file)
@@ -1123,3 +1123,18 @@ drbd-reject-data-replies-with-an-out-of-range-payload-size.patch
 riscv-prevent-null-pointer-dereference-in-machine_kexec_prepare.patch
 tracing-osnoise-call-synchronize_rcu-when-unregistering.patch
 cgroup-cpuset-rebind-mm-mempolicy-to-effective_mems-not-mems_allowed.patch
+pmdomain-imx-fix-i.mx8mp-power-notifier.patch
+pmdomain-imx-fix-i.mx8mp-vc8000e-power-up-sequence.patch
+powerpc-pseries-fix-memory-leak-on-krealloc-failure-in-papr_init.patch
+wifi-rt2x00-avoid-full-teardown-before-work-setup-in-probe.patch
+wifi-mac80211-fix-memory-leak-in-ieee80211_register_hw.patch
+regulator-ltc3676-fix-incorrect-irqstat-bit-offsets.patch
+net-openvswitch-reject-oversized-nested-action-attrs.patch
+bluetooth-btrtl-validate-firmware-patch-bounds.patch
+llc-fix-sap-refcount-leak-when-creating-incoming-sockets.patch
+macsec-fix-promiscuity-refcount-leak-in-macsec_dev_open.patch
+memstick-ms_block-reject-a-card-that-reports-too-many-blocks.patch
+ipvs-fix-more-places-with-wrong-ipv6-transport-offsets.patch
+ipvs-reload-ip-header-after-head-reallocation.patch
+reset-imx7-correct-polarity-of-mipi-csi-resets-on-i.mx8mq.patch
+reset-sunxi-fix-memory-region-leak-on-ioremap-failure.patch
diff --git a/queue-6.6/wifi-mac80211-fix-memory-leak-in-ieee80211_register_hw.patch b/queue-6.6/wifi-mac80211-fix-memory-leak-in-ieee80211_register_hw.patch
new file mode 100644 (file)
index 0000000..adcbe13
--- /dev/null
@@ -0,0 +1,56 @@
+From 95fc02722edde02946d0d475221f2b2054d3d8ba Mon Sep 17 00:00:00 2001
+From: Dawei Feng <dawei.feng@seu.edu.cn>
+Date: Mon, 6 Jul 2026 22:35:07 +0800
+Subject: wifi: mac80211: fix memory leak in ieee80211_register_hw()
+
+From: Dawei Feng <dawei.feng@seu.edu.cn>
+
+commit 95fc02722edde02946d0d475221f2b2054d3d8ba upstream.
+
+If kmemdup() fails while copying supported band structures, the error
+path jumps to fail_rate. This skips rate_control_deinitialize() and
+leaks the initialized local->rate_ctrl.
+
+Fix this by adding a fail_band label that shares the rate-control cleanup
+path before falling through to the remaining teardown.
+
+The bug was first flagged by an experimental analysis tool we are
+developing for kernel memory-management bugs while analyzing
+v6.13-rc1. The tool is still under development and is not yet publicly
+available. Manual inspection confirms that the bug is still present in
+v7.1-rc7.
+
+An x86_64 allyesconfig build showed no new warnings. As we do not have a
+suitable mac80211 device/driver combination to test with, no runtime
+testing was able to be performed.
+
+Fixes: 09b4a4faf9d0 ("mac80211: introduce capability flags for VHT EXT NSS support")
+Cc: stable@vger.kernel.org
+Reviewed-by: Zilin Guan <zilin@seu.edu.cn>
+Signed-off-by: Dawei Feng <dawei.feng@seu.edu.cn>
+Link: https://patch.msgid.link/20260706143507.146131-1-dawei.feng@seu.edu.cn
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/mac80211/main.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -1410,7 +1410,7 @@ int ieee80211_register_hw(struct ieee802
+               sband = kmemdup(sband, sizeof(*sband), GFP_KERNEL);
+               if (!sband) {
+                       result = -ENOMEM;
+-                      goto fail_rate;
++                      goto fail_band;
+               }
+               wiphy_dbg(hw->wiphy, "copying sband (band %d) due to VHT EXT NSS BW flag\n",
+@@ -1475,6 +1475,7 @@ int ieee80211_register_hw(struct ieee802
+ #endif
+       wiphy_unregister(local->hw.wiphy);
+  fail_wiphy_register:
++ fail_band:
+       rtnl_lock();
+       rate_control_deinitialize(local);
+       ieee80211_remove_interfaces(local);
diff --git a/queue-6.6/wifi-rt2x00-avoid-full-teardown-before-work-setup-in-probe.patch b/queue-6.6/wifi-rt2x00-avoid-full-teardown-before-work-setup-in-probe.patch
new file mode 100644 (file)
index 0000000..a6641dd
--- /dev/null
@@ -0,0 +1,75 @@
+From 536fb3d739d75a03cb318c0c6fe799425cfea501 Mon Sep 17 00:00:00 2001
+From: Runyu Xiao <runyu.xiao@seu.edu.cn>
+Date: Fri, 19 Jun 2026 15:31:04 +0800
+Subject: wifi: rt2x00: avoid full teardown before work setup in probe
+
+From: Runyu Xiao <runyu.xiao@seu.edu.cn>
+
+commit 536fb3d739d75a03cb318c0c6fe799425cfea501 upstream.
+
+rt2x00lib_probe_dev() uses the full rt2x00lib_remove_dev() teardown for
+all probe failures. However, drv_data allocation and workqueue allocation
+can fail before intf_work, autowakeup_work and sleep_work have been
+initialized.
+
+Do not enter the full remove path until the probe has reached the point
+where those work items are set up. Return directly for drv_data allocation
+failure, and use a small early cleanup path for workqueue allocation
+failure.
+
+This issue was found by our static analysis tool and then confirmed by
+manual review of rt2x00lib_probe_dev() and rt2x00lib_remove_dev(). The
+early probe exits should not call a common teardown path that assumes the
+later work setup has already completed.
+
+A QEMU PoC forced alloc_ordered_workqueue() to fail before the work
+initializers are reached. The resulting fail path entered
+rt2x00lib_remove_dev(), and DEBUG_OBJECTS reported invalid work drains with
+rt2x00lib_probe_dev() and rt2x00lib_remove_dev() in the stack.
+
+Fixes: 1ebbc48520a0 ("rt2x00: Introduce concept of driver data in struct rt2x00_dev.")
+Fixes: 0439f5367c8d ("rt2x00: Move TX/RX work into dedicated workqueue")
+Cc: stable@vger.kernel.org
+Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
+Link: https://patch.msgid.link/20260619073104.1809161-1-runyu.xiao@seu.edu.cn
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/wireless/ralink/rt2x00/rt2x00dev.c |   12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+@@ -1382,7 +1382,7 @@ int rt2x00lib_probe_dev(struct rt2x00_de
+                                             GFP_KERNEL);
+               if (!rt2x00dev->drv_data) {
+                       retval = -ENOMEM;
+-                      goto exit;
++                      return retval;
+               }
+       }
+@@ -1416,7 +1416,7 @@ int rt2x00lib_probe_dev(struct rt2x00_de
+           alloc_ordered_workqueue("%s", 0, wiphy_name(rt2x00dev->hw->wiphy));
+       if (!rt2x00dev->workqueue) {
+               retval = -ENOMEM;
+-              goto exit;
++              goto exit_free_drv_data;
+       }
+       INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled);
+@@ -1489,6 +1489,14 @@ exit:
+       rt2x00lib_remove_dev(rt2x00dev);
+       return retval;
++
++exit_free_drv_data:
++      clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
++
++      kfree(rt2x00dev->drv_data);
++      rt2x00dev->drv_data = NULL;
++
++      return retval;
+ }
+ EXPORT_SYMBOL_GPL(rt2x00lib_probe_dev);