Quoting Kuogee Hsieh (2022-05-03 09:25:36)
Event thread supposed to exit from its while loop after kthread_stop(). However there may has possibility that event thread is pending in the middle of wait_event due to condition checking never become true. To make sure event thread exit its loop after kthread_stop(), this patch OR kthread_should_stop() into wait_event's condition checking so that event thread will exit its loop after kernal_stop().
Changes in v2: -- correct spelling error at commit title
Changes in v3: -- remove unnecessary parenthesis -- while(1) to replace while (!kthread_should_stop())
Reported-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org Fixes: 570d3e5d28db ("drm/msm/dp: stop event kernel thread when DP unbind") Signed-off-by: Kuogee Hsieh quic_khsieh@quicinc.com
Reviewed-by: Stephen Boyd swboyd@chromium.org