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@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx