lmkd: Remove process record after it is killed by lmkd watchdog

After lmkd watchdog kills a process, its record should be removed.

Bug: 243567425
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I70bb2a432df8088ebc9865fbc36b065738248d19
This commit is contained in:
Suren Baghdasaryan 2022-08-23 13:25:56 -07:00
parent 41a4a92781
commit 26c9de4e72
1 changed files with 2 additions and 0 deletions

View File

@ -2153,6 +2153,8 @@ static void watchdog_callback() {
if (reaper.kill({ target.pidfd, target.pid, target.uid }, true) == 0) {
ALOGW("lmkd watchdog killed process %d, oom_score_adj %d", target.pid, oom_score);
killinfo_log(&target, 0, 0, 0, NULL, NULL, NULL, NULL, NULL);
// WARNING: do not use target after pid_remove()
pid_remove(target.pid);
break;
}
prev_pid = target.pid;