From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C14CC433DF for ; Fri, 22 May 2020 12:10:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 106AA206F6 for ; Fri, 22 May 2020 12:10:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="McEkZJIa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 106AA206F6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 935C86E9A4; Fri, 22 May 2020 12:10:10 +0000 (UTC) Received: from mail-vk1-xa42.google.com (mail-vk1-xa42.google.com [IPv6:2607:f8b0:4864:20::a42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 77CF56E9A4 for ; Fri, 22 May 2020 12:10:08 +0000 (UTC) Received: by mail-vk1-xa42.google.com with SMTP id o8so2497622vkd.12 for ; Fri, 22 May 2020 05:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j0tD841zwFIlHTuvBXKFlqGzX8M4mq1nr2on+hlNf0c=; b=McEkZJIazN8SDGHWmlRUv75+8X+1+ebgBDqu3SMb1KVtz2xt01FZWzqS3nRyVBGmOS PDeFpcvCsMdHp6X7w/oPa3fhmL4uT4LpMorgl6QynjQiIpJoYH/D1i7xQ4oeJPLZ0Tbe 3E2Pk4UI8loJq5OdW25lrQQ90dxEVXOC7hXPznHpEiQuAvCM3DrdZuFFFGg3a9qy6dps VkXnUjAbSE0FGnkf2QERJZqB2fmCfKyFRv30RZFMART0fuai2VIx5F5m5nPDEpjdaOdp AFb85xtX3mg2pTLjFqTtBQm8T3OxcN1yKkAS+lY6BnlwSrzeexCP4vIU9rFNsRzal5fn w80g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j0tD841zwFIlHTuvBXKFlqGzX8M4mq1nr2on+hlNf0c=; b=X4NDPZlW/W2e65bkPY+M5FYzmibkSZOjCpHy2v7MOLh5utI1yN9zac6CiLd3rwj5s/ e7rhQz1gGu7nspVtheFcPlvhCMHZ7BVCV9QX8svuAs08T5rs4oyeQtfD9nHse0Ngxyvg JSOHYe9ldU9Rrc7mChyVca17xVKG5j90ywxY8PrMp4zlE3KnC2as43F9WFyytLDg3M6t ei9ka1Y4PqfcgDZPKVafsMeawMvCq+0RE4sjjh2mcwlcfz+pcQc+NRZvMFEOChRZtHBw /WOjz293h1el7juYdIA8RCFldML6DZdFZkmX58IkeBL/K/pc+l+8WB8X4leqyGl5F3FV AAeQ== X-Gm-Message-State: AOAM530q4SwRGNx/2mX+HWZZRvfQaArOQVCXus2a3HTyvR2aaSnTBsae ZgJllJnwTbHKPVabArCFfmd4Q4nz0J2X8H3BUYE= X-Google-Smtp-Source: ABdhPJyd/Nqqub1fEJ3EBij5SKiCEngrI0Ke7E1EFTG84WCyJ0frziHeTTjIbzxgB2YTLXoQkIPzLKJfZQwTkUM0e5g= X-Received: by 2002:a1f:212:: with SMTP id 18mr11684572vkc.14.1590149407556; Fri, 22 May 2020 05:10:07 -0700 (PDT) MIME-Version: 1.0 References: <20200522104207.19439-1-chris@chris-wilson.co.uk> <159014892558.32320.14917683830875571843@build.alporthouse.com> In-Reply-To: <159014892558.32320.14917683830875571843@build.alporthouse.com> From: Matthew Auld Date: Fri, 22 May 2020 13:09:41 +0100 Message-ID: To: Chris Wilson Subject: Re: [Intel-gfx] [PATCH] drm/i915/gem: Avoid iterating an empty list X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Intel Graphics Development , Matthew Auld Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, 22 May 2020 at 13:02, Chris Wilson wrote: > > Quoting Chris Wilson (2020-05-22 11:42:07) > > Our __sgt_iter assumes that the scattergather list has at least one > > element. But during construction we may fail in allocating the first > > page, and so mark the first element as the terminator. This is > > unexpected! > > > > [22555.524752] RIP: 0010:shmem_get_pages+0x506/0x710 [i915] > > [22555.524759] Code: 49 8b 2c 24 31 c0 66 89 44 24 40 48 85 ed 0f 84 62 01 00 00 4c 8b 75 00 8b 5d 08 44 8b 7d 0c 48 8b 0d 7e 34 07 e2 49 83 e6 fc <49> 8b 16 41 01 df 48 89 cf 48 89 d0 48 c1 e8 2d 48 85 c9 0f 84 c8 > > [22555.524765] RSP: 0018:ffffc9000053f9d0 EFLAGS: 00010246 > > [22555.524770] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8881ffffa000 > > [22555.524774] RDX: fffffffffffffff4 RSI: ffffffffffffffff RDI: ffffffff821efe00 > > [22555.524778] RBP: ffff8881b099ab00 R08: 0000000000000000 R09: 00000000fffffff4 > > [22555.524782] R10: 0000000000000002 R11: 00000000ffec0a02 R12: ffff8881cd3c8d60 > > [22555.524786] R13: 00000000fffffff4 R14: 0000000000000000 R15: 0000000000000000 > > [22555.524790] FS: 00007f4fbeb9b9c0(0000) GS:ffff8881f8580000(0000) knlGS:0000000000000000 > > [22555.524795] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > [22555.524799] CR2: 0000000000000000 CR3: 00000001ec7f0004 CR4: 00000000001606e0 > > [22555.524803] Call Trace: > > [22555.524919] __i915_gem_object_get_pages+0x4f/0x60 [i915] > > > > Fixes: 85d1225ec066 ("drm/i915: Introduce & use new lightweight SGL iterators") > > Signed-off-by: Chris Wilson > > Cc: Matthew Auld > > Cc: Tvrtko Ursulin > Cc: # v4.8+ Reviewed-by: Matthew Auld _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx