lkml.org 
[lkml]   [2019]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/22] mm: don't clear ->mapping in hmm_devmem_free
On Thu, Jun 13, 2019 at 07:05:07PM +0000, Jason Gunthorpe wrote:
> Hurm, is hmm following this comment from mm_types.h?
>
> * If you allocate the page using alloc_pages(), you can use some of the
> * space in struct page for your own purposes. The five words in the main
> * union are available, except for bit 0 of the first word which must be
> * kept clear. Many users use this word to store a pointer to an object
> * which is guaranteed to be aligned. If you use the same storage as
> * page->mapping, you must restore it to NULL before freeing the page.
>
> Maybe the assumption was that a driver is using ->mapping ?

Maybe. The union layou in struct page certainly doesn't help..

\
 
 \ /
  Last update: 2019-06-14 08:23    [W:1.431 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site