Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3767767pxt; Tue, 10 Aug 2021 10:51:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzu+qkS39J/z5LHJLcSdarhxaHdBJ+8uSBXEkzTYjTv928CPqYg8W8gfNaFZuOpyAseN7P6 X-Received: by 2002:a92:b012:: with SMTP id x18mr237134ilh.255.1628617907945; Tue, 10 Aug 2021 10:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617907; cv=none; d=google.com; s=arc-20160816; b=nyMmsAhMg6WUeH4y/b3E7cWP4hTYA4jFMmTciDROUmpkyaIABDo0iyAmOdCZJkCFsM e9k83gjP4sY1yMxiksoIjPapH3qNUn471NFAIDyxhtbygcxuxYvHeprWL1j+w73rY4US UCLVhB1ae23rSqJOovd7+xOlnxw+pvQW1dzttZ9b7ARBD0k4hHaMT6O3pAjpTwXclu77 NHNnf4o+pJ9O/8n3iPUZ9AcDU0beTcnihXg+EmGS+t+r80sfBzzAlNqXoLYAHh7fn+sz bbZBdfwfXQoe/f5G0xcHocsUNfQ5q5qDcfPiWfnkTbc5Ea0taqOsFnwFEGi8uE/pSGeG D2tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wLMztGh3Artsilz26R6B4Hc7GX5TyIRmTRqFYfynfbs=; b=wbXt6wjzVZz1tniBOMg1oU+MlDoVKPLIBabwy/VjSPNVI/2b66dab2zzoAY3lb3Pal UEnJU54TIMVg1ENjtUar/3fHoYJ8TSrsL4UJzgMRcEEB9mHz4dYfC5/XrZIPa6u1wW6q jQj1mJVsRqJwUFnw3L1XhHS4Ikn+Mp0Fv3t6C48HMtjWyX582NPiDdLP16up9g8sl0GK 6ruMpCS0QvgioA76hkOG0Z1XEB7l1uwTdQax2ifAQI5ubemop2RFjXZs+q57wV2PyIkj ygN5J45GhWRSKOM7tDVoXjs9Qpw1ePzRZmR/+eUrmYIM0fbLrEL4b1o1cgVP4RzpakTg YL8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=J5vytcLK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g14si25468887jat.28.2021.08.10.10.51.35; Tue, 10 Aug 2021 10:51:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=J5vytcLK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233796AbhHJRvG (ORCPT + 99 others); Tue, 10 Aug 2021 13:51:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:38632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbhHJRs2 (ORCPT ); Tue, 10 Aug 2021 13:48:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AB215610FD; Tue, 10 Aug 2021 17:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617279; bh=52wx1QAENu1RFKw2KKVSA/Q5oPays035lX5xH5MXumM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J5vytcLKYzm5HE8RmQu40eJEwNzIiOtUc5Ag5Jw6XOJNisIwWAmvc+796wDhaCYLz XxIK3N/XH5Lfo/WGjWR97oraUC66zHHSvW14Dcj+N2p8L+/Rwju0cIEuwBqUDxEiwd SGmfvzF3Jltyl6/uRcoP9Lbg1grYHUFbUAHmAyFA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , jason@jlekstrand.net, Jonathan Gray Subject: [PATCH 5.10 125/135] drm/i915: avoid uninitialised var in eb_parse() Date: Tue, 10 Aug 2021 19:30:59 +0200 Message-Id: <20210810173000.050147269@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan Gray The backport of c9d9fdbc108af8915d3f497bbdf3898bf8f321b8 to 5.10 in 6976f3cf34a1a8b791c048bbaa411ebfe48666b1 removed more than it should have leading to 'batch' being used uninitialised. The 5.13 backport and the mainline commit did not remove the portion this patch adds back. Signed-off-by: Jonathan Gray Fixes: 6976f3cf34a1 ("drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"") Cc: # 5.10 Cc: Jason Ekstrand Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -2351,6 +2351,12 @@ static int eb_parse(struct i915_execbuff eb->batch_flags |= I915_DISPATCH_SECURE; } + batch = eb_dispatch_secure(eb, shadow); + if (IS_ERR(batch)) { + err = PTR_ERR(batch); + goto err_trampoline; + } + err = intel_engine_cmd_parser(eb->engine, eb->batch->vma, eb->batch_start_offset, @@ -2377,6 +2383,7 @@ secure_batch: err_unpin_batch: if (batch) i915_vma_unpin(batch); +err_trampoline: if (trampoline) i915_vma_unpin(trampoline); err_shadow: