Re: [PATCH] z3fold: fix retry mechanism in page reclaim

2019-09-08 Thread Vitaly Wool
On Sun, Sep 8, 2019 at 4:56 PM Maciej S. Szmigiero wrote: > > On 08.09.2019 15:29, Vitaly Wool wrote: > > 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

Re: [PATCH] z3fold: fix retry mechanism in page reclaim

2019-09-08 Thread Maciej S. Szmigiero
On 08.09.2019 15:29, Vitaly Wool wrote: > 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

[PATCH] z3fold: fix retry mechanism in page reclaim

2019-09-08 Thread Vitaly Wool
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