summaryrefslogtreecommitdiff
path: root/Documentation/hwmon/nct6775.rst
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2020-09-14 07:52:19 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2020-09-16 05:24:37 +0300
commita665eec0a22e11cdde708c1c256a465ebe768047 (patch)
tree9ea3020de679fb7cfcdb00928539383ac8cb5c58 /Documentation/hwmon/nct6775.rst
parentbafb056ce27940c9994ea905336aa8f27b4f7275 (diff)
downloadlinux-a665eec0a22e11cdde708c1c256a465ebe768047.tar.xz
powerpc/64s/radix: Fix mm_cpumask trimming race vs kthread_use_mm
Commit 0cef77c7798a7 ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask") added a mechanism to trim the mm_cpumask of a process under certain conditions. One of the assumptions is that mm_users would not be incremented via a reference outside the process context with mmget_not_zero() then go on to kthread_use_mm() via that reference. That invariant was broken by io_uring code (see previous sparc64 fix), but I'll point Fixes: to the original powerpc commit because we are changing that assumption going forward, so this will make backports match up. Fix this by no longer relying on that assumption, but by having each CPU check the mm is not being used, and clearing their own bit from the mask only if it hasn't been switched-to by the time the IPI is processed. This relies on commit 38cf307c1f20 ("mm: fix kthread_use_mm() vs TLB invalidate") and ARCH_WANT_IRQS_OFF_ACTIVATE_MM to disable irqs over mm switch sequences. Fixes: 0cef77c7798a7 ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask") Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> Depends-on: 38cf307c1f20 ("mm: fix kthread_use_mm() vs TLB invalidate") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200914045219.3736466-5-npiggin@gmail.com
Diffstat (limited to 'Documentation/hwmon/nct6775.rst')
0 files changed, 0 insertions, 0 deletions