--- /dev/null
+From 82d6e01a0699800efd8b048eb584c907ccb47b7a Mon Sep 17 00:00:00 2001
+From: Adam Li <adamli@os.amperecomputing.com>
+Date: Sat, 11 Oct 2025 06:43:22 +0000
+Subject: sched/fair: Only update stats for allowed CPUs when looking for dst group
+
+From: Adam Li <adamli@os.amperecomputing.com>
+
+commit 82d6e01a0699800efd8b048eb584c907ccb47b7a upstream.
+
+Load imbalance is observed when the workload frequently forks new threads.
+Due to CPU affinity, the workload can run on CPU 0-7 in the first
+group, and only on CPU 8-11 in the second group. CPU 12-15 are always idle.
+
+{ 0 1 2 3 4 5 6 7 } {8 9 10 11 12 13 14 15}
+ * * * * * * * * * * * *
+
+When looking for dst group for newly forked threads, in many times
+update_sg_wakeup_stats() reports the second group has more idle CPUs
+than the first group. The scheduler thinks the second group is less
+busy. Then it selects least busy CPUs among CPU 8-11. Therefore CPU 8-11
+can be crowded with newly forked threads, at the same time CPU 0-7
+can be idle.
+
+A task may not use all the CPUs in a schedule group due to CPU affinity.
+Only update schedule group statistics for allowed CPUs.
+
+Signed-off-by: Adam Li <adamli@os.amperecomputing.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Erwan Velu <e.velu@criteo.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/sched/fair.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/sched/fair.c
++++ b/kernel/sched/fair.c
+@@ -10847,7 +10847,7 @@ static inline void update_sg_wakeup_stat
+ if (sd->flags & SD_ASYM_CPUCAPACITY)
+ sgs->group_misfit_task_load = 1;
+
+- for_each_cpu(i, sched_group_span(group)) {
++ for_each_cpu_and(i, sched_group_span(group), p->cpus_ptr) {
+ struct rq *rq = cpu_rq(i);
+ unsigned int local;
+
fuse-uring-avoid-queue-stopped-races-and-set-read-that-value-under-lock.patch
fuse-uring-make-a-fuse_req-on-sqe-commit-only-findable-after-memcpy.patch
fuse-uring-remove-request-less-entries-from-ent_w_req_queue-to-fix-null-deref.patch
+sched-fair-only-update-stats-for-allowed-cpus-when-looking-for-dst-group.patch
+usb-gadget-f_fs-initialize-epfile-in-early-to-fix-endpoint-direction-checks.patch
--- /dev/null
+From 82cfd4739011bdc7e87b5d585703427e89ddfaa5 Mon Sep 17 00:00:00 2001
+From: Neill Kapron <nkapron@google.com>
+Date: Fri, 19 Jun 2026 04:06:03 +0000
+Subject: usb: gadget: f_fs: Initialize epfile->in early to fix endpoint direction checks
+
+From: Neill Kapron <nkapron@google.com>
+
+commit 82cfd4739011bdc7e87b5d585703427e89ddfaa5 upstream.
+
+When parsing endpoint descriptors, ffs_data_got_descs() generates the
+eps_addrmap which contains the endpoint direction. However, epfile->in
+was previously only populated in ffs_func_eps_enable() which executes
+upon USB host connection. As a result, early userspace ioctls like
+FUNCTIONFS_DMABUF_ATTACH that run before the host connects would see
+epfile->in as 0, leading to incorrect DMA directions.
+
+By moving the initialization to ffs_epfiles_create(), epfile->in is
+accurate before userspace opens the endpoint files.
+
+Fixes: 7b07a2a7ca02 ("usb: gadget: functionfs: Add DMABUF import interface")
+Cc: stable <stable@kernel.org>
+Assisted-by: Antigravity:gemini-3.1-pro
+Signed-off-by: Neill Kapron <nkapron@google.com>
+Link: https://patch.msgid.link/20260619040609.4010746-2-nkapron@google.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/gadget/function/f_fs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/function/f_fs.c
++++ b/drivers/usb/gadget/function/f_fs.c
+@@ -2354,6 +2354,7 @@ static int ffs_epfiles_create(struct ffs
+ sprintf(epfile->name, "ep%02x", ffs->eps_addrmap[i]);
+ else
+ sprintf(epfile->name, "ep%u", i);
++ epfile->in = (ffs->eps_addrmap[i] & USB_ENDPOINT_DIR_MASK) ? 1 : 0;
+ epfile->dentry = ffs_sb_create_file(ffs->sb, epfile->name,
+ epfile,
+ &ffs_epfile_operations);
+@@ -2440,7 +2441,6 @@ static int ffs_func_eps_enable(struct ff
+ ret = usb_ep_enable(ep->ep);
+ if (!ret) {
+ epfile->ep = ep;
+- epfile->in = usb_endpoint_dir_in(ep->ep->desc);
+ epfile->isoc = usb_endpoint_xfer_isoc(ep->ep->desc);
+ } else {
+ break;