linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Toad <toad@amphibian.dyndns.org>, linux-kernel@vger.kernel.org
Subject: Re: 'bad: scheduling while atomic!', preempt kernel, 2.6.1-test11, reading an apparently duff DVD-R
Date: Mon, 15 Dec 2003 20:13:35 +0100	[thread overview]
Message-ID: <20031215191335.GG2267@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0312151043480.1631@home.osdl.org>

On Mon, Dec 15 2003, Linus Torvalds wrote:
> 
> 
> On Mon, 15 Dec 2003, Toad wrote:
> >
> > ide-scsi: reset called for 133
> 
> Ok, I can't trigger an IDE reset even with a bad CDROM, so I'm kind of out
> of luck on testing this. Can you try out the following silly patch, and
> report what it says?
> 
> The old ide-scsi reset function is just terminally broken, there's no way
> it can work. This patch _might_ make it work, but is more likely to just
> print out what it's trying to do.

abort doesn't work well either, and ide-scsi needs to be ported to do
proper new error handling. It's internal buffering stinks. In short, it
really needs to be almost rewritten if it is serve some useful purpose.
If it wasn't for the principle of it, it really should not be a big job.

> -	printk (KERN_ERR "ide-scsi: reset called for %lu\n", cmd->serial_number);
> -	/* first null the handler for the drive and let any process
> -	 * doing IO (on another CPU) run to (partial) completion
> -	 * the lock prevents processing new requests */
> -	spin_lock_irqsave(&ide_lock, flags);
> -	while (HWGROUP(drive)->handler) {
> -		HWGROUP(drive)->handler = NULL;
> -		schedule_timeout(1);
> -	}

It's incredible how anything like that ever got merged, looks like it
was introduced with scsi_sleep() change.

> -	/* now nuke the drive queue */
> -	while ((req = elv_next_request(drive->queue))) {
> -		blkdev_dequeue_request(req);
> -		end_that_request_last(req);

Broken, will introduced infinite stalls.

> -	}
> -	/* FIXME - this will probably leak memory */
> -	HWGROUP(drive)->rq = NULL;
> -	if (drive_to_idescsi(drive))
> -		drive_to_idescsi(drive)->pc = NULL;
> -	spin_unlock_irqrestore(&ide_lock, flags);
> -	/* finally, reset the drive (and its partner on the bus...) */
> -	ide_do_reset (drive);

-- 
Jens Axboe


  reply	other threads:[~2003-12-15 19:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-15 13:58 'bad: scheduling while atomic!', preempt kernel, 2.6.1-test11, reading an apparently duff DVD-R Toad
2003-12-15 15:20 ` Linus Torvalds
2003-12-15 15:54   ` Jeff Garzik
2003-12-15 17:49     ` Toad
2003-12-15 17:54       ` David T Hollis
2003-12-15 17:57       ` grundig
2003-12-15 17:59       ` Jeff Garzik
2003-12-16  8:00       ` Martin Schlemmer
2003-12-15 18:22     ` Linus Torvalds
2003-12-16 22:34       ` bill davidsen
2003-12-15 15:46 ` Toad
2003-12-15 18:52   ` Linus Torvalds
2003-12-15 18:46 ` Linus Torvalds
2003-12-15 19:13   ` Jens Axboe [this message]
2003-12-15 19:52     ` Linus Torvalds
2003-12-15 20:04       ` Jens Axboe

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=20031215191335.GG2267@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=toad@amphibian.dyndns.org \
    --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;
as well as URLs for NNTP newsgroup(s).