commit | 3f9d2b5766aea06042630ac60b7316fd0cebf06f | [log] [tgz] |
---|---|---|
author | Vitaly Wool <[email protected]> | Mon Sep 23 15:33:02 2019 -0700 |
committer | Linus Torvalds <[email protected]> | Tue Sep 24 15:54:06 2019 -0700 |
tree | 297838e1dff9482bd655535ee918331a558c3038 | |
parent | 710ec38b0f633ab3e2581f07a73442d809e28ab0 [diff] |
z3fold: fix retry mechanism in page reclaim z3fold_page_reclaim()'s retry mechanism is broken: on a second iteration it will have zhdr from the first one so that zhdr is no longer in line with struct page. That leads to crashes when the system is stressed. Fix that by moving zhdr assignment up. While at it, protect against using already freed handles by using own local slots structure in z3fold_page_reclaim(). Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Vitaly Wool <[email protected]> Reported-by: Markus Linnala <[email protected]> Reported-by: Chris Murphy <[email protected]> Reported-by: Agustin Dall'Alba <[email protected]> Cc: "Maciej S. Szmigiero" <[email protected]> Cc: Shakeel Butt <[email protected]> Cc: Henry Burns <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>