@@ -663,13 +663,7 @@ static struct kmemleak_object *__alloc_object(gfp_t gfp)
strncpy(object->comm, "softirq", sizeof(object->comm));
} else {
object->pid = current->pid;
- /*
- * There is a small chance of a race with set_task_comm(),
- * however using get_task_comm() here may cause locking
- * dependency issues with current->alloc_lock. In the worst
- * case, the command line is not correct.
- */
- strncpy(object->comm, current->comm, sizeof(object->comm));
+ __get_task_comm(object->comm, sizeof(object->comm), current);
}
/* kernel backtrace */