diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-08-25 19:56:27 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-08-25 19:56:27 +0300 |
commit | f47edb59bb4897a5d495139bb12e93cd3f0cbded (patch) | |
tree | 07e8381e1d08c2c7b027ae14a23a9492b7839c82 /kernel | |
parent | e67095fd2f727c35e510d831c588696f2138a1bb (diff) | |
parent | 00fb24a42a68b1ee0f6495993fe1be7124433dfb (diff) | |
download | linux-f47edb59bb4897a5d495139bb12e93cd3f0cbded.tar.xz |
Merge branch 'akpm' (patches from Andrew)
Mergr misc fixes from Andrew Morton:
"11 fixes"
Mostly VM fixes, one psi polling fix, and one parisc build fix.
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
mm/kasan: fix false positive invalid-free reports with CONFIG_KASAN_SW_TAGS=y
mm/zsmalloc.c: fix race condition in zs_destroy_pool
mm/zsmalloc.c: migration can leave pages in ZS_EMPTY indefinitely
mm, page_owner: handle THP splits correctly
userfaultfd_release: always remove uffd flags and clear vm_userfaultfd_ctx
psi: get poll_work to run when calling poll syscall next time
mm: memcontrol: flush percpu vmevents before releasing memcg
mm: memcontrol: flush percpu vmstats before releasing memcg
parisc: fix compilation errrors
mm, page_alloc: move_freepages should not examine struct page of reserved memory
mm/z3fold.c: fix race between migration and destruction
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/psi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index 23fbbcc414d5..6e52b67b420e 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -1131,7 +1131,15 @@ static void psi_trigger_destroy(struct kref *ref) * deadlock while waiting for psi_poll_work to acquire trigger_lock */ if (kworker_to_destroy) { + /* + * After the RCU grace period has expired, the worker + * can no longer be found through group->poll_kworker. + * But it might have been already scheduled before + * that - deschedule it cleanly before destroying it. + */ kthread_cancel_delayed_work_sync(&group->poll_work); + atomic_set(&group->poll_scheduled, 0); + kthread_destroy_worker(kworker_to_destroy); } kfree(t); |