]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory-failure: send SIGBUS(BUS_MCEERR_AR) only to current thread
authorNaoya Horiguchi <nao.horiguchi@gmail.com>
Fri, 12 Jun 2020 00:34:48 +0000 (17:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Jun 2020 01:17:47 +0000 (18:17 -0700)
commit438f654b2e148915f1b34b089fb1148ee2cbdf45
tree5a9de246dbf075ad962aef289ac59a14e3b3d9be
parentfd77b714a2ae82d0336bb0f0ad31dbad0ec8b0e1
mm/memory-failure: send SIGBUS(BUS_MCEERR_AR) only to current thread

Action Required memory error should happen only when a processor is
about to access to a corrupted memory, so it's synchronous and only
affects current process/thread.

Recently commit 0265d96adb1e ("mm, memory_failure: don't send
BUS_MCEERR_AO for action required error") fixed the issue that Action
Required memory could unnecessarily send SIGBUS to the processes which
share the error memory.  But we still have another issue that we could
send SIGBUS to a wrong thread.

This is because collect_procs() and task_early_kill() fails to add the
current process to "to-kill" list.  So this patch is suggesting to fix
it.  With this fix, SIGBUS(BUS_MCEERR_AR) is never sent to non-current
process/thread.

Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Tony Luck <tony.luck@intel.com>
Acked-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Link: http://lkml.kernel.org/r/1591321039-22141-3-git-send-email-naoya.horiguchi@nec.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory-failure.c