[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190614062110.GF7246@lst.de>
Date: Fri, 14 Jun 2019 08:21:10 +0200
From: Christoph Hellwig <hch@....de>
To: Jason Gunthorpe <jgg@...lanox.com>
Cc: Christoph Hellwig <hch@....de>,
Dan Williams <dan.j.williams@...el.com>,
Jérôme Glisse <jglisse@...hat.com>,
Ben Skeggs <bskeggs@...hat.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [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..
Powered by blists - more mailing lists