From: Sai Gurrappadi Date: Tue, 17 Dec 2013 21:40:45 +0000 (-0800) Subject: cpuquiet: Clean up sysfs memory properly X-Git-Tag: firefly_0821_release~4158^2~23 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=46f7d5dbded45dfbc239848e4875ec7e9e8a07a9;p=firefly-linux-kernel-4.4.55.git cpuquiet: Clean up sysfs memory properly Runnable sysfs node wasn't being free'd in stop via a kobject_put call because the sysfs node wasn't allocated with kobject_create. Now do an explicity kfree on stop after the kobject_put. Change-Id: I5ba554312757380dfb2e814f75832b28d4c7edf8 Signed-off-by: Sai Gurrappadi Reviewed-on: http://git-master/r/346645 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peter Boonstoppel GVS: Gerrit_Virtual_Submit Reviewed-by: Diwakar Tundlam --- diff --git a/drivers/cpuquiet/governors/runnable_threads.c b/drivers/cpuquiet/governors/runnable_threads.c index 79ba69d8057a..f20b8c71e384 100644 --- a/drivers/cpuquiet/governors/runnable_threads.c +++ b/drivers/cpuquiet/governors/runnable_threads.c @@ -265,6 +265,7 @@ static void runnables_stop(void) del_timer_sync(&runnables_timer); cancel_work_sync(&runnables_work); kobject_put(runnables_kobject); + kfree(runnables_kobject); mutex_unlock(&runnables_lock); }