mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
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: Thu, 25 Mar 2010 17:55:56 +0100	[thread overview]
Message-ID: <ca2dc2821003250955x211ef2f8la16ded9759ccb6ab@mail.gmail.com> (raw)
In-Reply-To: <20100324111436.fe5d2906.akpm@linux-foundation.org>

On Wed, Mar 24, 2010 at 7:14 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> 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?

Yes. In addition, applying the patch I provided also fixes it in current code.

Current code:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=01e77706cdde7c0b47e5ca1f4284a795504c7c40

>
> --- 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);
> _
>
>

  parent reply	other threads:[~2010-03-25 16:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 22:09 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
2010-03-24 19:07                       ` Miguel Ojeda
2010-03-25 16:55                       ` Miguel Ojeda [this message]
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=ca2dc2821003250955x211ef2f8la16ded9759ccb6ab@mail.gmail.com \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=David.Woodhouse@intel.com \
    --cc=akpm@linux-foundation.org \
    --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=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 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®