summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2016-11-10 10:46:11 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-11-11 08:12:37 -0800
commit9956edf37e65e93fbb76dcff1236dff2323d306a (patch)
tree2eddb099d513d27dc80a1fadfc00e1bc7e496ba1 /lib
parent5e322beefc8699b5747cfb35539a9496034e4296 (diff)
downloadlinux-9956edf37e65e93fbb76dcff1236dff2323d306a.tar.gz
linux-9956edf37e65e93fbb76dcff1236dff2323d306a.tar.bz2
linux-9956edf37e65e93fbb76dcff1236dff2323d306a.zip
shmem: fix pageflags after swapping DMA32 object
If shmem_alloc_page() does not set PageLocked and PageSwapBacked, then shmem_replace_page() needs to do so for itself. Without this, it puts newpage on the wrong lru, re-unlocks the unlocked newpage, and system descends into "Bad page" reports and freeze; or if CONFIG_DEBUG_VM=y, it hits an earlier VM_BUG_ON_PAGE(!PageLocked), depending on config. But shmem_replace_page() is not a common path: it's only called when swapin (or swapoff) finds the page was already read into an unsuitable zone: usually all zones are suitable, but gem objects for a few drm devices (gma500, omapdrm, crestline, broadwater) require zone DMA32 if there's more than 4GB of ram. Fixes: 800d8c63b2e9 ("shmem: add huge pages support") Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1611062003510.11253@eggly.anvils Signed-off-by: Hugh Dickins <hughd@google.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: <stable@vger.kernel.org> [4.8.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions