Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp498436rdb; Fri, 26 Jan 2024 01:59:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHuLW8kpAY3gvZZPkZMTMiq1/stk3gzFLW5qwP+3mkDk4qUChSxCexv7L/OzfI9RCRGi1pX X-Received: by 2002:a50:aadd:0:b0:55a:6a30:8edf with SMTP id r29-20020a50aadd000000b0055a6a308edfmr685825edc.20.1706263179638; Fri, 26 Jan 2024 01:59:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706263179; cv=pass; d=google.com; s=arc-20160816; b=w3TjTXUwhYTfLLkTj49pdRkT4uzS2IgtOAnefWAsV0uKRfy74YM5ulvgl/qiG8reyu 9MNlZLH2Q1cNNHH5QaLFr+GNIx+8Tq2WQJqJF7ROYBl0+0kHMUUC6Um9gvTEKSKvaZL6 LcLoSvyRqkrvV302XA+kbNzrCEz25i/9GpS0b70LUHjLgIe7SnmRzASzE9ZId1LP2QDl /qh9GGQq8qm0Q6vsiuHByzUG8dJcoOP8sSheY0IlYyelPGTLwDbM12yQBCh/ATwXk3b3 /dQmzMRz97GYtInoIWM2OWEDFSo0YSF7q98yjEIplYr3cvEhIMBxiyWOkeVviTmSeVmj Ohjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=zktIXtItjv+fVi7ul4hYO0u3+vKG4/jxnGLAgp0I0Ws=; fh=Vt0f8aIoXkLwv9NNfwRSle7KFDX2SmzUG+L09AOmqeU=; b=lGqqbojpcQHdeRHez51V0yeNEwmNt7ksK7exgNzogawmgs/WG4gFpOOfxNmeDFB/T1 4zNyMpUkXB2zbwftTr+l1tgXUWdlGbwhvCFy9Ec6EGXV+u6zd24qWaKogmAHFvMljFsC pn5/bQ602O0YsNuuc3nEc5/m7xq2uOKcSVTDuC3UhsTk/x/vgbDNQXC3IIbOXrqswrCc BSipjaHx3yokRJMtS7w1UK4jOj1yntKf/ArdTmJGa9YtmToTraauVsPZAAAxAmNalIe8 9+d1wu8DByYH3FZ3maavpQjTSJzKdvSBdBtfrQ0cqs+nAYFjUuiSMCIUaQmTbSmRECtI UV5g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="XFtnuKH/"; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-39889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39889-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id eg34-20020a05640228a200b0055a71913517si475367edb.558.2024.01.26.01.59.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 01:59:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="XFtnuKH/"; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-39889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39889-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1D5321F2B455 for ; Fri, 26 Jan 2024 09:57:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4A995D745; Fri, 26 Jan 2024 09:08:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="XFtnuKH/" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49AA311731 for ; Fri, 26 Jan 2024 09:08:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706260086; cv=none; b=TTFHQtW1e+ucJZVOEBVWPxZ0efVD1b8ukbxNK06pjMrOX2ziZhrSCUbNagqCihEykrTYXhYR1qcZsBLeIat8772EUspcLS3PaL1bJYqFkxPri6flgOSnp1FOCDsQG7MZaPhWaslGprVdRRnXY0ZNocx73saNrOhNVfTu2b1XdOQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706260086; c=relaxed/simple; bh=A4Bu9DBeMohqV6ojHawhAsegNEGOWtq+rjrBZb62rOc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Vz3DvGKOssKfQPzcL6SVj8b35XwZ7IyWN2c4DVSfq3qqMEWT+808yI3RRK35G1zpE4x5T2F0HsKyc647q3k+pFD/HbuWh+VNl9iCTgYs7iFsUW8iKDJorzbUY2wejm11HOGYwU0lKuSVFRy2j4JiS1ktM4LZkgb4Q6Cndk/Zzj8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=XFtnuKH/; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1706260083; bh=A4Bu9DBeMohqV6ojHawhAsegNEGOWtq+rjrBZb62rOc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=XFtnuKH/yy0vN6U0GKaSbQxuJRJwi85TPpZapfqm0zNj09H+H4pLbdif9YOjKAnbT CgizO/+3tdmOPxrRavCPLOlJCFuGYEYYdptJv8nPKIFrr3z0z7v+89JZT9IHRdi8Aq EmUYTkVdUZB2KLS79O3RoZYS1SGtwUPbL/pUH78Oi8TFkqRnybZAUw1HWvhIIh4Ek0 24FuFvw6t9ZVSpLk45qkCVubxoy/KPHvtndztHwN3YawPuWFt9dIJ9H/lfrE4nsNHH K0c5aH13HPg7sBHJYyPExioM128Qnu694FvZmbY3aH2oKWH27f++Im5eIIz55bie+7 2D8kWg8FKzGxA== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 25188378107C; Fri, 26 Jan 2024 09:08:02 +0000 (UTC) Message-ID: Date: Fri, 26 Jan 2024 10:08:01 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v19 17/30] drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr() To: Dmitry Osipenko , David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , =?UTF-8?Q?Christian_K=C3=B6nig?= , Qiang Yu , Steven Price , Boris Brezillon , Emma Anholt , Melissa Wen Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, virtualization@lists.linux-foundation.org References: <20240105184624.508603-1-dmitry.osipenko@collabora.com> <20240105184624.508603-18-dmitry.osipenko@collabora.com> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20240105184624.508603-18-dmitry.osipenko@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 05/01/24 19:46, Dmitry Osipenko ha scritto: > From: Boris Brezillon > > If some the pages or sgt allocation failed, we shouldn't release the > pages ref we got earlier, otherwise we will end up with unbalanced > get/put_pages() calls. We should instead leave everything in place > and let the BO release function deal with extra cleanup when the object > is destroyed, or let the fault handler try again next time it's called. > > Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") > Cc: > Signed-off-by: Boris Brezillon > Co-developed-by: Dmitry Osipenko > Signed-off-by: Dmitry Osipenko Reviewed-by: AngeloGioacchino Del Regno