From: Greg Kroah-Hartman Date: Mon, 14 Jul 2025 12:39:37 +0000 (+0200) Subject: 6.12-stable patches X-Git-Tag: v5.15.188~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a83ff76c2f2b39235c4405719f1bf99ff04c4b90;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: asoc-intel-sof-function-topology-lib-print-out-the-unsupported-dmic-count.patch netlink-fix-rmem-check-in-netlink_broadcast_deliver.patch netlink-make-sure-we-allow-at-least-one-dump-skb.patch --- diff --git a/queue-6.12/asoc-intel-sof-function-topology-lib-print-out-the-unsupported-dmic-count.patch b/queue-6.12/asoc-intel-sof-function-topology-lib-print-out-the-unsupported-dmic-count.patch new file mode 100644 index 0000000000..5a8c00335e --- /dev/null +++ b/queue-6.12/asoc-intel-sof-function-topology-lib-print-out-the-unsupported-dmic-count.patch @@ -0,0 +1,36 @@ +From 16ea4666bbb7f5bd1130fa2d75631ccf8b62362e Mon Sep 17 00:00:00 2001 +From: Peter Ujfalusi +Date: Thu, 19 Jun 2025 13:47:05 +0300 +Subject: ASoC: Intel: sof-function-topology-lib: Print out the unsupported dmic count + +From: Peter Ujfalusi + +commit 16ea4666bbb7f5bd1130fa2d75631ccf8b62362e upstream. + +It is better to print out the non supported num_dmics than printing that +it is not matching with 2 or 4. + +Fixes: 2fbeff33381c ("ASoC: Intel: add sof_sdw_get_tplg_files ops") +Cc: stable@vger.kernel.org +Signed-off-by: Peter Ujfalusi +Reviewed-by: Bard Liao +Reviewed-by: Pierre-Louis Bossart +Link: https://patch.msgid.link/20250619104705.26057-1-peter.ujfalusi@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/intel/common/sof-function-topology-lib.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/sound/soc/intel/common/sof-function-topology-lib.c ++++ b/sound/soc/intel/common/sof-function-topology-lib.c +@@ -73,7 +73,8 @@ int sof_sdw_get_tplg_files(struct snd_so + break; + default: + dev_warn(card->dev, +- "only -2ch and -4ch are supported for dmic\n"); ++ "unsupported number of dmics: %d\n", ++ mach_params.dmic_num); + continue; + } + tplg_dev = TPLG_DEVICE_INTEL_PCH_DMIC; diff --git a/queue-6.12/netlink-fix-rmem-check-in-netlink_broadcast_deliver.patch b/queue-6.12/netlink-fix-rmem-check-in-netlink_broadcast_deliver.patch new file mode 100644 index 0000000000..e184925c90 --- /dev/null +++ b/queue-6.12/netlink-fix-rmem-check-in-netlink_broadcast_deliver.patch @@ -0,0 +1,37 @@ +From a3c4a125ec725cefb40047eb05ff9eafd57830b4 Mon Sep 17 00:00:00 2001 +From: Kuniyuki Iwashima +Date: Fri, 11 Jul 2025 05:32:07 +0000 +Subject: netlink: Fix rmem check in netlink_broadcast_deliver(). + +From: Kuniyuki Iwashima + +commit a3c4a125ec725cefb40047eb05ff9eafd57830b4 upstream. + +We need to allow queuing at least one skb even when skb is +larger than sk->sk_rcvbuf. + +The cited commit made a mistake while converting a condition +in netlink_broadcast_deliver(). + +Let's correct the rmem check for the allow-one-skb rule. + +Fixes: ae8f160e7eb24 ("netlink: Fix wraparounds of sk->sk_rmem_alloc.") +Signed-off-by: Kuniyuki Iwashima +Link: https://patch.msgid.link/20250711053208.2965945-1-kuniyu@google.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + net/netlink/af_netlink.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/netlink/af_netlink.c ++++ b/net/netlink/af_netlink.c +@@ -1398,7 +1398,7 @@ static int netlink_broadcast_deliver(str + rmem = atomic_add_return(skb->truesize, &sk->sk_rmem_alloc); + rcvbuf = READ_ONCE(sk->sk_rcvbuf); + +- if ((rmem != skb->truesize || rmem <= rcvbuf) && ++ if ((rmem == skb->truesize || rmem <= rcvbuf) && + !test_bit(NETLINK_S_CONGESTED, &nlk->state)) { + netlink_skb_set_owner_r(skb, sk); + __netlink_sendskb(sk, skb); diff --git a/queue-6.12/netlink-make-sure-we-allow-at-least-one-dump-skb.patch b/queue-6.12/netlink-make-sure-we-allow-at-least-one-dump-skb.patch new file mode 100644 index 0000000000..e7d9ae79a6 --- /dev/null +++ b/queue-6.12/netlink-make-sure-we-allow-at-least-one-dump-skb.patch @@ -0,0 +1,62 @@ +From a215b5723922f8099078478122f02100e489cb80 Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Thu, 10 Jul 2025 17:11:21 -0700 +Subject: netlink: make sure we allow at least one dump skb + +From: Jakub Kicinski + +commit a215b5723922f8099078478122f02100e489cb80 upstream. + +Commit under Fixes tightened up the memory accounting for Netlink +sockets. Looks like the accounting is too strict for some existing +use cases, Marek reported issues with nl80211 / WiFi iw CLI. + +To reduce number of iterations Netlink dumps try to allocate +messages based on the size of the buffer passed to previous +recvmsg() calls. If user space uses a larger buffer in recvmsg() +than sk_rcvbuf we will allocate an skb we won't be able to queue. + +Make sure we always allow at least one skb to be queued. +Same workaround is already present in netlink_attachskb(). +Alternative would be to cap the allocation size to + rcvbuf - rmem_alloc +but as I said, the workaround is already present in other places. + +Reported-by: Marek Szyprowski +Link: https://lore.kernel.org/9794af18-4905-46c6-b12c-365ea2f05858@samsung.com +Fixes: ae8f160e7eb2 ("netlink: Fix wraparounds of sk->sk_rmem_alloc.") +Tested-by: Marek Szyprowski +Reviewed-by: Kuniyuki Iwashima +Link: https://patch.msgid.link/20250711001121.3649033-1-kuba@kernel.org +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + net/netlink/af_netlink.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/net/netlink/af_netlink.c ++++ b/net/netlink/af_netlink.c +@@ -2261,11 +2261,11 @@ static int netlink_dump(struct sock *sk, + struct netlink_ext_ack extack = {}; + struct netlink_callback *cb; + struct sk_buff *skb = NULL; ++ unsigned int rmem, rcvbuf; + size_t max_recvmsg_len; + struct module *module; + int err = -ENOBUFS; + int alloc_min_size; +- unsigned int rmem; + int alloc_size; + + if (!lock_taken) +@@ -2297,8 +2297,9 @@ static int netlink_dump(struct sock *sk, + if (!skb) + goto errout_skb; + ++ rcvbuf = READ_ONCE(sk->sk_rcvbuf); + rmem = atomic_add_return(skb->truesize, &sk->sk_rmem_alloc); +- if (rmem >= READ_ONCE(sk->sk_rcvbuf)) { ++ if (rmem != skb->truesize && rmem >= rcvbuf) { + atomic_sub(skb->truesize, &sk->sk_rmem_alloc); + goto errout_skb; + } diff --git a/queue-6.12/series b/queue-6.12/series index 4c855616d4..f60ca9cc0f 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -101,3 +101,6 @@ smb-server-make-use-of-rdma_destroy_qp.patch ksmbd-fix-a-mount-write-count-leak-in-ksmbd_vfs_kern_path_locked.patch erofs-fix-to-add-missing-tracepoint-in-erofs_read_folio.patch erofs-address-d-cache-aliasing.patch +asoc-intel-sof-function-topology-lib-print-out-the-unsupported-dmic-count.patch +netlink-fix-rmem-check-in-netlink_broadcast_deliver.patch +netlink-make-sure-we-allow-at-least-one-dump-skb.patch