From: Matthew Wilcox <willy@debian.org>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ryan Bradetich <rbradetich@uswest.net>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
PARISC list <parisc-linux@lists.parisc-linux.org>
Subject: Re: zalon/ncr53c720 crashes K460 (parisc port) on bootup.
Date: Sat, 27 Sep 2003 19:37:56 +0100 [thread overview]
Message-ID: <20030927183756.GT24824@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <1064677551.2002.20.camel@mulgrave>
On Sat, Sep 27, 2003 at 10:45:50AM -0500, James Bottomley wrote:
> This should fix the panic, but it simply detaches correctly.
We both missed it. This is why it's panicing:
host = ncr_attach(&zalon7xx_template, unit, &device);
if (!host)
goto fail;
fail:
ncr53c8xx_release(host);
return error;
ie we're calling ncr53c8xx_release(NULL) so both your & my patch fail
to fix the problem. This looks best to me:
+++ drivers/scsi/ncr53c8xx.c 27 Sep 2003 18:31:13 -0000
@@ -8855,11 +8855,14 @@ struct Scsi_Host * __init ncr_attach(str
int ncr53c8xx_release(struct Scsi_Host *host)
{
- struct host_data *host_data = (struct host_data *)host->hostdata;
+ struct host_data *host_data;
#ifdef DEBUG_NCR53C8XX
printk("ncr53c8xx: release\n");
#endif
- if (host_data->ncb)
+ if (!host)
+ return 1;
+ host_data = (struct host_data *)host->hostdata;
+ if (host_data && host_data->ncb)
ncr_detach(host_data->ncb);
return 1;
}
and it does fix the problem. Maybe it's too much checking, but I'm not
interested in tracking down bugs like this again ;-)
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
next prev parent reply other threads:[~2003-09-27 18:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-27 3:43 zalon/ncr53c720 crashes K460 (parisc port) on bootup Ryan Bradetich
2003-09-27 7:48 ` [parisc-linux] " Matthew Wilcox
2003-09-27 13:45 ` James Bottomley
2003-09-27 15:45 ` James Bottomley
2003-09-27 17:23 ` Matthew Wilcox
2003-09-27 18:37 ` Matthew Wilcox [this message]
2003-09-27 18:43 ` Christoph Hellwig
2003-09-27 18:58 ` James Bottomley
2003-09-27 20:06 ` 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=20030927183756.GT24824@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=James.Bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=parisc-linux@lists.parisc-linux.org \
--cc=rbradetich@uswest.net \
/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