From: Paul Mackerras <paulus@samba.org>
To: Patrick Mansfield <patmans@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
linux1394-devel@lists.sourceforge.net
Subject: Re: oops when removing sbp2 module
Date: Mon, 6 Oct 2003 13:08:27 +1000 [thread overview]
Message-ID: <16256.56491.671416.205944@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20031005074902.A26284@beaverton.ibm.com>
Patrick Mansfield writes:
> There is a typo on a change to the access_count check.
>
> Try this patch:
>
> --- bleed-2.5/drivers/scsi/scsi_sysfs.c-orig Mon Sep 29 12:21:09 2003
> +++ bleed-2.5/drivers/scsi/scsi_sysfs.c Mon Sep 29 16:19:22 2003
> @@ -412,7 +412,7 @@
> set_bit(SDEV_DEL, &sdev->sdev_state);
> if (sdev->host->hostt->slave_destroy)
> sdev->host->hostt->slave_destroy(sdev);
> - if (atomic_read(&sdev->access_count))
> + if (!atomic_read(&sdev->access_count))
> device_del(&sdev->sdev_gendev);
> up_write(&class->subsys.rwsem);
> }
That fixes it, it no longer oopses on removing sbp2. As before I get
a message saying "Device 'fw-host0' does not have a release()
function, it is broken and must be fixed." I assume that is a problem
with the sbp2 module.
The code in the patch looks a little worrying to me, though. Is there
some lock we have taken to ensure that no other process could be
modifying sdev->access_count at the same time? Also, what is to stop
some other process from noticing that sdev->access_count is 0 and
calling device_del(&sdev->sdev_gendev) ?
Regards,
Paul.
next prev parent reply other threads:[~2003-10-06 3:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-05 13:12 Paul Mackerras
2003-10-05 14:49 ` Patrick Mansfield
2003-10-06 3:08 ` Paul Mackerras [this message]
2003-10-06 3:36 ` Patrick Mansfield
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=16256.56491.671416.205944@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=patmans@us.ibm.com \
/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®