diff options
author | Henry Burns <[email protected]> | 2019-08-13 15:37:25 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-08-13 16:06:52 -0700 |
commit | b997052bc3ac444a0bceab1093aff7ae71ed419e (patch) | |
tree | fc64a1aff3aa46681dfcedf31c46db09df140996 /lib/test_overflow.c | |
parent | 6051d3bd3b91e96c59e62b8be2dba1cc2b19ee40 (diff) |
mm/z3fold.c: fix z3fold_destroy_pool() race condition
The constraint from the zpool use of z3fold_destroy_pool() is there are
no outstanding handles to memory (so no active allocations), but it is
possible for there to be outstanding work on either of the two wqs in
the pool.
Calling z3fold_deregister_migration() before the workqueues are drained
means that there can be allocated pages referencing a freed inode,
causing any thread in compaction to be able to trip over the bad pointer
in PageMovable().
Link: http://lkml.kernel.org/r/[email protected]
Fixes: 1f862989b04a ("mm/z3fold.c: support page migration")
Signed-off-by: Henry Burns <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
Reviewed-by: Jonathan Adams <[email protected]>
Cc: Vitaly Vul <[email protected]>
Cc: Vitaly Wool <[email protected]>
Cc: David Howells <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Henry Burns <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions