Commit 030219ad authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] EATA driver fix

This driver is calling down into scsi_register with local interrupts
disabled.  scsi_register performs blocking allocations, starts kernel
threads, etc.  slab debugging gets offended by someone performing blocking
operations with local interrupts disabled.
parent f9409775
......@@ -1193,9 +1193,9 @@ static int port_detect \
}
#endif
spin_unlock(&driver_lock);
spin_unlock_irq(&driver_lock);
sh[j] = scsi_register(tpnt, sizeof(struct hostdata));
spin_lock(&driver_lock);
spin_lock_irq(&driver_lock);
if (sh[j] == NULL) {
printk("%s: unable to register host, detaching.\n", name);
......@@ -1450,9 +1450,8 @@ static void add_pci_ports(void) {
static int eata2x_detect(Scsi_Host_Template *tpnt) {
unsigned int j = 0, k;
unsigned long spin_flags;
spin_lock_irqsave(&driver_lock, spin_flags);
spin_lock_irq(&driver_lock);
tpnt->proc_name = "eata2x";
......@@ -1490,7 +1489,7 @@ static int eata2x_detect(Scsi_Host_Template *tpnt) {
}
num_boards = j;
spin_unlock_irqrestore(&driver_lock, spin_flags);
spin_unlock_irq(&driver_lock);
return j;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment