Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3418a22 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

llkd: do not crash kernel if llkd stops running

Today, assume llkd is not hardened enough to 100% guarantee that
lack of progress in inspection loops is a direct result of a
livelock condition affecting llkd itself.  Log a fatal alarm to
make init restart llkd instead for the time being.

ToDo: develop trust in llkd regarding sigalarm causes.

Test: compile
Bug: 119781757
Change-Id: I668dc1773898da6c95aad7221724b16f1684b067
parent eb1213f1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -555,7 +555,9 @@ void llkPanicKernel(bool dump, pid_t tid, const char* state, const std::string&
}

void llkAlarmHandler(int) {
    llkPanicKernel(false, ::getpid(), "alarm");
    LOG(FATAL) << "alarm";
    // NOTREACHED
    llkPanicKernel(true, ::getpid(), "alarm");
}

milliseconds GetUintProperty(const std::string& key, milliseconds def) {