diff --git a/blacklist.conf b/blacklist.conf index ffda359..87159e2 100644 --- a/blacklist.conf +++ b/blacklist.conf @@ -157,6 +157,7 @@ drivers/pci/dwc/pci-dra7xx.c # config not enabled drivers/staging/android # we do not build android stuff drivers/staging/lustre # not shipped drivers/usb/renesas_usbhs # config not enabled +drivers/android # we do not build android stuff security/smack # we don't enable Smack @@ -1803,3 +1804,7 @@ ea86f3defd55f141a44146e66cbf8ffb683d60da # Not applicable: drm/virtio: use kvmal 50791f5d7b6a14b388f46c8885f71d1b98216d1d # Not applicable: drm/sun4i: tcon: set sync polarity for tcon1 channel e504e74cc3a2c092b05577ce3e8e013fae7d94e6 # KASAN is not supported a4a251f8c23518899d2078c320cf9ce2fa459c9f # misattributed, SP5 does not have f8f80be501aa2f10669585c3e328fad079d8cb3a, which this patch fixes +95ebabde382c371572297915b104e55403674e73 # capabilities: reverted in below +3b0c2d3eaa83da259d7726192cf55a137769012f # capabilities: reverting the above +5ae5fbd2107959b68ac69a8b75412208663aea88 # only required with da97e18458fb42d7c00fac5fd1c56a3896ec666e +da97e18458fb42d7c00fac5fd1c56a3896ec666e # requires 5ae5fbd2107959b68ac69a8b75412208663aea88 diff --git a/patches.rt/0074-kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch b/patches.rt/0074-kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch index 455cfe2..8a5bada 100644 --- a/patches.rt/0074-kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch +++ b/patches.rt/0074-kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch @@ -61,36 +61,38 @@ Cc: Rafael J. Wysocki Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Mike Galbraith --- - arch/ia64/kernel/mca.c | 2 - - arch/mips/include/asm/switch_to.h | 4 +- - arch/mips/kernel/mips-mt-fpaff.c | 2 - - arch/mips/kernel/traps.c | 6 ++-- - arch/powerpc/platforms/cell/spufs/sched.c | 2 - - arch/tile/include/asm/setup.h | 2 - - arch/tile/kernel/hardwall.c | 10 +++--- - arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 2 - - drivers/infiniband/hw/hfi1/affinity.c | 6 ++-- - drivers/infiniband/hw/hfi1/sdma.c | 3 -- - drivers/infiniband/hw/qib/qib_file_ops.c | 7 ++-- - fs/proc/array.c | 4 +- - include/linux/init_task.h | 3 +- - include/linux/sched.h | 5 ++- - kernel/cgroup/cpuset.c | 2 - - kernel/fork.c | 2 + - kernel/sched/core.c | 42 ++++++++++++++--------------- - kernel/sched/cpudeadline.c | 4 +- - kernel/sched/cpupri.c | 4 +- - kernel/sched/deadline.c | 6 ++-- - kernel/sched/fair.c | 32 +++++++++++----------- - kernel/sched/rt.c | 4 +- - kernel/trace/trace_hwlat.c | 2 - - lib/smp_processor_id.c | 2 - - samples/trace_events/trace-events-sample.c | 2 - + arch/ia64/kernel/mca.c | 2 +- + arch/mips/include/asm/switch_to.h | 4 +-- + arch/mips/kernel/mips-mt-fpaff.c | 2 +- + arch/mips/kernel/traps.c | 6 ++-- + arch/powerpc/platforms/cell/spufs/sched.c | 2 +- + arch/tile/include/asm/setup.h | 2 +- + arch/tile/kernel/hardwall.c | 10 +++--- + arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 2 +- + drivers/infiniband/hw/hfi1/affinity.c | 6 ++-- + drivers/infiniband/hw/hfi1/sdma.c | 3 +- + drivers/infiniband/hw/qib/qib_file_ops.c | 7 ++-- + fs/proc/array.c | 4 +-- + include/linux/init_task.h | 3 +- + include/linux/sched.h | 5 +-- + kernel/cgroup/cpuset.c | 2 +- + kernel/fork.c | 2 ++ + kernel/sched/core.c | 42 +++++++++++----------- + kernel/sched/cpudeadline.c | 4 +-- + kernel/sched/cpupri.c | 4 +-- + kernel/sched/deadline.c | 6 ++-- + kernel/sched/fair.c | 32 ++++++++--------- + kernel/sched/rt.c | 4 +-- + kernel/trace/trace_hwlat.c | 2 +- + lib/smp_processor_id.c | 2 +- + samples/trace_events/trace-events-sample.c | 2 +- 25 files changed, 81 insertions(+), 79 deletions(-) +diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c +index 79c7c46d7dc1..f5f116e1a504 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c -@@ -1824,7 +1824,7 @@ format_mca_init_stack(void *mca_data, un +@@ -1824,7 +1824,7 @@ format_mca_init_stack(void *mca_data, unsigned long offset, ti->cpu = cpu; p->stack = ti; p->state = TASK_UNINTERRUPTIBLE; @@ -99,6 +101,8 @@ Signed-off-by: Mike Galbraith INIT_LIST_HEAD(&p->tasks); p->parent = p->real_parent = p->group_leader = p; INIT_LIST_HEAD(&p->children); +diff --git a/arch/mips/include/asm/switch_to.h b/arch/mips/include/asm/switch_to.h +index e610473d61b8..1428b4febbc9 100644 --- a/arch/mips/include/asm/switch_to.h +++ b/arch/mips/include/asm/switch_to.h @@ -42,7 +42,7 @@ extern struct task_struct *ll_task; @@ -119,9 +123,11 @@ Signed-off-by: Mike Galbraith } \ next->thread.emulated_fp = 0; \ } while(0) +diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c +index 8cab633e0e5a..f64555ea9068 100644 --- a/arch/mips/kernel/mips-mt-fpaff.c +++ b/arch/mips/kernel/mips-mt-fpaff.c -@@ -176,7 +176,7 @@ asmlinkage long mipsmt_sys_sched_getaffi +@@ -176,7 +176,7 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len, if (retval) goto out_unlock; @@ -130,6 +136,8 @@ Signed-off-by: Mike Galbraith cpumask_and(&mask, &allowed, cpu_active_mask); out_unlock: +diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c +index 6434e44909c3..4cffa0d199b9 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -1193,12 +1193,12 @@ static void mt_ase_fp_affinity(void) @@ -148,9 +156,11 @@ Signed-off-by: Mike Galbraith &mt_fpu_cpumask); set_cpus_allowed_ptr(current, &tmask); set_thread_flag(TIF_FPUBOUND); +diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c +index 1fbb5da17dd2..ca86366d5424 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c -@@ -141,7 +141,7 @@ void __spu_update_sched_info(struct spu_ +@@ -141,7 +141,7 @@ void __spu_update_sched_info(struct spu_context *ctx) * runqueue. The context will be rescheduled on the proper node * if it is timesliced or preempted. */ @@ -159,6 +169,8 @@ Signed-off-by: Mike Galbraith /* Save the current cpu id for spu interrupt routing. */ ctx->last_ran = raw_smp_processor_id(); +diff --git a/arch/tile/include/asm/setup.h b/arch/tile/include/asm/setup.h +index 2a0347af0702..670fa2f4cfc3 100644 --- a/arch/tile/include/asm/setup.h +++ b/arch/tile/include/asm/setup.h @@ -49,7 +49,7 @@ int hardwall_ipi_valid(int cpu); @@ -170,9 +182,11 @@ Signed-off-by: Mike Galbraith hardwall_deactivate_all(p); \ } while (0) #endif +diff --git a/arch/tile/kernel/hardwall.c b/arch/tile/kernel/hardwall.c +index 2fd1694ac1d0..98f4fb696289 100644 --- a/arch/tile/kernel/hardwall.c +++ b/arch/tile/kernel/hardwall.c -@@ -590,12 +590,12 @@ static int hardwall_activate(struct hard +@@ -590,12 +590,12 @@ static int hardwall_activate(struct hardwall_info *info) * Get our affinity; if we're not bound to this tile uniquely, * we can't access the network registers. */ @@ -187,7 +201,7 @@ Signed-off-by: Mike Galbraith if (!cpumask_test_cpu(cpu, &info->cpumask)) return -EINVAL; -@@ -621,17 +621,17 @@ static int hardwall_activate(struct hard +@@ -621,17 +621,17 @@ static int hardwall_activate(struct hardwall_info *info) * Deactivate a task's hardwall. Must hold lock for hardwall_type. * This method may be called from exit_thread(), so we don't want to * rely on too many fields of struct task_struct still being valid. @@ -208,9 +222,11 @@ Signed-off-by: Mike Galbraith BUG(); } +diff --git a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c +index 604c0e3bcc83..f68baccc69f0 100644 --- a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c +++ b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c -@@ -1503,7 +1503,7 @@ static int pseudo_lock_dev_mmap(struct f +@@ -1503,7 +1503,7 @@ static int pseudo_lock_dev_mmap(struct file *filp, struct vm_area_struct *vma) * may be scheduled elsewhere and invalidate entries in the * pseudo-locked region. */ @@ -219,9 +235,11 @@ Signed-off-by: Mike Galbraith mutex_unlock(&rdtgroup_mutex); return -EINVAL; } +diff --git a/drivers/infiniband/hw/hfi1/affinity.c b/drivers/infiniband/hw/hfi1/affinity.c +index 2e2f45d0362b..2b06234ef551 100644 --- a/drivers/infiniband/hw/hfi1/affinity.c +++ b/drivers/infiniband/hw/hfi1/affinity.c -@@ -1037,7 +1037,7 @@ int hfi1_get_proc_affinity(int node) +@@ -1039,7 +1039,7 @@ int hfi1_get_proc_affinity(int node) struct hfi1_affinity_node *entry; cpumask_var_t diff, hw_thread_mask, available_mask, intrs_mask; const struct cpumask *node_mask, @@ -230,7 +248,7 @@ Signed-off-by: Mike Galbraith struct hfi1_affinity_node_list *affinity = &node_affinity; struct cpu_mask_set *set = &affinity->proc; -@@ -1045,7 +1045,7 @@ int hfi1_get_proc_affinity(int node) +@@ -1047,7 +1047,7 @@ int hfi1_get_proc_affinity(int node) * check whether process/context affinity has already * been set */ @@ -239,7 +257,7 @@ Signed-off-by: Mike Galbraith hfi1_cdbg(PROC, "PID %u %s affinity set to CPU %*pbl", current->pid, current->comm, cpumask_pr_args(proc_mask)); -@@ -1056,7 +1056,7 @@ int hfi1_get_proc_affinity(int node) +@@ -1058,7 +1058,7 @@ int hfi1_get_proc_affinity(int node) cpu = cpumask_first(proc_mask); cpumask_set_cpu(cpu, &set->used); goto done; @@ -248,9 +266,11 @@ Signed-off-by: Mike Galbraith hfi1_cdbg(PROC, "PID %u %s affinity set to CPU set(s) %*pbl", current->pid, current->comm, cpumask_pr_args(proc_mask)); +diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c +index a1eed86112e5..f9522399c4c6 100644 --- a/drivers/infiniband/hw/hfi1/sdma.c +++ b/drivers/infiniband/hw/hfi1/sdma.c -@@ -855,14 +855,13 @@ struct sdma_engine *sdma_select_user_eng +@@ -869,14 +869,13 @@ struct sdma_engine *sdma_select_user_engine(struct hfi1_devdata *dd, { struct sdma_rht_node *rht_node; struct sdma_engine *sde = NULL; @@ -266,9 +286,11 @@ Signed-off-by: Mike Galbraith goto out; cpu_id = smp_processor_id(); +diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c +index d2e4a091c0e8..291afe6c6bab 100644 --- a/drivers/infiniband/hw/qib/qib_file_ops.c +++ b/drivers/infiniband/hw/qib/qib_file_ops.c -@@ -1142,7 +1142,7 @@ static unsigned int qib_poll(struct file +@@ -1142,7 +1142,7 @@ static unsigned int qib_poll(struct file *fp, struct poll_table_struct *pt) static void assign_ctxt_affinity(struct file *fp, struct qib_devdata *dd) { struct qib_filedata *fd = fp->private_data; @@ -277,7 +299,7 @@ Signed-off-by: Mike Galbraith const struct cpumask *local_mask = cpumask_of_pcibus(dd->pcidev->bus); int local_cpu; -@@ -1623,9 +1623,8 @@ static int qib_assign_ctxt(struct file * +@@ -1623,9 +1623,8 @@ static int qib_assign_ctxt(struct file *fp, const struct qib_user_info *uinfo) ret = find_free_ctxt(i_minor - 1, fp, uinfo); else { int unit; @@ -289,9 +311,11 @@ Signed-off-by: Mike Galbraith if (weight == 1 && !test_bit(cpu, qib_cpulist)) if (!find_hca(cpu, &unit) && unit >= 0) +diff --git a/fs/proc/array.c b/fs/proc/array.c +index 7b4810d09457..cde9ab182394 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c -@@ -390,9 +390,9 @@ static inline void task_context_switch_c +@@ -390,9 +390,9 @@ static inline void task_context_switch_counts(struct seq_file *m, static void task_cpus_allowed(struct seq_file *m, struct task_struct *task) { seq_printf(m, "Cpus_allowed:\t%*pb\n", @@ -303,6 +327,8 @@ Signed-off-by: Mike Galbraith } int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, +diff --git a/include/linux/init_task.h b/include/linux/init_task.h +index 22b3b47e7a66..63cecad186c0 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -239,7 +239,8 @@ extern struct cred init_cred; @@ -315,6 +341,8 @@ Signed-off-by: Mike Galbraith .nr_cpus_allowed= NR_CPUS, \ .mm = NULL, \ .active_mm = &init_mm, \ +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 918f17c374ed..3fc97c026d93 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -565,7 +565,8 @@ struct task_struct { @@ -327,7 +355,7 @@ Signed-off-by: Mike Galbraith #ifdef CONFIG_PREEMPT_RCU int rcu_read_lock_nesting; -@@ -1255,7 +1256,7 @@ extern struct pid *cad_pid; +@@ -1263,7 +1264,7 @@ extern struct pid *cad_pid; #define PF_KTHREAD 0x00200000 /* I am a kernel thread */ #define PF_RANDOMIZE 0x00400000 /* Randomize virtual address space */ #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ @@ -336,9 +364,11 @@ Signed-off-by: Mike Galbraith #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */ +diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c +index 0e65aba2a742..f9543cee75ae 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c -@@ -2094,7 +2094,7 @@ static void cpuset_fork(struct task_stru +@@ -2094,7 +2094,7 @@ static void cpuset_fork(struct task_struct *task) if (task_css_is_root(task, cpuset_cgrp_id)) return; @@ -347,9 +377,11 @@ Signed-off-by: Mike Galbraith task->mems_allowed = current->mems_allowed; } +diff --git a/kernel/fork.c b/kernel/fork.c +index 867b46d6fd0a..088a1f799f14 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -611,6 +611,8 @@ static struct task_struct *dup_task_stru +@@ -611,6 +611,8 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node) tsk->stack_canary = get_random_long(); #endif @@ -358,9 +390,11 @@ Signed-off-by: Mike Galbraith /* * One for us, one for whoever does the "release_task()" (usually * parent) +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 3d9acdfa4b70..020533f9dd3f 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1041,7 +1041,7 @@ static struct rq *__migrate_task(struct +@@ -1041,7 +1041,7 @@ static struct rq *__migrate_task(struct rq *rq, struct rq_flags *rf, return rq; /* Affinity changed (again). */ @@ -369,7 +403,7 @@ Signed-off-by: Mike Galbraith return rq; update_rq_clock(rq); -@@ -1069,7 +1069,7 @@ static int migration_cpu_stop(void *data +@@ -1069,7 +1069,7 @@ static int migration_cpu_stop(void *data) local_irq_disable(); /* * We need to explicitly wake pending tasks before running @@ -378,7 +412,7 @@ Signed-off-by: Mike Galbraith * during wakeups, see set_cpus_allowed_ptr()'s TASK_WAKING test. */ sched_ttwu_pending(); -@@ -1100,7 +1100,7 @@ static int migration_cpu_stop(void *data +@@ -1100,7 +1100,7 @@ static int migration_cpu_stop(void *data) */ void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask) { @@ -387,7 +421,7 @@ Signed-off-by: Mike Galbraith p->nr_cpus_allowed = cpumask_weight(new_mask); } -@@ -1170,7 +1170,7 @@ static int __set_cpus_allowed_ptr(struct +@@ -1170,7 +1170,7 @@ static int __set_cpus_allowed_ptr(struct task_struct *p, goto out; } @@ -409,7 +443,7 @@ Signed-off-by: Mike Galbraith goto unlock; __migrate_swap_task(arg->src_task, arg->dst_cpu); -@@ -1373,10 +1373,10 @@ int migrate_swap(struct task_struct *cur +@@ -1373,10 +1373,10 @@ int migrate_swap(struct task_struct *cur, struct task_struct *p, if (!cpu_active(arg.src_cpu) || !cpu_active(arg.dst_cpu)) goto out; @@ -431,7 +465,7 @@ Signed-off-by: Mike Galbraith * * A few notes on cpu_active vs cpu_online: * -@@ -1561,14 +1561,14 @@ static int select_fallback_rq(int cpu, s +@@ -1561,14 +1561,14 @@ static int select_fallback_rq(int cpu, struct task_struct *p) for_each_cpu(dest_cpu, nodemask) { if (!cpu_active(dest_cpu)) continue; @@ -448,7 +482,7 @@ Signed-off-by: Mike Galbraith if (!(p->flags & PF_KTHREAD) && !cpu_active(dest_cpu)) continue; if (!cpu_online(dest_cpu)) -@@ -1613,7 +1613,7 @@ out: +@@ -1613,7 +1613,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p) } /* @@ -457,7 +491,7 @@ Signed-off-by: Mike Galbraith */ static inline int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags) -@@ -1623,11 +1623,11 @@ int select_task_rq(struct task_struct *p +@@ -1623,11 +1623,11 @@ int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags) if (p->nr_cpus_allowed > 1) cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags); else @@ -471,7 +505,7 @@ Signed-off-by: Mike Galbraith * CPU. * * Since this is common to all placement strategies, this lives here. -@@ -1635,7 +1635,7 @@ int select_task_rq(struct task_struct *p +@@ -1635,7 +1635,7 @@ int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags) * [ this allows ->select_task() to simply return task_cpu(p) and * not worry about this generic constraint ] */ @@ -480,7 +514,7 @@ Signed-off-by: Mike Galbraith !cpu_online(cpu))) cpu = select_fallback_rq(task_cpu(p), p); -@@ -2584,7 +2584,7 @@ void wake_up_new_task(struct task_struct +@@ -2585,7 +2585,7 @@ void wake_up_new_task(struct task_struct *p) #ifdef CONFIG_SMP /* * Fork balancing, do it here and not earlier because: @@ -489,7 +523,7 @@ Signed-off-by: Mike Galbraith * - any previously selected CPU might disappear through hotplug * * Use __set_task_cpu() to avoid calling sched_class::migrate_task_rq, -@@ -4382,7 +4382,7 @@ change: +@@ -4384,7 +4384,7 @@ static int __sched_setscheduler(struct task_struct *p, * the entire root_domain to become SCHED_DEADLINE. We * will also fail if there's no bandwidth available. */ @@ -498,7 +532,7 @@ Signed-off-by: Mike Galbraith rq->rd->dl_bw.bw == 0) { task_rq_unlock(rq, p, &rf); return -EPERM; -@@ -4976,7 +4976,7 @@ long sched_getaffinity(pid_t pid, struct +@@ -4978,7 +4978,7 @@ long sched_getaffinity(pid_t pid, struct cpumask *mask) goto out_unlock; raw_spin_lock_irqsave(&p->pi_lock, flags); @@ -507,7 +541,7 @@ Signed-off-by: Mike Galbraith raw_spin_unlock_irqrestore(&p->pi_lock, flags); out_unlock: -@@ -5540,7 +5540,7 @@ int task_can_attach(struct task_struct * +@@ -5542,7 +5542,7 @@ int task_can_attach(struct task_struct *p, * allowed nodes is unnecessary. Thus, cpusets are not * applicable for such threads. This prevents checking for * success of set_cpus_allowed_ptr() on all attached tasks @@ -516,7 +550,7 @@ Signed-off-by: Mike Galbraith */ if (p->flags & PF_NO_SETAFFINITY) { ret = -EINVAL; -@@ -5596,7 +5596,7 @@ int migrate_task_to(struct task_struct * +@@ -5598,7 +5598,7 @@ int migrate_task_to(struct task_struct *p, int target_cpu) if (curr_cpu == target_cpu) return 0; @@ -525,7 +559,7 @@ Signed-off-by: Mike Galbraith return -EINVAL; /* TODO: This is not properly updating schedstats */ -@@ -5733,7 +5733,7 @@ static void migrate_tasks(struct rq *dea +@@ -5735,7 +5735,7 @@ static void migrate_tasks(struct rq *dead_rq, struct rq_flags *rf) put_prev_task(rq, next); /* @@ -534,9 +568,11 @@ Signed-off-by: Mike Galbraith * both pi_lock and rq->lock, such that holding either * stabilizes the mask. * +diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c +index fba235c7d026..165dd5078e85 100644 --- a/kernel/sched/cpudeadline.c +++ b/kernel/sched/cpudeadline.c -@@ -128,10 +128,10 @@ int cpudl_find(struct cpudl *cp, struct +@@ -128,10 +128,10 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p, const struct sched_dl_entity *dl_se = &p->dl; if (later_mask && @@ -549,9 +585,11 @@ Signed-off-by: Mike Galbraith dl_time_before(dl_se->deadline, cp->elements[0].dl)) { best_cpu = cpudl_maximum(cp); if (later_mask) +diff --git a/kernel/sched/cpupri.c b/kernel/sched/cpupri.c +index 981fcd7dc394..d84aae9b694c 100644 --- a/kernel/sched/cpupri.c +++ b/kernel/sched/cpupri.c -@@ -103,11 +103,11 @@ int cpupri_find(struct cpupri *cp, struc +@@ -103,11 +103,11 @@ int cpupri_find(struct cpupri *cp, struct task_struct *p, if (skip) continue; @@ -565,9 +603,11 @@ Signed-off-by: Mike Galbraith /* * We have to ensure that we have at least one bit +diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c +index 407984f4d91d..a441763052e3 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c -@@ -250,7 +250,7 @@ static struct rq *dl_task_offline_migrat +@@ -250,7 +250,7 @@ static struct rq *dl_task_offline_migration(struct rq *rq, struct task_struct *p * If we cannot preempt any rq, fall back to pick any * online cpu. */ @@ -576,7 +616,7 @@ Signed-off-by: Mike Galbraith if (cpu >= nr_cpu_ids) { /* * Fail to find any suitable cpu. -@@ -1276,7 +1276,7 @@ static void set_curr_task_dl(struct rq * +@@ -1276,7 +1276,7 @@ static void set_curr_task_dl(struct rq *rq) static int pick_dl_task(struct rq *rq, struct task_struct *p, int cpu) { if (!task_running(rq, p) && @@ -585,7 +625,7 @@ Signed-off-by: Mike Galbraith return 1; return 0; } -@@ -1425,7 +1425,7 @@ static struct rq *find_lock_later_rq(str +@@ -1425,7 +1425,7 @@ static struct rq *find_lock_later_rq(struct task_struct *task, struct rq *rq) /* Retry if something changed. */ if (double_lock_balance(rq, later_rq)) { if (unlikely(task_rq(task) != rq || @@ -594,9 +634,11 @@ Signed-off-by: Mike Galbraith task_running(rq, task) || !dl_task(task) || !task_on_rq_queued(task))) { +diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c +index 406edceda44e..02536eb31a95 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -1623,7 +1623,7 @@ static void task_numa_compare(struct tas +@@ -1684,7 +1684,7 @@ static void task_numa_compare(struct task_numa_env *env, * be incurred if the tasks were swapped. */ /* Skip this swap candidate if cannot move to the source cpu */ @@ -605,7 +647,7 @@ Signed-off-by: Mike Galbraith goto unlock; /* -@@ -1720,7 +1720,7 @@ static void task_numa_find_cpu(struct ta +@@ -1782,7 +1782,7 @@ static void task_numa_find_cpu(struct task_numa_env *env, for_each_cpu(cpu, cpumask_of_node(env->dst_nid)) { /* Skip this CPU if the source task cannot migrate */ @@ -614,7 +656,7 @@ Signed-off-by: Mike Galbraith continue; env->dst_cpu = cpu; -@@ -5856,7 +5856,7 @@ find_idlest_group(struct sched_domain *s +@@ -6011,7 +6011,7 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p, /* Skip over this group if it has no CPUs allowed */ if (!cpumask_intersects(sched_group_span(group), @@ -623,7 +665,7 @@ Signed-off-by: Mike Galbraith continue; local_group = cpumask_test_cpu(this_cpu, -@@ -5988,7 +5988,7 @@ find_idlest_group_cpu(struct sched_group +@@ -6143,7 +6143,7 @@ find_idlest_group_cpu(struct sched_group *group, struct task_struct *p, int this return cpumask_first(sched_group_span(group)); /* Traverse only the allowed CPUs */ @@ -632,7 +674,7 @@ Signed-off-by: Mike Galbraith if (idle_cpu(i)) { struct rq *rq = cpu_rq(i); struct cpuidle_state *idle = idle_get_state(rq); -@@ -6028,7 +6028,7 @@ static inline int find_idlest_cpu(struct +@@ -6183,7 +6183,7 @@ static inline int find_idlest_cpu(struct sched_domain *sd, struct task_struct *p { int new_cpu = cpu; @@ -641,7 +683,7 @@ Signed-off-by: Mike Galbraith return prev_cpu; while (sd) { -@@ -6138,7 +6138,7 @@ static int select_idle_core(struct task_ +@@ -6293,7 +6293,7 @@ static int select_idle_core(struct task_struct *p, struct sched_domain *sd, int if (!test_idle_cores(target, false)) return -1; @@ -650,16 +692,16 @@ Signed-off-by: Mike Galbraith for_each_cpu_wrap(core, cpus, target) { bool idle = true; -@@ -6172,7 +6172,7 @@ static int select_idle_smt(struct task_s +@@ -6327,7 +6327,7 @@ static int select_idle_smt(struct task_struct *p, struct sched_domain *sd, int t return -1; for_each_cpu(cpu, cpu_smt_mask(target)) { -- if (!cpumask_test_cpu(cpu, &p->cpus_allowed)) -+ if (!cpumask_test_cpu(cpu, p->cpus_ptr)) +- if (!cpumask_test_cpu(cpu, &p->cpus_allowed) || ++ if (!cpumask_test_cpu(cpu, p->cpus_ptr) || + !cpumask_test_cpu(cpu, sched_domain_span(sd))) continue; if (idle_cpu(cpu)) - return cpu; -@@ -6235,7 +6235,7 @@ static int select_idle_cpu(struct task_s +@@ -6391,7 +6391,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t for_each_cpu_wrap(cpu, sched_domain_span(sd), target) { if (!--nr) return -1; @@ -668,7 +710,7 @@ Signed-off-by: Mike Galbraith continue; if (idle_cpu(cpu)) break; -@@ -6272,7 +6272,7 @@ static int select_idle_sibling(struct ta +@@ -6428,7 +6428,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) recent_used_cpu != target && cpus_share_cache(recent_used_cpu, target) && idle_cpu(recent_used_cpu) && @@ -677,7 +719,7 @@ Signed-off-by: Mike Galbraith /* * Replace recent_used_cpu with prev as it is a potential * candidate for the next wake. -@@ -6405,7 +6405,7 @@ select_task_rq_fair(struct task_struct * +@@ -6561,7 +6561,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f if (sd_flag & SD_BALANCE_WAKE) { record_wakee(p); want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) @@ -686,7 +728,7 @@ Signed-off-by: Mike Galbraith } rcu_read_lock(); -@@ -7144,14 +7144,14 @@ int can_migrate_task(struct task_struct +@@ -7306,14 +7306,14 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env) /* * We do not migrate tasks that are: * 1) throttled_lb_pair, or @@ -703,7 +745,7 @@ Signed-off-by: Mike Galbraith int cpu; schedstat_inc(p->se.statistics.nr_failed_migrations_affine); -@@ -7171,7 +7171,7 @@ int can_migrate_task(struct task_struct +@@ -7333,7 +7333,7 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env) /* Prevent to re-select dst_cpu via env's cpus */ for_each_cpu_and(cpu, env->dst_grpmask, env->cpus) { @@ -712,7 +754,7 @@ Signed-off-by: Mike Galbraith env->flags |= LBF_DST_PINNED; env->new_dst_cpu = cpu; break; -@@ -7716,7 +7716,7 @@ check_cpu_capacity(struct rq *rq, struct +@@ -7898,7 +7898,7 @@ check_cpu_capacity(struct rq *rq, struct sched_domain *sd) /* * Group imbalance indicates (and tries to solve) the problem where balancing @@ -721,7 +763,7 @@ Signed-off-by: Mike Galbraith * * Imagine a situation of two groups of 4 cpus each and 4 tasks each with a * cpumask covering 1 cpu of the first group and 3 cpus of the second group. -@@ -8292,7 +8292,7 @@ static struct sched_group *find_busiest_ +@@ -8474,7 +8474,7 @@ static struct sched_group *find_busiest_group(struct lb_env *env) /* * If the busiest group is imbalanced the below checks don't * work because they assume all things are equal, which typically @@ -730,7 +772,7 @@ Signed-off-by: Mike Galbraith */ if (busiest->group_type == group_imbalanced) goto force_balance; -@@ -8677,7 +8677,7 @@ more_balance: +@@ -8859,7 +8859,7 @@ static int load_balance(int this_cpu, struct rq *this_rq, * if the curr task on busiest cpu can't be * moved to this_cpu */ @@ -739,9 +781,11 @@ Signed-off-by: Mike Galbraith raw_spin_unlock_irqrestore(&busiest->lock, flags); env.flags |= LBF_ALL_PINNED; +diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c +index 11a772c67338..8149218ae416 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c -@@ -1582,7 +1582,7 @@ static void put_prev_task_rt(struct rq * +@@ -1582,7 +1582,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p) static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu) { if (!task_running(rq, p) && @@ -750,7 +794,7 @@ Signed-off-by: Mike Galbraith return 1; return 0; } -@@ -1717,7 +1717,7 @@ static struct rq *find_lock_lowest_rq(st +@@ -1717,7 +1717,7 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq) * Also make sure that it wasn't scheduled on its rq. */ if (unlikely(task_rq(task) != rq || @@ -759,6 +803,8 @@ Signed-off-by: Mike Galbraith task_running(rq, task) || !rt_task(task) || !task_on_rq_queued(task))) { +diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c +index 54b53e8afb43..59a3476553e3 100644 --- a/kernel/trace/trace_hwlat.c +++ b/kernel/trace/trace_hwlat.c @@ -279,7 +279,7 @@ static void move_to_next_cpu(void) @@ -770,9 +816,11 @@ Signed-off-by: Mike Galbraith goto disable; get_online_cpus(); +diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c +index 2fb007be0212..de3b2d925473 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c -@@ -22,7 +22,7 @@ notrace static unsigned int check_preemp +@@ -22,7 +22,7 @@ notrace static unsigned int check_preemption_disabled(const char *what1, * Kernel threads bound to a single CPU can safely use * smp_processor_id(): */ @@ -781,6 +829,8 @@ Signed-off-by: Mike Galbraith goto out; /* +diff --git a/samples/trace_events/trace-events-sample.c b/samples/trace_events/trace-events-sample.c +index 5522692100ba..8b4be8e1802a 100644 --- a/samples/trace_events/trace-events-sample.c +++ b/samples/trace_events/trace-events-sample.c @@ -33,7 +33,7 @@ static void simple_thread_func(int cnt) @@ -792,3 +842,6 @@ Signed-off-by: Mike Galbraith trace_foo_with_template_simple("HELLO", cnt); +-- +2.26.2 + diff --git a/patches.suse/Bluetooth-hci_uart-Cancel-init-work-before-unregiste.patch b/patches.suse/Bluetooth-hci_uart-Cancel-init-work-before-unregiste.patch new file mode 100644 index 0000000..2610151 --- /dev/null +++ b/patches.suse/Bluetooth-hci_uart-Cancel-init-work-before-unregiste.patch @@ -0,0 +1,31 @@ +From 3b799254cf6f481460719023d7a18f46651e5e7f Mon Sep 17 00:00:00 2001 +From: Samuel Holland +Date: Sat, 1 Aug 2020 11:29:56 -0500 +Subject: [PATCH] Bluetooth: hci_uart: Cancel init work before unregistering +Git-commit: 3b799254cf6f481460719023d7a18f46651e5e7f +Patch-mainline: v5.10-rc1 +References: git-fixes + +If hci_uart_tty_close() or hci_uart_unregister_device() is called while +hu->init_ready is scheduled, hci_register_dev() could be called after +the hci_uart is torn down. Avoid this by ensuring the work is complete +or canceled before checking the HCI_UART_REGISTERED flag. + +Fixes: 9f2aee848fe6 ("Bluetooth: Add delayed init sequence support for UART controllers") +Signed-off-by: Samuel Holland +Signed-off-by: Marcel Holtmann +Signed-off-by: Oliver Neukum +--- + drivers/bluetooth/hci_ldisc.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/bluetooth/hci_ldisc.c ++++ b/drivers/bluetooth/hci_ldisc.c +@@ -535,6 +535,7 @@ static void hci_uart_tty_close(struct tt + clear_bit(HCI_UART_PROTO_READY, &hu->flags); + write_unlock_irqrestore(&hu->proto_lock, flags); + ++ cancel_work_sync(&hu->init_ready); + cancel_work_sync(&hu->write_work); + + if (hdev) { diff --git a/patches.suse/Bluetooth-hci_uart-Fix-a-race-for-write_work-schedul.patch b/patches.suse/Bluetooth-hci_uart-Fix-a-race-for-write_work-schedul.patch new file mode 100644 index 0000000..21742dc --- /dev/null +++ b/patches.suse/Bluetooth-hci_uart-Fix-a-race-for-write_work-schedul.patch @@ -0,0 +1,61 @@ +From afe0b1c86458f121b085271e4f3034017a90d4a3 Mon Sep 17 00:00:00 2001 +From: Claire Chang +Date: Mon, 14 Dec 2020 15:29:21 +0800 +Subject: [PATCH] Bluetooth: hci_uart: Fix a race for write_work scheduling +Git-commit: afe0b1c86458f121b085271e4f3034017a90d4a3 +Patch-mainline: v5.12-rc1 +References: git-fixes + +In hci_uart_write_work, there is a loop/goto checking the value of +HCI_UART_TX_WAKEUP. If HCI_UART_TX_WAKEUP is set again, it keeps trying +hci_uart_dequeue; otherwise, it clears HCI_UART_SENDING and returns. + +In hci_uart_tx_wakeup, if HCI_UART_SENDING is already set, it sets +HCI_UART_TX_WAKEUP, skips schedule_work and assumes the running/pending +hci_uart_write_work worker will do hci_uart_dequeue properly. + +However, if the HCI_UART_SENDING check in hci_uart_tx_wakeup is done after +the loop breaks, but before HCI_UART_SENDING is cleared in +hci_uart_write_work, the schedule_work is skipped incorrectly. + +Fix this race by changing the order of HCI_UART_SENDING and +HCI_UART_TX_WAKEUP modification. + +Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") +Fixes: 82f5169bf3d3 ("Bluetooth: hci_uart: add serdev driver support library") +Signed-off-by: Claire Chang +Signed-off-by: Marcel Holtmann +Signed-off-by: Oliver Neukum +--- + drivers/bluetooth/hci_ldisc.c | 5 ++--- + drivers/bluetooth/hci_serdev.c | 3 +-- + 2 files changed, 3 insertions(+), 5 deletions(-) + +--- a/drivers/bluetooth/hci_ldisc.c ++++ b/drivers/bluetooth/hci_ldisc.c +@@ -135,10 +135,9 @@ int hci_uart_tx_wakeup(struct hci_uart * + if (!test_bit(HCI_UART_PROTO_READY, &hu->flags)) + goto no_schedule; + +- if (test_and_set_bit(HCI_UART_SENDING, &hu->tx_state)) { +- set_bit(HCI_UART_TX_WAKEUP, &hu->tx_state); ++ set_bit(HCI_UART_TX_WAKEUP, &hu->tx_state); ++ if (test_and_set_bit(HCI_UART_SENDING, &hu->tx_state)) + goto no_schedule; +- } + + BT_DBG(""); + +--- a/drivers/bluetooth/hci_serdev.c ++++ b/drivers/bluetooth/hci_serdev.c +@@ -94,9 +94,8 @@ static void hci_uart_write_work(struct w + hci_uart_tx_complete(hu, hci_skb_pkt_type(skb)); + kfree_skb(skb); + } ++ clear_bit(HCI_UART_SENDING, &hu->tx_state); + } while(test_bit(HCI_UART_TX_WAKEUP, &hu->tx_state)); +- +- clear_bit(HCI_UART_SENDING, &hu->tx_state); + } + + /* ------- Interface to HCI layer ------ */ diff --git a/patches.suse/can-skb-can_skb_set_owner-fix-ref-counting-if-socket.patch b/patches.suse/can-skb-can_skb_set_owner-fix-ref-counting-if-socket.patch new file mode 100644 index 0000000..235bd5a --- /dev/null +++ b/patches.suse/can-skb-can_skb_set_owner-fix-ref-counting-if-socket.patch @@ -0,0 +1,79 @@ +From e940e0895a82c6fbaa259f2615eb52b57ee91a7e Mon Sep 17 00:00:00 2001 +From: Oleksij Rempel +Date: Fri, 26 Feb 2021 10:24:56 +0100 +Subject: [PATCH] can: skb: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership +Git-commit: e940e0895a82c6fbaa259f2615eb52b57ee91a7e +Patch-mainline: v5.12-rc3 +References: git-fixes + +[ backport note: use atomic_*() instead of refcount_*() for SLE12-SP5 code + -- tiwai ] + +There are two ref count variables controlling the free()ing of a socket: +- struct sock::sk_refcnt - which is changed by sock_hold()/sock_put() +- struct sock::sk_wmem_alloc - which accounts the memory allocated by + the skbs in the send path. + +In case there are still TX skbs on the fly and the socket() is closed, +the struct sock::sk_refcnt reaches 0. In the TX-path the CAN stack +clones an "echo" skb, calls sock_hold() on the original socket and +references it. This produces the following back trace: + +| WARNING: CPU: 0 PID: 280 at lib/refcount.c:25 refcount_warn_saturate+0x114/0x134 +| refcount_t: addition on 0; use-after-free. +| Modules linked in: coda_vpu(E) v4l2_jpeg(E) videobuf2_vmalloc(E) imx_vdoa(E) +| CPU: 0 PID: 280 Comm: test_can.sh Tainted: G E 5.11.0-04577-gf8ff6603c617 #203 +| Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) +| Backtrace: +| [<80bafea4>] (dump_backtrace) from [<80bb0280>] (show_stack+0x20/0x24) r7:00000000 r6:600f0113 r5:00000000 r4:81441220 +| [<80bb0260>] (show_stack) from [<80bb593c>] (dump_stack+0xa0/0xc8) +| [<80bb589c>] (dump_stack) from [<8012b268>] (__warn+0xd4/0x114) r9:00000019 r8:80f4a8c2 r7:83e4150c r6:00000000 r5:00000009 r4:80528f90 +| [<8012b194>] (__warn) from [<80bb09c4>] (warn_slowpath_fmt+0x88/0xc8) r9:83f26400 r8:80f4a8d1 r7:00000009 r6:80528f90 r5:00000019 r4:80f4a8c2 +| [<80bb0940>] (warn_slowpath_fmt) from [<80528f90>] (refcount_warn_saturate+0x114/0x134) r8:00000000 r7:00000000 r6:82b44000 r5:834e5600 r4:83f4d540 +| [<80528e7c>] (refcount_warn_saturate) from [<8079a4c8>] (__refcount_add.constprop.0+0x4c/0x50) +| [<8079a47c>] (__refcount_add.constprop.0) from [<8079a57c>] (can_put_echo_skb+0xb0/0x13c) +| [<8079a4cc>] (can_put_echo_skb) from [<8079ba98>] (flexcan_start_xmit+0x1c4/0x230) r9:00000010 r8:83f48610 r7:0fdc0000 r6:0c080000 r5:82b44000 r4:834e5600 +| [<8079b8d4>] (flexcan_start_xmit) from [<80969078>] (netdev_start_xmit+0x44/0x70) r9:814c0ba0 r8:80c8790c r7:00000000 r6:834e5600 r5:82b44000 r4:82ab1f00 +| [<80969034>] (netdev_start_xmit) from [<809725a4>] (dev_hard_start_xmit+0x19c/0x318) r9:814c0ba0 r8:00000000 r7:82ab1f00 r6:82b44000 r5:00000000 r4:834e5600 +| [<80972408>] (dev_hard_start_xmit) from [<809c6584>] (sch_direct_xmit+0xcc/0x264) r10:834e5600 r9:00000000 r8:00000000 r7:82b44000 r6:82ab1f00 r5:834e5600 r4:83f27400 +| [<809c64b8>] (sch_direct_xmit) from [<809c6c0c>] (__qdisc_run+0x4f0/0x534) + +To fix this problem, only set skb ownership to sockets which have still +a ref count > 0. + +Fixes: 0ae89beb283a ("can: add destructor for self generated skbs") +Cc: Oliver Hartkopp +Cc: Andre Naujoks +Link: https://lore.kernel.org/r/20210226092456.27126-1-o.rempel@pengutronix.de +Suggested-by: Eric Dumazet +Signed-off-by: Oleksij Rempel +Reviewed-by: Oliver Hartkopp +Signed-off-by: Marc Kleine-Budde +Acked-by: Takashi Iwai + +--- + include/linux/can/skb.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/include/linux/can/skb.h b/include/linux/can/skb.h +index 685f34cfba20..d438eb058069 100644 +--- a/include/linux/can/skb.h ++++ b/include/linux/can/skb.h +@@ -65,8 +65,12 @@ static inline void can_skb_reserve(struct sk_buff *skb) + + static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk) + { +- if (sk) { +- sock_hold(sk); ++ /* If the socket has already been closed by user space, the ++ * refcount may already be 0 (and the socket will be freed ++ * after the last TX skb has been freed). So only increase ++ * socket refcount if the refcount is > 0. ++ */ ++ if (sk && atomic_inc_not_zero(&sk->sk_refcnt)) { + skb->destructor = sock_efree; + skb->sk = sk; + } +-- +2.26.2 + diff --git a/patches.suse/drm-meson_drv-add-shutdown-function.patch b/patches.suse/drm-meson_drv-add-shutdown-function.patch new file mode 100644 index 0000000..e52ef6f --- /dev/null +++ b/patches.suse/drm-meson_drv-add-shutdown-function.patch @@ -0,0 +1,78 @@ +From fa0c16caf3d73ab4d2e5d6fa2ef2394dbec91791 Mon Sep 17 00:00:00 2001 +From: Artem Lapkin +Date: Tue, 2 Mar 2021 12:22:02 +0800 +Subject: [PATCH] drm: meson_drv add shutdown function +Git-commit: fa0c16caf3d73ab4d2e5d6fa2ef2394dbec91791 +Patch-mainline: v5.12-rc3 +References: git-fixes + +Problem: random stucks on reboot stage about 1/20 stuck/reboots +// debug kernel log +[ 4.496660] reboot: kernel restart prepare CMD:(null) +[ 4.498114] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin +[ 4.503949] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... +...STUCK... + +Solution: add shutdown function to meson_drm driver +// debug kernel log +[ 5.231896] reboot: kernel restart prepare CMD:(null) +[ 5.246135] [drm:meson_drv_shutdown] +... +[ 5.259271] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown begin +[ 5.274688] meson_ee_pwrc c883c000.system-controller:power-controller: shutdown domain 0:VPU... +[ 5.338331] reboot: Restarting system +[ 5.358293] psci: PSCI_0_2_FN_SYSTEM_RESET reboot_mode:0 cmd:(null) +bl31 reboot reason: 0xd +bl31 reboot reason: 0x0 +system cmd 1. +...REBOOT... + +Tested: on VIM1 VIM2 VIM3 VIM3L khadas sbcs - 1000+ successful reboots +and Odroid boards, WeTek Play2 (GXBB) + +Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller") +Signed-off-by: Artem Lapkin +Tested-by: Christian Hewitt +Acked-by: Neil Armstrong +Acked-by: Kevin Hilman +Signed-off-by: Neil Armstrong +Link: https://patchwork.freedesktop.org/patch/msgid/20210302042202.3728113-1-art@khadas.com +Signed-off-by: Maarten Lankhorst +Acked-by: Takashi Iwai + +--- + drivers/gpu/drm/meson/meson_drv.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c +index 42c5d3246cfc..453d8b4c5763 100644 +--- a/drivers/gpu/drm/meson/meson_drv.c ++++ b/drivers/gpu/drm/meson/meson_drv.c +@@ -482,6 +482,16 @@ static int meson_probe_remote(struct platform_device *pdev, + return count; + } + ++static void meson_drv_shutdown(struct platform_device *pdev) ++{ ++ struct meson_drm *priv = dev_get_drvdata(&pdev->dev); ++ struct drm_device *drm = priv->drm; ++ ++ DRM_DEBUG_DRIVER("\n"); ++ drm_kms_helper_poll_fini(drm); ++ drm_atomic_helper_shutdown(drm); ++} ++ + static int meson_drv_probe(struct platform_device *pdev) + { + struct component_match *match = NULL; +@@ -553,6 +563,7 @@ static const struct dev_pm_ops meson_drv_pm_ops = { + + static struct platform_driver meson_drm_platform_driver = { + .probe = meson_drv_probe, ++ .shutdown = meson_drv_shutdown, + .driver = { + .name = "meson-drm", + .of_match_table = dt_match, +-- +2.26.2 + diff --git a/patches.suse/ethernet-alx-fix-order-of-calls-on-resume.patch b/patches.suse/ethernet-alx-fix-order-of-calls-on-resume.patch new file mode 100644 index 0000000..9914996 --- /dev/null +++ b/patches.suse/ethernet-alx-fix-order-of-calls-on-resume.patch @@ -0,0 +1,73 @@ +From a4dcfbc4ee2218abd567d81d795082d8d4afcdf6 Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Fri, 5 Mar 2021 14:17:29 -0800 +Subject: [PATCH] ethernet: alx: fix order of calls on resume +Git-commit: a4dcfbc4ee2218abd567d81d795082d8d4afcdf6 +Patch-mainline: v5.12-rc3 +References: git-fixes + +netif_device_attach() will unpause the queues so we can't call +it before __alx_open(). This went undetected until +commit b0999223f224 ("alx: add ability to allocate and free +alx_napi structures") but now if stack tries to xmit immediately +on resume before __alx_open() we'll crash on the NAPI being null: + + BUG: kernel NULL pointer dereference, address: 0000000000000198 + CPU: 0 PID: 12 Comm: ksoftirqd/0 Tainted: G OE 5.10.0-3-amd64 #1 Debian 5.10.13-1 + Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./H77-D3H, BIOS F15 11/14/2013 + RIP: 0010:alx_start_xmit+0x34/0x650 [alx] + Code: 41 56 41 55 41 54 55 53 48 83 ec 20 0f b7 57 7c 8b 8e b0 +0b 00 00 39 ca 72 06 89 d0 31 d2 f7 f1 89 d2 48 8b 84 df + RSP: 0018:ffffb09240083d28 EFLAGS: 00010297 + RAX: 0000000000000000 RBX: ffffa04d80ae7800 RCX: 0000000000000004 + RDX: 0000000000000000 RSI: ffffa04d80afa000 RDI: ffffa04e92e92a00 + RBP: 0000000000000042 R08: 0000000000000100 R09: ffffa04ea3146700 + R10: 0000000000000014 R11: 0000000000000000 R12: ffffa04e92e92100 + R13: 0000000000000001 R14: ffffa04e92e92a00 R15: ffffa04e92e92a00 + FS: 0000000000000000(0000) GS:ffffa0508f600000(0000) knlGS:0000000000000000 + i915 0000:00:02.0: vblank wait timed out on crtc 0 + CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 + CR2: 0000000000000198 CR3: 000000004460a001 CR4: 00000000001706f0 + Call Trace: + dev_hard_start_xmit+0xc7/0x1e0 + sch_direct_xmit+0x10f/0x310 + +Cc: # 4.9+ +Fixes: bc2bebe8de8e ("alx: remove WoL support") +Reported-by: Zbynek Michl +Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983595 +Signed-off-by: Jakub Kicinski +Tested-by: Zbynek Michl +Signed-off-by: David S. Miller +Acked-by: Takashi Iwai + +--- + drivers/net/ethernet/atheros/alx/main.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c +index 9b7f1af5f574..9e02f8864593 100644 +--- a/drivers/net/ethernet/atheros/alx/main.c ++++ b/drivers/net/ethernet/atheros/alx/main.c +@@ -1894,13 +1894,16 @@ static int alx_resume(struct device *dev) + + if (!netif_running(alx->dev)) + return 0; +- netif_device_attach(alx->dev); + + rtnl_lock(); + err = __alx_open(alx, true); + rtnl_unlock(); ++ if (err) ++ return err; + +- return err; ++ netif_device_attach(alx->dev); ++ ++ return 0; + } + + static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume); +-- +2.26.2 + diff --git a/patches.suse/firmware-efi-Fix-a-use-after-bug-in-efi_mem_reserve_.patch b/patches.suse/firmware-efi-Fix-a-use-after-bug-in-efi_mem_reserve_.patch new file mode 100644 index 0000000..20c29fd --- /dev/null +++ b/patches.suse/firmware-efi-Fix-a-use-after-bug-in-efi_mem_reserve_.patch @@ -0,0 +1,40 @@ +From 9ceee7d0841a8f7d7644021ba7d4cc1fbc7966e3 Mon Sep 17 00:00:00 2001 +From: Lv Yunlong +Date: Wed, 10 Mar 2021 00:31:27 -0800 +Subject: [PATCH] firmware/efi: Fix a use after bug in efi_mem_reserve_persistent +Git-commit: 9ceee7d0841a8f7d7644021ba7d4cc1fbc7966e3 +Patch-mainline: v5.12-rc4 +References: git-fixes + +In the for loop in efi_mem_reserve_persistent(), prsv = rsv->next +use the unmapped rsv. Use the unmapped pages will cause segment +fault. + +Fixes: 18df7577adae6 ("efi/memreserve: deal with memreserve entries in unmapped memory") +Signed-off-by: Lv Yunlong +Signed-off-by: Ard Biesheuvel +Acked-by: Takashi Iwai + +--- + drivers/firmware/efi/efi.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/firmware/efi/efi.c ++++ b/drivers/firmware/efi/efi.c +@@ -939,7 +939,7 @@ int __ref efi_mem_reserve_persistent(phy + } + + /* first try to find a slot in an existing linked list entry */ +- for (prsv = efi_memreserve_root->next; prsv; prsv = rsv->next) { ++ for (prsv = efi_memreserve_root->next; prsv; ) { + rsv = memremap(prsv, sizeof(*rsv), MEMREMAP_WB); + /* implement atomic_fetch_add_unless for + * index = atomic_fetch_add_unless(&rsv->count, 1, rsv->size); +@@ -958,6 +958,7 @@ int __ref efi_mem_reserve_persistent(phy + memunmap(rsv); + return 0; + } ++ prsv = rsv->next; + memunmap(rsv); + } + diff --git a/patches.suse/iio-adc-qcom-spmi-vadc-add-default-scale-to-LR_MUX2_.patch b/patches.suse/iio-adc-qcom-spmi-vadc-add-default-scale-to-LR_MUX2_.patch new file mode 100644 index 0000000..8642ec6 --- /dev/null +++ b/patches.suse/iio-adc-qcom-spmi-vadc-add-default-scale-to-LR_MUX2_.patch @@ -0,0 +1,53 @@ +From 7d200b283aa049fcda0d43dd6e03e9e783d2799c Mon Sep 17 00:00:00 2001 +From: Jonathan Albrieux +Date: Wed, 13 Jan 2021 16:18:07 +0100 +Subject: [PATCH] iio:adc:qcom-spmi-vadc: add default scale to LR_MUX2_BAT_ID channel +Git-commit: 7d200b283aa049fcda0d43dd6e03e9e783d2799c +Patch-mainline: v5.12-rc4 +References: git-fixes + +Checking at both msm8909-pm8916.dtsi and msm8916.dtsi from downstream +it is indicated that "batt_id" channel has to be scaled with the default +Function: + + chan@31 { + label = "batt_id"; + reg = <0x31>; + qcom,decimation = <0>; + qcom,pre-div-channel-scaling = <0>; + qcom,calibration-type = "ratiometric"; + qcom,scale-function = <0>; + qcom,hw-settle-time = <0xb>; + qcom,fast-avg-setup = <0>; + }; + +Change LR_MUX2_BAT_ID scaling accordingly. + +Signed-off-by: Jonathan Albrieux +Acked-by: Bjorn Andersson +Fixes: 7c271eea7b8a ("iio: adc: spmi-vadc: Changes to support different scaling") +Link: https://lore.kernel.org/r/20210113151808.4628-2-jonathan.albrieux@gmail.com +Cc: +Signed-off-by: Jonathan Cameron +Acked-by: Takashi Iwai + +--- + drivers/iio/adc/qcom-spmi-vadc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/iio/adc/qcom-spmi-vadc.c b/drivers/iio/adc/qcom-spmi-vadc.c +index b0388f8a69f4..7e7d408452ec 100644 +--- a/drivers/iio/adc/qcom-spmi-vadc.c ++++ b/drivers/iio/adc/qcom-spmi-vadc.c +@@ -598,7 +598,7 @@ static const struct vadc_channels vadc_chans[] = { + VADC_CHAN_NO_SCALE(P_MUX16_1_3, 1) + + VADC_CHAN_NO_SCALE(LR_MUX1_BAT_THERM, 0) +- VADC_CHAN_NO_SCALE(LR_MUX2_BAT_ID, 0) ++ VADC_CHAN_VOLT(LR_MUX2_BAT_ID, 0, SCALE_DEFAULT) + VADC_CHAN_NO_SCALE(LR_MUX3_XO_THERM, 0) + VADC_CHAN_NO_SCALE(LR_MUX4_AMUX_THM1, 0) + VADC_CHAN_NO_SCALE(LR_MUX5_AMUX_THM2, 0) +-- +2.26.2 + diff --git a/patches.suse/iio-gyro-mpu3050-Fix-error-handling-in-mpu3050_trigg.patch b/patches.suse/iio-gyro-mpu3050-Fix-error-handling-in-mpu3050_trigg.patch new file mode 100644 index 0000000..912fe9a --- /dev/null +++ b/patches.suse/iio-gyro-mpu3050-Fix-error-handling-in-mpu3050_trigg.patch @@ -0,0 +1,41 @@ +From 6dbbbe4cfd398704b72b21c1d4a5d3807e909d60 Mon Sep 17 00:00:00 2001 +From: Dinghao Liu +Date: Mon, 1 Mar 2021 16:04:21 +0800 +Subject: [PATCH] iio: gyro: mpu3050: Fix error handling in mpu3050_trigger_handler +Git-commit: 6dbbbe4cfd398704b72b21c1d4a5d3807e909d60 +Patch-mainline: v5.12-rc4 +References: git-fixes + +There is one regmap_bulk_read() call in mpu3050_trigger_handler +that we have caught its return value bug lack further handling. +Check and terminate the execution flow just like the other three +regmap_bulk_read() calls in this function. + +Fixes: 3904b28efb2c7 ("iio: gyro: Add driver for the MPU-3050 gyroscope") +Signed-off-by: Dinghao Liu +Reviewed-by: Linus Walleij +Link: https://lore.kernel.org/r/20210301080421.13436-1-dinghao.liu@zju.edu.cn +Cc: +Signed-off-by: Jonathan Cameron +Acked-by: Takashi Iwai + +--- + drivers/iio/gyro/mpu3050-core.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c +index dfa31a23500f..ac90be03332a 100644 +--- a/drivers/iio/gyro/mpu3050-core.c ++++ b/drivers/iio/gyro/mpu3050-core.c +@@ -551,6 +551,8 @@ static irqreturn_t mpu3050_trigger_handler(int irq, void *p) + MPU3050_FIFO_R, + &fifo_values[offset], + toread); ++ if (ret) ++ goto out_trigger_unlock; + + dev_dbg(mpu3050->dev, + "%04x %04x %04x %04x %04x\n", +-- +2.26.2 + diff --git a/patches.suse/iio-hid-sensor-humidity-Fix-alignment-issue-of-times.patch b/patches.suse/iio-hid-sensor-humidity-Fix-alignment-issue-of-times.patch new file mode 100644 index 0000000..8f191ea --- /dev/null +++ b/patches.suse/iio-hid-sensor-humidity-Fix-alignment-issue-of-times.patch @@ -0,0 +1,62 @@ +From 37e89e574dc238a4ebe439543c5ab4fbb2f0311b Mon Sep 17 00:00:00 2001 +From: Ye Xiang +Date: Wed, 3 Mar 2021 14:36:12 +0800 +Subject: [PATCH] iio: hid-sensor-humidity: Fix alignment issue of timestamp channel +Git-commit: 37e89e574dc238a4ebe439543c5ab4fbb2f0311b +Patch-mainline: v5.12-rc4 +References: git-fixes + +This patch ensures that, there is sufficient space and correct +alignment for the timestamp. + +Fixes: d7ed89d5aadf ("iio: hid: Add humidity sensor support") +Signed-off-by: Ye Xiang +Cc: +Link: https://lore.kernel.org/r/20210303063615.12130-2-xiang.ye@intel.com +Signed-off-by: Jonathan Cameron +Acked-by: Takashi Iwai + +--- + drivers/iio/humidity/hid-sensor-humidity.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/drivers/iio/humidity/hid-sensor-humidity.c b/drivers/iio/humidity/hid-sensor-humidity.c +index 52f605114ef7..d62705448ae2 100644 +--- a/drivers/iio/humidity/hid-sensor-humidity.c ++++ b/drivers/iio/humidity/hid-sensor-humidity.c +@@ -15,7 +15,10 @@ + struct hid_humidity_state { + struct hid_sensor_common common_attributes; + struct hid_sensor_hub_attribute_info humidity_attr; +- s32 humidity_data; ++ struct { ++ s32 humidity_data; ++ u64 timestamp __aligned(8); ++ } scan; + int scale_pre_decml; + int scale_post_decml; + int scale_precision; +@@ -125,9 +128,8 @@ static int humidity_proc_event(struct hid_sensor_hub_device *hsdev, + struct hid_humidity_state *humid_st = iio_priv(indio_dev); + + if (atomic_read(&humid_st->common_attributes.data_ready)) +- iio_push_to_buffers_with_timestamp(indio_dev, +- &humid_st->humidity_data, +- iio_get_time_ns(indio_dev)); ++ iio_push_to_buffers_with_timestamp(indio_dev, &humid_st->scan, ++ iio_get_time_ns(indio_dev)); + + return 0; + } +@@ -142,7 +144,7 @@ static int humidity_capture_sample(struct hid_sensor_hub_device *hsdev, + + switch (usage_id) { + case HID_USAGE_SENSOR_ATMOSPHERIC_HUMIDITY: +- humid_st->humidity_data = *(s32 *)raw_data; ++ humid_st->scan.humidity_data = *(s32 *)raw_data; + + return 0; + default: +-- +2.26.2 + diff --git a/patches.suse/iio-hid-sensor-prox-Fix-scale-not-correct-issue.patch b/patches.suse/iio-hid-sensor-prox-Fix-scale-not-correct-issue.patch new file mode 100644 index 0000000..35c9d7e --- /dev/null +++ b/patches.suse/iio-hid-sensor-prox-Fix-scale-not-correct-issue.patch @@ -0,0 +1,65 @@ +From d68c592e02f6f49a88e705f13dfc1883432cf300 Mon Sep 17 00:00:00 2001 +From: Ye Xiang +Date: Sat, 30 Jan 2021 18:25:30 +0800 +Subject: [PATCH] iio: hid-sensor-prox: Fix scale not correct issue +Git-commit: d68c592e02f6f49a88e705f13dfc1883432cf300 +Patch-mainline: v5.12-rc4 +References: git-fixes + +Currently, the proxy sensor scale is zero because it just return the +exponent directly. To fix this issue, this patch use +hid_sensor_format_scale to process the scale first then return the +output. + +Fixes: 39a3a0138f61 ("iio: hid-sensors: Added Proximity Sensor Driver") +Signed-off-by: Ye Xiang +Link: https://lore.kernel.org/r/20210130102530.31064-1-xiang.ye@intel.com +Cc: +Signed-off-by: Jonathan Cameron +Acked-by: Takashi Iwai + +--- + drivers/iio/light/hid-sensor-prox.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c +index 330cf359e0b8..e9e00ce0c6d4 100644 +--- a/drivers/iio/light/hid-sensor-prox.c ++++ b/drivers/iio/light/hid-sensor-prox.c +@@ -23,6 +23,9 @@ struct prox_state { + struct hid_sensor_common common_attributes; + struct hid_sensor_hub_attribute_info prox_attr; + u32 human_presence; ++ int scale_pre_decml; ++ int scale_post_decml; ++ int scale_precision; + }; + + /* Channel definitions */ +@@ -93,8 +96,9 @@ static int prox_read_raw(struct iio_dev *indio_dev, + ret_type = IIO_VAL_INT; + break; + case IIO_CHAN_INFO_SCALE: +- *val = prox_state->prox_attr.units; +- ret_type = IIO_VAL_INT; ++ *val = prox_state->scale_pre_decml; ++ *val2 = prox_state->scale_post_decml; ++ ret_type = prox_state->scale_precision; + break; + case IIO_CHAN_INFO_OFFSET: + *val = hid_sensor_convert_exponent( +@@ -234,6 +238,11 @@ static int prox_parse_report(struct platform_device *pdev, + HID_USAGE_SENSOR_HUMAN_PRESENCE, + &st->common_attributes.sensitivity); + ++ st->scale_precision = hid_sensor_format_scale( ++ hsdev->usage, ++ &st->prox_attr, ++ &st->scale_pre_decml, &st->scale_post_decml); ++ + return ret; + } + +-- +2.26.2 + diff --git a/patches.suse/iio-hid-sensor-temperature-Fix-issues-of-timestamp-c.patch b/patches.suse/iio-hid-sensor-temperature-Fix-issues-of-timestamp-c.patch new file mode 100644 index 0000000..219ebe8 --- /dev/null +++ b/patches.suse/iio-hid-sensor-temperature-Fix-issues-of-timestamp-c.patch @@ -0,0 +1,73 @@ +From 141e7633aa4d2838d1f6ad5c74cccc53547c16ac Mon Sep 17 00:00:00 2001 +From: Ye Xiang +Date: Wed, 3 Mar 2021 14:36:14 +0800 +Subject: [PATCH] iio: hid-sensor-temperature: Fix issues of timestamp channel +Git-commit: 141e7633aa4d2838d1f6ad5c74cccc53547c16ac +Patch-mainline: v5.12-rc4 +References: git-fixes + +This patch fixes 2 issues of timestamp channel: +1. This patch ensures that there is sufficient space and correct +alignment for the timestamp. +2. Correct the timestamp channel scan index. + +Fixes: 59d0f2da3569 ("iio: hid: Add temperature sensor support") +Signed-off-by: Ye Xiang +Cc: +Link: https://lore.kernel.org/r/20210303063615.12130-4-xiang.ye@intel.com +Signed-off-by: Jonathan Cameron +Acked-by: Takashi Iwai + +--- + drivers/iio/temperature/hid-sensor-temperature.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/drivers/iio/temperature/hid-sensor-temperature.c b/drivers/iio/temperature/hid-sensor-temperature.c +index 81688f1b932f..da9a247097fa 100644 +--- a/drivers/iio/temperature/hid-sensor-temperature.c ++++ b/drivers/iio/temperature/hid-sensor-temperature.c +@@ -15,7 +15,10 @@ + struct temperature_state { + struct hid_sensor_common common_attributes; + struct hid_sensor_hub_attribute_info temperature_attr; +- s32 temperature_data; ++ struct { ++ s32 temperature_data; ++ u64 timestamp __aligned(8); ++ } scan; + int scale_pre_decml; + int scale_post_decml; + int scale_precision; +@@ -32,7 +35,7 @@ static const struct iio_chan_spec temperature_channels[] = { + BIT(IIO_CHAN_INFO_SAMP_FREQ) | + BIT(IIO_CHAN_INFO_HYSTERESIS), + }, +- IIO_CHAN_SOFT_TIMESTAMP(3), ++ IIO_CHAN_SOFT_TIMESTAMP(1), + }; + + /* Adjust channel real bits based on report descriptor */ +@@ -123,9 +126,8 @@ static int temperature_proc_event(struct hid_sensor_hub_device *hsdev, + struct temperature_state *temp_st = iio_priv(indio_dev); + + if (atomic_read(&temp_st->common_attributes.data_ready)) +- iio_push_to_buffers_with_timestamp(indio_dev, +- &temp_st->temperature_data, +- iio_get_time_ns(indio_dev)); ++ iio_push_to_buffers_with_timestamp(indio_dev, &temp_st->scan, ++ iio_get_time_ns(indio_dev)); + + return 0; + } +@@ -140,7 +142,7 @@ static int temperature_capture_sample(struct hid_sensor_hub_device *hsdev, + + switch (usage_id) { + case HID_USAGE_SENSOR_DATA_ENVIRONMENTAL_TEMPERATURE: +- temp_st->temperature_data = *(s32 *)raw_data; ++ temp_st->scan.temperature_data = *(s32 *)raw_data; + return 0; + default: + return -EINVAL; +-- +2.26.2 + diff --git a/patches.suse/net-usb-ax88179_178a-fix-missing-stop-entry-in-drive.patch b/patches.suse/net-usb-ax88179_178a-fix-missing-stop-entry-in-drive.patch new file mode 100644 index 0000000..c677500 --- /dev/null +++ b/patches.suse/net-usb-ax88179_178a-fix-missing-stop-entry-in-drive.patch @@ -0,0 +1,34 @@ +From 9666ea66a74adfe295cb3a8760c76e1ef70f9caf Mon Sep 17 00:00:00 2001 +From: Wilken Gottwalt +Date: Mon, 28 Sep 2020 11:01:04 +0200 +Subject: [PATCH] net: usb: ax88179_178a: fix missing stop entry in driver_info +Git-commit: 9666ea66a74adfe295cb3a8760c76e1ef70f9caf +Patch-mainline: v5.9 +References: git-fixes + +Adds the missing .stop entry in the Belkin driver_info structure. + +Fixes: e20bd60bf62a ("net: usb: asix88179_178a: Add support for the Belkin B2B128") +Signed-off-by: Wilken Gottwalt +Signed-off-by: David S. Miller +Acked-by: Takashi Iwai + +--- + drivers/net/usb/ax88179_178a.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c +index 125f7bf57590..8f1798b95a02 100644 +--- a/drivers/net/usb/ax88179_178a.c ++++ b/drivers/net/usb/ax88179_178a.c +@@ -1823,6 +1823,7 @@ static const struct driver_info belkin_info = { + .status = ax88179_status, + .link_reset = ax88179_link_reset, + .reset = ax88179_reset, ++ .stop = ax88179_stop, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, + .rx_fixup = ax88179_rx_fixup, + .tx_fixup = ax88179_tx_fixup, +-- +2.26.2 + diff --git a/patches.suse/powerpc-book3s64-pkeys-Fix-pkey_access_permitted-for.patch b/patches.suse/powerpc-book3s64-pkeys-Fix-pkey_access_permitted-for.patch index b062b45..9759959 100644 --- a/patches.suse/powerpc-book3s64-pkeys-Fix-pkey_access_permitted-for.patch +++ b/patches.suse/powerpc-book3s64-pkeys-Fix-pkey_access_permitted-for.patch @@ -131,10 +131,12 @@ Acked-by: Michal Suchanek arch/powerpc/mm/pkeys.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) +diff --git a/arch/powerpc/mm/pkeys.c b/arch/powerpc/mm/pkeys.c +index ca5fcb4bff32..d174106bab67 100644 --- a/arch/powerpc/mm/pkeys.c +++ b/arch/powerpc/mm/pkeys.c -@@ -355,12 +355,14 @@ static bool pkey_access_permitted(int pk - return true; +@@ -354,12 +354,14 @@ static bool pkey_access_permitted(int pkey, bool write, bool execute) + u64 amr; pkey_shift = pkeyshift(pkey); - if (execute && !(read_iamr() & (IAMR_EX_BIT << pkey_shift))) @@ -153,3 +155,6 @@ Acked-by: Michal Suchanek } bool arch_pte_access_permitted(u64 pte, bool write, bool execute) +-- +2.26.2 + diff --git a/patches.suse/powerpc-mm-pkeys-Make-pkey-access-check-work-on-exec.patch b/patches.suse/powerpc-mm-pkeys-Make-pkey-access-check-work-on-exec.patch new file mode 100644 index 0000000..3575a38 --- /dev/null +++ b/patches.suse/powerpc-mm-pkeys-Make-pkey-access-check-work-on-exec.patch @@ -0,0 +1,84 @@ +From 19ab500edb5d6020010caba48ce3b4ce4182ab63 Mon Sep 17 00:00:00 2001 +From: "Aneesh Kumar K.V" +Date: Sat, 27 Jun 2020 12:31:46 +0530 +Subject: [PATCH] powerpc/mm/pkeys: Make pkey access check work on + execute_only_key + +References: bsc#1181544 ltc#191080 git-fixes +Patch-mainline: v5.8-rc4 +Git-commit: 19ab500edb5d6020010caba48ce3b4ce4182ab63 + +Jan reported that LTP mmap03 was getting stuck in a page fault loop +after commit c46241a370a6 ("powerpc/pkeys: Check vma before returning +key fault error to the user"), as well as a minimised reproducer: + + #include + #include + #include + #include + #include + + int main(int ac, char **av) + { + int page_sz = getpagesize(); + int fildes; + char *addr; + + fildes = open("tempfile", O_WRONLY | O_CREAT, 0666); + write(fildes, &fildes, sizeof(fildes)); + close(fildes); + + fildes = open("tempfile", O_RDONLY); + unlink("tempfile"); + + addr = mmap(0, page_sz, PROT_EXEC, MAP_FILE | MAP_PRIVATE, fildes, 0); + + printf("%d\n", *addr); + return 0; + } + +And noticed that access_pkey_error() in page fault handler now always +seem to return false: + + __do_page_fault + access_pkey_error(is_pkey: 1, is_exec: 0, is_write: 0) + arch_vma_access_permitted + pkey_access_permitted + if (!is_pkey_enabled(pkey)) + return true + return false + +pkey_access_permitted() should not check if the pkey is available in +UAMOR (using is_pkey_enabled()). The kernel needs to do that check +only when allocating keys. This also makes sure the execute_only_key +which is marked as non-manageable via UAMOR is handled correctly in +pkey_access_permitted(), and fixes the bug. + +Fixes: c46241a370a6 ("powerpc/pkeys: Check vma before returning key fault error to the user") +Reported-by: Jan Stancek +Signed-off-by: Aneesh Kumar K.V +[mpe: Include bug report details etc. in the change log] +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20200627070147.297535-1-aneesh.kumar@linux.ibm.com +Acked-by: Michal Suchanek +--- + arch/powerpc/mm/pkeys.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/arch/powerpc/mm/pkeys.c b/arch/powerpc/mm/pkeys.c +index 1199fc2bfaec..ca5fcb4bff32 100644 +--- a/arch/powerpc/mm/pkeys.c ++++ b/arch/powerpc/mm/pkeys.c +@@ -353,9 +353,6 @@ static bool pkey_access_permitted(int pkey, bool write, bool execute) + int pkey_shift; + u64 amr; + +- if (!is_pkey_enabled(pkey)) +- return true; +- + pkey_shift = pkeyshift(pkey); + if (execute && !(read_iamr() & (IAMR_EX_BIT << pkey_shift))) + return true; +-- +2.26.2 + diff --git a/patches.suse/rcu-Allow-only-one-expedited-GP-to-run-concurrently-.patch b/patches.suse/rcu-Allow-only-one-expedited-GP-to-run-concurrently-.patch new file mode 100644 index 0000000..1d9f4b7 --- /dev/null +++ b/patches.suse/rcu-Allow-only-one-expedited-GP-to-run-concurrently-.patch @@ -0,0 +1,86 @@ +From 4bc6b745e5cbefed92c48071e28a5f41246d0470 Mon Sep 17 00:00:00 2001 +From: Neeraj Upadhyay +Date: Tue, 19 Nov 2019 11:50:52 -0800 +Subject: [PATCH] rcu: Allow only one expedited GP to run concurrently with + wakeups +Git-commit: 4bc6b745e5cbefed92c48071e28a5f41246d0470 +Patch-mainline: v5.6-rc1 +References: git-fixes + +The current expedited RCU grace-period code expects that a task +requesting an expedited grace period cannot awaken until that grace +period has reached the wakeup phase. However, it is possible for a long +preemption to result in the waiting task never sleeping. For example, +consider the following sequence of events: + +1. Task A starts an expedited grace period by invoking + synchronize_rcu_expedited(). It proceeds normally up to the + wait_event() near the end of that function, and is then preempted + (or interrupted or whatever). + +2. The expedited grace period completes, and a kworker task starts + the awaken phase, having incremented the counter and acquired + the rcu_state structure's .exp_wake_mutex. This kworker task + is then preempted or interrupted or whatever. + +3. Task A resumes and enters wait_event(), which notes that the + expedited grace period has completed, and thus doesn't sleep. + +4. Task B starts an expedited grace period exactly as did Task A, + complete with the preemption (or whatever delay) just before + the call to wait_event(). + +5. The expedited grace period completes, and another kworker + task starts the awaken phase, having incremented the counter. + However, it blocks when attempting to acquire the rcu_state + structure's .exp_wake_mutex because step 2's kworker task has + not yet released it. + +6. Steps 4 and 5 repeat, resulting in overflow of the rcu_node + structure's ->exp_wq[] array. + +In theory, this is harmless. Tasks waiting on the various ->exp_wq[] +array will just be spuriously awakened, but they will just sleep again +on noting that the rcu_state structure's ->expedited_sequence value has +not advanced far enough. + +In practice, this wastes CPU time and is an accident waiting to happen. +This commit therefore moves the rcu_exp_gp_seq_end() call that officially +ends the expedited grace period (along with associate tracing) until +after the ->exp_wake_mutex has been acquired. This prevents Task A from +awakening prematurely, thus preventing more than one expedited grace +period from being in flight during a previous expedited grace period's +wakeup phase. + +Fixes: 3b5f668e715b ("rcu: Overlap wakeups with next expedited grace period") +Signed-off-by: Neeraj Upadhyay +[ paulmck: Added updated comment. ] + +Signed-off-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +--- + kernel/rcu/tree_exp.h | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +--- a/kernel/rcu/tree_exp.h ++++ b/kernel/rcu/tree_exp.h +@@ -516,14 +516,13 @@ static void rcu_exp_wait_wake(struct rcu + struct rcu_node *rnp; + + synchronize_sched_expedited_wait(rsp); +- rcu_exp_gp_seq_end(rsp); +- trace_rcu_exp_grace_period(rsp->name, s, TPS("end")); + +- /* +- * Switch over to wakeup mode, allowing the next GP, but -only- the +- * next GP, to proceed. +- */ ++ // Switch over to wakeup mode, allowing the next GP to proceed. ++ // End the previous grace period only after acquiring the mutex ++ // to ensure that only one GP runs concurrently with wakeups. + mutex_lock(&rsp->exp_wake_mutex); ++ rcu_exp_gp_seq_end(rsp); ++ trace_rcu_exp_grace_period(rsp->name, s, TPS("end")); + + rcu_for_each_node_breadth_first(rsp, rnp) { + if (ULONG_CMP_LT(READ_ONCE(rnp->exp_seq_rq), s)) { diff --git a/patches.suse/rcu-Fix-missed-wakeup-of-exp_wq-waiters.patch b/patches.suse/rcu-Fix-missed-wakeup-of-exp_wq-waiters.patch new file mode 100644 index 0000000..5ff6257 --- /dev/null +++ b/patches.suse/rcu-Fix-missed-wakeup-of-exp_wq-waiters.patch @@ -0,0 +1,96 @@ +From fd6bc19d7676a060a171d1cf3dcbf6fd797eb05f Mon Sep 17 00:00:00 2001 +From: Neeraj Upadhyay +Date: Tue, 19 Nov 2019 03:17:07 +0000 +Subject: [PATCH] rcu: Fix missed wakeup of exp_wq waiters +Git-commit: fd6bc19d7676a060a171d1cf3dcbf6fd797eb05f +Patch-mainline: v5.6-rc1 +References: git-fixes + +Tasks waiting within exp_funnel_lock() for an expedited grace period to +elapse can be starved due to the following sequence of events: + +1. Tasks A and B both attempt to start an expedited grace + period at about the same time. This grace period will have + completed when the lower four bits of the rcu_state structure's + ->expedited_sequence field are 0b'0100', for example, when the + initial value of this counter is zero. Task A wins, and thus + does the actual work of starting the grace period, including + acquiring the rcu_state structure's .exp_mutex and sets the + counter to 0b'0001'. + +2. Because task B lost the race to start the grace period, it + waits on ->expedited_sequence to reach 0b'0100' inside of + exp_funnel_lock(). This task therefore blocks on the rcu_node + structure's ->exp_wq[1] field, keeping in mind that the + end-of-grace-period value of ->expedited_sequence (0b'0100') + is shifted down two bits before indexing the ->exp_wq[] field. + +3. Task C attempts to start another expedited grace period, + but blocks on ->exp_mutex, which is still held by Task A. + +4. The aforementioned expedited grace period completes, so that + ->expedited_sequence now has the value 0b'0100'. A kworker task + therefore acquires the rcu_state structure's ->exp_wake_mutex + and starts awakening any tasks waiting for this grace period. + +5. One of the first tasks awakened happens to be Task A. Task A + therefore releases the rcu_state structure's ->exp_mutex, + which allows Task C to start the next expedited grace period, + which causes the lower four bits of the rcu_state structure's + ->expedited_sequence field to become 0b'0101'. + +6. Task C's expedited grace period completes, so that the lower four + bits of the rcu_state structure's ->expedited_sequence field now + become 0b'1000'. + +7. The kworker task from step 4 above continues its wakeups. + Unfortunately, the wake_up_all() refetches the rcu_state + structure's .expedited_sequence field: + + wake_up_all(&rnp->exp_wq[rcu_seq_ctr(rcu_state.expedited_sequence) & 0x3]); + + This results in the wakeup being applied to the rcu_node + structure's ->exp_wq[2] field, which is unfortunate given that + Task B is instead waiting on ->exp_wq[1]. + +On a busy system, no harm is done (or at least no permanent harm is done). +Some later expedited grace period will redo the wakeup. But on a quiet +system, such as many embedded systems, it might be a good long time before +there was another expedited grace period. On such embedded systems, +this situation could therefore result in a system hang. + +This issue manifested as DPM device timeout during suspend (which +usually qualifies as a quiet time) due to a SCSI device being stuck in +_synchronize_rcu_expedited(), with the following stack trace: + + schedule() + synchronize_rcu_expedited() + synchronize_rcu() + scsi_device_quiesce() + scsi_bus_suspend() + dpm_run_callback() + __device_suspend() + +This commit therefore prevents such delays, timeouts, and hangs by +making rcu_exp_wait_wake() use its "s" argument consistently instead of +refetching from rcu_state.expedited_sequence. + +Fixes: 3b5f668e715b ("rcu: Overlap wakeups with next expedited grace period") +Signed-off-by: Neeraj Upadhyay +Signed-off-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +--- + kernel/rcu/tree_exp.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/rcu/tree_exp.h ++++ b/kernel/rcu/tree_exp.h +@@ -534,7 +534,7 @@ static void rcu_exp_wait_wake(struct rcu + spin_unlock(&rnp->exp_lock); + } + smp_mb(); /* All above changes before wakeup. */ +- wake_up_all(&rnp->exp_wq[rcu_seq_ctr(rsp->expedited_sequence) & 0x3]); ++ wake_up_all(&rnp->exp_wq[rcu_seq_ctr(s) & 0x3]); + } + trace_rcu_exp_grace_period(rsp->name, s, TPS("endwake")); + mutex_unlock(&rsp->exp_wake_mutex); diff --git a/patches.suse/s390-vtime-fix-increased-steal-time-accounting.patch b/patches.suse/s390-vtime-fix-increased-steal-time-accounting.patch new file mode 100644 index 0000000..403e552 --- /dev/null +++ b/patches.suse/s390-vtime-fix-increased-steal-time-accounting.patch @@ -0,0 +1,36 @@ +From: Gerald Schaefer +Date: Wed, 10 Mar 2021 14:23:37 +0100 +Subject: [PATCH] s390/vtime: fix increased steal time accounting +Patch-mainline: v5.12-rc4 +Git-commit: d54cb7d54877d529bc1e0e1f47a3dd082f73add3 +References: bsc#1183861 + +Commit 152e9b8676c6e ("s390/vtime: steal time exponential moving average") +inadvertently changed the input value for account_steal_time() from +"cputime_to_nsecs(steal)" to just "steal", resulting in broken increased +steal time accounting. + +Fix this by changing it back to "cputime_to_nsecs(steal)". + +Fixes: 152e9b8676c6e ("s390/vtime: steal time exponential moving average") +Cc: # 5.1 +Reported-by: Sabine Forkel +Reviewed-by: Heiko Carstens +Signed-off-by: Gerald Schaefer +Signed-off-by: Heiko Carstens +Acked-by: Cho, Yu-Chen +--- + arch/s390/kernel/vtime.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/s390/kernel/vtime.c ++++ b/arch/s390/kernel/vtime.c +@@ -219,7 +219,7 @@ void vtime_flush(struct task_struct *tsk + avg_steal = S390_lowcore.avg_steal_timer / 2; + if ((s64) steal > 0) { + S390_lowcore.steal_timer = 0; +- account_steal_time(steal); ++ account_steal_time(cputime_to_nsecs(steal)); + avg_steal += steal; + } + S390_lowcore.avg_steal_timer = avg_steal; diff --git a/patches.suse/sched-fair-Fix-wrong-cpu-selecting-from-isolated-dom.patch b/patches.suse/sched-fair-Fix-wrong-cpu-selecting-from-isolated-dom.patch new file mode 100644 index 0000000..dbed3fb --- /dev/null +++ b/patches.suse/sched-fair-Fix-wrong-cpu-selecting-from-isolated-dom.patch @@ -0,0 +1,47 @@ +From df3cb4ea1fb63ff326488efd671ba3c39034255e Mon Sep 17 00:00:00 2001 +From: Xunlei Pang +Date: Thu, 24 Sep 2020 14:48:47 +0800 +Subject: [PATCH] sched/fair: Fix wrong cpu selecting from isolated domain +Git-commit: df3cb4ea1fb63ff326488efd671ba3c39034255e +Patch-mainline: v5.10-rc1 +References: git-fixes + +We've met problems that occasionally tasks with full cpumask +(e.g. by putting it into a cpuset or setting to full affinity) +were migrated to our isolated cpus in production environment. + +After some analysis, we found that it is due to the current +select_idle_smt() not considering the sched_domain mask. + +Steps to reproduce on my 31-CPU hyperthreads machine: +1. with boot parameter: "isolcpus=domain,2-31" + (thread lists: 0,16 and 1,17) +2. cgcreate -g cpu:test; cgexec -g cpu:test "test_threads" +3. some threads will be migrated to the isolated cpu16~17. + +Fix it by checking the valid domain mask in select_idle_smt(). + +Fixes: 10e2f1acd010 ("sched/core: Rewrite and improve select_idle_siblings()) +Reported-by: Wetp Zhang +Signed-off-by: Xunlei Pang +Signed-off-by: Peter Zijlstra (Intel) +Reviewed-by: Jiang Biao +Reviewed-by: Vincent Guittot +Link: https://lkml.kernel.org/r/1600930127-76857-1-git-send-email-xlpang@linux.alibaba.com +Signed-off-by: Frederic Weisbecker +--- + kernel/sched/fair.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/kernel/sched/fair.c ++++ b/kernel/sched/fair.c +@@ -6327,7 +6327,8 @@ static int select_idle_smt(struct task_s + return -1; + + for_each_cpu(cpu, cpu_smt_mask(target)) { +- if (!cpumask_test_cpu(cpu, &p->cpus_allowed)) ++ if (!cpumask_test_cpu(cpu, &p->cpus_allowed) || ++ !cpumask_test_cpu(cpu, sched_domain_span(sd))) + continue; + if (idle_cpu(cpu)) + return cpu; diff --git a/patches.suse/sched-vtime-Fix-guest-system-mis-accounting-on-task-.patch b/patches.suse/sched-vtime-Fix-guest-system-mis-accounting-on-task-.patch new file mode 100644 index 0000000..fd1df15 --- /dev/null +++ b/patches.suse/sched-vtime-Fix-guest-system-mis-accounting-on-task-.patch @@ -0,0 +1,78 @@ +From 68e7a4d66b0ce04bf18ff2ffded5596ab3618585 Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 25 Sep 2019 23:42:42 +0200 +Subject: [PATCH] sched/vtime: Fix guest/system mis-accounting on task switch +Git-commit: 68e7a4d66b0ce04bf18ff2ffded5596ab3618585 +Patch-mainline: v5.4-rc3 +References: git-fixes + +vtime_account_system() assumes that the target task to account cputime +to is always the current task. This is most often true indeed except on +task switch where we call: + + vtime_common_task_switch(prev) + vtime_account_system(prev) + +Here prev is the scheduling-out task where we account the cputime to. It +doesn't match current that is already the scheduling-in task at this +stage of the context switch. + +So we end up checking the wrong task flags to determine if we are +accounting guest or system time to the previous task. + +As a result the wrong task is used to check if the target is running in +guest mode. We may then spuriously account or leak either system or +guest time on task switch. + +Fix this assumption and also turn vtime_guest_enter/exit() to use the +task passed in parameter as well to avoid future similar issues. + +Signed-off-by: Frederic Weisbecker +Signed-off-by: Peter Zijlstra (Intel) +Cc: Linus Torvalds +Cc: Peter Zijlstra +Cc: Rik van Riel +Cc: Thomas Gleixner +Cc: Wanpeng Li +Fixes: 2a42eb9594a1 ("sched/cputime: Accumulate vtime on top of nsec clocksource") +Link: https://lkml.kernel.org/r/20190925214242.21873-1-frederic@kernel.org +Signed-off-by: Ingo Molnar +Signed-off-by: Frederic Weisbecker +--- + kernel/sched/cputime.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c +index 2305ce89a26c..46ed4e1383e2 100644 +--- a/kernel/sched/cputime.c ++++ b/kernel/sched/cputime.c +@@ -740,7 +740,7 @@ void vtime_account_system(struct task_struct *tsk) + + write_seqcount_begin(&vtime->seqcount); + /* We might have scheduled out from guest path */ +- if (current->flags & PF_VCPU) ++ if (tsk->flags & PF_VCPU) + vtime_account_guest(tsk, vtime); + else + __vtime_account_system(tsk, vtime); +@@ -783,7 +783,7 @@ void vtime_guest_enter(struct task_struct *tsk) + */ + write_seqcount_begin(&vtime->seqcount); + __vtime_account_system(tsk, vtime); +- current->flags |= PF_VCPU; ++ tsk->flags |= PF_VCPU; + write_seqcount_end(&vtime->seqcount); + } + EXPORT_SYMBOL_GPL(vtime_guest_enter); +@@ -794,7 +794,7 @@ void vtime_guest_exit(struct task_struct *tsk) + + write_seqcount_begin(&vtime->seqcount); + vtime_account_guest(tsk, vtime); +- current->flags &= ~PF_VCPU; ++ tsk->flags &= ~PF_VCPU; + write_seqcount_end(&vtime->seqcount); + } + EXPORT_SYMBOL_GPL(vtime_guest_exit); +-- +2.25.1 + diff --git a/patches.suse/staging-comedi-addi_apci_1032-Fix-endian-problem-for.patch b/patches.suse/staging-comedi-addi_apci_1032-Fix-endian-problem-for.patch new file mode 100644 index 0000000..c7e0385 --- /dev/null +++ b/patches.suse/staging-comedi-addi_apci_1032-Fix-endian-problem-for.patch @@ -0,0 +1,51 @@ +From 25317f428a78fde71b2bf3f24d05850f08a73a52 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 23 Feb 2021 14:30:42 +0000 +Subject: [PATCH] staging: comedi: addi_apci_1032: Fix endian problem for COS sample +Git-commit: 25317f428a78fde71b2bf3f24d05850f08a73a52 +Patch-mainline: v5.12-rc3 +References: git-fixes + +The Change-Of-State (COS) subdevice supports Comedi asynchronous +commands to read 16-bit change-of-state values. However, the interrupt +handler is calling `comedi_buf_write_samples()` with the address of a +32-bit integer `&s->state`. On bigendian architectures, it will copy 2 +bytes from the wrong end of the 32-bit integer. Fix it by transferring +the value via a 16-bit integer. + +Fixes: 6bb45f2b0c86 ("staging: comedi: addi_apci_1032: use comedi_buf_write_samples()") +Cc: # 3.19+ +Signed-off-by: Ian Abbott +Link: https://lore.kernel.org/r/20210223143055.257402-2-abbotti@mev.co.uk +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + drivers/staging/comedi/drivers/addi_apci_1032.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c +index 35b75f0c9200..81a246fbcc01 100644 +--- a/drivers/staging/comedi/drivers/addi_apci_1032.c ++++ b/drivers/staging/comedi/drivers/addi_apci_1032.c +@@ -260,6 +260,7 @@ static irqreturn_t apci1032_interrupt(int irq, void *d) + struct apci1032_private *devpriv = dev->private; + struct comedi_subdevice *s = dev->read_subdev; + unsigned int ctrl; ++ unsigned short val; + + /* check interrupt is from this device */ + if ((inl(devpriv->amcc_iobase + AMCC_OP_REG_INTCSR) & +@@ -275,7 +276,8 @@ static irqreturn_t apci1032_interrupt(int irq, void *d) + outl(ctrl & ~APCI1032_CTRL_INT_ENA, dev->iobase + APCI1032_CTRL_REG); + + s->state = inl(dev->iobase + APCI1032_STATUS_REG) & 0xffff; +- comedi_buf_write_samples(s, &s->state, 1); ++ val = s->state; ++ comedi_buf_write_samples(s, &val, 1); + comedi_handle_events(dev, s); + + /* enable the interrupt */ +-- +2.26.2 + diff --git a/patches.suse/staging-comedi-addi_apci_1500-Fix-endian-problem-for.patch b/patches.suse/staging-comedi-addi_apci_1500-Fix-endian-problem-for.patch new file mode 100644 index 0000000..97b95cc --- /dev/null +++ b/patches.suse/staging-comedi-addi_apci_1500-Fix-endian-problem-for.patch @@ -0,0 +1,66 @@ +From ac0bbf55ed3be75fde1f8907e91ecd2fd589bde3 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 23 Feb 2021 14:30:43 +0000 +Subject: [PATCH] staging: comedi: addi_apci_1500: Fix endian problem for command sample +Git-commit: ac0bbf55ed3be75fde1f8907e91ecd2fd589bde3 +Patch-mainline: v5.12-rc3 +References: git-fixes + +The digital input subdevice supports Comedi asynchronous commands that +read interrupt status information. This uses 16-bit Comedi samples (of +which only the bottom 8 bits contain status information). However, the +interrupt handler is calling `comedi_buf_write_samples()` with the +address of a 32-bit variable `unsigned int status`. On a bigendian +machine, this will copy 2 bytes from the wrong end of the variable. Fix +it by changing the type of the variable to `unsigned short`. + +Fixes: a8c66b684efa ("staging: comedi: addi_apci_1500: rewrite the subdevice support functions") +Cc: #4.0+ +Signed-off-by: Ian Abbott +Link: https://lore.kernel.org/r/20210223143055.257402-3-abbotti@mev.co.uk +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + .../staging/comedi/drivers/addi_apci_1500.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c +index 11efb21555e3..b04c15dcfb57 100644 +--- a/drivers/staging/comedi/drivers/addi_apci_1500.c ++++ b/drivers/staging/comedi/drivers/addi_apci_1500.c +@@ -208,7 +208,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d) + struct comedi_device *dev = d; + struct apci1500_private *devpriv = dev->private; + struct comedi_subdevice *s = dev->read_subdev; +- unsigned int status = 0; ++ unsigned short status = 0; + unsigned int val; + + val = inl(devpriv->amcc + AMCC_OP_REG_INTCSR); +@@ -238,14 +238,14 @@ static irqreturn_t apci1500_interrupt(int irq, void *d) + * + * Mask Meaning + * ---------- ------------------------------------------ +- * 0x00000001 Event 1 has occurred +- * 0x00000010 Event 2 has occurred +- * 0x00000100 Counter/timer 1 has run down (not implemented) +- * 0x00001000 Counter/timer 2 has run down (not implemented) +- * 0x00010000 Counter 3 has run down (not implemented) +- * 0x00100000 Watchdog has run down (not implemented) +- * 0x01000000 Voltage error +- * 0x10000000 Short-circuit error ++ * 0b00000001 Event 1 has occurred ++ * 0b00000010 Event 2 has occurred ++ * 0b00000100 Counter/timer 1 has run down (not implemented) ++ * 0b00001000 Counter/timer 2 has run down (not implemented) ++ * 0b00010000 Counter 3 has run down (not implemented) ++ * 0b00100000 Watchdog has run down (not implemented) ++ * 0b01000000 Voltage error ++ * 0b10000000 Short-circuit error + */ + comedi_buf_write_samples(s, &status, 1); + comedi_handle_events(dev, s); +-- +2.26.2 + diff --git a/patches.suse/staging-comedi-adv_pci1710-Fix-endian-problem-for-AI.patch b/patches.suse/staging-comedi-adv_pci1710-Fix-endian-problem-for-AI.patch new file mode 100644 index 0000000..3929b54 --- /dev/null +++ b/patches.suse/staging-comedi-adv_pci1710-Fix-endian-problem-for-AI.patch @@ -0,0 +1,78 @@ +From b2e78630f733a76508b53ba680528ca39c890e82 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 23 Feb 2021 14:30:44 +0000 +Subject: [PATCH] staging: comedi: adv_pci1710: Fix endian problem for AI command data +Git-commit: b2e78630f733a76508b53ba680528ca39c890e82 +Patch-mainline: v5.12-rc3 +References: git-fixes + +The analog input subdevice supports Comedi asynchronous commands that +use Comedi's 16-bit sample format. However, the calls to +`comedi_buf_write_samples()` are passing the address of a 32-bit integer +variable. On bigendian machines, this will copy 2 bytes from the wrong +end of the 32-bit value. Fix it by changing the type of the variables +holding the sample value to `unsigned short`. The type of the `val` +parameter of `pci1710_ai_read_sample()` is changed to `unsigned short *` +accordingly. The type of the `val` variable in `pci1710_ai_insn_read()` +is also changed to `unsigned short` since its address is passed to +`pci1710_ai_read_sample()`. + +Fixes: a9c3a015c12f ("staging: comedi: adv_pci1710: use comedi_buf_write_samples()") +Cc: # 4.0+ +Signed-off-by: Ian Abbott +Link: https://lore.kernel.org/r/20210223143055.257402-4-abbotti@mev.co.uk +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + drivers/staging/comedi/drivers/adv_pci1710.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c +index 692893c7e5c3..090607760be6 100644 +--- a/drivers/staging/comedi/drivers/adv_pci1710.c ++++ b/drivers/staging/comedi/drivers/adv_pci1710.c +@@ -300,11 +300,11 @@ static int pci1710_ai_eoc(struct comedi_device *dev, + static int pci1710_ai_read_sample(struct comedi_device *dev, + struct comedi_subdevice *s, + unsigned int cur_chan, +- unsigned int *val) ++ unsigned short *val) + { + const struct boardtype *board = dev->board_ptr; + struct pci1710_private *devpriv = dev->private; +- unsigned int sample; ++ unsigned short sample; + unsigned int chan; + + sample = inw(dev->iobase + PCI171X_AD_DATA_REG); +@@ -345,7 +345,7 @@ static int pci1710_ai_insn_read(struct comedi_device *dev, + pci1710_ai_setup_chanlist(dev, s, &insn->chanspec, 1, 1); + + for (i = 0; i < insn->n; i++) { +- unsigned int val; ++ unsigned short val; + + /* start conversion */ + outw(0, dev->iobase + PCI171X_SOFTTRG_REG); +@@ -395,7 +395,7 @@ static void pci1710_handle_every_sample(struct comedi_device *dev, + { + struct comedi_cmd *cmd = &s->async->cmd; + unsigned int status; +- unsigned int val; ++ unsigned short val; + int ret; + + status = inw(dev->iobase + PCI171X_STATUS_REG); +@@ -455,7 +455,7 @@ static void pci1710_handle_fifo(struct comedi_device *dev, + } + + for (i = 0; i < devpriv->max_samples; i++) { +- unsigned int val; ++ unsigned short val; + int ret; + + ret = pci1710_ai_read_sample(dev, s, s->async->cur_chan, &val); +-- +2.26.2 + diff --git a/patches.suse/staging-comedi-das6402-Fix-endian-problem-for-AI-com.patch b/patches.suse/staging-comedi-das6402-Fix-endian-problem-for-AI-com.patch new file mode 100644 index 0000000..8383995 --- /dev/null +++ b/patches.suse/staging-comedi-das6402-Fix-endian-problem-for-AI-com.patch @@ -0,0 +1,42 @@ +From 1c0f20b78781b9ca50dc3ecfd396d0db5b141890 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 23 Feb 2021 14:30:45 +0000 +Subject: [PATCH] staging: comedi: das6402: Fix endian problem for AI command data +Git-commit: 1c0f20b78781b9ca50dc3ecfd396d0db5b141890 +Patch-mainline: v5.12-rc3 +References: git-fixes + +The analog input subdevice supports Comedi asynchronous commands that +use Comedi's 16-bit sample format. However, the call to +`comedi_buf_write_samples()` is passing the address of a 32-bit integer +variable. On bigendian machines, this will copy 2 bytes from the wrong +end of the 32-bit value. Fix it by changing the type of the variable +holding the sample value to `unsigned short`. + +Fixes: d1d24cb65ee3 ("staging: comedi: das6402: read analog input samples in interrupt handler") +Cc: # 3.19+ +Signed-off-by: Ian Abbott +Link: https://lore.kernel.org/r/20210223143055.257402-5-abbotti@mev.co.uk +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + drivers/staging/comedi/drivers/das6402.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/comedi/drivers/das6402.c b/drivers/staging/comedi/drivers/das6402.c +index 04e224f8b779..96f4107b8054 100644 +--- a/drivers/staging/comedi/drivers/das6402.c ++++ b/drivers/staging/comedi/drivers/das6402.c +@@ -186,7 +186,7 @@ static irqreturn_t das6402_interrupt(int irq, void *d) + if (status & DAS6402_STATUS_FFULL) { + async->events |= COMEDI_CB_OVERFLOW; + } else if (status & DAS6402_STATUS_FFNE) { +- unsigned int val; ++ unsigned short val; + + val = das6402_ai_read_sample(dev, s); + comedi_buf_write_samples(s, &val, 1); +-- +2.26.2 + diff --git a/patches.suse/staging-comedi-das800-Fix-endian-problem-for-AI-comm.patch b/patches.suse/staging-comedi-das800-Fix-endian-problem-for-AI-comm.patch new file mode 100644 index 0000000..145ef5a --- /dev/null +++ b/patches.suse/staging-comedi-das800-Fix-endian-problem-for-AI-comm.patch @@ -0,0 +1,42 @@ +From 459b1e8c8fe97fcba0bd1b623471713dce2c5eaf Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 23 Feb 2021 14:30:46 +0000 +Subject: [PATCH] staging: comedi: das800: Fix endian problem for AI command data +Git-commit: 459b1e8c8fe97fcba0bd1b623471713dce2c5eaf +Patch-mainline: v5.12-rc3 +References: git-fixes + +The analog input subdevice supports Comedi asynchronous commands that +use Comedi's 16-bit sample format. However, the call to +`comedi_buf_write_samples()` is passing the address of a 32-bit integer +variable. On bigendian machines, this will copy 2 bytes from the wrong +end of the 32-bit value. Fix it by changing the type of the variable +holding the sample value to `unsigned short`. + +Fixes: ad9eb43c93d8 ("staging: comedi: das800: use comedi_buf_write_samples()") +Cc: # 3.19+ +Signed-off-by: Ian Abbott +Link: https://lore.kernel.org/r/20210223143055.257402-6-abbotti@mev.co.uk +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + drivers/staging/comedi/drivers/das800.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c +index 4ea100ff6930..2881808d6606 100644 +--- a/drivers/staging/comedi/drivers/das800.c ++++ b/drivers/staging/comedi/drivers/das800.c +@@ -427,7 +427,7 @@ static irqreturn_t das800_interrupt(int irq, void *d) + struct comedi_cmd *cmd; + unsigned long irq_flags; + unsigned int status; +- unsigned int val; ++ unsigned short val; + bool fifo_empty; + bool fifo_overflow; + int i; +-- +2.26.2 + diff --git a/patches.suse/staging-comedi-dmm32at-Fix-endian-problem-for-AI-com.patch b/patches.suse/staging-comedi-dmm32at-Fix-endian-problem-for-AI-com.patch new file mode 100644 index 0000000..f1dcf6a --- /dev/null +++ b/patches.suse/staging-comedi-dmm32at-Fix-endian-problem-for-AI-com.patch @@ -0,0 +1,47 @@ +From 54999c0d94b3c26625f896f8e3460bc029821578 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 23 Feb 2021 14:30:47 +0000 +Subject: [PATCH] staging: comedi: dmm32at: Fix endian problem for AI command data +Git-commit: 54999c0d94b3c26625f896f8e3460bc029821578 +Patch-mainline: v5.12-rc3 +References: git-fixes + +The analog input subdevice supports Comedi asynchronous commands that +use Comedi's 16-bit sample format. However, the call to +`comedi_buf_write_samples()` is passing the address of a 32-bit integer +variable. On bigendian machines, this will copy 2 bytes from the wrong +end of the 32-bit value. Fix it by changing the type of the variable +holding the sample value to `unsigned short`. + +[note: the bug was introduced in commit 1700529b24cc ("staging: comedi: +Dmm32at: use comedi_buf_write_samples()") but the patch applies better +to the later (but in the same kernel release) commit 0c0eadadcbe6e +("staging: comedi: dmm32at: introduce dmm32_ai_get_sample()").] + +Fixes: 0c0eadadcbe6e ("staging: comedi: dmm32at: introduce dmm32_ai_get_sample()") +Cc: # 3.19+ +Signed-off-by: Ian Abbott +Link: https://lore.kernel.org/r/20210223143055.257402-7-abbotti@mev.co.uk +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + drivers/staging/comedi/drivers/dmm32at.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c +index 17e6018918bb..56682f01242f 100644 +--- a/drivers/staging/comedi/drivers/dmm32at.c ++++ b/drivers/staging/comedi/drivers/dmm32at.c +@@ -404,7 +404,7 @@ static irqreturn_t dmm32at_isr(int irq, void *d) + { + struct comedi_device *dev = d; + unsigned char intstat; +- unsigned int val; ++ unsigned short val; + int i; + + if (!dev->attached) { +-- +2.26.2 + diff --git a/patches.suse/staging-comedi-me4000-Fix-endian-problem-for-AI-comm.patch b/patches.suse/staging-comedi-me4000-Fix-endian-problem-for-AI-comm.patch new file mode 100644 index 0000000..b56a11d --- /dev/null +++ b/patches.suse/staging-comedi-me4000-Fix-endian-problem-for-AI-comm.patch @@ -0,0 +1,42 @@ +From b39dfcced399d31e7c4b7341693b18e01c8f655e Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 23 Feb 2021 14:30:48 +0000 +Subject: [PATCH] staging: comedi: me4000: Fix endian problem for AI command data +Git-commit: b39dfcced399d31e7c4b7341693b18e01c8f655e +Patch-mainline: v5.12-rc3 +References: git-fixes + +The analog input subdevice supports Comedi asynchronous commands that +use Comedi's 16-bit sample format. However, the calls to +`comedi_buf_write_samples()` are passing the address of a 32-bit integer +variable. On bigendian machines, this will copy 2 bytes from the wrong +end of the 32-bit value. Fix it by changing the type of the variable +holding the sample value to `unsigned short`. + +Fixes: de88924f67d1 ("staging: comedi: me4000: use comedi_buf_write_samples()") +Cc: # 3.19+ +Signed-off-by: Ian Abbott +Link: https://lore.kernel.org/r/20210223143055.257402-8-abbotti@mev.co.uk +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + drivers/staging/comedi/drivers/me4000.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c +index 726e40dc17b6..0d3d4cafce2e 100644 +--- a/drivers/staging/comedi/drivers/me4000.c ++++ b/drivers/staging/comedi/drivers/me4000.c +@@ -924,7 +924,7 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id) + struct comedi_subdevice *s = dev->read_subdev; + int i; + int c = 0; +- unsigned int lval; ++ unsigned short lval; + + if (!dev->attached) + return IRQ_NONE; +-- +2.26.2 + diff --git a/patches.suse/staging-comedi-pcl711-Fix-endian-problem-for-AI-comm.patch b/patches.suse/staging-comedi-pcl711-Fix-endian-problem-for-AI-comm.patch new file mode 100644 index 0000000..9ceba6c --- /dev/null +++ b/patches.suse/staging-comedi-pcl711-Fix-endian-problem-for-AI-comm.patch @@ -0,0 +1,42 @@ +From a084303a645896e834883f2c5170d044410dfdb3 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 23 Feb 2021 14:30:49 +0000 +Subject: [PATCH] staging: comedi: pcl711: Fix endian problem for AI command data +Git-commit: a084303a645896e834883f2c5170d044410dfdb3 +Patch-mainline: v5.12-rc3 +References: git-fixes + +The analog input subdevice supports Comedi asynchronous commands that +use Comedi's 16-bit sample format. However, the call to +`comedi_buf_write_samples()` is passing the address of a 32-bit integer +variable. On bigendian machines, this will copy 2 bytes from the wrong +end of the 32-bit value. Fix it by changing the type of the variable +holding the sample value to `unsigned short`. + +Fixes: 1f44c034de2e ("staging: comedi: pcl711: use comedi_buf_write_samples()") +Cc: # 3.19+ +Signed-off-by: Ian Abbott +Link: https://lore.kernel.org/r/20210223143055.257402-9-abbotti@mev.co.uk +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + drivers/staging/comedi/drivers/pcl711.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/comedi/drivers/pcl711.c b/drivers/staging/comedi/drivers/pcl711.c +index 2dbf69e30965..bd6f42fe9e3c 100644 +--- a/drivers/staging/comedi/drivers/pcl711.c ++++ b/drivers/staging/comedi/drivers/pcl711.c +@@ -184,7 +184,7 @@ static irqreturn_t pcl711_interrupt(int irq, void *d) + struct comedi_device *dev = d; + struct comedi_subdevice *s = dev->read_subdev; + struct comedi_cmd *cmd = &s->async->cmd; +- unsigned int data; ++ unsigned short data; + + if (!dev->attached) { + dev_err(dev->class_dev, "spurious interrupt\n"); +-- +2.26.2 + diff --git a/patches.suse/staging-comedi-pcl818-Fix-endian-problem-for-AI-comm.patch b/patches.suse/staging-comedi-pcl818-Fix-endian-problem-for-AI-comm.patch new file mode 100644 index 0000000..8cdc274 --- /dev/null +++ b/patches.suse/staging-comedi-pcl818-Fix-endian-problem-for-AI-comm.patch @@ -0,0 +1,47 @@ +From 148e34fd33d53740642db523724226de14ee5281 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Tue, 23 Feb 2021 14:30:50 +0000 +Subject: [PATCH] staging: comedi: pcl818: Fix endian problem for AI command data +Git-commit: 148e34fd33d53740642db523724226de14ee5281 +Patch-mainline: v5.12-rc3 +References: git-fixes + +The analog input subdevice supports Comedi asynchronous commands that +use Comedi's 16-bit sample format. However, the call to +`comedi_buf_write_samples()` is passing the address of a 32-bit integer +parameter. On bigendian machines, this will copy 2 bytes from the wrong +end of the 32-bit value. Fix it by changing the type of the parameter +holding the sample value to `unsigned short`. + +[note: the bug was introduced in commit edf4537bcbf5 ("staging: comedi: +Pcl818: use comedi_buf_write_samples()") but the patch applies better to +commit d615416de615 ("staging: comedi: pcl818: introduce +pcl818_ai_write_sample()").] + +Fixes: d615416de615 ("staging: comedi: pcl818: introduce pcl818_ai_write_sample()") +Cc: # 4.0+ +Signed-off-by: Ian Abbott +Link: https://lore.kernel.org/r/20210223143055.257402-10-abbotti@mev.co.uk +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + drivers/staging/comedi/drivers/pcl818.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c +index 63e3011158f2..f4b4a686c710 100644 +--- a/drivers/staging/comedi/drivers/pcl818.c ++++ b/drivers/staging/comedi/drivers/pcl818.c +@@ -423,7 +423,7 @@ static int pcl818_ai_eoc(struct comedi_device *dev, + + static bool pcl818_ai_write_sample(struct comedi_device *dev, + struct comedi_subdevice *s, +- unsigned int chan, unsigned int val) ++ unsigned int chan, unsigned short val) + { + struct pcl818_private *devpriv = dev->private; + struct comedi_cmd *cmd = &s->async->cmd; +-- +2.26.2 + diff --git a/patches.suse/usb-gadget-f_uac2-always-increase-endpoint-max_packe.patch b/patches.suse/usb-gadget-f_uac2-always-increase-endpoint-max_packe.patch new file mode 100644 index 0000000..aeb2180 --- /dev/null +++ b/patches.suse/usb-gadget-f_uac2-always-increase-endpoint-max_packe.patch @@ -0,0 +1,54 @@ +From 789ea77310f0200c84002884ffd628e2baf3ad8a Mon Sep 17 00:00:00 2001 +From: Ruslan Bilovol +Date: Mon, 1 Mar 2021 13:49:31 +0200 +Subject: [PATCH] usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot +Git-commit: 789ea77310f0200c84002884ffd628e2baf3ad8a +Patch-mainline: v5.12-rc3 +References: git-fixes + +As per UAC2 Audio Data Formats spec (2.3.1.1 USB Packets), +if the sampling rate is a constant, the allowable variation +of number of audio slots per virtual frame is +/- 1 audio slot. + +It means that endpoint should be able to accept/send +1 audio +slot. + +Previous endpoint max_packet_size calculation code +was adding sometimes +1 audio slot due to DIV_ROUND_UP +behaviour which was rounding up to closest integer. +However this doesn't work if the numbers are divisible. + +It had no any impact with Linux hosts which ignore +this issue, but in case of more strict Windows it +caused rejected enumeration + +Thus always add +1 audio slot to endpoint's max packet size + +Fixes: 913e4a90b6f9 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth") +Cc: Peter Chen +Cc: #v4.3+ +Signed-off-by: Ruslan Bilovol +Link: https://lore.kernel.org/r/1614599375-8803-2-git-send-email-ruslan.bilovol@gmail.com +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + drivers/usb/gadget/function/f_uac2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c +index 5d960b6603b6..6f03e944e0e3 100644 +--- a/drivers/usb/gadget/function/f_uac2.c ++++ b/drivers/usb/gadget/function/f_uac2.c +@@ -478,7 +478,7 @@ static int set_ep_max_packet_size(const struct f_uac2_opts *uac2_opts, + } + + max_size_bw = num_channels(chmask) * ssize * +- DIV_ROUND_UP(srate, factor / (1 << (ep_desc->bInterval - 1))); ++ ((srate / (factor / (1 << (ep_desc->bInterval - 1)))) + 1); + ep_desc->wMaxPacketSize = cpu_to_le16(min_t(u16, max_size_bw, + max_size_ep)); + +-- +2.26.2 + diff --git a/series.conf b/series.conf index 3834698..9909d8f 100644 --- a/series.conf +++ b/series.conf @@ -52502,6 +52502,7 @@ patches.suse/x86-asm-fix-mwaitx-c-state-hint-value.patch patches.suse/efivar-ssdt-Don-t-iterate-over-EFI-vars-if-no-SSDT-o.patch patches.suse/perf-x86-amd-change-fix-nmi-latency-mitigation-to-use-a-timestamp.patch + patches.suse/sched-vtime-Fix-guest-system-mis-accounting-on-task-.patch patches.suse/0001-USB-microtek-fix-info-leak-at-probe.patch patches.suse/0001-USB-adutux-fix-use-after-free-on-disconnect.patch patches.suse/0001-USB-adutux-fix-NULL-derefs-on-disconnect.patch @@ -54009,6 +54010,8 @@ patches.suse/msft-hv-2006-clocksource-drivers-hyper-v-Set-TSC-clocksource-as-d.patch patches.suse/irqdomain-Fix-a-memory-leak-in-irq_domain_push_irq.patch patches.suse/x86-cpu-update-cached-hle-state-on-write-to-tsx_ctrl_cpuid_clear + patches.suse/rcu-Fix-missed-wakeup-of-exp_wq-waiters.patch + patches.suse/rcu-Allow-only-one-expedited-GP-to-run-concurrently-.patch patches.suse/efi-x86-Map-the-entire-EFI-vendor-string-before-copy.patch patches.suse/efi-x86-Don-t-panic-or-BUG-on-non-critical-error-con.patch patches.suse/perf-x86-amd-constrain-large-increment-per-cycle-events.patch @@ -56088,6 +56091,7 @@ patches.suse/SMB3-Honor-lease-disabling-for-multiuser-mounts.patch patches.suse/SMB3-Honor-handletimeout-flag-for-multiuser-mounts.patch patches.suse/SMB3-Honor-posix-flag-for-multiuser-mounts.patch + patches.suse/powerpc-mm-pkeys-Make-pkey-access-check-work-on-exec.patch patches.suse/i2c-algo-pca-Add-0x78-as-SCL-stuck-low-status-for-PC.patch patches.suse/i2c-eg20t-Load-module-automatically-if-ID-matches.patch patches.suse/i2c-mlxcpld-check-correct-size-of-maximum-RECV_LEN-p.patch @@ -56965,6 +56969,7 @@ patches.suse/vmxnet3-fix-cksum-offload-issues-for-non-udp-tunnels.patch patches.suse/bonding-set-dev-needed_headroom-in-bond_setup_by_sla.patch patches.suse/team-set-dev-needed_headroom-in-team_setup_by_port.patch + patches.suse/net-usb-ax88179_178a-fix-missing-stop-entry-in-drive.patch patches.suse/0002-net-introduce-helper-sendpage_ok-in-include-linux-ne.patch patches.suse/0003-net-add-WARN_ONCE-in-kernel_sendpage-for-improper-ze.patch patches.suse/0004-nvme-tcp-check-page-by-sendpage_ok-before-calling-ke.patch @@ -56993,6 +56998,7 @@ patches.suse/edac-i5100-fix-error-handling-order-in-i5100_init_one.patch patches.suse/x86-fpu-allow-multiple-bits-in-clearcpuid-parameter.patch patches.suse/x86-resctrl-remove-unused-struct-mbm_state-chunks_bw.patch + patches.suse/sched-fair-Fix-wrong-cpu-selecting-from-isolated-dom.patch patches.suse/efivarfs-Replace-invalid-slashes-with-exclamation-ma.patch patches.suse/perf-x86-amd-fix-sampling-large-increment-per-cycle-events.patch patches.suse/perf-x86-fix-n_pair-for-cancelled-txn.patch @@ -57229,6 +57235,7 @@ patches.suse/s390-bpf-fix-multiple-tail-calls patches.suse/ath9k-hif_usb-fix-race-condition-between-usb_get_urb.patch patches.suse/ath6kl-wmi-prevent-a-shift-wrapping-bug-in-ath6kl_wm.patch + patches.suse/Bluetooth-hci_uart-Cancel-init-work-before-unregiste.patch patches.suse/Bluetooth-Only-mark-socket-zapped-after-unlocking.patch patches.suse/Bluetooth-A2MP-Fix-not-initializing-all-members.patch patches.suse/Bluetooth-L2CAP-Fix-calling-sk_filter-on-non-socket-.patch @@ -58016,6 +58023,7 @@ patches.suse/wlcore-Fix-command-execute-failure-19-for-wl12xx.patch patches.suse/net-bridge-use-switchdev-for-port-flags-set-through-.patch patches.suse/Bluetooth-btqcomsmd-Fix-a-resource-leak-in-error-han.patch + patches.suse/Bluetooth-hci_uart-Fix-a-race-for-write_work-schedul.patch patches.suse/Bluetooth-Fix-initializing-response-id-after-clearin.patch patches.suse/Bluetooth-drop-HCI-device-reference-before-return.patch patches.suse/Bluetooth-Put-HCI-device-if-inquiry-procedure-interr.patch @@ -58149,16 +58157,19 @@ patches.suse/powerpc-pseries-Don-t-enforce-MSI-affinity-with-kdum.patch patches.suse/net-hns3-fix-query-vlan-mask-value-error-for-flow-di.patch patches.suse/net-hns3-fix-bug-when-calculating-the-TCAM-table-inf.patch + patches.suse/can-skb-can_skb_set_owner-fix-ref-counting-if-socket.patch patches.suse/ixgbe-fail-to-create-xfrm-offload-of-IPsec-tunnel-mo.patch patches.suse/net-usb-qmi_wwan-allow-qmimux-add-del-with-master-up.patch patches.suse/ibmvnic-always-store-valid-MAC-address.patch patches.suse/xsk-Remove-dangling-function-declaration-from-header.patch patches.suse/ibmvnic-remove-excessive-irqsave.patch + patches.suse/ethernet-alx-fix-order-of-calls-on-resume.patch patches.suse/s390-cio-return-efault-if-copy_to_user-fails-51c44bab.patch patches.suse/s390-crypto-return-efault-if-copy_to_user-fails.patch patches.suse/s390-cio-return-efault-if-copy_to_user-fails-d9c48a94.patch patches.suse/media-usbtv-Fix-deadlock-on-suspend.patch patches.suse/qxl-Fix-uninitialised-struct-field-head.surface_id.patch + patches.suse/drm-meson_drv-add-shutdown-function.patch patches.suse/xen-events-reset-affinity-of-2-level-event-when-tear.patch patches.suse/xen-events-don-t-unmask-an-event-channel-when-an-eoi.patch patches.suse/xen-events-avoid-handling-the-same-event-on-two-cpus.patch @@ -58166,15 +58177,32 @@ patches.suse/mmc-cqhci-fix-random-crash-when-remove-mmc-module-card.patch patches.suse/ALSA-hda-Drop-the-BATCH-workaround-for-AMD-controlle.patch patches.suse/block-rsxx-fix-error-return-code-of-rsxx_pci_probe.patch + patches.suse/usb-gadget-f_uac2-always-increase-endpoint-max_packe.patch patches.suse/usbip-fix-stub_dev-usbip_sockfd_store-races-leading-.patch patches.suse/usbip-fix-vhci_hcd-attach_store-races-leading-to-gpf.patch patches.suse/USB-serial-io_edgeport-fix-memory-leak-in-edge_start.patch patches.suse/staging-rtl8712-unterminated-string-leads-to-read-ov.patch patches.suse/staging-ks7010-prevent-buffer-overflow-in-ks_wlan_se.patch + patches.suse/staging-comedi-addi_apci_1032-Fix-endian-problem-for.patch + patches.suse/staging-comedi-addi_apci_1500-Fix-endian-problem-for.patch + patches.suse/staging-comedi-adv_pci1710-Fix-endian-problem-for-AI.patch + patches.suse/staging-comedi-das6402-Fix-endian-problem-for-AI-com.patch + patches.suse/staging-comedi-das800-Fix-endian-problem-for-AI-comm.patch + patches.suse/staging-comedi-dmm32at-Fix-endian-problem-for-AI-com.patch + patches.suse/staging-comedi-me4000-Fix-endian-problem-for-AI-comm.patch + patches.suse/staging-comedi-pcl711-Fix-endian-problem-for-AI-comm.patch + patches.suse/staging-comedi-pcl818-Fix-endian-problem-for-AI-comm.patch patches.suse/staging-rtl8192u-fix-ssid-overflow-in-r8192_wx_set_s.patch patches.suse/staging-rtl8188eu-prevent-ssid-overflow-in-rtw_wx_se.patch patches.suse/Revert-PM-runtime-Update-device-status-before-lettin.patch + patches.suse/s390-vtime-fix-increased-steal-time-accounting.patch patches.suse/PCI-rpadlpar-Fix-potential-drc_name-corruption-in-st.patch + patches.suse/firmware-efi-Fix-a-use-after-bug-in-efi_mem_reserve_.patch + patches.suse/iio-adc-qcom-spmi-vadc-add-default-scale-to-LR_MUX2_.patch + patches.suse/iio-hid-sensor-prox-Fix-scale-not-correct-issue.patch + patches.suse/iio-hid-sensor-humidity-Fix-alignment-issue-of-times.patch + patches.suse/iio-hid-sensor-temperature-Fix-issues-of-timestamp-c.patch + patches.suse/iio-gyro-mpu3050-Fix-error-handling-in-mpu3050_trigg.patch # dhowells/linux-fs keys-uefi patches.suse/0001-KEYS-Allow-unrestricted-boot-time-addition-of-keys-t.patch