From: Dmitry Shmidt Date: Wed, 7 Mar 2018 22:11:03 +0000 (-0800) Subject: ANDROID: uid_sys_stats: Copy task_struct comm field to bigger buffer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3253a29a4d7c70450b4ed7b4dda0e788641025a5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ANDROID: uid_sys_stats: Copy task_struct comm field to bigger buffer get_task_comm() currently checks if buf_size != TASK_COMM_LEN and fails even if sizeof(buf) > TASK_COMM_LEN. Change-Id: Icb3e9c172607534ef1db10baf5d626083db73498 Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/misc/uid_sys_stats.c b/drivers/misc/uid_sys_stats.c index 9f5b6d1dde0a..ace629934821 100644 --- a/drivers/misc/uid_sys_stats.c +++ b/drivers/misc/uid_sys_stats.c @@ -129,7 +129,7 @@ static void get_full_task_comm(struct task_entry *task_entry, struct mm_struct *mm = task->mm; /* fill the first TASK_COMM_LEN bytes with thread name */ - get_task_comm(task_entry->comm, task); + __get_task_comm(task_entry->comm, TASK_COMM_LEN, task); i = strlen(task_entry->comm); while (i < TASK_COMM_LEN) task_entry->comm[i++] = ' ';