From: Christoph Hellwig <hch@lst.de>
To: davej@redhat.com, hannal@us.ibm.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fix pci_get_device conversion in intel-agp
Date: Sat, 8 Jan 2005 20:08:15 +0100 [thread overview]
Message-ID: <20050108190815.GA7031@lst.de> (raw)
- any device teardown must happen between agp_remove_bridge and
agp_put_bridge, before agp_remove_bridge users can still call into
the code
- it's releasing a reference to the wrong device
--- 1.76/drivers/char/agp/intel-agp.c 2004-12-22 05:53:58 +01:00
+++ edited/drivers/char/agp/intel-agp.c 2005-01-08 20:11:38 +01:00
@@ -1720,8 +1720,13 @@
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
- pci_dev_put(pdev);
agp_remove_bridge(bridge);
+
+ if (intel_i810_private.i810_dev)
+ pci_dev_put(intel_i810_private.i830_dev);
+ if (intel_i810_private.i830_dev)
+ pci_dev_put(intel_i830_private.i830_dev);
+
agp_put_bridge(bridge);
}
--- 1.18/drivers/char/agp/intel-mch-agp.c 2004-12-16 07:31:44 +01:00
+++ edited/drivers/char/agp/intel-mch-agp.c 2005-01-08 20:12:18 +01:00
@@ -569,8 +569,11 @@
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
- pci_dev_put(pdev);
agp_remove_bridge(bridge);
+
+ if (intel_i810_private.i830_dev)
+ pci_dev_put(intel_i830_private.i830_dev);
+
agp_put_bridge(bridge);
}
next reply other threads:[~2005-01-08 19:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-08 19:08 Christoph Hellwig [this message]
2005-01-08 19:13 ` [PATCH] fix pci_get_device conversion in intel-agp Roland Dreier
2005-01-08 19:14 ` Christoph Hellwig
2005-01-09 18:29 ` Greg KH
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=20050108190815.GA7031@lst.de \
--to=hch@lst.de \
--cc=davej@redhat.com \
--cc=hannal@us.ibm.com \
--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 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.