public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.15-rc] ipmi: missing NULL test for kthread
@ 2005-11-16 17:31 Matt Domsch
  2005-11-16 19:30 ` [Openipmi-developer] " Corey Minyard
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Domsch @ 2005-11-16 17:31 UTC (permalink / raw)
  To: minyard, akpm, torvalds; +Cc: linux-kernel, openipmi-developer

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: Matt Domsch <Matt_Domsch@dell.com>

-- 
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

diff -urNp --exclude-from=/home/mdomsch/excludes --minimal linux-2.6/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.ipmi/drivers/char/ipmi/ipmi_si_intf.c
--- linux-2.6/drivers/char/ipmi/ipmi_si_intf.c	Wed Nov 16 08:45:57 2005
+++ linux-2.6.ipmi/drivers/char/ipmi/ipmi_si_intf.c	Wed Nov 16 08:49:12 2005
@@ -2203,7 +2203,7 @@ static void setup_xaction_handlers(struc
 
 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);
 	del_timer_sync(&smi_info->si_timer);
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-16 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-16 17:31 [PATCH 2.6.15-rc] ipmi: missing NULL test for kthread Matt Domsch
2005-11-16 19:30 ` [Openipmi-developer] " Corey Minyard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox