From: Greg Kroah-Hartman Date: Sun, 22 Jan 2023 14:59:14 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v4.14.304~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc1e9bd243a0ca52b67bacebc3f76f1d609e491d;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: block-mq-deadline-rename-deadline_is_seq_writes.patch net-mlx5-fix-missing-mutex_unlock-in-mlx5_fw_fatal_reporter_err_work.patch net-ulp-use-consistent-error-code-when-blocking-ulp.patch revert-wifi-mac80211-fix-memory-leak-in-ieee80211_if_add.patch soc-qcom-apr-make-qcom-protection-domain-optional-again.patch --- diff --git a/queue-5.15/block-mq-deadline-rename-deadline_is_seq_writes.patch b/queue-5.15/block-mq-deadline-rename-deadline_is_seq_writes.patch new file mode 100644 index 00000000000..5ee10ecba3a --- /dev/null +++ b/queue-5.15/block-mq-deadline-rename-deadline_is_seq_writes.patch @@ -0,0 +1,42 @@ +From 3692fec8bb476e8583e559ff5783a6adef306cf2 Mon Sep 17 00:00:00 2001 +From: Damien Le Moal +Date: Sat, 26 Nov 2022 11:55:49 +0900 +Subject: block: mq-deadline: Rename deadline_is_seq_writes() + +From: Damien Le Moal + +commit 3692fec8bb476e8583e559ff5783a6adef306cf2 upstream. + +Rename deadline_is_seq_writes() to deadline_is_seq_write() (remove the +"s" plural) to more correctly reflect the fact that this function tests +a single request, not multiple requests. + +Fixes: 015d02f48537 ("block: mq-deadline: Do not break sequential write streams to zoned HDDs") +Signed-off-by: Damien Le Moal +Link: https://lore.kernel.org/r/20221126025550.967914-2-damien.lemoal@opensource.wdc.com +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman +--- + block/mq-deadline.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/block/mq-deadline.c ++++ b/block/mq-deadline.c +@@ -305,7 +305,7 @@ static inline int deadline_check_fifo(st + /* + * Check if rq has a sequential request preceding it. + */ +-static bool deadline_is_seq_writes(struct deadline_data *dd, struct request *rq) ++static bool deadline_is_seq_write(struct deadline_data *dd, struct request *rq) + { + struct request *prev = deadline_earlier_request(rq); + +@@ -364,7 +364,7 @@ deadline_fifo_request(struct deadline_da + list_for_each_entry(rq, &per_prio->fifo_list[DD_WRITE], queuelist) { + if (blk_req_can_dispatch_to_zone(rq) && + (blk_queue_nonrot(rq->q) || +- !deadline_is_seq_writes(dd, rq))) ++ !deadline_is_seq_write(dd, rq))) + goto out; + } + rq = NULL; diff --git a/queue-5.15/net-mlx5-fix-missing-mutex_unlock-in-mlx5_fw_fatal_reporter_err_work.patch b/queue-5.15/net-mlx5-fix-missing-mutex_unlock-in-mlx5_fw_fatal_reporter_err_work.patch new file mode 100644 index 00000000000..52e4de4e589 --- /dev/null +++ b/queue-5.15/net-mlx5-fix-missing-mutex_unlock-in-mlx5_fw_fatal_reporter_err_work.patch @@ -0,0 +1,33 @@ +From 90e7cb78b81543998217b0eb446c067ce2191a79 Mon Sep 17 00:00:00 2001 +From: Yang Yingliang +Date: Thu, 5 Jan 2023 19:42:20 +0800 +Subject: net/mlx5: fix missing mutex_unlock in mlx5_fw_fatal_reporter_err_work() + +From: Yang Yingliang + +commit 90e7cb78b81543998217b0eb446c067ce2191a79 upstream. + +Add missing mutex_unlock() before returning from +mlx5_fw_fatal_reporter_err_work(). + +Fixes: 9078e843efec ("net/mlx5: Avoid recovery in probe flows") +Reported-by: kernel test robot +Reported-by: Dan Carpenter +Signed-off-by: Yang Yingliang +Signed-off-by: Shay Drory +Signed-off-by: Saeed Mahameed +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/mellanox/mlx5/core/health.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c ++++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c +@@ -617,6 +617,7 @@ static void mlx5_fw_fatal_reporter_err_w + mutex_lock(&dev->intf_state_mutex); + if (test_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags)) { + mlx5_core_err(dev, "health works are not permitted at this stage\n"); ++ mutex_unlock(&dev->intf_state_mutex); + return; + } + mutex_unlock(&dev->intf_state_mutex); diff --git a/queue-5.15/net-ulp-use-consistent-error-code-when-blocking-ulp.patch b/queue-5.15/net-ulp-use-consistent-error-code-when-blocking-ulp.patch new file mode 100644 index 00000000000..054f0d118f3 --- /dev/null +++ b/queue-5.15/net-ulp-use-consistent-error-code-when-blocking-ulp.patch @@ -0,0 +1,51 @@ +From 8ccc99362b60c6f27bb46f36fdaaccf4ef0303de Mon Sep 17 00:00:00 2001 +From: Paolo Abeni +Date: Wed, 18 Jan 2023 13:24:12 +0100 +Subject: net/ulp: use consistent error code when blocking ULP + +From: Paolo Abeni + +commit 8ccc99362b60c6f27bb46f36fdaaccf4ef0303de upstream. + +The referenced commit changed the error code returned by the kernel +when preventing a non-established socket from attaching the ktls +ULP. Before to such a commit, the user-space got ENOTCONN instead +of EINVAL. + +The existing self-tests depend on such error code, and the change +caused a failure: + + RUN global.non_established ... + tls.c:1673:non_established:Expected errno (22) == ENOTCONN (107) + non_established: Test failed at step #3 + FAIL global.non_established + +In the unlikely event existing applications do the same, address +the issue by restoring the prior error code in the above scenario. + +Note that the only other ULP performing similar checks at init +time - smc_ulp_ops - also fails with ENOTCONN when trying to attach +the ULP to a non-established socket. + +Reported-by: Sabrina Dubroca +Fixes: 2c02d41d71f9 ("net/ulp: prevent ULP without clone op from entering the LISTEN status") +Signed-off-by: Paolo Abeni +Reviewed-by: Sabrina Dubroca +Link: https://lore.kernel.org/r/7bb199e7a93317fb6f8bf8b9b2dc71c18f337cde.1674042685.git.pabeni@redhat.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv4/tcp_ulp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/ipv4/tcp_ulp.c ++++ b/net/ipv4/tcp_ulp.c +@@ -136,7 +136,7 @@ static int __tcp_set_ulp(struct sock *sk + if (icsk->icsk_ulp_ops) + goto out_err; + +- err = -EINVAL; ++ err = -ENOTCONN; + if (!ulp_ops->clone && sk->sk_state == TCP_LISTEN) + goto out_err; + diff --git a/queue-5.15/revert-wifi-mac80211-fix-memory-leak-in-ieee80211_if_add.patch b/queue-5.15/revert-wifi-mac80211-fix-memory-leak-in-ieee80211_if_add.patch new file mode 100644 index 00000000000..4f864173f01 --- /dev/null +++ b/queue-5.15/revert-wifi-mac80211-fix-memory-leak-in-ieee80211_if_add.patch @@ -0,0 +1,81 @@ +From 80f8a66dede0a4b4e9e846765a97809c6fe49ce5 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Fri, 13 Jan 2023 12:43:26 +0000 +Subject: Revert "wifi: mac80211: fix memory leak in ieee80211_if_add()" + +From: Eric Dumazet + +commit 80f8a66dede0a4b4e9e846765a97809c6fe49ce5 upstream. + +This reverts commit 13e5afd3d773c6fc6ca2b89027befaaaa1ea7293. + +ieee80211_if_free() is already called from free_netdev(ndev) +because ndev->priv_destructor == ieee80211_if_free + +syzbot reported: + +general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN +KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027] +CPU: 0 PID: 10041 Comm: syz-executor.0 Not tainted 6.2.0-rc2-syzkaller-00388-g55b98837e37d #0 +Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 +RIP: 0010:pcpu_get_page_chunk mm/percpu.c:262 [inline] +RIP: 0010:pcpu_chunk_addr_search mm/percpu.c:1619 [inline] +RIP: 0010:free_percpu mm/percpu.c:2271 [inline] +RIP: 0010:free_percpu+0x186/0x10f0 mm/percpu.c:2254 +Code: 80 3c 02 00 0f 85 f5 0e 00 00 48 8b 3b 48 01 ef e8 cf b3 0b 00 48 ba 00 00 00 00 00 fc ff df 48 8d 78 20 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85 3b 0e 00 00 48 8b 58 20 48 b8 00 00 00 00 00 fc +RSP: 0018:ffffc90004ba7068 EFLAGS: 00010002 +RAX: 0000000000000000 RBX: ffff88823ffe2b80 RCX: 0000000000000004 +RDX: dffffc0000000000 RSI: ffffffff81c1f4e7 RDI: 0000000000000020 +RBP: ffffe8fffe8fc220 R08: 0000000000000005 R09: 0000000000000000 +R10: 0000000000000000 R11: 1ffffffff2179ab2 R12: ffff8880b983d000 +R13: 0000000000000003 R14: 0000607f450fc220 R15: ffff88823ffe2988 +FS: 00007fcb349de700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 0000001b32220000 CR3: 000000004914f000 CR4: 00000000003506f0 +DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 +Call Trace: + +netdev_run_todo+0x6bf/0x1100 net/core/dev.c:10352 +ieee80211_register_hw+0x2663/0x4040 net/mac80211/main.c:1411 +mac80211_hwsim_new_radio+0x2537/0x4d80 drivers/net/wireless/mac80211_hwsim.c:4583 +hwsim_new_radio_nl+0xa09/0x10f0 drivers/net/wireless/mac80211_hwsim.c:5176 +genl_family_rcv_msg_doit.isra.0+0x1e6/0x2d0 net/netlink/genetlink.c:968 +genl_family_rcv_msg net/netlink/genetlink.c:1048 [inline] +genl_rcv_msg+0x4ff/0x7e0 net/netlink/genetlink.c:1065 +netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2564 +genl_rcv+0x28/0x40 net/netlink/genetlink.c:1076 +netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] +netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1356 +netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1932 +sock_sendmsg_nosec net/socket.c:714 [inline] +sock_sendmsg+0xd3/0x120 net/socket.c:734 +____sys_sendmsg+0x712/0x8c0 net/socket.c:2476 +___sys_sendmsg+0x110/0x1b0 net/socket.c:2530 +__sys_sendmsg+0xf7/0x1c0 net/socket.c:2559 +do_syscall_x64 arch/x86/entry/common.c:50 [inline] +do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 +entry_SYSCALL_64_after_hwframe+0x63/0xcd + +Reported-by: syzbot +Fixes: 13e5afd3d773 ("wifi: mac80211: fix memory leak in ieee80211_if_add()") +Signed-off-by: Eric Dumazet +Cc: Zhengchao Shao +Cc: Johannes Berg +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20230113124326.3533978-1-edumazet@google.com +Signed-off-by: Greg Kroah-Hartman +--- + net/mac80211/iface.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -2059,7 +2059,6 @@ int ieee80211_if_add(struct ieee80211_lo + + ret = cfg80211_register_netdevice(ndev); + if (ret) { +- ieee80211_if_free(ndev); + free_netdev(ndev); + return ret; + } diff --git a/queue-5.15/series b/queue-5.15/series index 3e77996a074..5e85b568b25 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -110,3 +110,8 @@ powerpc-vmlinux.lds-don-t-discard-.rela-for-relocatable-builds.patch powerpc-vmlinux.lds-don-t-discard-.comment.patch io_uring-io_kiocb_update_pos-should-not-touch-file-for-non-1-offset.patch io_uring-net-fix-fast_iov-assignment-in-io_setup_async_msg.patch +net-ulp-use-consistent-error-code-when-blocking-ulp.patch +net-mlx5-fix-missing-mutex_unlock-in-mlx5_fw_fatal_reporter_err_work.patch +block-mq-deadline-rename-deadline_is_seq_writes.patch +revert-wifi-mac80211-fix-memory-leak-in-ieee80211_if_add.patch +soc-qcom-apr-make-qcom-protection-domain-optional-again.patch diff --git a/queue-5.15/soc-qcom-apr-make-qcom-protection-domain-optional-again.patch b/queue-5.15/soc-qcom-apr-make-qcom-protection-domain-optional-again.patch new file mode 100644 index 00000000000..fcb696294e1 --- /dev/null +++ b/queue-5.15/soc-qcom-apr-make-qcom-protection-domain-optional-again.patch @@ -0,0 +1,45 @@ +From 599d41fb8ea8bd2a99ca9525dd69405020e43dda Mon Sep 17 00:00:00 2001 +From: Stephan Gerhold +Date: Thu, 29 Dec 2022 16:16:48 +0100 +Subject: soc: qcom: apr: Make qcom,protection-domain optional again + +From: Stephan Gerhold + +commit 599d41fb8ea8bd2a99ca9525dd69405020e43dda upstream. + +APR should not fail if the service device tree node does not have +the qcom,protection-domain property, since this functionality does +not exist on older platforms such as MSM8916 and MSM8996. + +Ignore -EINVAL (returned when the property does not exist) to fix +a regression on 6.2-rc1 that prevents audio from working: + + qcom,apr remoteproc0:smd-edge.apr_audio_svc.-1.-1: + Failed to read second value of qcom,protection-domain + qcom,apr remoteproc0:smd-edge.apr_audio_svc.-1.-1: + Failed to add apr 3 svc + +Fixes: 6d7860f5750d ("soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index") +Signed-off-by: Stephan Gerhold +Reviewed-by: Bjorn Andersson +Signed-off-by: Bjorn Andersson +Link: https://lore.kernel.org/r/20221229151648.19839-3-stephan@gerhold.net +Signed-off-by: Greg Kroah-Hartman +--- + drivers/soc/qcom/apr.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/soc/qcom/apr.c ++++ b/drivers/soc/qcom/apr.c +@@ -317,9 +317,10 @@ static int apr_add_device(struct device + goto out; + } + ++ /* Protection domain is optional, it does not exist on older platforms */ + ret = of_property_read_string_index(np, "qcom,protection-domain", + 1, &adev->service_path); +- if (ret < 0) { ++ if (ret < 0 && ret != -EINVAL) { + dev_err(dev, "Failed to read second value of qcom,protection-domain\n"); + goto out; + }