From: Greg KH <greg@kroah.com>
To: CaT <cat@zip.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.5.70: pcmcia oops (a real one! honest!)
Date: Tue, 3 Jun 2003 12:28:36 -0700 [thread overview]
Message-ID: <20030603192836.GA12746@kroah.com> (raw)
In-Reply-To: <20030602210537.GA6666@kroah.com>
On Mon, Jun 02, 2003 at 02:05:37PM -0700, Greg KH wrote:
> On Sun, Jun 01, 2003 at 01:41:42AM +1000, CaT wrote:
> > On Thu, May 29, 2003 at 02:21:39PM -0700, Greg KH wrote:
> > > On Thu, May 29, 2003 at 09:02:09AM +0100, Russell King wrote:
> > > > On Wed, May 28, 2003 at 02:26:10PM +1000, CaT wrote:
> > > > > removed my xircom pcmcia realport card and put in another. End result was
> > > > > total loss of ps2 keyboard functionality (everything else, inc the ps2 mouse
> > > > > still works). I then removed the xircom card. The following was in dmesg:
> > > >
> > > > I'm assuming that this is something Gregkh needs to look into and not
> > > > myself; my guess is that it's related to the pci device accounting stuff.
> > > >
> > > > Greg?
> > >
> > > Yeah, it could be. Cat, can you revert the following patch from your
> > > tree and let me know if it fixes your problem or not?
> >
> > The kernel no longer crashes on remove and I can reinsert and it
> > recognises the card without hassle. I do get no messages on eject though
> > (about devices being deregistered, etc) but I get msgs on insert (about
> > them getting regstered etc). One time I didn't get the card recognised
> > at all on insert... dunno if that was myfault or not but on eject and
> > reinsert all was fine.
>
> Ok, I've duplicated this here with a PCI card containing a bridge on a
> pci hotplug system, so I'll work on tracking this down...
Ah, stupid bug in the driver class code was causing this. Can you try
this patch out against a clean 2.5.70 tree? It fixes the problem for
me, and I want to make sure it fixes it for you too.
thanks,
greg k-h
#Driver Class: don't call put_device() when we never called get_device()
#
#This fixes a oops when unplugging pci network devices.
#
diff -Nru a/drivers/base/class.c b/drivers/base/class.c
--- a/drivers/base/class.c Tue Jun 3 12:24:05 2003
+++ b/drivers/base/class.c Tue Jun 3 12:24:05 2003
@@ -311,11 +311,8 @@
up_write(&parent->subsys.rwsem);
}
- if (class_dev->dev) {
- class_device_dev_unlink(class_dev);
- class_device_driver_unlink(class_dev);
- put_device(class_dev->dev);
- }
+ class_device_dev_unlink(class_dev);
+ class_device_driver_unlink(class_dev);
kobject_del(&class_dev->kobj);
next prev parent reply other threads:[~2003-06-03 19:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-28 4:26 2.5.70: pcmcia oops (a real one! honest!) CaT
2003-05-28 4:38 ` CaT
2003-05-29 8:02 ` Russell King
2003-05-29 21:21 ` Greg KH
2003-05-31 15:41 ` CaT
2003-06-02 21:05 ` Greg KH
2003-06-03 19:28 ` Greg KH [this message]
2003-06-05 4:24 ` CaT
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=20030603192836.GA12746@kroah.com \
--to=greg@kroah.com \
--cc=cat@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
/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