From: Matthew Wilcox <willy@debian.org>
To: Felipe W Damasio <felipewd@terra.com.br>, Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blk API update (and bug fix) to CDU535 cdrom driver
Date: Wed, 10 Sep 2003 20:58:31 +0100 [thread overview]
Message-ID: <20030910195831.GD21596@parcelfarce.linux.theplanet.co.uk> (raw)
This cli-sti removal seems exactly as broken as all the ones i've NAKed on
kernel-janitors. There's no evidence that I can see for locking in the
interrupt handler. Here's a race example:
CPU 1 CPU 2
sony_sleep();
spin_lock_irq(&sonycd535_lock);
enable_interrupts();
cdu535_interrupt();
disable_interrupts();
if (waitqueue_active(&cdu535_irq_wait)) {
prepare_to_wait(&cdu535_irq_wait, &wait, TASK_INTERRUPTIBLE);
spin_unlock_irq(&sonycd535_lock);
Either you need to move prepare_to_wait before enable_interrupts or
grab the sonycd535_lock in interrupt context.
Hang on a minute. This driver is always polled, and never interrupt
driven. There's no problem because this code path is never executed :-P
Nevertheless, it's probaby worth fixing so other more complex drivers
(eg cdu31a) don't copy it wrongly.
BTW, I bet sony_sleep() shouldn't be calling the new-and-improved yield().
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
next reply other threads:[~2003-09-10 19:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-10 19:58 Matthew Wilcox [this message]
[not found] <3F5DDEA8.6040901@terra.com.br>
[not found] ` <20030909143341.GA18257@suse.de>
[not found] ` <3F5DEA0D.6030701@terra.com.br>
[not found] ` <20030909153536.GH18257@suse.de>
2003-09-09 17:50 ` [PATCH] blk API update (and bug fix) to CDU535 cdrom driver Felipe W Damasio
2003-09-09 19:55 ` Jens Axboe
2003-09-09 20:21 ` Felipe W Damasio
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=20030910195831.GD21596@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=axboe@suse.de \
--cc=felipewd@terra.com.br \
--cc=linux-kernel@vger.kernel.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