]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory-failure.c: add hwpoison_filter for soft offline
authorzhenwei pi <pizhenwei@bytedance.com>
Fri, 13 May 2022 03:23:10 +0000 (20:23 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 13 May 2022 14:20:19 +0000 (07:20 -0700)
commitf0690ca9d415a43e7582e99802ac43a069bfc52f
treedcec5cf0b7be1b60e53c34435b4fb37f0191d244
parentb2bee2b2fc0556058e65961b7a2efd4a5722e5a0
mm/memory-failure.c: add hwpoison_filter for soft offline

hwpoison_filter is missing in the soft offline path, this leads an issue:
after enabling the corrupt filter, the user process still has a chance to
inject hwpoison fault by madvise(addr, len, MADV_SOFT_OFFLINE) at PFN
which is expected to reject.

Also do a minor change in comment of memory_failure().

Link: https://lkml.kernel.org/r/20220509105641.491313-4-pizhenwei@bytedance.com
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-failure.c