From: Matt Domsch <Matt_Domsch@dell.com>
To: minyard@acm.org, akpm@osdl.org, torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org, openipmi-developer@lists.sourceforge.net
Subject: [PATCH 2.6.15-rc] ipmi: missing NULL test for kthread
Date: Wed, 16 Nov 2005 11:31:23 -0600 [thread overview]
Message-ID: <20051116173123.GA25777@lists.us.dell.com> (raw)
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);
}
next reply other threads:[~2005-11-16 17:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-16 17:31 Matt Domsch [this message]
2005-11-16 19:30 ` [Openipmi-developer] [PATCH 2.6.15-rc] ipmi: missing NULL test for kthread Corey Minyard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051116173123.GA25777@lists.us.dell.com \
--to=matt_domsch@dell.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox