Skip to content

Commit bc1fe94

Browse files
bbrezillonroxanan1996
authored andcommitted
PM / devfreq: Fix leak in devfreq_dev_release()
BugLink: https://bugs.launchpad.net/bugs/2041702 commit 5693d07 upstream. srcu_init_notifier_head() allocates resources that need to be released with a srcu_cleanup_notifier_head() call. Reported by kmemleak. Fixes: 0fe3a66 ("PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier") Cc: <stable@vger.kernel.org> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent 258dfea commit bc1fe94

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/devfreq/devfreq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ static void devfreq_dev_release(struct device *dev)
762762
dev_pm_opp_put_opp_table(devfreq->opp_table);
763763

764764
mutex_destroy(&devfreq->lock);
765+
srcu_cleanup_notifier_head(&devfreq->transition_notifier_list);
765766
kfree(devfreq);
766767
}
767768

0 commit comments

Comments
 (0)