提交 b4037aaa 编写于 作者: V Viresh Kumar 提交者: Rafael J. Wysocki

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: NViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 129eec55
...@@ -641,7 +641,7 @@ static int opp_set_availability(struct device *dev, unsigned long freq, ...@@ -641,7 +641,7 @@ static int opp_set_availability(struct device *dev, unsigned long freq,
list_replace_rcu(&opp->node, &new_opp->node); list_replace_rcu(&opp->node, &new_opp->node);
mutex_unlock(&dev_opp_list_lock); mutex_unlock(&dev_opp_list_lock);
kfree_rcu(opp, rcu_head); call_srcu(&dev_opp->srcu_head.srcu, &opp->rcu_head, kfree_opp_rcu);
/* Notify the change of the OPP availability */ /* Notify the change of the OPP availability */
if (availability_req) if (availability_req)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册