Re: [PATCH] fix rmmod sbp2 hang in 2.6.7

From: Tim Wright (timw_at_splhi.com)
Date: 07/17/04

  • Next message: Paul Mackerras: "Re: 2.6.7-mm7"
    To: Ben Collins <bcollins@debian.org>
    Date:	Sat, 17 Jul 2004 11:43:16 -0700
    
    

    Here's a wild guess. Is the 'sg' driver loaded. This sounds similar to
    my complaint with trying to rmmod 'st'. When I load my SCSI HBA driver,
    it automagically pulls in st for my tape drive *and* sg. Now, if you try
    to remove it, it "hangs". It's because sg also got a reference. If you
    rmmod 'sg' then the rmmod of st frees up too.

    The problem above is that st has module use count of 0, but that's a
    lie. sg has glommed on that device, and the true reference count is
    actually one (if you consider that st owns the tape device). It seems to
    me that what should happen is for the SCSI layer/drivers to handle
    kicking sg out when they want to unload. If the consensus is that this
    is desirable, I'm happy to go off and see what needs to be done.
    Otherwise, I'll crawl back into my hole :-)

    Tim

    On Wed, 2004-07-14 at 04:33, Ben Collins wrote:
    > On Wed, Jul 14, 2004 at 10:24:17AM +0100, Russell King wrote:
    > > On Wed, Jul 14, 2004 at 05:11:07PM +0800, Hugang wrote:
    > > > On Wed, 14 Jul 2004 16:13:57 +0800
    > > > Hugang <hugang@soulinfo.com> wrote:
    > > > | On Wed, 14 Jul 2004 11:48:54 +0800
    > > > | Hugang <hugang@soulinfo.com> wrote:
    > > > |
    > > > ....
    > > > | Sorry, the above patch, can't fix rmmod sbp2 complete,I still got hang when
    > > > | rmmod sbp2 in my PowerBook G4 sometimes.
    > > > |
    > > >
    > > > This new patch can complete fix the bug. That's really hack. Any comment are
    > > > welcome.
    > >
    > > This down+up prevents drivers from being unloaded until there are no
    > > references to their struct device_driver. By removing this, you open
    > > the very real possibility for an oops to occur.
    > >
    > > If you're waiting inside that function for the last reference to be
    > > dropped, the real question is why you still have references to it.
    >
    > Seems like every 2 months or so I have to revisit the sbp2 module to see
    > where the scsi layer has changed (or the driver model) so that I can get
    > all the reference counting to equal out properly. Guess it's been two
    > months again :)

    -- 
    Tim Wright <timw@splhi.com>
    Splhi
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Paul Mackerras: "Re: 2.6.7-mm7"

    Relevant Pages

    • [PATCH 18-rc2] Fix typos in /Documentation : N-P
      ... Again, if you're not gonna do synchronization with disk drives (dang, ... -the kernel. ... There are two options specific to PSX driver portion. ... The driver uses the settings from the EEPROM set in the SCSI BIOS ...
      (Linux-Kernel)
    • SCSI aic7xxx driver: Initialization Failure over a kdump reboot
      ... I am facing aic7xxx driver initialization failure over a kdump reboot. ... I get a stack dump and kernel booting operation simply hangs. ... In my machine Adaptec SCSI controller is not managing any devices. ... IntelXeonCPU 2.40GHz, SMT, 2 logical cpus. ...
      (Linux-Kernel)
    • SCSI AHA-2940 SUN ULTRA 5 Not Detecting
      ... I can't get my scsi card working on my ultra 5 sun sparc, ... usbcore: registered new driver usbfs ... mounted filesystem with ordered data mode. ...
      (Debian-User)
    • Re: dat40
      ... The SCSI_TAPE_DM driver is listed for all SCSI-attached DAT drives and these ... would all be attached through the SE SCSI channel. ... So, my thought was that if one uses the SE SCSI channel for a DAT40, one ... To join/leave the list, search archives, change list settings, * ...
      (comp.sys.hp.mpe)
    • RE: [RFC PATCH] HP (Compaq) Smart Array 5xxx controller SCSI driver
      ... HP Smart Array 5xxx controller ... This is a SCSI driver for HP Smart Array 5xxx controllers. ...
      (Linux-Kernel)