lkml.org 
[lkml]   [1998]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Missing exports(patch) + Ugh
Itai Nahshon wrote:
>
> After adding these (and the fix to SHM_SWP_TYPE) I get Ugh messages
> when I try to use an ide cdrom with ide-scsi and the scsi cdrom driver.
>
> The Ugh messages are always from the lock_kernel() inlined call in the
> next system call after the call to open /dev/scd0.
>
> In some cases (I'm not sure it is releted) I got a system hang
> when repeating the same scenario.
>
> To repeat:
> compile support for ide-scsi and scsi cdrom as modules, then
> rmmod ide-cd, modprobe ide-scsi, modprobe sr_mod, run this program:
> main() {
> int fd;
> char buf[2048];
>
> fd = open("/dev/scd0", 0);
> read(fd, buf, 2048);
> }

I think I located the reason for the Ugh in the scsi cdrom driver.
do_sr_request() (in drivers/cdrom/sr.c).

The function is starting with
save_flags(flags);
cli();

But later uses the macro INIT_SCSI_REQUEST:
#define INIT_SCSI_REQUEST \
if (!CURRENT) { \
CLEAR_INTR; \
spin_unlock_irqrestore(&current_lock,flags); \
return; \
....
Which does not reset global_irq_holder (when __SMP__ is defined).

Notice also that if the host is "in_recovery" that same function returns
without re-enabling interrupts.

Itai
--
Itai Nahshon nahshon@actcom.co.il
Also nahshon@vnet.ibm.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [from the cache]
©2003-2011 Jasper Spaans