]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.10
authorSasha Levin <sashal@kernel.org>
Mon, 31 Jul 2023 01:25:04 +0000 (21:25 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 31 Jul 2023 01:25:04 +0000 (21:25 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
14 files changed:
queue-5.10/asoc-fsl_spdif-silence-output-on-stop.patch [new file with mode: 0644]
queue-5.10/ata-pata_ns87415-mark-ns87560_tf_read-static.patch [new file with mode: 0644]
queue-5.10/block-fix-a-source-code-comment-in-include-uapi-linu.patch [new file with mode: 0644]
queue-5.10/dm-raid-clean-up-four-equivalent-goto-tags-in-raid_c.patch [new file with mode: 0644]
queue-5.10/dm-raid-fix-missing-reconfig_mutex-unlock-in-raid_ct.patch [new file with mode: 0644]
queue-5.10/dm-raid-protect-md_stop-with-reconfig_mutex.patch [new file with mode: 0644]
queue-5.10/drm-msm-adreno-fix-snapshot-bindless_data-size.patch [new file with mode: 0644]
queue-5.10/drm-msm-dpu-drop-enum-dpu_core_perf_data_bus_id.patch [new file with mode: 0644]
queue-5.10/drm-msm-fix-is_err_or_null-vs-null-check-in-a5xx_sub.patch [new file with mode: 0644]
queue-5.10/rdma-mlx4-make-check-for-invalid-flags-stricter.patch [new file with mode: 0644]
queue-5.10/rdma-mthca-fix-crash-when-polling-cq-for-shared-qps.patch [new file with mode: 0644]
queue-5.10/ring-buffer-fix-wrong-stat-of-cpu_buffer-read.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/tracing-fix-warning-in-trace_buffered_event_disable.patch [new file with mode: 0644]

diff --git a/queue-5.10/asoc-fsl_spdif-silence-output-on-stop.patch b/queue-5.10/asoc-fsl_spdif-silence-output-on-stop.patch
new file mode 100644 (file)
index 0000000..12079ea
--- /dev/null
@@ -0,0 +1,38 @@
+From 85de7eaa9f988ed091dd89e6127d26dfc662ba78 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 19 Jul 2023 18:47:29 +0200
+Subject: ASoC: fsl_spdif: Silence output on stop
+
+From: Matus Gajdos <matuszpd@gmail.com>
+
+[ Upstream commit 0e4c2b6b0c4a4b4014d9424c27e5e79d185229c5 ]
+
+Clear TX registers on stop to prevent the SPDIF interface from sending
+last written word over and over again.
+
+Fixes: a2388a498ad2 ("ASoC: fsl: Add S/PDIF CPU DAI driver")
+Signed-off-by: Matus Gajdos <matuszpd@gmail.com>
+Reviewed-by: Fabio Estevam <festevam@gmail.com>
+Link: https://lore.kernel.org/r/20230719164729.19969-1-matuszpd@gmail.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/fsl/fsl_spdif.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
+index d01e8d516df1f..64b85b786bf64 100644
+--- a/sound/soc/fsl/fsl_spdif.c
++++ b/sound/soc/fsl/fsl_spdif.c
+@@ -612,6 +612,8 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream,
+       case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+               regmap_update_bits(regmap, REG_SPDIF_SCR, dmaen, 0);
+               regmap_update_bits(regmap, REG_SPDIF_SIE, intr, 0);
++              regmap_write(regmap, REG_SPDIF_STL, 0x0);
++              regmap_write(regmap, REG_SPDIF_STR, 0x0);
+               break;
+       default:
+               return -EINVAL;
+-- 
+2.40.1
+
diff --git a/queue-5.10/ata-pata_ns87415-mark-ns87560_tf_read-static.patch b/queue-5.10/ata-pata_ns87415-mark-ns87560_tf_read-static.patch
new file mode 100644 (file)
index 0000000..3c63244
--- /dev/null
@@ -0,0 +1,42 @@
+From 516c5c1a7a0ddc2f34616f0901c8a97081198bad Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 26 Jul 2023 22:33:22 +0200
+Subject: ata: pata_ns87415: mark ns87560_tf_read static
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+[ Upstream commit 3fc2febb0f8ffae354820c1772ec008733237cfa ]
+
+The global function triggers a warning because of the missing prototype
+
+drivers/ata/pata_ns87415.c:263:6: warning: no previous prototype for 'ns87560_tf_read' [-Wmissing-prototypes]
+  263 | void ns87560_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
+
+There are no other references to this, so just make it static.
+
+Fixes: c4b5b7b6c4423 ("pata_ns87415: Initial cut at 87415/87560 IDE support")
+Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
+Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/ata/pata_ns87415.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c
+index 1532b2e3c6720..9217385774400 100644
+--- a/drivers/ata/pata_ns87415.c
++++ b/drivers/ata/pata_ns87415.c
+@@ -260,7 +260,7 @@ static u8 ns87560_check_status(struct ata_port *ap)
+  *    LOCKING:
+  *    Inherited from caller.
+  */
+-void ns87560_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
++static void ns87560_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
+ {
+       struct ata_ioports *ioaddr = &ap->ioaddr;
+-- 
+2.40.1
+
diff --git a/queue-5.10/block-fix-a-source-code-comment-in-include-uapi-linu.patch b/queue-5.10/block-fix-a-source-code-comment-in-include-uapi-linu.patch
new file mode 100644 (file)
index 0000000..e5b044d
--- /dev/null
@@ -0,0 +1,50 @@
+From 603ccd01e95a09c97434b0b5c1ef6603cb03fb5d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 6 Jul 2023 13:14:12 -0700
+Subject: block: Fix a source code comment in include/uapi/linux/blkzoned.h
+
+From: Bart Van Assche <bvanassche@acm.org>
+
+[ Upstream commit e0933b526fbfd937c4a8f4e35fcdd49f0e22d411 ]
+
+Fix the symbolic names for zone conditions in the blkzoned.h header
+file.
+
+Cc: Hannes Reinecke <hare@suse.de>
+Cc: Damien Le Moal <dlemoal@kernel.org>
+Fixes: 6a0cb1bc106f ("block: Implement support for zoned block devices")
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
+Link: https://lore.kernel.org/r/20230706201422.3987341-1-bvanassche@acm.org
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/uapi/linux/blkzoned.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/include/uapi/linux/blkzoned.h b/include/uapi/linux/blkzoned.h
+index 656a326821a2b..321965feee354 100644
+--- a/include/uapi/linux/blkzoned.h
++++ b/include/uapi/linux/blkzoned.h
+@@ -51,13 +51,13 @@ enum blk_zone_type {
+  *
+  * The Zone Condition state machine in the ZBC/ZAC standards maps the above
+  * deinitions as:
+- *   - ZC1: Empty         | BLK_ZONE_EMPTY
++ *   - ZC1: Empty         | BLK_ZONE_COND_EMPTY
+  *   - ZC2: Implicit Open | BLK_ZONE_COND_IMP_OPEN
+  *   - ZC3: Explicit Open | BLK_ZONE_COND_EXP_OPEN
+- *   - ZC4: Closed        | BLK_ZONE_CLOSED
+- *   - ZC5: Full          | BLK_ZONE_FULL
+- *   - ZC6: Read Only     | BLK_ZONE_READONLY
+- *   - ZC7: Offline       | BLK_ZONE_OFFLINE
++ *   - ZC4: Closed        | BLK_ZONE_COND_CLOSED
++ *   - ZC5: Full          | BLK_ZONE_COND_FULL
++ *   - ZC6: Read Only     | BLK_ZONE_COND_READONLY
++ *   - ZC7: Offline       | BLK_ZONE_COND_OFFLINE
+  *
+  * Conditions 0x5 to 0xC are reserved by the current ZBC/ZAC spec and should
+  * be considered invalid.
+-- 
+2.40.1
+
diff --git a/queue-5.10/dm-raid-clean-up-four-equivalent-goto-tags-in-raid_c.patch b/queue-5.10/dm-raid-clean-up-four-equivalent-goto-tags-in-raid_c.patch
new file mode 100644 (file)
index 0000000..586c428
--- /dev/null
@@ -0,0 +1,97 @@
+From e4903760e62a2c4cb7d6a4c649f8eb3b0672621e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 8 Jul 2023 17:21:52 +0800
+Subject: dm raid: clean up four equivalent goto tags in raid_ctr()
+
+From: Yu Kuai <yukuai3@huawei.com>
+
+[ Upstream commit e74c874eabe2e9173a8fbdad616cd89c70eb8ffd ]
+
+There are four equivalent goto tags in raid_ctr(), clean them up to
+use just one.
+
+There is no functional change and this is preparation to fix
+raid_ctr()'s unprotected md_stop().
+
+Signed-off-by: Yu Kuai <yukuai3@huawei.com>
+Signed-off-by: Mike Snitzer <snitzer@kernel.org>
+Stable-dep-of: 7d5fff8982a2 ("dm raid: protect md_stop() with 'reconfig_mutex'")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/md/dm-raid.c | 27 +++++++++------------------
+ 1 file changed, 9 insertions(+), 18 deletions(-)
+
+diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
+index 1a25c8b01b6aa..f3a489b1b6e9a 100644
+--- a/drivers/md/dm-raid.c
++++ b/drivers/md/dm-raid.c
+@@ -3258,8 +3258,7 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+       r = md_start(&rs->md);
+       if (r) {
+               ti->error = "Failed to start raid array";
+-              mddev_unlock(&rs->md);
+-              goto bad_md_start;
++              goto bad_unlock;
+       }
+       /* If raid4/5/6 journal mode explicitly requested (only possible with journal dev) -> set it */
+@@ -3267,8 +3266,7 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+               r = r5c_journal_mode_set(&rs->md, rs->journal_dev.mode);
+               if (r) {
+                       ti->error = "Failed to set raid4/5/6 journal mode";
+-                      mddev_unlock(&rs->md);
+-                      goto bad_journal_mode_set;
++                      goto bad_unlock;
+               }
+       }
+@@ -3278,19 +3276,15 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+       /* Try to adjust the raid4/5/6 stripe cache size to the stripe size */
+       if (rs_is_raid456(rs)) {
+               r = rs_set_raid456_stripe_cache(rs);
+-              if (r) {
+-                      mddev_unlock(&rs->md);
+-                      goto bad_stripe_cache;
+-              }
++              if (r)
++                      goto bad_unlock;
+       }
+       /* Now do an early reshape check */
+       if (test_bit(RT_FLAG_RESHAPE_RS, &rs->runtime_flags)) {
+               r = rs_check_reshape(rs);
+-              if (r) {
+-                      mddev_unlock(&rs->md);
+-                      goto bad_check_reshape;
+-              }
++              if (r)
++                      goto bad_unlock;
+               /* Restore new, ctr requested layout to perform check */
+               rs_config_restore(rs, &rs_layout);
+@@ -3299,8 +3293,7 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+                       r = rs->md.pers->check_reshape(&rs->md);
+                       if (r) {
+                               ti->error = "Reshape check failed";
+-                              mddev_unlock(&rs->md);
+-                              goto bad_check_reshape;
++                              goto bad_unlock;
+                       }
+               }
+       }
+@@ -3311,10 +3304,8 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+       mddev_unlock(&rs->md);
+       return 0;
+-bad_md_start:
+-bad_journal_mode_set:
+-bad_stripe_cache:
+-bad_check_reshape:
++bad_unlock:
++      mddev_unlock(&rs->md);
+       md_stop(&rs->md);
+ bad:
+       raid_set_free(rs);
+-- 
+2.40.1
+
diff --git a/queue-5.10/dm-raid-fix-missing-reconfig_mutex-unlock-in-raid_ct.patch b/queue-5.10/dm-raid-fix-missing-reconfig_mutex-unlock-in-raid_ct.patch
new file mode 100644 (file)
index 0000000..d9b9184
--- /dev/null
@@ -0,0 +1,57 @@
+From 14b5b3d88c17561ac021d69e5c939cd0c8eea0d3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 8 Jul 2023 17:21:51 +0800
+Subject: dm raid: fix missing reconfig_mutex unlock in raid_ctr() error paths
+
+From: Yu Kuai <yukuai3@huawei.com>
+
+[ Upstream commit bae3028799dc4f1109acc4df37c8ff06f2d8f1a0 ]
+
+In the error paths 'bad_stripe_cache' and 'bad_check_reshape',
+'reconfig_mutex' is still held after raid_ctr() returns.
+
+Fixes: 9dbd1aa3a81c ("dm raid: add reshaping support to the target")
+Signed-off-by: Yu Kuai <yukuai3@huawei.com>
+Signed-off-by: Mike Snitzer <snitzer@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/md/dm-raid.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
+index a2d09c9c6e9f7..1a25c8b01b6aa 100644
+--- a/drivers/md/dm-raid.c
++++ b/drivers/md/dm-raid.c
+@@ -3278,15 +3278,19 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+       /* Try to adjust the raid4/5/6 stripe cache size to the stripe size */
+       if (rs_is_raid456(rs)) {
+               r = rs_set_raid456_stripe_cache(rs);
+-              if (r)
++              if (r) {
++                      mddev_unlock(&rs->md);
+                       goto bad_stripe_cache;
++              }
+       }
+       /* Now do an early reshape check */
+       if (test_bit(RT_FLAG_RESHAPE_RS, &rs->runtime_flags)) {
+               r = rs_check_reshape(rs);
+-              if (r)
++              if (r) {
++                      mddev_unlock(&rs->md);
+                       goto bad_check_reshape;
++              }
+               /* Restore new, ctr requested layout to perform check */
+               rs_config_restore(rs, &rs_layout);
+@@ -3295,6 +3299,7 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+                       r = rs->md.pers->check_reshape(&rs->md);
+                       if (r) {
+                               ti->error = "Reshape check failed";
++                              mddev_unlock(&rs->md);
+                               goto bad_check_reshape;
+                       }
+               }
+-- 
+2.40.1
+
diff --git a/queue-5.10/dm-raid-protect-md_stop-with-reconfig_mutex.patch b/queue-5.10/dm-raid-protect-md_stop-with-reconfig_mutex.patch
new file mode 100644 (file)
index 0000000..4d28ad1
--- /dev/null
@@ -0,0 +1,65 @@
+From c9159a4596222955ffa558a871a0cfedfb439475 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 8 Jul 2023 17:21:53 +0800
+Subject: dm raid: protect md_stop() with 'reconfig_mutex'
+
+From: Yu Kuai <yukuai3@huawei.com>
+
+[ Upstream commit 7d5fff8982a2199d49ec067818af7d84d4f95ca0 ]
+
+__md_stop_writes() and __md_stop() will modify many fields that are
+protected by 'reconfig_mutex', and all the callers will grab
+'reconfig_mutex' except for md_stop().
+
+Also, update md_stop() to make certain 'reconfig_mutex' is held using
+lockdep_assert_held().
+
+Fixes: 9d09e663d550 ("dm: raid456 basic support")
+Signed-off-by: Yu Kuai <yukuai3@huawei.com>
+Signed-off-by: Mike Snitzer <snitzer@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/md/dm-raid.c | 4 +++-
+ drivers/md/md.c      | 2 ++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
+index f3a489b1b6e9a..140bdf2a6ee11 100644
+--- a/drivers/md/dm-raid.c
++++ b/drivers/md/dm-raid.c
+@@ -3305,8 +3305,8 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
+       return 0;
+ bad_unlock:
+-      mddev_unlock(&rs->md);
+       md_stop(&rs->md);
++      mddev_unlock(&rs->md);
+ bad:
+       raid_set_free(rs);
+@@ -3317,7 +3317,9 @@ static void raid_dtr(struct dm_target *ti)
+ {
+       struct raid_set *rs = ti->private;
++      mddev_lock_nointr(&rs->md);
+       md_stop(&rs->md);
++      mddev_unlock(&rs->md);
+       raid_set_free(rs);
+ }
+diff --git a/drivers/md/md.c b/drivers/md/md.c
+index ae0a857d6076a..6efe49f7bdf5e 100644
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -6316,6 +6316,8 @@ static void __md_stop(struct mddev *mddev)
+ void md_stop(struct mddev *mddev)
+ {
++      lockdep_assert_held(&mddev->reconfig_mutex);
++
+       /* stop the array and free an attached data structures.
+        * This is called from dm-raid
+        */
+-- 
+2.40.1
+
diff --git a/queue-5.10/drm-msm-adreno-fix-snapshot-bindless_data-size.patch b/queue-5.10/drm-msm-adreno-fix-snapshot-bindless_data-size.patch
new file mode 100644 (file)
index 0000000..b002352
--- /dev/null
@@ -0,0 +1,38 @@
+From dd099d145b29735a2ca910f6b249b7b69ff2e3a4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 11 Jul 2023 10:54:07 -0700
+Subject: drm/msm/adreno: Fix snapshot BINDLESS_DATA size
+
+From: Rob Clark <robdclark@chromium.org>
+
+[ Upstream commit bd846ceee9c478d0397428f02696602ba5eb264a ]
+
+The incorrect size was causing "CP | AHB bus error" when snapshotting
+the GPU state on a6xx gen4 (a660 family).
+
+Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/26
+Signed-off-by: Rob Clark <robdclark@chromium.org>
+Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
+Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state")
+Patchwork: https://patchwork.freedesktop.org/patch/546763/
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h
+index 2fb58b7098e4b..3bd2065a9d30e 100644
+--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h
++++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h
+@@ -200,7 +200,7 @@ static const struct a6xx_shader_block {
+       SHADER(A6XX_SP_LB_3_DATA, 0x800),
+       SHADER(A6XX_SP_LB_4_DATA, 0x800),
+       SHADER(A6XX_SP_LB_5_DATA, 0x200),
+-      SHADER(A6XX_SP_CB_BINDLESS_DATA, 0x2000),
++      SHADER(A6XX_SP_CB_BINDLESS_DATA, 0x800),
+       SHADER(A6XX_SP_CB_LEGACY_DATA, 0x280),
+       SHADER(A6XX_SP_UAV_DATA, 0x80),
+       SHADER(A6XX_SP_INST_TAG, 0x80),
+-- 
+2.40.1
+
diff --git a/queue-5.10/drm-msm-dpu-drop-enum-dpu_core_perf_data_bus_id.patch b/queue-5.10/drm-msm-dpu-drop-enum-dpu_core_perf_data_bus_id.patch
new file mode 100644 (file)
index 0000000..31f61c3
--- /dev/null
@@ -0,0 +1,51 @@
+From aba864a6fe2a990b2b30e56a908bb70122fa7272 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 7 Jul 2023 22:39:32 +0300
+Subject: drm/msm/dpu: drop enum dpu_core_perf_data_bus_id
+
+From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+
+[ Upstream commit e8383f5cf1b3573ce140a80bfbfd809278ab16d6 ]
+
+Drop the leftover of bus-client -> interconnect conversion, the enum
+dpu_core_perf_data_bus_id.
+
+Fixes: cb88482e2570 ("drm/msm/dpu: clean up references of DPU custom bus scaling")
+Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
+Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Patchwork: https://patchwork.freedesktop.org/patch/546048/
+Link: https://lore.kernel.org/r/20230707193942.3806526-2-dmitry.baryshkov@linaro.org
+Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h
+index cf4b9b5964c6c..cd6c3518ba021 100644
+--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h
++++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h
+@@ -14,19 +14,6 @@
+ #define       DPU_PERF_DEFAULT_MAX_CORE_CLK_RATE      412500000
+-/**
+- * enum dpu_core_perf_data_bus_id - data bus identifier
+- * @DPU_CORE_PERF_DATA_BUS_ID_MNOC: DPU/MNOC data bus
+- * @DPU_CORE_PERF_DATA_BUS_ID_LLCC: MNOC/LLCC data bus
+- * @DPU_CORE_PERF_DATA_BUS_ID_EBI: LLCC/EBI data bus
+- */
+-enum dpu_core_perf_data_bus_id {
+-      DPU_CORE_PERF_DATA_BUS_ID_MNOC,
+-      DPU_CORE_PERF_DATA_BUS_ID_LLCC,
+-      DPU_CORE_PERF_DATA_BUS_ID_EBI,
+-      DPU_CORE_PERF_DATA_BUS_ID_MAX,
+-};
+-
+ /**
+  * struct dpu_core_perf_params - definition of performance parameters
+  * @max_per_pipe_ib: maximum instantaneous bandwidth request
+-- 
+2.40.1
+
diff --git a/queue-5.10/drm-msm-fix-is_err_or_null-vs-null-check-in-a5xx_sub.patch b/queue-5.10/drm-msm-fix-is_err_or_null-vs-null-check-in-a5xx_sub.patch
new file mode 100644 (file)
index 0000000..b63aabc
--- /dev/null
@@ -0,0 +1,41 @@
+From c2275762e7c1937a9c01b143aa959ceb27e53237 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 17 Jul 2023 09:47:38 +0800
+Subject: drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()
+
+From: Gaosheng Cui <cuigaosheng1@huawei.com>
+
+[ Upstream commit 6e8a996563ecbe68e49c49abd4aaeef69f11f2dc ]
+
+The msm_gem_get_vaddr() returns an ERR_PTR() on failure, and a null
+is catastrophic here, so we should use IS_ERR_OR_NULL() to check
+the return value.
+
+Fixes: 6a8bd08d0465 ("drm/msm: add sudo flag to submit ioctl")
+Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
+Patchwork: https://patchwork.freedesktop.org/patch/547712/
+Signed-off-by: Rob Clark <robdclark@chromium.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+index 0fcba2bc26b8e..9ae0e60ecac30 100644
+--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
++++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+@@ -81,7 +81,7 @@ static void a5xx_submit_in_rb(struct msm_gpu *gpu, struct msm_gem_submit *submit
+                        * since we've already mapped it once in
+                        * submit_reloc()
+                        */
+-                      if (WARN_ON(!ptr))
++                      if (WARN_ON(IS_ERR_OR_NULL(ptr)))
+                               return;
+                       for (i = 0; i < dwords; i++) {
+-- 
+2.40.1
+
diff --git a/queue-5.10/rdma-mlx4-make-check-for-invalid-flags-stricter.patch b/queue-5.10/rdma-mlx4-make-check-for-invalid-flags-stricter.patch
new file mode 100644 (file)
index 0000000..5a9f410
--- /dev/null
@@ -0,0 +1,55 @@
+From 2d13687dd38543163395a897757fab62986119f8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 29 Jun 2023 09:07:37 +0300
+Subject: RDMA/mlx4: Make check for invalid flags stricter
+
+From: Dan Carpenter <dan.carpenter@linaro.org>
+
+[ Upstream commit d64b1ee12a168030fbb3e0aebf7bce49e9a07589 ]
+
+This code is trying to ensure that only the flags specified in the list
+are allowed.  The problem is that ucmd->rx_hash_fields_mask is a u64 and
+the flags are an enum which is treated as a u32 in this context.  That
+means the test doesn't check whether the highest 32 bits are zero.
+
+Fixes: 4d02ebd9bbbd ("IB/mlx4: Fix RSS hash fields restrictions")
+Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
+Link: https://lore.kernel.org/r/233ed975-982d-422a-b498-410f71d8a101@moroto.mountain
+Signed-off-by: Leon Romanovsky <leon@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/infiniband/hw/mlx4/qp.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
+index 255194029e2d8..50b355e34445c 100644
+--- a/drivers/infiniband/hw/mlx4/qp.c
++++ b/drivers/infiniband/hw/mlx4/qp.c
+@@ -530,15 +530,15 @@ static int set_qp_rss(struct mlx4_ib_dev *dev, struct mlx4_ib_rss *rss_ctx,
+               return (-EOPNOTSUPP);
+       }
+-      if (ucmd->rx_hash_fields_mask & ~(MLX4_IB_RX_HASH_SRC_IPV4      |
+-                                        MLX4_IB_RX_HASH_DST_IPV4      |
+-                                        MLX4_IB_RX_HASH_SRC_IPV6      |
+-                                        MLX4_IB_RX_HASH_DST_IPV6      |
+-                                        MLX4_IB_RX_HASH_SRC_PORT_TCP  |
+-                                        MLX4_IB_RX_HASH_DST_PORT_TCP  |
+-                                        MLX4_IB_RX_HASH_SRC_PORT_UDP  |
+-                                        MLX4_IB_RX_HASH_DST_PORT_UDP  |
+-                                        MLX4_IB_RX_HASH_INNER)) {
++      if (ucmd->rx_hash_fields_mask & ~(u64)(MLX4_IB_RX_HASH_SRC_IPV4 |
++                                             MLX4_IB_RX_HASH_DST_IPV4 |
++                                             MLX4_IB_RX_HASH_SRC_IPV6 |
++                                             MLX4_IB_RX_HASH_DST_IPV6 |
++                                             MLX4_IB_RX_HASH_SRC_PORT_TCP |
++                                             MLX4_IB_RX_HASH_DST_PORT_TCP |
++                                             MLX4_IB_RX_HASH_SRC_PORT_UDP |
++                                             MLX4_IB_RX_HASH_DST_PORT_UDP |
++                                             MLX4_IB_RX_HASH_INNER)) {
+               pr_debug("RX Hash fields_mask has unsupported mask (0x%llx)\n",
+                        ucmd->rx_hash_fields_mask);
+               return (-EOPNOTSUPP);
+-- 
+2.40.1
+
diff --git a/queue-5.10/rdma-mthca-fix-crash-when-polling-cq-for-shared-qps.patch b/queue-5.10/rdma-mthca-fix-crash-when-polling-cq-for-shared-qps.patch
new file mode 100644 (file)
index 0000000..d6e6185
--- /dev/null
@@ -0,0 +1,40 @@
+From ebc8aa0b4788478d5a9fdde26e1b35d5f9aa73a3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 13 Jul 2023 16:16:58 +0200
+Subject: RDMA/mthca: Fix crash when polling CQ for shared QPs
+
+From: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+
+[ Upstream commit dc52aadbc1849cbe3fcf6bc54d35f6baa396e0a1 ]
+
+Commit 21c2fe94abb2 ("RDMA/mthca: Combine special QP struct with mthca QP")
+introduced a new struct mthca_sqp which doesn't contain struct mthca_qp
+any longer. Placing a pointer of this new struct into qptable leads
+to crashes, because mthca_poll_one() expects a qp pointer. Fix this
+by putting the correct pointer into qptable.
+
+Fixes: 21c2fe94abb2 ("RDMA/mthca: Combine special QP struct with mthca QP")
+Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+Link: https://lore.kernel.org/r/20230713141658.9426-1-tbogendoerfer@suse.de
+Signed-off-by: Leon Romanovsky <leon@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/infiniband/hw/mthca/mthca_qp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
+index 08a2a7afafd3d..3f57f7dfb822f 100644
+--- a/drivers/infiniband/hw/mthca/mthca_qp.c
++++ b/drivers/infiniband/hw/mthca/mthca_qp.c
+@@ -1390,7 +1390,7 @@ int mthca_alloc_sqp(struct mthca_dev *dev,
+       if (mthca_array_get(&dev->qp_table.qp, mqpn))
+               err = -EBUSY;
+       else
+-              mthca_array_set(&dev->qp_table.qp, mqpn, qp->sqp);
++              mthca_array_set(&dev->qp_table.qp, mqpn, qp);
+       spin_unlock_irq(&dev->qp_table.lock);
+       if (err)
+-- 
+2.40.1
+
diff --git a/queue-5.10/ring-buffer-fix-wrong-stat-of-cpu_buffer-read.patch b/queue-5.10/ring-buffer-fix-wrong-stat-of-cpu_buffer-read.patch
new file mode 100644 (file)
index 0000000..8f829ee
--- /dev/null
@@ -0,0 +1,130 @@
+From 8d5e1a85476fad2df4aaf3ec61418469e911c7f3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 24 Jul 2023 13:40:40 +0800
+Subject: ring-buffer: Fix wrong stat of cpu_buffer->read
+
+From: Zheng Yejian <zhengyejian1@huawei.com>
+
+[ Upstream commit 2d093282b0d4357373497f65db6a05eb0c28b7c8 ]
+
+When pages are removed in rb_remove_pages(), 'cpu_buffer->read' is set
+to 0 in order to make sure any read iterators reset themselves. However,
+this will mess 'entries' stating, see following steps:
+
+  # cd /sys/kernel/tracing/
+  # 1. Enlarge ring buffer prepare for later reducing:
+  # echo 20 > per_cpu/cpu0/buffer_size_kb
+  # 2. Write a log into ring buffer of cpu0:
+  # taskset -c 0 echo "hello1" > trace_marker
+  # 3. Read the log:
+  # cat per_cpu/cpu0/trace_pipe
+       <...>-332     [000] .....    62.406844: tracing_mark_write: hello1
+  # 4. Stop reading and see the stats, now 0 entries, and 1 event readed:
+  # cat per_cpu/cpu0/stats
+   entries: 0
+   [...]
+   read events: 1
+  # 5. Reduce the ring buffer
+  # echo 7 > per_cpu/cpu0/buffer_size_kb
+  # 6. Now entries became unexpected 1 because actually no entries!!!
+  # cat per_cpu/cpu0/stats
+   entries: 1
+   [...]
+   read events: 0
+
+To fix it, introduce 'page_removed' field to count total removed pages
+since last reset, then use it to let read iterators reset themselves
+instead of changing the 'read' pointer.
+
+Link: https://lore.kernel.org/linux-trace-kernel/20230724054040.3489499-1-zhengyejian1@huawei.com
+
+Cc: <mhiramat@kernel.org>
+Cc: <vnagarnaik@google.com>
+Fixes: 83f40318dab0 ("ring-buffer: Make removal of ring buffer pages atomic")
+Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
+Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/trace/ring_buffer.c | 22 ++++++++++++----------
+ 1 file changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
+index 593e446f6c487..3b8c53264441e 100644
+--- a/kernel/trace/ring_buffer.c
++++ b/kernel/trace/ring_buffer.c
+@@ -526,6 +526,8 @@ struct ring_buffer_per_cpu {
+       rb_time_t                       write_stamp;
+       rb_time_t                       before_stamp;
+       u64                             read_stamp;
++      /* pages removed since last reset */
++      unsigned long                   pages_removed;
+       /* ring buffer pages to update, > 0 to add, < 0 to remove */
+       long                            nr_pages_to_update;
+       struct list_head                new_pages; /* new pages to add */
+@@ -561,6 +563,7 @@ struct ring_buffer_iter {
+       struct buffer_page              *head_page;
+       struct buffer_page              *cache_reader_page;
+       unsigned long                   cache_read;
++      unsigned long                   cache_pages_removed;
+       u64                             read_stamp;
+       u64                             page_stamp;
+       struct ring_buffer_event        *event;
+@@ -1833,6 +1836,8 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages)
+               to_remove = rb_list_head(to_remove)->next;
+               head_bit |= (unsigned long)to_remove & RB_PAGE_HEAD;
+       }
++      /* Read iterators need to reset themselves when some pages removed */
++      cpu_buffer->pages_removed += nr_removed;
+       next_page = rb_list_head(to_remove)->next;
+@@ -1854,12 +1859,6 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages)
+               cpu_buffer->head_page = list_entry(next_page,
+                                               struct buffer_page, list);
+-      /*
+-       * change read pointer to make sure any read iterators reset
+-       * themselves
+-       */
+-      cpu_buffer->read = 0;
+-
+       /* pages are removed, resume tracing and then free the pages */
+       atomic_dec(&cpu_buffer->record_disabled);
+       raw_spin_unlock_irq(&cpu_buffer->reader_lock);
+@@ -4105,6 +4104,7 @@ static void rb_iter_reset(struct ring_buffer_iter *iter)
+       iter->cache_reader_page = iter->head_page;
+       iter->cache_read = cpu_buffer->read;
++      iter->cache_pages_removed = cpu_buffer->pages_removed;
+       if (iter->head) {
+               iter->read_stamp = cpu_buffer->read_stamp;
+@@ -4558,12 +4558,13 @@ rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
+       buffer = cpu_buffer->buffer;
+       /*
+-       * Check if someone performed a consuming read to
+-       * the buffer. A consuming read invalidates the iterator
+-       * and we need to reset the iterator in this case.
++       * Check if someone performed a consuming read to the buffer
++       * or removed some pages from the buffer. In these cases,
++       * iterator was invalidated and we need to reset it.
+        */
+       if (unlikely(iter->cache_read != cpu_buffer->read ||
+-                   iter->cache_reader_page != cpu_buffer->reader_page))
++                   iter->cache_reader_page != cpu_buffer->reader_page ||
++                   iter->cache_pages_removed != cpu_buffer->pages_removed))
+               rb_iter_reset(iter);
+  again:
+@@ -5005,6 +5006,7 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
+       cpu_buffer->last_overrun = 0;
+       rb_head_page_activate(cpu_buffer);
++      cpu_buffer->pages_removed = 0;
+ }
+ /* Must have disabled the cpu buffer then done a synchronize_rcu */
+-- 
+2.40.1
+
index f438b14584d8090c5334534f0ef46730823a88c1..195be920f73b05f821ab62b40ee4e904d0f25274 100644 (file)
@@ -49,3 +49,16 @@ net-sched-mqprio-add-length-check-for-tca_mqprio_-ma.patch
 benet-fix-return-value-check-in-be_lancer_xmit_worka.patch
 tipc-check-return-value-of-pskb_trim.patch
 tipc-stop-tipc-crypto-on-failure-in-tipc_node_create.patch
+rdma-mlx4-make-check-for-invalid-flags-stricter.patch
+drm-msm-dpu-drop-enum-dpu_core_perf_data_bus_id.patch
+drm-msm-adreno-fix-snapshot-bindless_data-size.patch
+rdma-mthca-fix-crash-when-polling-cq-for-shared-qps.patch
+drm-msm-fix-is_err_or_null-vs-null-check-in-a5xx_sub.patch
+asoc-fsl_spdif-silence-output-on-stop.patch
+block-fix-a-source-code-comment-in-include-uapi-linu.patch
+dm-raid-fix-missing-reconfig_mutex-unlock-in-raid_ct.patch
+dm-raid-clean-up-four-equivalent-goto-tags-in-raid_c.patch
+dm-raid-protect-md_stop-with-reconfig_mutex.patch
+ata-pata_ns87415-mark-ns87560_tf_read-static.patch
+ring-buffer-fix-wrong-stat-of-cpu_buffer-read.patch
+tracing-fix-warning-in-trace_buffered_event_disable.patch
diff --git a/queue-5.10/tracing-fix-warning-in-trace_buffered_event_disable.patch b/queue-5.10/tracing-fix-warning-in-trace_buffered_event_disable.patch
new file mode 100644 (file)
index 0000000..0df1617
--- /dev/null
@@ -0,0 +1,119 @@
+From bb4da883bf091f2de493dc0f88b5dde230038ea3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 26 Jul 2023 17:58:04 +0800
+Subject: tracing: Fix warning in trace_buffered_event_disable()
+
+From: Zheng Yejian <zhengyejian1@huawei.com>
+
+[ Upstream commit dea499781a1150d285c62b26659f62fb00824fce ]
+
+Warning happened in trace_buffered_event_disable() at
+  WARN_ON_ONCE(!trace_buffered_event_ref)
+
+  Call Trace:
+   ? __warn+0xa5/0x1b0
+   ? trace_buffered_event_disable+0x189/0x1b0
+   __ftrace_event_enable_disable+0x19e/0x3e0
+   free_probe_data+0x3b/0xa0
+   unregister_ftrace_function_probe_func+0x6b8/0x800
+   event_enable_func+0x2f0/0x3d0
+   ftrace_process_regex.isra.0+0x12d/0x1b0
+   ftrace_filter_write+0xe6/0x140
+   vfs_write+0x1c9/0x6f0
+   [...]
+
+The cause of the warning is in __ftrace_event_enable_disable(),
+trace_buffered_event_enable() was called once while
+trace_buffered_event_disable() was called twice.
+Reproduction script show as below, for analysis, see the comments:
+ ```
+ #!/bin/bash
+
+ cd /sys/kernel/tracing/
+
+ # 1. Register a 'disable_event' command, then:
+ #    1) SOFT_DISABLED_BIT was set;
+ #    2) trace_buffered_event_enable() was called first time;
+ echo 'cmdline_proc_show:disable_event:initcall:initcall_finish' > \
+     set_ftrace_filter
+
+ # 2. Enable the event registered, then:
+ #    1) SOFT_DISABLED_BIT was cleared;
+ #    2) trace_buffered_event_disable() was called first time;
+ echo 1 > events/initcall/initcall_finish/enable
+
+ # 3. Try to call into cmdline_proc_show(), then SOFT_DISABLED_BIT was
+ #    set again!!!
+ cat /proc/cmdline
+
+ # 4. Unregister the 'disable_event' command, then:
+ #    1) SOFT_DISABLED_BIT was cleared again;
+ #    2) trace_buffered_event_disable() was called second time!!!
+ echo '!cmdline_proc_show:disable_event:initcall:initcall_finish' > \
+     set_ftrace_filter
+ ```
+
+To fix it, IIUC, we can change to call trace_buffered_event_enable() at
+fist time soft-mode enabled, and call trace_buffered_event_disable() at
+last time soft-mode disabled.
+
+Link: https://lore.kernel.org/linux-trace-kernel/20230726095804.920457-1-zhengyejian1@huawei.com
+
+Cc: <mhiramat@kernel.org>
+Fixes: 0fc1b09ff1ff ("tracing: Use temp buffer when filtering events")
+Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
+Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/trace/trace_events.c | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
+index f8ed66f38175b..a46d34d840f69 100644
+--- a/kernel/trace/trace_events.c
++++ b/kernel/trace/trace_events.c
+@@ -371,7 +371,6 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,
+ {
+       struct trace_event_call *call = file->event_call;
+       struct trace_array *tr = file->tr;
+-      unsigned long file_flags = file->flags;
+       int ret = 0;
+       int disable;
+@@ -395,6 +394,8 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,
+                               break;
+                       disable = file->flags & EVENT_FILE_FL_SOFT_DISABLED;
+                       clear_bit(EVENT_FILE_FL_SOFT_MODE_BIT, &file->flags);
++                      /* Disable use of trace_buffered_event */
++                      trace_buffered_event_disable();
+               } else
+                       disable = !(file->flags & EVENT_FILE_FL_SOFT_MODE);
+@@ -433,6 +434,8 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,
+                       if (atomic_inc_return(&file->sm_ref) > 1)
+                               break;
+                       set_bit(EVENT_FILE_FL_SOFT_MODE_BIT, &file->flags);
++                      /* Enable use of trace_buffered_event */
++                      trace_buffered_event_enable();
+               }
+               if (!(file->flags & EVENT_FILE_FL_ENABLED)) {
+@@ -472,15 +475,6 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,
+               break;
+       }
+-      /* Enable or disable use of trace_buffered_event */
+-      if ((file_flags & EVENT_FILE_FL_SOFT_DISABLED) !=
+-          (file->flags & EVENT_FILE_FL_SOFT_DISABLED)) {
+-              if (file->flags & EVENT_FILE_FL_SOFT_DISABLED)
+-                      trace_buffered_event_enable();
+-              else
+-                      trace_buffered_event_disable();
+-      }
+-
+       return ret;
+ }
+-- 
+2.40.1
+