mm/shmem.c: zero out unused vma fields in shmem_pseudo_vma_init()
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 8 Jun 2018 00:09:32 +0000 (17:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Jun 2018 00:34:38 +0000 (17:34 -0700)
commitdaa280753cefa692607190852a98a9c06ae9ec9a
tree7781b91dd6a9c1f68fcc22b29a4b111747465c28
parent7810e6781e0fcbca78b91cf65053f895bf59e85f
mm/shmem.c: zero out unused vma fields in shmem_pseudo_vma_init()

shmem/tmpfs uses pseudo vma to allocate page with correct NUMA policy.

The pseudo vma doesn't have vm_page_prot set.  We are going to encode
encryption KeyID in vm_page_prot.  Having garbage there causes problems.

Zero out all unused fields in the pseudo vma.

Link: http://lkml.kernel.org/r/20180531135602.20321-1-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/shmem.c