All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Tony Battersby <tonyb@cybernetics.com>
Cc: w@1wt.eu, linux-scsi@vger.kernel.org,
	James.Bottomley@HansenPartnership.com, protasnb@gmail.com,
	bugme-daemon@bugzilla.kernel.org
Subject: Re: [Bug 3680] sym53c8xx_2 SMP deadlock on driver load
Date: Wed, 17 Oct 2007 10:27:47 -0600	[thread overview]
Message-ID: <20071017162747.GA32174@parisc-linux.org> (raw)
In-Reply-To: <471621D2.5080806@cybernetics.com>

On Wed, Oct 17, 2007 at 10:53:06AM -0400, Tony Battersby wrote:
> After looking at it carefully, this is true of pci_map_mem, but not
> pci_unmap_mem.  pci_unmap_mem can be called from both ->detect and
> ->release.  io_request_lock is held in ->detect but not in ->release.
> So, your patch locks up the system on module unload.

My mistake.  I should have checked the iorl was held over ->release too.

This is a pretty ugly patch, but I think the three alternatives are
worse:

 - Drop the iorl at the beginning of ->detect and reacquire it at exit.
   We don't know what else the iorl might be protecting.  Probably
   nothing, but I don't want to audit it.
 - Convert sym2 back to old error handling so the midlayer doesn't
   acquire the iorl for us in ->detect.
 - Acquire the iorl in ->release.  We might deadlock on something.

So, sure, apply this patch.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  parent reply	other threads:[~2007-10-17 16:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071017013045.A19ED108036@picon.linux-foundation.org>
2007-10-17 14:53 ` [Bug 3680] sym53c8xx_2 SMP deadlock on driver load Tony Battersby
2007-10-17 15:20   ` Willy Tarreau
2007-10-17 15:44     ` Tony Battersby
2007-10-17 15:52       ` Willy Tarreau
2007-10-17 16:22         ` Tony Battersby
2007-10-17 16:27   ` Matthew Wilcox [this message]
2007-10-17 18:46     ` Willy Tarreau
2007-10-17 20:12       ` Matthew Wilcox

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=20071017162747.GA32174@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=protasnb@gmail.com \
    --cc=tonyb@cybernetics.com \
    --cc=w@1wt.eu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.