--- /dev/null
+From 42a84a8cd0ff0cbff5a4595e1304c4567a30267d Mon Sep 17 00:00:00 2001
+From: John Fastabend <john.fastabend@gmail.com>
+Date: Sun, 26 Jan 2020 16:14:00 -0800
+Subject: bpf, xdp: Update devmap comments to reflect napi/rcu usage
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: John Fastabend <john.fastabend@gmail.com>
+
+commit 42a84a8cd0ff0cbff5a4595e1304c4567a30267d upstream.
+
+Now that we rely on synchronize_rcu and call_rcu waiting to
+exit perempt-disable regions (NAPI) lets update the comments
+to reflect this.
+
+Fixes: 0536b85239b84 ("xdp: Simplify devmap cleanup")
+Signed-off-by: John Fastabend <john.fastabend@gmail.com>
+Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
+Acked-by: Björn Töpel <bjorn.topel@intel.com>
+Acked-by: Song Liu <songliubraving@fb.com>
+Link: https://lore.kernel.org/bpf/1580084042-11598-2-git-send-email-john.fastabend@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/bpf/devmap.c | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+--- a/kernel/bpf/devmap.c
++++ b/kernel/bpf/devmap.c
+@@ -210,10 +210,12 @@ static void dev_map_free(struct bpf_map
+
+ /* At this point bpf_prog->aux->refcnt == 0 and this map->refcnt == 0,
+ * so the programs (can be more than one that used this map) were
+- * disconnected from events. Wait for outstanding critical sections in
+- * these programs to complete. The rcu critical section only guarantees
+- * no further reads against netdev_map. It does __not__ ensure pending
+- * flush operations (if any) are complete.
++ * disconnected from events. The following synchronize_rcu() guarantees
++ * both rcu read critical sections complete and waits for
++ * preempt-disable regions (NAPI being the relevant context here) so we
++ * are certain there will be no further reads against the netdev_map and
++ * all flush operations are complete. Flush operations can only be done
++ * from NAPI context for this reason.
+ */
+
+ spin_lock(&dev_map_lock);
+@@ -518,12 +520,11 @@ static int dev_map_delete_elem(struct bp
+ return -EINVAL;
+
+ /* Use call_rcu() here to ensure any rcu critical sections have
+- * completed, but this does not guarantee a flush has happened
+- * yet. Because driver side rcu_read_lock/unlock only protects the
+- * running XDP program. However, for pending flush operations the
+- * dev and ctx are stored in another per cpu map. And additionally,
+- * the driver tear down ensures all soft irqs are complete before
+- * removing the net device in the case of dev_put equals zero.
++ * completed as well as any flush operations because call_rcu
++ * will wait for preempt-disable region to complete, NAPI in this
++ * context. And additionally, the driver tear down ensures all
++ * soft irqs are complete before removing the net device in the
++ * case of dev_put equals zero.
+ */
+ old_dev = xchg(&dtab->netdev_map[k], NULL);
+ if (old_dev)
+++ /dev/null
-From jianqi.ren.cn@windriver.com Thu Dec 12 13:11:21 2024
-From: <jianqi.ren.cn@windriver.com>
-Date: Wed, 11 Dec 2024 18:15:44 +0800
-Subject: [PATCH 6.1.y] drm/amd/display: Don't refer to dc_sink in is_dsc_need_re_compute
-To: <wayne.lin@amd.com>, <gregkh@linuxfoundation.org>
-Cc: <patches@lists.linux.dev>, <jerry.zuo@amd.com>, <zaeem.mohamed@amd.com>, <daniel.wheeler@amd.com>, <alexander.deucher@amd.com>, <stable@vger.kernel.org>, <harry.wentland@amd.com>, <sunpeng.li@amd.com>, <Rodrigo.Siqueira@amd.com>, <christian.koenig@amd.com>, <airlied@gmail.com>, <daniel@ffwll.ch>, <Jerry.Zuo@amd.com>, <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
-Message-ID: <20241211101544.2121147-1-jianqi.ren.cn@windriver.com>
-
-
-From: Wayne Lin <wayne.lin@amd.com>
-
-[ Upstream commit fcf6a49d79923a234844b8efe830a61f3f0584e4 ]
-
-[Why]
-When unplug one of monitors connected after mst hub, encounter null pointer dereference.
-
-It's due to dc_sink get released immediately in early_unregister() or detect_ctx(). When
-commit new state which directly referring to info stored in dc_sink will cause null pointer
-dereference.
-
-[how]
-Remove redundant checking condition. Relevant condition should already be covered by checking
-if dsc_aux is null or not. Also reset dsc_aux to NULL when the connector is disconnected.
-
-Reviewed-by: Jerry Zuo <jerry.zuo@amd.com>
-Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
-Signed-off-by: Wayne Lin <wayne.lin@amd.com>
-Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
-Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
----
- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git 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
-index 1acef5f3838f..a1619f4569cf 100644
---- 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
-@@ -183,6 +183,8 @@ amdgpu_dm_mst_connector_early_unregister(struct drm_connector *connector)
- dc_sink_release(dc_sink);
- aconnector->dc_sink = NULL;
- aconnector->edid = NULL;
-+ aconnector->dsc_aux = NULL;
-+ port->passthrough_aux = NULL;
- }
-
- aconnector->mst_status = MST_STATUS_DEFAULT;
-@@ -487,6 +489,8 @@ dm_dp_mst_detect(struct drm_connector *connector,
- dc_sink_release(aconnector->dc_sink);
- aconnector->dc_sink = NULL;
- aconnector->edid = NULL;
-+ aconnector->dsc_aux = NULL;
-+ port->passthrough_aux = NULL;
-
- amdgpu_dm_set_mst_status(&aconnector->mst_status,
- MST_REMOTE_EDID | MST_ALLOCATE_NEW_PAYLOAD | MST_CLEAR_ALLOCATED_PAYLOAD,
---
-2.25.1
-
revert-drm-amdgpu-add-missing-size-check-in-amdgpu_debugfs_gprwave_read.patch
pci-rockchip-ep-fix-address-translation-unit-programming.patch
alsa-usb-audio-fix-out-of-bounds-reads-when-finding-clock-sources.patch
-drm-amd-display-don-t-refer-to-dc_sink-in-is_dsc_need_re_compute.patch
+bpf-xdp-update-devmap-comments-to-reflect-napi-rcu-usage.patch