diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2014-11-26 22:24:07 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-29 17:53:20 -0500 |
commit | b4037aaa584bd914bbf578f5ceb2d9884fa7ddb6 (patch) | |
tree | 43ce804178e162d5d57922194483adaacc79a76b | |
parent | 129eec55df6ab1b5ecdd89fd7db7a2cd103200b5 (diff) |
PM / OPP replace kfree_rcu() with call_srcu() in opp_set_availability()
This existed before we introduced call_srcu() in opp layer to synchronize with
srcu_notifier_call_chain() while removing OPPs. And is a potential bug which
wasn't noticed earlier.
Let fix it as well by using the right API to free OPP.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/base/power/opp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 977474a3c64f..2d195f3a1998 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c | |||
@@ -641,7 +641,7 @@ static int opp_set_availability(struct device *dev, unsigned long freq, | |||
641 | 641 | ||
642 | list_replace_rcu(&opp->node, &new_opp->node); | 642 | list_replace_rcu(&opp->node, &new_opp->node); |
643 | mutex_unlock(&dev_opp_list_lock); | 643 | mutex_unlock(&dev_opp_list_lock); |
644 | kfree_rcu(opp, rcu_head); | 644 | call_srcu(&dev_opp->srcu_head.srcu, &opp->rcu_head, kfree_opp_rcu); |
645 | 645 | ||
646 | /* Notify the change of the OPP availability */ | 646 | /* Notify the change of the OPP availability */ |
647 | if (availability_req) | 647 | if (availability_req) |