]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mm/madvise: pass return code of memory_failure() to userspace
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Tue, 15 Mar 2016 21:56:36 +0000 (14:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Mar 2016 23:55:16 +0000 (16:55 -0700)
commit23a003bfd23ea9ea0b7756b920e51f64b284b468
tree3219402f3b8ad53114e4193e27b852ba7cb79f90
parent5b3810e5c6e1b9a1858464a53b5d72ee050bb918
mm/madvise: pass return code of memory_failure() to userspace

Currently the return value of memory_failure() is not passed to
userspace when madvise(MADV_HWPOISON) is used.  This is inconvenient for
test programs that want to know the result of error handling.  So let's
return it to the caller as we already do in the MADV_SOFT_OFFLINE case.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Chen Gong <gong.chen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/madvise.c