The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Mateusz Berezecki <mateuszb@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: "scheduling while atomic" ?
Date: Tue, 12 Jul 2005 16:08:44 +0200	[thread overview]
Message-ID: <42D3CEEC.90603@gmail.com> (raw)
In-Reply-To: <1121175049.6917.19.camel@localhost.localdomain>


>When you say enable a lock, do you mean that you grabbed a lock?  Now if
>you grabbed a spinlock, it is really bad to then call schedule, since a
>another process that will grab that same spinlock will deadlock the CPU
>(on an SMP system). Since you are using locks (I'm also assuming that
>you are using spinlocks) I assume that you will be running this on a
>CONFIG_PREEMPT or SMP system.
>
>So the fix will be to release the lock before calling something that
>will schedule, and regrab it afterwards.
>  
>
Sorry for not being too precise. Yes, your assumptions were correct ;-)
I grab a lock using

spin_lock(&ieee->lock);

and release it using

spin_unlock(&ieee->lock);

there is quite a lot of debugging printk's inbetween. Can this be a cause ?


  reply	other threads:[~2005-07-12 14:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12 13:19 "scheduling while atomic" ? Mateusz Berezecki
2005-07-12 13:30 ` Richard B. Johnson
2005-07-12 13:30 ` Steven Rostedt
2005-07-12 14:08   ` Mateusz Berezecki [this message]
2005-07-12 14:11     ` Steven Rostedt
2005-07-12 14:22       ` Mateusz Berezecki

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=42D3CEEC.90603@gmail.com \
    --to=mateuszb@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.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