]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jan 2025 10:23:36 +0000 (11:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jan 2025 10:23:36 +0000 (11:23 +0100)
added patches:
alsa-hda-realtek-add-quirk-for-framework-f111-000c.patch
alsa-seq-check-ump-support-for-midi_version-change.patch
alsa-seq-oss-fix-races-at-processing-sysex-messages.patch
drm-xe-use-non-interruptible-wait-when-moving-bo-to-system.patch
drm-xe-wait-for-migration-job-before-unmapping-pages.patch
ftrace-fix-function-profiler-s-filtering-functionality.patch
io_uring-kbuf-use-pre-committed-buffer-address-for-non-pollable-file.patch
rdma-mlx5-enable-multiplane-mode-only-when-it-is-supported.patch
revert-alsa-ump-don-t-enumeration-invalid-groups-for-legacy-rawmidi.patch

queue-6.12/alsa-hda-realtek-add-quirk-for-framework-f111-000c.patch [new file with mode: 0644]
queue-6.12/alsa-seq-check-ump-support-for-midi_version-change.patch [new file with mode: 0644]
queue-6.12/alsa-seq-oss-fix-races-at-processing-sysex-messages.patch [new file with mode: 0644]
queue-6.12/drm-xe-use-non-interruptible-wait-when-moving-bo-to-system.patch [new file with mode: 0644]
queue-6.12/drm-xe-wait-for-migration-job-before-unmapping-pages.patch [new file with mode: 0644]
queue-6.12/ftrace-fix-function-profiler-s-filtering-functionality.patch [new file with mode: 0644]
queue-6.12/io_uring-kbuf-use-pre-committed-buffer-address-for-non-pollable-file.patch [new file with mode: 0644]
queue-6.12/rdma-mlx5-enable-multiplane-mode-only-when-it-is-supported.patch [new file with mode: 0644]
queue-6.12/revert-alsa-ump-don-t-enumeration-invalid-groups-for-legacy-rawmidi.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/alsa-hda-realtek-add-quirk-for-framework-f111-000c.patch b/queue-6.12/alsa-hda-realtek-add-quirk-for-framework-f111-000c.patch
new file mode 100644 (file)
index 0000000..c2f42d2
--- /dev/null
@@ -0,0 +1,40 @@
+From 7b509910b3ad6d7aacead24c8744de10daf8715d Mon Sep 17 00:00:00 2001
+From: Daniel Schaefer <dhs@frame.work>
+Date: Tue, 31 Dec 2024 12:59:58 +0800
+Subject: ALSA hda/realtek: Add quirk for Framework F111:000C
+
+From: Daniel Schaefer <dhs@frame.work>
+
+commit 7b509910b3ad6d7aacead24c8744de10daf8715d upstream.
+
+Similar to commit eb91c456f371
+("ALSA: hda/realtek: Add Framework Laptop 13 (Intel Core Ultra) to quirks")
+and previous quirks for Framework systems with
+Realtek codecs.
+
+000C is a new platform that will also have an ALC285 codec and needs the
+same quirk.
+
+Cc: Jaroslav Kysela <perex@perex.cz>
+Cc: Takashi Iwai <tiwai@suse.com>
+Cc: linux@frame.work
+Cc: Dustin L. Howett <dustin@howett.net>
+Signed-off-by: Daniel Schaefer <dhs@frame.work>
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20241231045958.14545-1-dhs@frame.work
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -10993,6 +10993,7 @@ static const struct hda_quirk alc269_fix
+       SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0xf111, 0x0006, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0xf111, 0x0009, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
++      SND_PCI_QUIRK(0xf111, 0x000c, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
+ #if 0
+       /* Below is a quirk table taken from the old code.
diff --git a/queue-6.12/alsa-seq-check-ump-support-for-midi_version-change.patch b/queue-6.12/alsa-seq-check-ump-support-for-midi_version-change.patch
new file mode 100644 (file)
index 0000000..923a611
--- /dev/null
@@ -0,0 +1,46 @@
+From 8765429279e7d3d68d39ace5f84af2815174bb1e Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 31 Dec 2024 15:53:58 +0100
+Subject: ALSA: seq: Check UMP support for midi_version change
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 8765429279e7d3d68d39ace5f84af2815174bb1e upstream.
+
+When the kernel is built without UMP support but a user-space app
+requires the midi_version > 0, the kernel should return an error.
+Otherwise user-space assumes as if it were possible to deal,
+eventually hitting serious errors later.
+
+Fixes: 46397622a3fa ("ALSA: seq: Add UMP support")
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20241231145358.21946-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/core/seq/seq_clientmgr.c |   14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- a/sound/core/seq/seq_clientmgr.c
++++ b/sound/core/seq/seq_clientmgr.c
+@@ -1275,10 +1275,16 @@ static int snd_seq_ioctl_set_client_info
+       if (client->type != client_info->type)
+               return -EINVAL;
+-      /* check validity of midi_version field */
+-      if (client->user_pversion >= SNDRV_PROTOCOL_VERSION(1, 0, 3) &&
+-          client_info->midi_version > SNDRV_SEQ_CLIENT_UMP_MIDI_2_0)
+-              return -EINVAL;
++      if (client->user_pversion >= SNDRV_PROTOCOL_VERSION(1, 0, 3)) {
++              /* check validity of midi_version field */
++              if (client_info->midi_version > SNDRV_SEQ_CLIENT_UMP_MIDI_2_0)
++                      return -EINVAL;
++
++              /* check if UMP is supported in kernel */
++              if (!IS_ENABLED(CONFIG_SND_SEQ_UMP) &&
++                  client_info->midi_version > 0)
++                      return -EINVAL;
++      }
+       /* fill the info fields */
+       if (client_info->name[0])
diff --git a/queue-6.12/alsa-seq-oss-fix-races-at-processing-sysex-messages.patch b/queue-6.12/alsa-seq-oss-fix-races-at-processing-sysex-messages.patch
new file mode 100644 (file)
index 0000000..d7ae382
--- /dev/null
@@ -0,0 +1,45 @@
+From 0179488ca992d79908b8e26b9213f1554fc5bacc Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 30 Dec 2024 12:05:35 +0100
+Subject: ALSA: seq: oss: Fix races at processing SysEx messages
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 0179488ca992d79908b8e26b9213f1554fc5bacc upstream.
+
+OSS sequencer handles the SysEx messages split in 6 bytes packets, and
+ALSA sequencer OSS layer tries to combine those.  It stores the data
+in the internal buffer and this access is racy as of now, which may
+lead to the out-of-bounds access.
+
+As a temporary band-aid fix, introduce a mutex for serializing the
+process of the SysEx message packets.
+
+Reported-by: Kun Hu <huk23@m.fudan.edu.cn>
+Closes: https://lore.kernel.org/2B7E93E4-B13A-4AE4-8E87-306A8EE9BBB7@m.fudan.edu.cn
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20241230110543.32454-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/core/seq/oss/seq_oss_synth.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/core/seq/oss/seq_oss_synth.c
++++ b/sound/core/seq/oss/seq_oss_synth.c
+@@ -66,6 +66,7 @@ static struct seq_oss_synth midi_synth_d
+ };
+ static DEFINE_SPINLOCK(register_lock);
++static DEFINE_MUTEX(sysex_mutex);
+ /*
+  * prototypes
+@@ -497,6 +498,7 @@ snd_seq_oss_synth_sysex(struct seq_oss_d
+       if (!info)
+               return -ENXIO;
++      guard(mutex)(&sysex_mutex);
+       sysex = info->sysex;
+       if (sysex == NULL) {
+               sysex = kzalloc(sizeof(*sysex), GFP_KERNEL);
diff --git a/queue-6.12/drm-xe-use-non-interruptible-wait-when-moving-bo-to-system.patch b/queue-6.12/drm-xe-use-non-interruptible-wait-when-moving-bo-to-system.patch
new file mode 100644 (file)
index 0000000..1b5a7e2
--- /dev/null
@@ -0,0 +1,45 @@
+From 528cef1b4170f328d28d4e9b437380d8e5a2d18f Mon Sep 17 00:00:00 2001
+From: Nirmoy Das <nirmoy.das@intel.com>
+Date: Fri, 13 Dec 2024 13:24:14 +0100
+Subject: drm/xe: Use non-interruptible wait when moving BO to system
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Nirmoy Das <nirmoy.das@intel.com>
+
+commit 528cef1b4170f328d28d4e9b437380d8e5a2d18f upstream.
+
+Ensure a non-interruptible wait is used when moving a bo to
+XE_PL_SYSTEM. This prevents dma_mappings from being removed prematurely
+while a GPU job is still in progress, even if the CPU receives a
+signal during the operation.
+
+Fixes: 75521e8b56e8 ("drm/xe: Perform dma_map when moving system buffer objects to TT")
+Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
+Cc: Matthew Brost <matthew.brost@intel.com>
+Cc: Lucas De Marchi <lucas.demarchi@intel.com>
+Cc: stable@vger.kernel.org # v6.11+
+Suggested-by: Matthew Auld <matthew.auld@intel.com>
+Reviewed-by: Matthew Auld <matthew.auld@intel.com>
+Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20241213122415.3880017-1-nirmoy.das@intel.com
+Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
+(cherry picked from commit dc5e20ae1f8a7c354dc9833faa2720254e5a5443)
+Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/xe/xe_bo.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/xe/xe_bo.c
++++ b/drivers/gpu/drm/xe/xe_bo.c
+@@ -722,7 +722,7 @@ static int xe_bo_move(struct ttm_buffer_
+           new_mem->mem_type == XE_PL_SYSTEM) {
+               long timeout = dma_resv_wait_timeout(ttm_bo->base.resv,
+                                                    DMA_RESV_USAGE_BOOKKEEP,
+-                                                   true,
++                                                   false,
+                                                    MAX_SCHEDULE_TIMEOUT);
+               if (timeout < 0) {
+                       ret = timeout;
diff --git a/queue-6.12/drm-xe-wait-for-migration-job-before-unmapping-pages.patch b/queue-6.12/drm-xe-wait-for-migration-job-before-unmapping-pages.patch
new file mode 100644 (file)
index 0000000..7381076
--- /dev/null
@@ -0,0 +1,59 @@
+From 5e0a67fdb894d34c5f109e969320eef9ddae7480 Mon Sep 17 00:00:00 2001
+From: Nirmoy Das <nirmoy.das@intel.com>
+Date: Fri, 13 Dec 2024 13:24:15 +0100
+Subject: drm/xe: Wait for migration job before unmapping pages
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Nirmoy Das <nirmoy.das@intel.com>
+
+commit 5e0a67fdb894d34c5f109e969320eef9ddae7480 upstream.
+
+Fix a potential GPU page fault during tt -> system moves by waiting for
+migration jobs to complete before unmapping SG. This ensures that IOMMU
+mappings are not prematurely torn down while a migration job is still in
+progress.
+
+v2: Use intr=false(Matt A)
+v3: Update commit message(Matt A)
+v4: s/DMA_RESV_USAGE_BOOKKEEP/DMA_RESV_USAGE_KERNEL(Thomas)
+
+Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3466
+Fixes: 75521e8b56e8 ("drm/xe: Perform dma_map when moving system buffer objects to TT")
+Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
+Cc: Matthew Brost <matthew.brost@intel.com>
+Cc: Lucas De Marchi <lucas.demarchi@intel.com>
+Cc: stable@vger.kernel.org # v6.11+
+Cc: Matthew Auld <matthew.auld@intel.com>
+Reviewed-by: Matthew Auld <matthew.auld@intel.com>
+Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20241213122415.3880017-2-nirmoy.das@intel.com
+Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
+(cherry picked from commit cda06412c06893a6f07a2fbf89d42a0972ec9e8e)
+Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/xe/xe_bo.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/xe/xe_bo.c
++++ b/drivers/gpu/drm/xe/xe_bo.c
+@@ -846,8 +846,16 @@ static int xe_bo_move(struct ttm_buffer_
+ out:
+       if ((!ttm_bo->resource || ttm_bo->resource->mem_type == XE_PL_SYSTEM) &&
+-          ttm_bo->ttm)
++          ttm_bo->ttm) {
++              long timeout = dma_resv_wait_timeout(ttm_bo->base.resv,
++                                                   DMA_RESV_USAGE_KERNEL,
++                                                   false,
++                                                   MAX_SCHEDULE_TIMEOUT);
++              if (timeout < 0)
++                      ret = timeout;
++
+               xe_tt_unmap_sg(ttm_bo->ttm);
++      }
+       return ret;
+ }
diff --git a/queue-6.12/ftrace-fix-function-profiler-s-filtering-functionality.patch b/queue-6.12/ftrace-fix-function-profiler-s-filtering-functionality.patch
new file mode 100644 (file)
index 0000000..ee656e3
--- /dev/null
@@ -0,0 +1,121 @@
+From 789a8cff8d2dbe4b5c617c3004b5eb63fa7a3b35 Mon Sep 17 00:00:00 2001
+From: Kohei Enju <enjuk@amazon.com>
+Date: Thu, 2 Jan 2025 04:08:20 +0900
+Subject: ftrace: Fix function profiler's filtering functionality
+
+From: Kohei Enju <enjuk@amazon.com>
+
+commit 789a8cff8d2dbe4b5c617c3004b5eb63fa7a3b35 upstream.
+
+Commit c132be2c4fcc ("function_graph: Have the instances use their own
+ftrace_ops for filtering"), function profiler (enabled via
+function_profile_enabled) has been showing statistics for all functions,
+ignoring set_ftrace_filter settings.
+
+While tracers are instantiated, the function profiler is not. Therefore, it
+should use the global set_ftrace_filter for consistency.  This patch
+modifies the function profiler to use the global filter, fixing the
+filtering functionality.
+
+Before (filtering not working):
+```
+root@localhost:~# echo 'vfs*' > /sys/kernel/tracing/set_ftrace_filter
+root@localhost:~# echo 1 > /sys/kernel/tracing/function_profile_enabled
+root@localhost:~# sleep 1
+root@localhost:~# echo 0 > /sys/kernel/tracing/function_profile_enabled
+root@localhost:~# head /sys/kernel/tracing/trace_stat/*
+  Function                               Hit    Time            Avg
+     s^2
+  --------                               ---    ----            ---
+     ---
+  schedule                               314    22290594 us     70989.15 us
+     40372231 us
+  x64_sys_call                          1527    8762510 us      5738.382 us
+     3414354 us
+  schedule_hrtimeout_range               176    8665356 us      49234.98 us
+     405618876 us
+  __x64_sys_ppoll                        324    5656635 us      17458.75 us
+     19203976 us
+  do_sys_poll                            324    5653747 us      17449.83 us
+     19214945 us
+  schedule_timeout                        67    5531396 us      82558.15 us
+     2136740827 us
+  __x64_sys_pselect6                      12    3029540 us      252461.7 us
+     63296940171 us
+  do_pselect.constprop.0                  12    3029532 us      252461.0 us
+     63296952931 us
+```
+
+After (filtering working):
+```
+root@localhost:~# echo 'vfs*' > /sys/kernel/tracing/set_ftrace_filter
+root@localhost:~# echo 1 > /sys/kernel/tracing/function_profile_enabled
+root@localhost:~# sleep 1
+root@localhost:~# echo 0 > /sys/kernel/tracing/function_profile_enabled
+root@localhost:~# head /sys/kernel/tracing/trace_stat/*
+  Function                               Hit    Time            Avg
+     s^2
+  --------                               ---    ----            ---
+     ---
+  vfs_write                              462    68476.43 us     148.217 us
+     25874.48 us
+  vfs_read                               641    9611.356 us     14.994 us
+     28868.07 us
+  vfs_fstat                              890    878.094 us      0.986 us
+     1.667 us
+  vfs_fstatat                            227    757.176 us      3.335 us
+     18.928 us
+  vfs_statx                              226    610.610 us      2.701 us
+     17.749 us
+  vfs_getattr_nosec                     1187    460.919 us      0.388 us
+     0.326 us
+  vfs_statx_path                         297    343.287 us      1.155 us
+     11.116 us
+  vfs_rename                               6    291.575 us      48.595 us
+     9889.236 us
+```
+
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/20250101190820.72534-1-enjuk@amazon.com
+Fixes: c132be2c4fcc ("function_graph: Have the instances use their own ftrace_ops for filtering")
+Signed-off-by: Kohei Enju <enjuk@amazon.com>
+Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/trace/ftrace.c |    8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+--- a/kernel/trace/ftrace.c
++++ b/kernel/trace/ftrace.c
+@@ -883,16 +883,13 @@ static void profile_graph_return(struct
+ }
+ static struct fgraph_ops fprofiler_ops = {
+-      .ops = {
+-              .flags = FTRACE_OPS_FL_INITIALIZED,
+-              INIT_OPS_HASH(fprofiler_ops.ops)
+-      },
+       .entryfunc = &profile_graph_entry,
+       .retfunc = &profile_graph_return,
+ };
+ static int register_ftrace_profiler(void)
+ {
++      ftrace_ops_set_global_filter(&fprofiler_ops.ops);
+       return register_ftrace_graph(&fprofiler_ops);
+ }
+@@ -903,12 +900,11 @@ static void unregister_ftrace_profiler(v
+ #else
+ static struct ftrace_ops ftrace_profile_ops __read_mostly = {
+       .func           = function_profile_call,
+-      .flags          = FTRACE_OPS_FL_INITIALIZED,
+-      INIT_OPS_HASH(ftrace_profile_ops)
+ };
+ static int register_ftrace_profiler(void)
+ {
++      ftrace_ops_set_global_filter(&ftrace_profile_ops);
+       return register_ftrace_function(&ftrace_profile_ops);
+ }
diff --git a/queue-6.12/io_uring-kbuf-use-pre-committed-buffer-address-for-non-pollable-file.patch b/queue-6.12/io_uring-kbuf-use-pre-committed-buffer-address-for-non-pollable-file.patch
new file mode 100644 (file)
index 0000000..59f0804
--- /dev/null
@@ -0,0 +1,64 @@
+From ed123c948d06688d10f3b10a7bce1d6fbfd1ed07 Mon Sep 17 00:00:00 2001
+From: Jens Axboe <axboe@kernel.dk>
+Date: Fri, 3 Jan 2025 09:29:09 -0700
+Subject: io_uring/kbuf: use pre-committed buffer address for non-pollable file
+
+From: Jens Axboe <axboe@kernel.dk>
+
+commit ed123c948d06688d10f3b10a7bce1d6fbfd1ed07 upstream.
+
+For non-pollable files, buffer ring consumption will commit upfront.
+This is fine, but io_ring_buffer_select() will return the address of the
+buffer after having committed it. For incrementally consumed buffers,
+this is incorrect as it will modify the buffer address.
+
+Store the pre-committed value and return that. If that isn't done, then
+the initial part of the buffer is not used and the application will
+correctly assume the content arrived at the start of the userspace
+buffer, but the kernel will have put it later in the buffer. Or it can
+cause a spurious -EFAULT returned in the CQE, depending on the buffer
+size. As bounds are suitably checked for doing the actual IO, no adverse
+side effects are possible - it's just a data misplacement within the
+existing buffer.
+
+Reported-by: Gwendal Fernet <gwendalfernet@gmail.com>
+Cc: stable@vger.kernel.org
+Fixes: ae98dbf43d75 ("io_uring/kbuf: add support for incremental buffer consumption")
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ io_uring/kbuf.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
+index d407576ddfb7..eec5eb7de843 100644
+--- a/io_uring/kbuf.c
++++ b/io_uring/kbuf.c
+@@ -139,6 +139,7 @@ static void __user *io_ring_buffer_select(struct io_kiocb *req, size_t *len,
+       struct io_uring_buf_ring *br = bl->buf_ring;
+       __u16 tail, head = bl->head;
+       struct io_uring_buf *buf;
++      void __user *ret;
+       tail = smp_load_acquire(&br->tail);
+       if (unlikely(tail == head))
+@@ -153,6 +154,7 @@ static void __user *io_ring_buffer_select(struct io_kiocb *req, size_t *len,
+       req->flags |= REQ_F_BUFFER_RING | REQ_F_BUFFERS_COMMIT;
+       req->buf_list = bl;
+       req->buf_index = buf->bid;
++      ret = u64_to_user_ptr(buf->addr);
+       if (issue_flags & IO_URING_F_UNLOCKED || !io_file_can_poll(req)) {
+               /*
+@@ -168,7 +170,7 @@ static void __user *io_ring_buffer_select(struct io_kiocb *req, size_t *len,
+               io_kbuf_commit(req, bl, *len, 1);
+               req->buf_list = NULL;
+       }
+-      return u64_to_user_ptr(buf->addr);
++      return ret;
+ }
+ void __user *io_buffer_select(struct io_kiocb *req, size_t *len,
+-- 
+2.47.1
+
diff --git a/queue-6.12/rdma-mlx5-enable-multiplane-mode-only-when-it-is-supported.patch b/queue-6.12/rdma-mlx5-enable-multiplane-mode-only-when-it-is-supported.patch
new file mode 100644 (file)
index 0000000..021793e
--- /dev/null
@@ -0,0 +1,54 @@
+From 45d339fefaa3dcd237038769e0d34584fb867390 Mon Sep 17 00:00:00 2001
+From: Mark Zhang <markzhang@nvidia.com>
+Date: Thu, 19 Dec 2024 14:23:36 +0200
+Subject: RDMA/mlx5: Enable multiplane mode only when it is supported
+
+From: Mark Zhang <markzhang@nvidia.com>
+
+commit 45d339fefaa3dcd237038769e0d34584fb867390 upstream.
+
+Driver queries vport_cxt.num_plane and enables multiplane when it is
+greater then 0, but some old FWs (versions from x.40.1000 till x.42.1000),
+report vport_cxt.num_plane = 1 unexpectedly.
+
+Fix it by querying num_plane only when HCA_CAP2.multiplane bit is set.
+
+Fixes: 2a5db20fa532 ("RDMA/mlx5: Add support to multi-plane device and port")
+Link: https://patch.msgid.link/r/1ef901acdf564716fcf550453cf5e94f343777ec.1734610916.git.leon@kernel.org
+Cc: stable@vger.kernel.org
+Reported-by: Francesco Poli <invernomuto@paranoici.org>
+Closes: https://lore.kernel.org/all/nvs4i2v7o6vn6zhmtq4sgazy2hu5kiulukxcntdelggmznnl7h@so3oul6uwgbl/
+Signed-off-by: Mark Zhang <markzhang@nvidia.com>
+Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
+Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
+Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/hw/mlx5/main.c |    2 +-
+ include/linux/mlx5/mlx5_ifc.h     |    4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/infiniband/hw/mlx5/main.c
++++ b/drivers/infiniband/hw/mlx5/main.c
+@@ -2831,7 +2831,7 @@ static int mlx5_ib_get_plane_num(struct
+       int err;
+       *num_plane = 0;
+-      if (!MLX5_CAP_GEN(mdev, ib_virt))
++      if (!MLX5_CAP_GEN(mdev, ib_virt) || !MLX5_CAP_GEN_2(mdev, multiplane))
+               return 0;
+       err = mlx5_query_hca_vport_context(mdev, 0, 1, 0, &vport_ctx);
+--- a/include/linux/mlx5/mlx5_ifc.h
++++ b/include/linux/mlx5/mlx5_ifc.h
+@@ -2113,7 +2113,9 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
+       u8         migration_in_chunks[0x1];
+       u8         reserved_at_d1[0x1];
+       u8         sf_eq_usage[0x1];
+-      u8         reserved_at_d3[0xd];
++      u8         reserved_at_d3[0x5];
++      u8         multiplane[0x1];
++      u8         reserved_at_d9[0x7];
+       u8         cross_vhca_object_to_object_supported[0x20];
diff --git a/queue-6.12/revert-alsa-ump-don-t-enumeration-invalid-groups-for-legacy-rawmidi.patch b/queue-6.12/revert-alsa-ump-don-t-enumeration-invalid-groups-for-legacy-rawmidi.patch
new file mode 100644 (file)
index 0000000..1cff690
--- /dev/null
@@ -0,0 +1,43 @@
+From abbff41b6932cde359589fd51f4024b7c85f366b Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 30 Dec 2024 12:40:22 +0100
+Subject: Revert "ALSA: ump: Don't enumeration invalid groups for legacy rawmidi"
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit abbff41b6932cde359589fd51f4024b7c85f366b upstream.
+
+This reverts commit c2d188e137e77294323132a760a4608321a36a70.
+
+Although it's fine to filter the invalid UMP groups at the first probe
+time, this will become a problem when UMP groups are updated and
+(re-)activated.  Then there is no way to re-add the substreams
+properly for the legacy rawmidi, and the new active groups will be
+still invisible.
+
+So let's revert the change.  This will move back to showing the full
+16 groups, but it's better than forever lost.
+
+Link: https://patch.msgid.link/20241230114023.3787-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/core/ump.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sound/core/ump.c b/sound/core/ump.c
+index fe4d39ae1159..9198bff4768c 100644
+--- a/sound/core/ump.c
++++ b/sound/core/ump.c
+@@ -1244,7 +1244,7 @@ static int fill_legacy_mapping(struct snd_ump_endpoint *ump)
+       num = 0;
+       for (i = 0; i < SNDRV_UMP_MAX_GROUPS; i++)
+-              if ((group_maps & (1U << i)) && ump->groups[i].valid)
++              if (group_maps & (1U << i))
+                       ump->legacy_mapping[num++] = i;
+       return num;
+-- 
+2.47.1
+
index c27a240e4893cf10d9ea983e254d8d4c4ec91616..b4f4054e3a8770d703b615325af1e0c83e4228fc 100644 (file)
@@ -107,3 +107,12 @@ clk-thead-fix-th1520-emmc-and-shdci-clock-rate.patch
 scripts-mksysmap-fix-escape-chars.patch
 modpost-fix-the-missed-iteration-for-the-max-bit-in-.patch
 kbuild-pacman-pkg-provide-versioned-linux-api-header.patch
+revert-alsa-ump-don-t-enumeration-invalid-groups-for-legacy-rawmidi.patch
+rdma-mlx5-enable-multiplane-mode-only-when-it-is-supported.patch
+io_uring-kbuf-use-pre-committed-buffer-address-for-non-pollable-file.patch
+alsa-seq-check-ump-support-for-midi_version-change.patch
+ftrace-fix-function-profiler-s-filtering-functionality.patch
+drm-xe-use-non-interruptible-wait-when-moving-bo-to-system.patch
+drm-xe-wait-for-migration-job-before-unmapping-pages.patch
+alsa-hda-realtek-add-quirk-for-framework-f111-000c.patch
+alsa-seq-oss-fix-races-at-processing-sysex-messages.patch