Re: [PATCH 5/5] mm/hmm: Fix mm stale reference use in hmm_free()

2019-05-23 Thread John Hubbard
On 5/22/19 6:25 PM, Jason Gunthorpe wrote: On Wed, May 22, 2019 at 05:54:17PM -0700, Ralph Campbell wrote: On 5/22/19 4:36 PM, Jason Gunthorpe wrote: On Mon, May 06, 2019 at 04:35:14PM -0700, rcampb...@nvidia.com wrote: From: Ralph Campbell The last reference to struct hmm may be released

Re: [PATCH 5/5] mm/hmm: Fix mm stale reference use in hmm_free()

2019-05-22 Thread Jason Gunthorpe
On Wed, May 22, 2019 at 05:54:17PM -0700, Ralph Campbell wrote: > > On 5/22/19 4:36 PM, Jason Gunthorpe wrote: > > On Mon, May 06, 2019 at 04:35:14PM -0700, rcampb...@nvidia.com wrote: > > > From: Ralph Campbell > > > > > > The last reference to struct hmm may be released long after the

Re: [PATCH 5/5] mm/hmm: Fix mm stale reference use in hmm_free()

2019-05-22 Thread Ralph Campbell
On 5/22/19 4:36 PM, Jason Gunthorpe wrote: On Mon, May 06, 2019 at 04:35:14PM -0700, rcampb...@nvidia.com wrote: From: Ralph Campbell The last reference to struct hmm may be released long after the mm_struct is destroyed because the struct hmm_mirror memory may be part of a device driver

Re: [PATCH 5/5] mm/hmm: Fix mm stale reference use in hmm_free()

2019-05-22 Thread Jason Gunthorpe
On Mon, May 06, 2019 at 04:35:14PM -0700, rcampb...@nvidia.com wrote: > From: Ralph Campbell > > The last reference to struct hmm may be released long after the mm_struct > is destroyed because the struct hmm_mirror memory may be part of a > device driver open file private data pointer. The file

[PATCH 5/5] mm/hmm: Fix mm stale reference use in hmm_free()

2019-05-06 Thread rcampbell
From: Ralph Campbell The last reference to struct hmm may be released long after the mm_struct is destroyed because the struct hmm_mirror memory may be part of a device driver open file private data pointer. The file descriptor close is usually after the mm_struct is destroyed in do_exit(). This