提交 ae41244d 编写于 作者: J Jes Sorensen 提交者: Yang Yingliang

ipmi_si_intf: Fix race in timer shutdown handling

mainline inclusion
from mainline-5.4
commit c9acc3c4
category: bugfix
bugzilla: NA
CVE: NA

-------------------------------------------------

smi_mod_timer() enables the timer before setting timer_running. This
means the timer can be running when we get to stop_timer_and_thread()
without timer_running having been set, resulting in del_timer_sync()
not being called and the timer being left to cause havoc during
shutdown.

Instead just call del_timer_sync() unconditionally
Signed-off-by: NJes Sorensen <jsorensen@fb.com>
Message-Id: <20190828203625.32093-2-Jes.Sorensen@gmail.com>
Signed-off-by: NCorey Minyard <cminyard@mvista.com>
Signed-off-by: NWenchao Hao <haowenchao@huawei.com>
Reviewed-by: NMiaohe Lin <linmiaohe@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 cae833ab
...@@ -1845,7 +1845,6 @@ static inline void stop_timer_and_thread(struct smi_info *smi_info) ...@@ -1845,7 +1845,6 @@ static inline void stop_timer_and_thread(struct smi_info *smi_info)
} }
smi_info->timer_can_start = false; smi_info->timer_can_start = false;
if (smi_info->timer_running)
del_timer_sync(&smi_info->si_timer); del_timer_sync(&smi_info->si_timer);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册