mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: dan carpenter <d_carpenter@sbcglobal.net>
To: wrlk@riede.org, Zwane Mwaikambo <zwane@holomorphy.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Any hope for ide-scsi (error handling)?
Date: Sat, 15 Mar 2003 05:43:51 +0100	[thread overview]
Message-ID: <200303152204.h2FM4RnB683562@pimout1-ext.prodigy.net> (raw)
In-Reply-To: <20030315210120.GI7082@linnie.riede.org>

On Saturday 15 March 2003 10:01 pm, Willem Riede wrote:
> It may not be elegant to schedule(1) with the lock taken, but it
> does work.
>
> However, my latest patch doesn't seem to be applied, since in my
> version I have a set_current_state(TASK_INTERRUPTIBLE); before
> the schedule.

I don't see how it works.

spin_lock_irqsave() increments  preempt_count()
in_atomic checks is defined as:
# define in_atomic()    ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
kernel_locked() is defined as:
#define kernel_locked()         (current->lock_depth >= 0)

If you call schedule while in_atomic() then it prints out the error 
"bad: scheduling while atomic!\n".  

As far as I can see set_current_state() doesn't affect
preempt_count() or current->lock_depth.  I must be 
missing something...

regards,
dan carpenter


  reply	other threads:[~2003-03-15 21:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-15 18:55 Zwane Mwaikambo
2003-03-15  2:05 ` dan carpenter
2003-03-15 19:53   ` Zwane Mwaikambo
2003-03-15  2:52     ` dan carpenter
2003-03-15 20:23       ` Zwane Mwaikambo
2003-03-15 21:01         ` Willem Riede
2003-03-15  4:43           ` dan carpenter [this message]
2003-03-15 21:11           ` Zwane Mwaikambo
2003-03-15 22:29             ` Willem Riede
2003-03-16  1:23           ` Alan Cox
2003-03-16  0:55             ` Willem Riede
2003-03-16 21:41               ` Alan Cox
2003-03-15 20:25       ` bert hubert
2003-03-15 20:41         ` Zwane Mwaikambo
2003-03-15 20:55           ` Zwane Mwaikambo
2003-03-16  1:05       ` Alan Cox

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=200303152204.h2FM4RnB683562@pimout1-ext.prodigy.net \
    --to=d_carpenter@sbcglobal.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wrlk@riede.org \
    --cc=zwane@holomorphy.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

all inboxes | Powered by JetHome®