All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Christian Kujau <lists@nerdbynature.de>,
	Zhenyu Wang <zhenyuw@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	David.Woodhouse@intel.com, dwmw2@infradead.org, eric@anholt.net,
	ben@decadent.org.uk, gregkh@suse.de
Subject: Re: [PATCH] intel-agp.c: Fix crash when accessing nonexistent GTT  entries in i915
Date: Wed, 24 Mar 2010 11:14:36 -0700	[thread overview]
Message-ID: <20100324111436.fe5d2906.akpm@linux-foundation.org> (raw)
In-Reply-To: <ca2dc2821003230440w3d96612aja0d4e083d3cc8c02@mail.gmail.com>

On Tue, 23 Mar 2010 12:40:05 +0100
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:

> On Tue, Mar 23, 2010 at 5:14 AM, Christian Kujau <lists@nerdbynature.de> wrote:
> > On Mon, 22 Mar 2010 at 20:57, Andrew Morton wrote:
> >> On Sun, 21 Mar 2010 16:30:20 +0100 Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:
> >> > I bisected in order to find the commit 5877960869333e42ebeb733e8d9d5630ff96d350.
> >
> > I believe this[0] is fc61901373987ad61851ed001fe971f3ee8d96a3 upstream:
> 
> Indeed. Also in
> 
> http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.32.y.git;a=commit;h=fc61901373987ad61851ed001fe971f3ee8d96a3

Does reverting that patch from the current code fix the crash?

--- a/drivers/char/agp/intel-agp.c~revert-1
+++ a/drivers/char/agp/intel-agp.c
@@ -207,7 +207,6 @@ static struct _intel_private {
 	 * popup and for the GTT.
 	 */
 	int gtt_entries;			/* i830+ */
-	int gtt_total_size;
 	union {
 		void __iomem *i9xx_flush_page;
 		void *i8xx_flush_page;
@@ -1239,7 +1238,7 @@ static int intel_i915_configure(void)
 	readl(intel_private.registers+I810_PGETBL_CTL);	/* PCI Posting. */
 
 	if (agp_bridge->driver->needs_scratch_page) {
-		for (i = intel_private.gtt_entries; i < intel_private.gtt_total_size; i++) {
+		for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) {
 			writel(agp_bridge->scratch_page, intel_private.gtt+i);
 		}
 		readl(intel_private.gtt+i-1);	/* PCI Posting. */
@@ -1394,8 +1393,6 @@ static int intel_i915_create_gatt_table(
 	if (!intel_private.gtt)
 		return -ENOMEM;
 
-	intel_private.gtt_total_size = gtt_map_size / 4;
-
 	temp &= 0xfff80000;
 
 	intel_private.registers = ioremap(temp, 128 * 4096);
@@ -1485,8 +1482,6 @@ static int intel_i965_create_gatt_table(
 	if (!intel_private.gtt)
 		return -ENOMEM;
 
-	intel_private.gtt_total_size = gtt_size / 4;
-
 	intel_private.registers = ioremap(temp, 128 * 4096);
 	if (!intel_private.registers) {
 		iounmap(intel_private.gtt);
_


  reply	other threads:[~2010-03-24 18:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 22:09 [PATCH] intel-agp.c: Fix crash when accessing nonexistent GTT entries in i915 Miguel Ojeda
2010-03-11  7:31 ` Miguel Ojeda
2010-03-11  8:34   ` Zhenyu Wang
2010-03-11 15:54     ` Miguel Ojeda
2010-03-19 20:27       ` Andrew Morton
2010-03-20 13:04         ` Miguel Ojeda
2010-03-21 13:58           ` Zhenyu Wang
2010-03-21 15:30             ` Miguel Ojeda
2010-03-23  0:57               ` Andrew Morton
2010-03-23  4:14                 ` Christian Kujau
2010-03-23 11:40                   ` Miguel Ojeda
2010-03-24 18:14                     ` Andrew Morton [this message]
2010-03-24 19:07                       ` Miguel Ojeda
2010-03-25 16:55                       ` Miguel Ojeda
2010-04-27 17:57                         ` Andrew Morton
2010-04-27 20:06                           ` Miguel Ojeda
2010-04-27 20:26                             ` Andrew Morton
2010-04-27 21:07                               ` Miguel Ojeda
2010-03-23 10:02                 ` Miguel Ojeda
2010-04-28  7:49       ` Dave Airlie

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=20100324111436.fe5d2906.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=David.Woodhouse@intel.com \
    --cc=ben@decadent.org.uk \
    --cc=dwmw2@infradead.org \
    --cc=eric@anholt.net \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists@nerdbynature.de \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=zhenyuw@linux.intel.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 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.