]> git.baikalelectronics.ru Git - kernel.git/commit
mm/madvise: move up the behavior parameter validation
authorAnshuman Khandual <khandual@linux.vnet.ibm.com>
Wed, 3 May 2017 21:55:28 +0000 (14:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 May 2017 22:52:11 +0000 (15:52 -0700)
commit3bfd05dbaab8b5bdc5cee36462b54cf533aef545
treeadcd585bd3b2417ac96afddfd3b8aebfbd5cce4a
parent304965e22786903aa9b3270ad319a097f1c4393a
mm/madvise: move up the behavior parameter validation

madvise_behavior_valid() should be called before acting upon the
behavior parameter.  Hence move up the function.  This also includes
MADV_SOFT_OFFLINE and MADV_HWPOISON options as valid behavior parameter
for the system call madvise().

Link: http://lkml.kernel.org/r/20170418052844.24891-1-khandual@linux.vnet.ibm.com
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/madvise.c