From: Frederik Deweerdt <deweerdt@free.fr>
To: Sumit Narayan <talk2sumit@gmail.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] sleeping function called from invalid context at kernel/sched.c
Date: Mon, 8 Jan 2007 22:55:07 +0000 [thread overview]
Message-ID: <20070108225506.GE15292@slug> (raw)
In-Reply-To: <1458d9610701081327sb9de173qc5b7d99558ed22ae@mail.gmail.com>
On Mon, Jan 08, 2007 at 04:27:32PM -0500, Sumit Narayan wrote:
> Hi,
>
> I am trying to do file write operations in a thread (filewrite())
> initiated from a jprobe (fs_vfs_write()) set on kernel function
> (vfs_write()). Although the write operation succeed, I get this on my
> log:
>
> BUG: sleeping function called from invalid context at kernel/sched.c:3678
> in_atomic():0, irqs_disabled():1
> [<c011a65b>] __might_sleep+0xa5/0xab
> [<c0343a00>] wait_for_completion+0x1a/0xc9
> [<c0118480>] __wake_up+0x32/0x43
> [<c012b33a>] __queue_work+0x42/0x4f
> [<c012e0f7>] kthread_create+0x9b/0xd3
> [<c012e00a>] keventd_create_kthread+0x0/0x52
> [<f8a560d4>] filewrite+0x0/0xaf [fsTrace]
> [<c03464b9>] do_page_fault+0x31f/0x5c5
> [<f8a561da>] fs_vfs_write+0x57/0x9e [fsTrace]
> [<f8a560d4>] filewrite+0x0/0xaf [fsTrace]
> [<c015f396>] sys_write+0x41/0x67
> [<c01034d1>] sysenter_past_esp+0x56/0x79
> =======================
kprobe disables interrupts, and you're not supposed to sleep with
interrupts disabled. But you call keventd_create_kthread which sleeps,
and that issues this message.
Regards,
Frederik
prev parent reply other threads:[~2007-01-08 22:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-08 21:27 [BUG] sleeping function called from invalid context at kernel/sched.c Sumit Narayan
2007-01-08 22:55 ` Frederik Deweerdt [this message]
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=20070108225506.GE15292@slug \
--to=deweerdt@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=talk2sumit@gmail.com \
/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