Commit 44f080c4 authored by Matt Domsch's avatar Matt Domsch Committed by 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: default avatarMatt Domsch <Matt_Domsch@dell.com>
Acked-by: default avatarCorey Minyard <minyard@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment