Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1736271
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2] PM / OPP: Call notifier without holding opp_table->lock |
| Date | 2017-09-21 02:00 +0200 |
| Message-ID | <urX4l-1rm-1@gated-at.bofh.it> (permalink) |
| References | <urPgu-4TY-31@gated-at.bofh.it> <urX4l-1rm-3@gated-at.bofh.it> <urTN8-7TQ-19@gated-at.bofh.it> |
| Organization | Samsung Electronics |
Hi Viresh, On 2017년 09월 21일 05:25, Viresh Kumar wrote: > The notifier callbacks may want to call some OPP helper routines which > may try to take the same opp_table->lock again and cause a deadlock. One > such usecase was reported by Chanwoo Choi, where calling > dev_pm_opp_disable() leads us to the devfreq's OPP notifier handler, > which further calls dev_pm_opp_find_freq_floor() and it deadlocks. > > We don't really need the opp_table->lock to be held across the notifier > call though, all we want to make sure is that the 'opp' doesn't get > freed while being used from within the notifier chain. We can do it with > help of dev_pm_opp_get/put() as well. Let's do it. > > Reported-by: Chanwoo Choi <cw00.choi@samsung.com> > Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> > --- > V1->V2: > - s/Lets/Let's/ in commit log and added Stephen's tag. > Thanks for your fixup. Looks good to me. IMHO, this patch should be posted to stable@vger.kernel.org. Tested-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> [snip] -- Best Regards, Chanwoo Choi Samsung Electronics
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH V2] PM / OPP: Call notifier without holding opp_table->lock Viresh Kumar <viresh.kumar@linaro.org> - 2017-09-20 22:30 +0200 Re: [PATCH V2] PM / OPP: Call notifier without holding opp_table->lock Chanwoo Choi <cw00.choi@samsung.com> - 2017-09-21 02:00 +0200
csiph-web