From: Dave Gordon <david.s.gordon@intel.com>
To: Andreas Lampersperger <andreas.l.jhoss@gmail.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: Kernel Oops on 3.14.66
Date: Thu, 28 Apr 2016 12:50:42 +0100 [thread overview]
Message-ID: <5721F912.1020301@intel.com> (raw)
In-Reply-To: <CAJu7YgC+pOjR3tYuN1qxDyAyFUpcVmiQ6mRXT5cTN1FCMD9LeQ@mail.gmail.com>
On 28/04/16 09:58, Andreas Lampersperger wrote:
> Hi Dave,
>
> thank you again.
>
> I searched, where the memory for the request came from, it is set in line 2158
> of i915_gem.c
> <https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/gpu/drm/i915/i915_gem.c?id=refs/tags/v3.14.67#n2158>
> and the kmalloc is in intel_ring_alloc_seqno() in intel_ringbuffer.c
> <https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/gpu/drm/i915/intel_ringbuffer.c?id=refs/tags/v3.14.67#n1600>,
> right?
>
> So I will test the following patch for intel_ringbuffer.c:
>
>
> intel_ring_alloc_seqno(struct intel_ring_buffer *ring)
> {
> if (ring->outstanding_lazy_seqno)
> return 0;
>
> if (ring->preallocated_lazy_request == NULL) {
> struct drm_i915_gem_request *request;
>
> request = kmalloc(sizeof(*request), GFP_KERNEL);
> if (request == NULL)
> return -ENOMEM;
> +
> + INIT_LIST_HEAD(&request->list);
> ring->preallocated_lazy_request = request;
> }
>
> return i915_gem_get_seqno(ring->dev, &ring->outstanding_lazy_seqno);
> }
> :
Yes, that looks sensible. Interestingly, that version uses kmalloc()
rather than k*z*alloc, so the uninitialised list head will be random
rather than zeroed. Anything could happen!
.Dave.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-28 11:51 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
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 [this message]
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=5721F912.1020301@intel.com \
--to=david.s.gordon@intel.com \
--cc=andreas.l.jhoss@gmail.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 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.