Re: [PATCH 2/2] mm/zsmalloc.c: Fix race condition in zs_destroy_pool

2019-08-06 Thread Henry Burns
By the way, I will lose access to this email in 3 days, so I've cc'd a personal email. On Mon, Aug 5, 2019 at 6:38 PM Minchan Kim wrote: > On Mon, Aug 05, 2019 at 10:34:41AM -0700, Henry Burns wrote: > > On Sun, Aug 4, 2019 at 9:28 PM Minchan Kim wrote: > > > On Thu, Aug 01, 2019 at 06:53:32PM

Re: [PATCH 2/2] mm/zsmalloc.c: Fix race condition in zs_destroy_pool

2019-08-05 Thread Minchan Kim
On Mon, Aug 05, 2019 at 10:34:41AM -0700, Henry Burns wrote: > On Sun, Aug 4, 2019 at 9:28 PM Minchan Kim wrote: > > > > Hi Henry, > > > > On Thu, Aug 01, 2019 at 06:53:32PM -0700, Henry Burns wrote: > > > In zs_destroy_pool() we call flush_work(>free_work). However, we > > > have no guarantee

Re: [PATCH 2/2] mm/zsmalloc.c: Fix race condition in zs_destroy_pool

2019-08-05 Thread Henry Burns
On Sun, Aug 4, 2019 at 9:28 PM Minchan Kim wrote: > > Hi Henry, > > On Thu, Aug 01, 2019 at 06:53:32PM -0700, Henry Burns wrote: > > In zs_destroy_pool() we call flush_work(>free_work). However, we > > have no guarantee that migration isn't happening in the background > > at that time. > > > >

Re: [PATCH 2/2] mm/zsmalloc.c: Fix race condition in zs_destroy_pool

2019-08-04 Thread Minchan Kim
Hi Henry, On Thu, Aug 01, 2019 at 06:53:32PM -0700, Henry Burns wrote: > In zs_destroy_pool() we call flush_work(>free_work). However, we > have no guarantee that migration isn't happening in the background > at that time. > > Since migration can't directly free pages, it relies on free_work >

[PATCH 2/2] mm/zsmalloc.c: Fix race condition in zs_destroy_pool

2019-08-01 Thread Henry Burns
In zs_destroy_pool() we call flush_work(>free_work). However, we have no guarantee that migration isn't happening in the background at that time. Since migration can't directly free pages, it relies on free_work being scheduled to free the pages. But there's nothing preventing an in-progress