mm/oom-kill: Add option to panic when killing foreground app

This setting is useful to debug memory intensive test scenarios,
which are close to the limit of what the device supports.

Change-Id: Id09f43736bd3c9586b4dac4fae570e78089f5bb3
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
[cgoldswo@codeaurora.org: Add macro introduced in obsolete patch]
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
This commit is contained in:
Patrick Daly 2019-10-18 17:34:17 -07:00 • committed by Chris Goldsworthy
commit 90ec8176a8
3 changed files with 21 additions and 0 deletions

View file

@ -1406,6 +1406,7 @@ int group_send_sig_info(int sig, struct kernel_siginfo *info,
rcu_read_unlock();
if (!ret && sig) {
check_panic_on_foreground_kill(p);
ret = do_send_sig_info(sig, info, p, type);
if (capable(CAP_KILL) && sig == SIGKILL)
add_to_oom_reaper(p);