sched: hmp: Fix potential task_struct memory leak
authorChris Redpath <chris.redpath@arm.com>
Wed, 4 Feb 2015 05:44:53 +0000 (14:44 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 14 Dec 2016 04:41:56 +0000 (13:41 +0900)
commit9d689693034a6339256161ef701a1880115c7c6d
treee42226ff217fd900814c96ac468b318bf73745a9
parentb7bc96922082d895df72eba74adc268dea14a799
sched: hmp: Fix potential task_struct memory leak

We use get_task_struct to increment the ref count on a task_struct
so that even if the task dies with a pending migration we are still
able to read the memory without causing a fault.

In the case of non-running tasks, we forgot to decrement the ref
count when we are done with the task.

Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
kernel/sched/fair.c