The patch titled Subject: mm/swap.c: workaround for_each_cpu() bug on UP kernel has been removed from the -mm tree. Its filename was mm-swapc-workaround-for_each_cpu-bug-on-up-kernel.patch This patch was dropped because an alternative patch was merged ------------------------------------------------------ From: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> Subject: mm/swap.c: workaround for_each_cpu() bug on UP kernel Since for_each_cpu(cpu, mask) added by commit 2d3854a37e8b767a ("cpumask: introduce new API, without changing anything") did not evaluate the mask argument if NR_CPUS == 1 due to CONFIG_SMP=n, lru_add_drain_all() is hitting WARN_ON() at __flush_work() added by commit 4d43d395fed12463 ("workqueue: Try to catch flush_work() without INIT_WORK().") by unconditionally calling flush_work() [1]. We should fix for_each_cpu() etc. but we need enough grace period for allowing people to test and fix unexpected behaviors including build failures. Therefore, this patch temporarily duplicates flush_work() for NR_CPUS == 1 case. This patch will be reverted after for_each_cpu() etc. are fixed. [1] https://lkml.kernel.org/r/18a30387-6aa5-6123-e67c-57579ecc3f38@xxxxxxxxxxxx Link: http://lkml.kernel.org/r/1549533189-9177-1-git-send-email-penguin-kernel@xxxxxxxxxxxxxxxxxxx Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> Reported-by: Guenter Roeck <linux@xxxxxxxxxxxx> Acked-by: Guenter Roeck <linux@xxxxxxxxxxxx> Reviewed by: William Kucharski <william.kucharski@xxxxxxxxxx> Cc: Chris Metcalf <chris.d.metcalf@xxxxxxxxx> Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/swap.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/mm/swap.c~mm-swapc-workaround-for_each_cpu-bug-on-up-kernel +++ a/mm/swap.c @@ -694,11 +694,16 @@ void lru_add_drain_all(void) INIT_WORK(work, lru_add_drain_per_cpu); queue_work_on(cpu, mm_percpu_wq, work); cpumask_set_cpu(cpu, &has_work); +#if NR_CPUS == 1 + flush_work(work); +#endif } } +#if NR_CPUS != 1 for_each_cpu(cpu, &has_work) flush_work(&per_cpu(lru_add_drain_work, cpu)); +#endif mutex_unlock(&lock); } _ Patches currently in -mm which might be from penguin-kernel@xxxxxxxxxxxxxxxxxxx are memcg-killed-threads-should-not-invoke-memcg-oom-killer.patch mmoom-dont-kill-global-init-via-memoryoomgroup.patch info-task-hung-in-generic_file_write_iter.patch info-task-hung-in-generic_file_write-fix.patch