mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: "P. Christeas" <p_christ@hol.gr>
Cc: gibbs@scsiguy.com, linux-kernel@vger.kernel.org, Andries.Brouwer@cwi.nl
Subject: Re: Linux 2.6.0-test9
Date: Sun, 26 Oct 2003 19:16:41 -0800	[thread overview]
Message-ID: <20031026191641.497132ec.akpm@osdl.org> (raw)
In-Reply-To: <200310262051.32801.p_christ@hol.gr>

"P. Christeas" <p_christ@hol.gr> wrote:
>
> One more, (as reported a few weeks ago):
> rmmod aic7xxx 
> will fail, as this module uses some wrong locks. This will also block sleeping 
> (tested w. ACPI) if the module is there.
> IMHO this module is crucial to many systems.

The rmmod works OK for me, in the sense that the module is removed, the
kernel doesn't crash and the module can be reloaded.

But yes, there are several locking problems in there:

- ahc_free() now sleeps, deep down in the kobject layer somewhere (it
  calls /sbin/hotplug).

  This is a likely fix for that:

--- 25/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c~aic7xxx-sleep-in-spinlock-fix	2003-10-26 18:51:45.000000000 -0800
+++ 25-akpm/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	2003-10-26 18:52:11.000000000 -0800
@@ -100,9 +100,10 @@ ahc_linux_pci_dev_remove(struct pci_dev 
 		ahc_lock(ahc, &s);
 		ahc_intr_enable(ahc, FALSE);
 		ahc_unlock(ahc, &s);
-		ahc_free(ahc);
 	}
 	ahc_list_unlock(&l);
+	if (ahc)
+		ahc_free(ahc);
 }
 #endif /* !LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) */
 


- ahc_linux_kill_dv_thread() is called under ahc_list_lock(), but it sleeps.



> I'm just repeating this issue, as I cannot see any patch for that. Justin has 
> not replied (I will need to be CC'ed). Andrew, who's the maintainer?

Justin is.

> I wish I 
> could help myself solve that, but fixing SMP-safe locks seems the hardest 
> thing I could do here. Somebody has to help here.


Well we can live with the CONFIG_DEBUG_SPINLOCK_SLEEP warnings I guess. 
But you don't actually say what goes wrong when you run rmmod.  Does the
kernel oops?  Lock up?  What?


  reply	other threads:[~2003-10-27  3:16 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-26 18:51 P. Christeas
2003-10-27  3:16 ` Andrew Morton [this message]
2003-10-27 20:18   ` Linux 2.6.0-test9, aic7xxx [passed] P. Christeas
  -- strict thread matches above, loose matches on Subject: below --
2003-10-27 10:58 Linux 2.6.0-test9 Andries.Brouwer
2003-10-27  9:47 Mikael Pettersson
2003-10-27  1:48 Andries.Brouwer
2003-10-27  2:10 ` Linus Torvalds
2003-10-27  9:40   ` David S. Miller
2003-10-26 19:40 Andries.Brouwer
2003-10-27  0:01 ` Andrew Morton
2003-10-27  0:21   ` Linus Torvalds
2003-10-27  0:28     ` Linus Torvalds
2003-10-27  6:43       ` David S. Miller
2003-10-27 19:54         ` kuznet
2003-10-27 19:36     ` kuznet
2003-10-28  0:42       ` Tommy Christensen
2003-10-28 18:25         ` kuznet
2003-10-26 15:32 Shane Shrybman
2003-10-26 16:27 ` Marco Roeland
2003-10-26 11:08 Andries.Brouwer
2003-10-26 13:57 ` OGAWA Hirofumi
2003-10-26 10:59 Andries.Brouwer
2003-10-27 23:37 ` bill davidsen
2003-10-26 10:26 Andries.Brouwer
2003-10-26  1:16 Andries.Brouwer
2003-10-26  3:12 ` OGAWA Hirofumi
2003-10-26  5:48 ` Linus Torvalds
2003-10-27 23:26   ` bill davidsen
2003-10-30  9:20     ` Russell King
2003-10-30 16:44       ` Bill Davidsen
2003-10-30 17:23         ` John Bradford
2003-10-25 19:09 Linus Torvalds
2003-10-25 19:52 ` Marcelo Tosatti
2003-10-25 20:14 ` viro
2003-10-25 22:35   ` Linus Torvalds
2003-10-25 23:45 ` Jose Luis Domingo Lopez
2003-10-26 12:05 ` Patrik Wallstrom
2003-10-27 18:21   ` Patrik Wallstrom
2003-10-27 22:51     ` bill davidsen
2003-10-28  2:12       ` Jeff Garzik
2003-10-28  4:52         ` Bill Davidsen

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=20031026191641.497132ec.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=gibbs@scsiguy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p_christ@hol.gr \
    /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®