From patchwork Wed Apr 27 10:03:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gordon X-Patchwork-Id: 8954291 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3F5F29F441 for ; Wed, 27 Apr 2016 10:03:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 595372024C for ; Wed, 27 Apr 2016 10:03:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E7EEF2021F for ; Wed, 27 Apr 2016 10:03:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C7B5F6EA35; Wed, 27 Apr 2016 10:03:40 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 9FF746EA35 for ; Wed, 27 Apr 2016 10:03:38 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 27 Apr 2016 03:03:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,540,1455004800"; d="scan'208,223";a="967489622" Received: from dsgordon-linux2.isw.intel.com (HELO [10.102.226.88]) ([10.102.226.88]) by fmsmga002.fm.intel.com with ESMTP; 27 Apr 2016 03:03:38 -0700 To: intel-gfx@lists.freedesktop.org References: From: Dave Gordon Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ Message-ID: <57208E78.4070800@intel.com> Date: Wed, 27 Apr 2016 11:03:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Subject: Re: [Intel-gfx] Kernel Oops on 3.14.66 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. From 6dde6b8b07239c68f32315faffa9d80b6e2d0aec Mon Sep 17 00:00:00 2001 From: Dave Gordon 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 --- 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