From: Dinesh Ahuja <mdlinux7@yahoo.co.in>
To: Kernel Newbies <kernelnewbies@nl.linux.org>
Subject: Trying to make kernel thread sleep
Date: Mon, 21 Aug 2006 05:31:14 +0100 (BST) [thread overview]
Message-ID: <20060821043114.54716.qmail@web8809.mail.in.yahoo.com> (raw)
Hi All,
I am trying to put kernel thread to sleep via
interruptible_sleep_on_timeout(). Body of kernel
thread function is as follows
static int print_taskinfo(void * data)
{
wait_queue_head_t wait;
init_waitqueue_head (&wait);
for (;;)
{
// do something useful here.
interruptible_sleep_on_timeout(&wait, HZ);
//check whether we have to break loop or
continue.
}
}
I am facing following kernel oops :
Unable to handle kernel NULL pointer dereference at
virtual address 00000005
printing eip:
c011905d
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0060:[<c011905d>] Tainted: PF
EFLAGS: 00010086
EIP is at interruptible_sleep_on_timeout [kernel] 0x2d
(2.4.20-6)
eax: c2cadfc4 ebx: 00000286 ecx: c2cadfac edx:
00000001
esi: 00000064 edi: c8dc7540 ebp: c2cadfbc esp:
c2cadfa4
ds: 0068 es: 0068 ss: 0068
Process insmod (pid: 3884, stackpage=c2cad000)
Stack: 00000000 c2cac000 00000f2b 00000000 c034c000
c8dc74c0 c2cadfec d087d1a1
00000001 c2cadfc8 c2cadfc8 00000000 00000000
00000000 00000000 d087d074
00000000 00000000 00000000 c010742d 00000000
00000000 00000000
Call Trace: [<d087d1a1>] print_taskinfo [hello1]
0x12d (0xc2cadfc0))
[<d087d074>] print_taskinfo [hello1] 0x0 (0xc2cadfe0))
[<c010742d>] kernel_thread_helper [kernel] 0x5
(0xc2cadff0))
Can anyone guide me where I am going wrong?
Regards
Dinesh
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
reply other threads:[~2006-08-21 4:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060821043114.54716.qmail@web8809.mail.in.yahoo.com \
--to=mdlinux7@yahoo.co.in \
--cc=kernelnewbies@nl.linux.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
all inboxes | Powered by JetHome®