Re: [PATCH 2/8] mm/swap: fix race on swap_info reuse between swapoff and swapon

2014-02-03 Thread Hugh Dickins
On Mon, 3 Feb 2014, Andrew Morton wrote: > On Mon, 3 Feb 2014 15:23:40 -0800 Andrew Morton > wrote: > > On Mon, 27 Jan 2014 18:03:04 +0800 Weijie Yang > > wrote: > > > > > swapoff clear swap_info's SWP_USED flag prematurely and free its resources > > > after that. A concurrent swapon will

Re: [PATCH 2/8] mm/swap: fix race on swap_info reuse between swapoff and swapon

2014-02-03 Thread Andrew Morton
On Mon, 3 Feb 2014 15:23:40 -0800 Andrew Morton wrote: > On Mon, 27 Jan 2014 18:03:04 +0800 Weijie Yang > wrote: > > > swapoff clear swap_info's SWP_USED flag prematurely and free its resources > > after that. A concurrent swapon will reuse this swap_info while its previous > > resources are

Re: [PATCH 2/8] mm/swap: fix race on swap_info reuse between swapoff and swapon

2014-02-03 Thread Andrew Morton
On Mon, 27 Jan 2014 18:03:04 +0800 Weijie Yang wrote: > swapoff clear swap_info's SWP_USED flag prematurely and free its resources > after that. A concurrent swapon will reuse this swap_info while its previous > resources are not cleared completely. > > These late freed resources are: > -

Re: [PATCH 2/8] mm/swap: fix race on swap_info reuse between swapoff and swapon

2014-02-03 Thread Andrew Morton
On Mon, 27 Jan 2014 18:03:04 +0800 Weijie Yang weijie.y...@samsung.com wrote: swapoff clear swap_info's SWP_USED flag prematurely and free its resources after that. A concurrent swapon will reuse this swap_info while its previous resources are not cleared completely. These late freed

Re: [PATCH 2/8] mm/swap: fix race on swap_info reuse between swapoff and swapon

2014-02-03 Thread Andrew Morton
On Mon, 3 Feb 2014 15:23:40 -0800 Andrew Morton a...@linux-foundation.org wrote: On Mon, 27 Jan 2014 18:03:04 +0800 Weijie Yang weijie.y...@samsung.com wrote: swapoff clear swap_info's SWP_USED flag prematurely and free its resources after that. A concurrent swapon will reuse this

Re: [PATCH 2/8] mm/swap: fix race on swap_info reuse between swapoff and swapon

2014-02-03 Thread Hugh Dickins
On Mon, 3 Feb 2014, Andrew Morton wrote: On Mon, 3 Feb 2014 15:23:40 -0800 Andrew Morton a...@linux-foundation.org wrote: On Mon, 27 Jan 2014 18:03:04 +0800 Weijie Yang weijie.y...@samsung.com wrote: swapoff clear swap_info's SWP_USED flag prematurely and free its resources after

[PATCH 2/8] mm/swap: fix race on swap_info reuse between swapoff and swapon

2014-01-27 Thread Weijie Yang
swapoff clear swap_info's SWP_USED flag prematurely and free its resources after that. A concurrent swapon will reuse this swap_info while its previous resources are not cleared completely. These late freed resources are: - p->percpu_cluster - swap_cgroup_ctrl[type] - block_device setting -

[PATCH 2/8] mm/swap: fix race on swap_info reuse between swapoff and swapon

2014-01-27 Thread Weijie Yang
swapoff clear swap_info's SWP_USED flag prematurely and free its resources after that. A concurrent swapon will reuse this swap_info while its previous resources are not cleared completely. These late freed resources are: - p-percpu_cluster - swap_cgroup_ctrl[type] - block_device setting -