[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200528002033.GB1992500@redhat.com>
Date: Wed, 27 May 2020 20:20:33 -0400
From: Jerome Glisse <jglisse@...hat.com>
To: linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
Huang Ying <ying.huang@...el.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Steven Capper <steve.capper@...aro.org>,
Catalin Marinas <catalin.marinas@....com>,
Rabin Vincent <rabinv@...s.com>,
linux-arm-kernel@...ts.infradead.org, rmk+kernel@....linux.org.uk,
Guo Ren <guoren@...nel.org>, linux-mips@...r.kernel.org,
Ralf Baechle <ralf@...ux-mips.org>,
Paul Burton <paulburton@...nel.org>,
James Hogan <jhogan@...nel.org>,
Ley Foon Tan <lftan@...era.com>,
nios2-dev@...ts.rocketboards.org, linux-parisc@...r.kernel.org,
Helge Deller <deller@....de>,
"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>, linux-sh@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
sparclinux@...r.kernel.org, Guan Xuetao <gxt@....edu.cn>,
linux-xtensa@...ux-xtensa.org, Max Filippov <jcmvbkbc@...il.com>,
Chris Zankel <chris@...kel.net>
Subject: Cache flush issue with page_mapping_file() and swap back shmem page ?
So any arch code which uses page_mapping_file() might get the wrong
answer, this function will return NULL for a swap backed page which
can be a shmem pages. But shmem pages can still be shared among
multiple process (and possibly at different virtual addresses if
mremap was use).
Attached is a patch that changes page_mapping_file() to return the
shmem mapping for swap backed shmem page. I have not tested it (no
way for me to test all those architecture) and i spotted this while
working on something else. So i hope someone can take a closer look.
Cheers,
Jérôme
View attachment "0001-mm-fix-cache-flush-for-shmem-page-that-are-swap-back.patch" of type "text/plain" (2357 bytes)
Powered by blists - more mailing lists