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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 B1A46C433DF for ; Tue, 30 Jun 2020 14:07:34 +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 92F3A2073E for ; Tue, 30 Jun 2020 14:07:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92F3A2073E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.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 1125D6E2BE; Tue, 30 Jun 2020 14:07:34 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id CEE606E2BE for ; Tue, 30 Jun 2020 14:07:32 +0000 (UTC) IronPort-SDR: ZenXOvcvsHn0xF6+jgoPk0HfsBFogH7FsRVhJZ2dh2ARGM87EViJvD73hfuyia1+bVSEVHnoqh IQ8oLTRiYvwg== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="125873808" X-IronPort-AV: E=Sophos;i="5.75,297,1589266800"; d="scan'208";a="125873808" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 07:07:05 -0700 IronPort-SDR: Yi/CQcPX3nK/6fMGia9pKE9c5wDbRvJVih0g/r4Zdcu178GG8RXM1gEiTGolbYZwYe83s+dwv+ 437ie8kFVI5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,297,1589266800"; d="scan'208";a="277436860" Received: from pozo-mobl1.ger.corp.intel.com (HELO [10.252.54.227]) ([10.252.54.227]) by orsmga003.jf.intel.com with ESMTP; 30 Jun 2020 07:07:04 -0700 To: Tvrtko Ursulin , intel-gfx@lists.freedesktop.org References: <20200623142843.423594-1-maarten.lankhorst@linux.intel.com> <20200623142843.423594-7-maarten.lankhorst@linux.intel.com> <179cf932-2f5f-419e-10d3-dc6ce0934963@linux.intel.com> From: Maarten Lankhorst Message-ID: <133c7c4e-f2ec-63a9-8688-14c94fa38e1f@linux.intel.com> Date: Tue, 30 Jun 2020 16:07:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <179cf932-2f5f-419e-10d3-dc6ce0934963@linux.intel.com> Content-Language: en-US Subject: Re: [Intel-gfx] [PATCH 07/26] Revert "drm/i915/gem: Split eb_vma into its own allocation" 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Op 30-06-2020 om 14:31 schreef Tvrtko Ursulin: > > On 30/06/2020 12:52, Maarten Lankhorst wrote: >> Op 29-06-2020 om 17:08 schreef Tvrtko Ursulin: >>> >>> On 23/06/2020 15:28, Maarten Lankhorst wrote: >>>> This reverts commit 0f1dd02295f35dcdcbaafcbcbbec0753884ab974. >>>> This conflicts with the ww mutex handling, which needs to drop >>>> the references after gpu submission anyway, because otherwise we >>>> may risk unlocking a BO after first freeing it. >>> >>> What is the problem here? eb_vma_array_put in eb_move_to_gpu? If so, could you just move this put to later in the sequence? I am simply thinking how to avoid controversial reverts. Because on the other hand I did not figure out what 0f1dd02295f35dcdcbaafcbcbbec0753884ab974 fixed in a few minutes I spent staring at the patch. >> >> >> We need to unlock before we unref to prevent a use-after-free in unlock, so freeing and releasing in eb_move_to_gpu() is too early. This means we only end up with 1 path for unlock, so it's fine to revert. > > You are saying the reason 0f1dd02295f35dcdcbaafcbcbbec0753884ab974 was added for will not be there after your changes? > > Regards, > > Tvrtko Yes. :) _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx