Daniel Jordan <[email protected]> writes:

> On Tue, Feb 26, 2019 at 02:49:05PM +0800, Huang, Ying wrote:
>> Do you have time to take a look at this patch?
>
> Hi Ying, is this handling all places where swapoff might cause a task to read
> invalid data?  For example, why don't other reads of swap_map (for example
> swp_swapcount, page_swapcount, swap_entry_free) need to be synchronized like
> this?

I have checked these places.  They are safe because there are some locks
(like page lock, page table lock, etc.) held to prevent swapoff.  I
found another place in the kernel that is unsafe: the mincore.  I have a
patch for that and will post it (in fact again) after this one is
merged.

Best Regards,
Huang, Ying

Reply via email to