Merge cherrypicks of [14651914, 14651880, 14651759, 14652210, 14651594, 14651881, 14651915, 14651882, 14651883, 14651799, 14652154, 14651595, 14651760, 14652271, 14652272, 14652273, 14652056, 14651800, 14651801, 14651802, 14651884, 14651885, 14651886, 14652274, 14652275, 14652276, 14652277, 14652278, 14651894, 14651723, 14652211, 14651895, 14651916, 14651887, 14651888, 14651596, 14651889, 14652212, 14651761, 14652310, 14652311, 14651973, 14651974, 14652312, 14652313, 14651896, 14651803] into rvc-qpr3-release
Change-Id: I559773c77635b6480d054ba0daba281eef4f84a5
This commit is contained in:
commit
1ff19f401f
6
lmkd.cpp
6
lmkd.cpp
|
|
@ -1157,9 +1157,10 @@ static void cmd_procprio(LMKD_CTRL_PACKET packet, int field_count, struct ucred
|
|||
} else {
|
||||
if (!claim_record(procp, cred->pid)) {
|
||||
char buf[LINE_MAX];
|
||||
char *taskname = proc_get_name(cred->pid, buf, sizeof(buf));
|
||||
/* Only registrant of the record can remove it */
|
||||
ALOGE("%s (%d, %d) attempts to modify a process registered by another client",
|
||||
proc_get_name(cred->pid, buf, sizeof(buf)), cred->uid, cred->pid);
|
||||
taskname ? taskname : "A process ", cred->uid, cred->pid);
|
||||
return;
|
||||
}
|
||||
proc_unslot(procp);
|
||||
|
|
@ -1194,9 +1195,10 @@ static void cmd_procremove(LMKD_CTRL_PACKET packet, struct ucred *cred) {
|
|||
|
||||
if (!claim_record(procp, cred->pid)) {
|
||||
char buf[LINE_MAX];
|
||||
char *taskname = proc_get_name(cred->pid, buf, sizeof(buf));
|
||||
/* Only registrant of the record can remove it */
|
||||
ALOGE("%s (%d, %d) attempts to unregister a process registered by another client",
|
||||
proc_get_name(cred->pid, buf, sizeof(buf)), cred->uid, cred->pid);
|
||||
taskname ? taskname : "A process ", cred->uid, cred->pid);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ void stats_remove_taskname(int pid) {
|
|||
}
|
||||
|
||||
void stats_store_taskname(int pid, const char* taskname) {
|
||||
if (!enable_stats_log) {
|
||||
if (!enable_stats_log || !taskname) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue