Re: [PATCH] mm, swap: Fix a race in free_swap_and_cache()

2017-03-04 Thread huang ying
Hi, Andrew, Sorry, I clicked the wrong button in my mail client, so forgot Ccing mailing list. Sorry for duplicated mail. On Sat, Mar 4, 2017 at 6:43 AM, Andrew Morton wrote: > On Wed, 1 Mar 2017 22:38:09 +0800 "Huang, Ying" wrote: > >> Before using cluster lock in free_swap_and_cache(), the

Re: [PATCH] mm, swap: Fix a race in free_swap_and_cache()

2017-03-03 Thread Andrew Morton
On Wed, 1 Mar 2017 22:38:09 +0800 "Huang, Ying" wrote: > Before using cluster lock in free_swap_and_cache(), the > swap_info_struct->lock will be held during freeing the swap entry and > acquiring page lock, so the page swap count will not change when > testing page information later. But after

[PATCH] mm, swap: Fix a race in free_swap_and_cache()

2017-03-01 Thread Huang, Ying
From: Huang Ying Before using cluster lock in free_swap_and_cache(), the swap_info_struct->lock will be held during freeing the swap entry and acquiring page lock, so the page swap count will not change when testing page information later. But after using cluster lock, the cluster lock (or swap_