mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge "mm: oom_kill: reap memory of a task that receives SIGKILL"
This commit is contained in:
commit
4296d43619
5 changed files with 74 additions and 9 deletions
|
|
@ -46,6 +46,7 @@
|
|||
#include <linux/livepatch.h>
|
||||
#include <linux/cgroup.h>
|
||||
#include <linux/audit.h>
|
||||
#include <linux/oom.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/signal.h>
|
||||
|
|
@ -1404,8 +1405,11 @@ int group_send_sig_info(int sig, struct kernel_siginfo *info,
|
|||
ret = check_kill_permission(sig, info, p);
|
||||
rcu_read_unlock();
|
||||
|
||||
if (!ret && sig)
|
||||
if (!ret && sig) {
|
||||
ret = do_send_sig_info(sig, info, p, type);
|
||||
if (capable(CAP_KILL) && sig == SIGKILL)
|
||||
add_to_oom_reaper(p);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue