public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: Kernel Oops on 3.14.66
Date: Wed, 27 Apr 2016 11:03:36 +0100	[thread overview]
Message-ID: <57208E78.4070800@intel.com> (raw)
In-Reply-To: <CAJu7YgBzd-NH60jsYLSgGPKnhR8+G-qHpjytZk4CwjZvhE+EiQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

On 27/04/16 10:19, Andreas Lampersperger wrote:
> Hello,
>
> has anyone here a hint for me, what can cause this error.
> The error occures highly sporadic on different machines with intel hd
> graphics (ivb_gt1).
> I did also some kernel coredumps and found out, that the failed
> paging request came from drm_i915_gem_request->list.prev or ->list.next.
>
> Thank you
> Andreas

Try this patch.

.Dave.


[-- Attachment #2: 0001-initialise-request-list-head.patch --]
[-- Type: text/x-patch, Size: 1598 bytes --]

>From 6dde6b8b07239c68f32315faffa9d80b6e2d0aec Mon Sep 17 00:00:00 2001
From: Dave Gordon <david.s.gordon@intel.com>
Date: Fri, 22 Apr 2016 19:33:53 +0100
Subject: [PATCH] Request constructor should initialise list head
Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Users of the Linux kernel linked-list macros should remember that a
zeroed "struct list_head" is not a valid list and in particular is
not the same as an empty list. ALL list heads MUST be initialised!

Without this, any attempt to follow this link (e.g. during teardown)
before the request has been put on the list of pending requests (or
if is not put on the list, e.g. is cancelled instead) will result in
a NULL pointer dereference.

Note: the diff below claims this code goes in i915_gem_request_free(),
but that's just git's failure to parse the function headers correctly.
It obviously belongs in __i915_gem_request_alloc(); it seems to apply
correctly despite the incorrect function tag.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93907 ?
Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index d493e79..8ce7d4d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2751,6 +2751,7 @@ void i915_gem_request_free(struct kref *req_ref)
 	if (ret)
 		goto err;
 
+	INIT_LIST_HEAD(&req->list);
 	kref_init(&req->ref);
 	req->i915 = dev_priv;
 	req->engine = engine;
-- 
1.9.1


[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-04-27 10:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27  9:19 Kernel Oops on 3.14.66 Andreas Lampersperger
2016-04-27 10:03 ` Dave Gordon [this message]
2016-04-27 12:20   ` Andreas Lampersperger
2016-04-27 18:28     ` Dave Gordon
2016-04-28  8:58       ` Andreas Lampersperger
2016-04-28 11:50         ` Dave Gordon
2016-04-27 10:54 ` ✓ Fi.CI.BAT: success for " Patchwork

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=57208E78.4070800@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=intel-gfx@lists.freedesktop.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