]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/filemap.c: remove bogus VM_BUG_ON
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 23 Aug 2021 23:58:51 +0000 (09:58 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:33:20 +0000 (09:33 +1000)
commit722eef348744d5badd0b29b518ba045d151375e9
treeb12e8bca9557d105946457bb75c8265bd524a102
parenta34cc13add2c92573db79192967f6a512868ec56
mm/filemap.c: remove bogus VM_BUG_ON

It is not safe to check page->index without holding the page lock.  It can
be changed if the page is moved between the swap cache and the page cache
for a shmem file, for example.  There is a VM_BUG_ON below which checks
page->index is correct after taking the page lock.

Link: https://lkml.kernel.org/r/20210818144932.940640-1-willy@infradead.org
Fixes: 5c211ba29deb ("mm: add and use find_lock_entries")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reported-by: <syzbot+c87be4f669d920c76330@syzkaller.appspotmail.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/filemap.c