sched: hmp: Fix potential task_struct memory leak
authorChris Redpath <chris.redpath@arm.com>
Fri, 10 Jan 2014 10:34:08 +0000 (10:34 +0000)
committerJon Medhurst <tixy@linaro.org>
Wed, 22 Jan 2014 09:50:45 +0000 (09:50 +0000)
commitb2fafaba35f490947b78e8d0d4f4264a137e64cd
tree7c625b41be9e14df3e08a972b31eee550b0de13c
parent5e0791511a938eaf28d9071b411ffa71a79ef8ed
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