]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2024 07:56:40 +0000 (09:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Oct 2024 07:56:40 +0000 (09:56 +0200)
added patches:
drm-amd-display-fix-synaptics-cascaded-panamera-dsc-determination.patch
io_uring-sqpoll-do-not-allow-pinning-outside-of-cpuset.patch

queue-6.1/drm-amd-display-fix-synaptics-cascaded-panamera-dsc-determination.patch [new file with mode: 0644]
queue-6.1/io_uring-sqpoll-do-not-allow-pinning-outside-of-cpuset.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/drm-amd-display-fix-synaptics-cascaded-panamera-dsc-determination.patch b/queue-6.1/drm-amd-display-fix-synaptics-cascaded-panamera-dsc-determination.patch
new file mode 100644 (file)
index 0000000..391b5ff
--- /dev/null
@@ -0,0 +1,34 @@
+From 4437936c6b696b98f3fe1d8679a2788c41b4df77 Mon Sep 17 00:00:00 2001
+From: Fangzhi Zuo <Jerry.Zuo@amd.com>
+Date: Mon, 12 Aug 2024 12:13:44 -0400
+Subject: drm/amd/display: Fix Synaptics Cascaded Panamera DSC Determination
+
+From: Fangzhi Zuo <Jerry.Zuo@amd.com>
+
+commit 4437936c6b696b98f3fe1d8679a2788c41b4df77 upstream.
+
+Synaptics Cascaded Panamera topology needs to unconditionally
+acquire root aux for dsc decoding.
+
+Reviewed-by: Roman Li <roman.li@amd.com>
+Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com>
+Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
+Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: Mario Limonciello <superm1@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+@@ -251,7 +251,7 @@ static bool validate_dsc_caps_on_connect
+               aconnector->dsc_aux = &aconnector->mst_port->dm_dp_aux.aux;
+       /* synaptics cascaded MST hub case */
+-      if (!aconnector->dsc_aux && is_synaptics_cascaded_panamera(aconnector->dc_link, port))
++      if (is_synaptics_cascaded_panamera(aconnector->dc_link, port))
+               aconnector->dsc_aux = port->mgr->aux;
+       if (!aconnector->dsc_aux)
diff --git a/queue-6.1/io_uring-sqpoll-do-not-allow-pinning-outside-of-cpuset.patch b/queue-6.1/io_uring-sqpoll-do-not-allow-pinning-outside-of-cpuset.patch
new file mode 100644 (file)
index 0000000..24780cc
--- /dev/null
@@ -0,0 +1,57 @@
+From f011c9cf04c06f16b24f583d313d3c012e589e50 Mon Sep 17 00:00:00 2001
+From: Felix Moessbauer <felix.moessbauer@siemens.com>
+Date: Mon, 9 Sep 2024 17:00:36 +0200
+Subject: io_uring/sqpoll: do not allow pinning outside of cpuset
+
+From: Felix Moessbauer <felix.moessbauer@siemens.com>
+
+commit f011c9cf04c06f16b24f583d313d3c012e589e50 upstream.
+
+The submit queue polling threads are userland threads that just never
+exit to the userland. When creating the thread with IORING_SETUP_SQ_AFF,
+the affinity of the poller thread is set to the cpu specified in
+sq_thread_cpu. However, this CPU can be outside of the cpuset defined
+by the cgroup cpuset controller. This violates the rules defined by the
+cpuset controller and is a potential issue for realtime applications.
+
+In b7ed6d8ffd6 we fixed the default affinity of the poller thread, in
+case no explicit pinning is required by inheriting the one of the
+creating task. In case of explicit pinning, the check is more
+complicated, as also a cpu outside of the parent cpumask is allowed.
+We implemented this by using cpuset_cpus_allowed (that has support for
+cgroup cpusets) and testing if the requested cpu is in the set.
+
+Fixes: 37d1e2e3642e ("io_uring: move SQPOLL thread io-wq forked worker")
+Cc: stable@vger.kernel.org # 6.1+
+Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
+Link: https://lore.kernel.org/r/20240909150036.55921-1-felix.moessbauer@siemens.com
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ io_uring/sqpoll.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/io_uring/sqpoll.c
++++ b/io_uring/sqpoll.c
+@@ -10,6 +10,7 @@
+ #include <linux/slab.h>
+ #include <linux/audit.h>
+ #include <linux/security.h>
++#include <linux/cpuset.h>
+ #include <linux/io_uring.h>
+ #include <uapi/linux/io_uring.h>
+@@ -394,10 +395,12 @@ __cold int io_sq_offload_create(struct i
+                       return 0;
+               if (p->flags & IORING_SETUP_SQ_AFF) {
++                      struct cpumask allowed_mask;
+                       int cpu = p->sq_thread_cpu;
+                       ret = -EINVAL;
+-                      if (cpu >= nr_cpu_ids || !cpu_online(cpu))
++                      cpuset_cpus_allowed(current, &allowed_mask);
++                      if (!cpumask_test_cpu(cpu, &allowed_mask))
+                               goto err_sqpoll;
+                       sqd->sq_cpu = cpu;
+               } else {
index 55f5470f103db83e12dcfe025adcfe5da2cd1497..6262bd4ae6f399e575c42416ea79030d4f87b39b 100644 (file)
@@ -289,3 +289,5 @@ bonding-fix-unnecessary-warnings-and-logs-from-bond_.patch
 net-stmmac-set-pp_flag_dma_sync_dev-only-if-xdp-is-e.patch
 netfilter-nf_tables-keep-deleted-flowtable-hooks-unt.patch
 netfilter-ctnetlink-compile-ctnetlink_label_size-wit.patch
+io_uring-sqpoll-do-not-allow-pinning-outside-of-cpuset.patch
+drm-amd-display-fix-synaptics-cascaded-panamera-dsc-determination.patch