Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp237327rdb; Thu, 25 Jan 2024 13:44:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGjyQ8jv23x8ifyLsNb0HSkQSxf0JRgqvGr9MOX6s+D76w6kcdo9Wr9SKJv5Y4BtK1BizT X-Received: by 2002:a05:620a:811f:b0:783:8999:5200 with SMTP id os31-20020a05620a811f00b0078389995200mr362463qkn.75.1706219091065; Thu, 25 Jan 2024 13:44:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706219091; cv=pass; d=google.com; s=arc-20160816; b=I5M4trQRliw1hlG2/f4/upKwX9vltyjZEqnKn2BLCbYaDLppSnaWPh7nMEvg4nJ7TW lLBa6Y+JGWsy4WCHnqdpluVKA1epZASTv6h5Im4EOMT0F9ZoKA1AlgcFHDSG5rJzpcnv CKTcHk32EPwC2y6rHRyMIp790s3KZQI6ZDRjo3sGvAKw6541RFcaSZ+hqb/0vFplbquK jOIBLs5+AL+tSqeSIU83bGDU+I6UJerUwgOm9JDc1gzi43F/WFn+7dlhB4p2GS7E4PxI kUOUx84QmE5azw6BzexZVjCCdZ/ngMEHGkHJY1xX2X/vXdNjcH16SDlRAbSDscT9FXMs 1h7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=JJA59T9gjzKW11v/rv3ynkhVwTw+gYqFXKPKaDgCdIY=; fh=oDPdOggKFzMKKW+4QIXESSzH7v0QhS1Y6I1yvDyNfeA=; b=M7zJZFWo3ZA3O6oa+dongTvpt/jlgZDOnoIUen2qv31k92KgaGO1mEfW2FX81Lqw7t iIjgi09Ryt1IvjlJxRwAJyEvgbylqTbp1MIgDHKuHkF81AgLsiXAFeLKcUDHbV1pADaC WiSRBM57ztw6TnCgItUvY0+TeylnwSmvGlG4FotE5mzPtyL75AhsUvop7PRixb5Vhmv4 b899fTf3ulbbVD/99819g5gVij93b/TIq77BAxYN+BbQebiLUCbxiznnDm16ubr3+3zL 4gdvHdfTtkWBcHK5oDx/9v0oSuSpP/IatEyGhai92mJnWox9ycDknBfjjhxnMMX4ERpo uMPQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=zH4YsQQ1; 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-39326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pe24-20020a05620a851800b0078396b04a0dsi11698101qkn.392.2024.01.25.13.44.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 13:44:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=zH4YsQQ1; 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-39326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39326-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9AFDA1C23AEF for ; Thu, 25 Jan 2024 21:44:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 097C313A272; Thu, 25 Jan 2024 21:44:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="zH4YsQQ1" 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 CD7E21292EA for ; Thu, 25 Jan 2024 21:44:40 +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=1706219082; cv=none; b=n8oUQjdKsDB8t5U92uZl2uo0J5J9eyTsIcAO8jpRV0uaxvVcp/fPqHa+lm9sehweOJgJSKsBepgEgmGZxfcc1cRqWhdnyFj6KUKsXK9v0WvAY9DTvRbsNENhN5m7FiRX48HujahoL+03Sb4xDsmHdgKF6tpJwefBwmm+x9ba0eA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706219082; c=relaxed/simple; bh=VKagnVmAZwzDPUwQEySN1O/dZJAvWl37niOmwVB/dyA=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=eEzGXHZPJ8lpNlyYuEWic/n2tZZZSqoV8sJeo9vNtQll52foblPZWSuTJf7Syy2rjrOevje7cSeAlXVbzApAeugUjwcm8QH+JuvMaKF7h+vlIVZ0rDPG8bJBpOC8Pvu6kH1iVWu9jRRHrxXI6lcIMLBqsoRDXg0s0kNUGMg856I= 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=zH4YsQQ1; 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=1706219078; bh=VKagnVmAZwzDPUwQEySN1O/dZJAvWl37niOmwVB/dyA=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=zH4YsQQ1l9xhDsaiFEXIwuiTiRpBtb9WAEHZF0IB1pCL1ARKClVhCLvtpJyejW385 MlZFZt3zOuBKgPCaCvbQqBeL7/fr1NdvMzbmvLXwOHAiMiLpf+t7BMzs0FN3Tp1x75 IZKk9/Q3MJ7nS/GfTLDHT1p0P+VEXeTEgosFRqNr4pNPdD9UedKbdo4BIXNQJ6hlOO ekPlOo1/mAejbQgzUJQP9o0hPQi/9EPAkzgxCWYjhuKgpCjvBaUXJkafrEzi0znmNU pr1RO2ZHuCXoiznbl/hNxf05pxnDwTd4ruetDWaCJCayfu7El6UbOZpD0cmK746ct3 yAH/351PiykNA== Received: from [100.109.49.129] (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: dmitry.osipenko) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 647DE37813DA; Thu, 25 Jan 2024 21:44:37 +0000 (UTC) Message-ID: Date: Fri, 26 Jan 2024 00:44:34 +0300 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() Content-Language: en-US From: Dmitry Osipenko To: Steven Price , Boris Brezillon Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, virtualization@lists.linux-foundation.org, 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 , Emma Anholt , Melissa Wen References: <20240105184624.508603-1-dmitry.osipenko@collabora.com> <20240105184624.508603-18-dmitry.osipenko@collabora.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/26/24 00:41, Dmitry Osipenko wrote: > On 1/5/24 21:46, Dmitry Osipenko wrote: >> for (i = page_offset; i < page_offset + NUM_FAULT_PAGES; i++) { >> + /* Can happen if the last fault only partially filled this >> + * section of the pages array before failing. In that case >> + * we skip already filled pages. >> + */ >> + if (pages[i]) >> + continue; >> + >> pages[i] = shmem_read_mapping_page(mapping, i); > > Although, the shmem_read_mapping_page() should return same page if it > was already allocated, isn't it? I.e. there was no bug here and the > fixes/stable tags not needed. Scratch that, I forgot that the patch is about the unbalanced get/put_pages -- Best regards, Dmitry