提交 44f080c4 编写于 作者: M Matt Domsch 提交者: Linus Torvalds

[PATCH] ipmi: missing NULL test for kthread

On IPMI systems with BT interfaces, we don't start the kernel thread, so
smi_info->thread is NULL.  Test for NULL when stopping the thread, because
kthread_stop() doesn't, and an oops ensues otherwise.
Signed-off-by: NMatt Domsch <Matt_Domsch@dell.com>
Acked-by: NCorey Minyard <minyard@acm.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 58bb01a9
...@@ -2203,7 +2203,7 @@ static void setup_xaction_handlers(struct smi_info *smi_info) ...@@ -2203,7 +2203,7 @@ static void setup_xaction_handlers(struct smi_info *smi_info)
static inline void wait_for_timer_and_thread(struct smi_info *smi_info) static inline void wait_for_timer_and_thread(struct smi_info *smi_info)
{ {
if (smi_info->thread != ERR_PTR(-ENOMEM)) if (smi_info->thread != NULL && smi_info->thread != ERR_PTR(-ENOMEM))
kthread_stop(smi_info->thread); kthread_stop(smi_info->thread);
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.
先完成此消息的编辑!
想要评论请 注册