Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp241314rdb; Thu, 25 Jan 2024 13:56:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGEl4Wph5Obk7bymLnbAyrSy0/9ppKKEjgPufoa2xwHkIZaFkpPx0hLOkfJv6imYtB4SXQW X-Received: by 2002:a17:90a:7c47:b0:290:3be1:9c2 with SMTP id e7-20020a17090a7c4700b002903be109c2mr263005pjl.14.1706219798009; Thu, 25 Jan 2024 13:56:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706219797; cv=pass; d=google.com; s=arc-20160816; b=oTAnX1R8WcLijysfIf0ow2ToUWHvJj+SXlDqy85J+19+rLkVsYgu+g0zZOi4HnuVVx +Uh+CD+HesBQDaYbKjilVMTDXCRiu3Tdw100M48ogdFPdmwH+M2PyaBg3nFUXqJi7wGv UFvuVogVkF0xVj/2i7vaomOkRWG9VTzvwcK1gjg6swQpMD/l2orwuYDkG7yEGneGirc1 bwnUViz7C7v3HnjIhIlXs6vHPcGc662VGtYYIn12jwRzwwL8HPLgaWSfI9fVytSv0s+d Rw0HdK1/SziM12p5HpZuKmSLOPnsXJXotv0f0R311f9oRPuDTwxG5tJPWgvDeWKiTdax ykbA== 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=8Rt3ykfezxa4gT1JsFU+iH4UJYb1OiMDpG3HdQSnWcY=; fh=oDPdOggKFzMKKW+4QIXESSzH7v0QhS1Y6I1yvDyNfeA=; b=uOid9rC4P3yQiOYmsW7jmPE2AnZIXJhlm4Wgs48lcCBknEhNTyjp+DfG6osqAOtMrA b2llRjFDQeRJDGUoLqxRqV7WKQr37RpqDJm6kTdNgqNMVRFJlX6xbqqE6a9zz9ZGOP2B 53vy7Wx0/QWwz+OOQRr7D+/OSSii6OZ7WmD/2YizJAhC75aElVbgeyDbLn2j4oa02iMB dR0Y8hsERqefAZAwXOf+vTx+kc2kXPp0Wfmwh6nZWRx5x4HzkpoFfzvCogpOyv5BkxcF Ngbflr2Oc1vV9ceT94cMRLrqiJnuOIJij+aCeq/VRNZ1fj+kk8oTF7HIamoOvLV0YG8s LXQg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=I5KffNlJ; 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-39325-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39325-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q24-20020a17090aa01800b0028d956cf50fsi2010033pjp.99.2024.01.25.13.56.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 13:56:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39325-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=I5KffNlJ; 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-39325-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39325-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8BD38B22F62 for ; Thu, 25 Jan 2024 21:42:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B3BB13A272; Thu, 25 Jan 2024 21:42:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="I5KffNlJ" 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 F3CE4130E52 for ; Thu, 25 Jan 2024 21:42:02 +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=1706218924; cv=none; b=jVYsbiwFccwavjKLeor0yE7quxNfjQv4mydN6xS2YVxxTFZZDt2UEzEFL926Q0WcmJHKG0dN4kn3E3ef6H5YUEqEqWi9I/EvWqUynt/fDpruaWxImKFadVEjLePjS0tv+R9nfETfnuHg9yWJNABkwCbeqhoMvThns2P/xQpOfYE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706218924; c=relaxed/simple; bh=6qkcZYWngfmRTvoOwp5UnpiufJBrssnD1F59vptg1wY=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=a80AobHJ9xohWHWLb+Yjg54KxsGpctBceMYKOfgr/Ambjax9nZtAfYnnwJ6k1hrC6j0JSqGnooLv7po/FiPy9lu/Rtv1uVZm7vW0lGsERPiIprrtV1dSVmktbHTgyhMxZEpGAUiKbf8MA68vFpgHZqTYUv2UqSDIGqPR6UXWGiE= 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=I5KffNlJ; 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=1706218920; bh=6qkcZYWngfmRTvoOwp5UnpiufJBrssnD1F59vptg1wY=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=I5KffNlJy4qUnAehVXlDMpPEWTV7OGsIeSJlAox5l7zB9E2csGaYrZXUiTt9xEjRu 1wSHngLecv9nUrZZn4lK8E3BaQyzHkupXZ+00Y9dp2nxCDeYOlM2bxcNKNl1v50hKl vbw2F9hUDKfA51s87p4ygh9gU02b6CINPP2ILYS9lAYc+gG8dCnqpEFQqSKq9FGiT7 hH4JAu0etmynZD1NexRS/bBPKzSMpU+qNoYBO5CjfYxTK/XtVlTCwvqwMpd1nCNvFu mmmESnUNfoNGGwGFyIrYq2t3Ko4TX+LE7pYVe8mcLAEoMGpy7Lm5aZKCYu5VFr2M4J evd9vc0KwWfRA== 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 2C1A037813DA; Thu, 25 Jan 2024 21:41:59 +0000 (UTC) Message-ID: Date: Fri, 26 Jan 2024 00:41:56 +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: <20240105184624.508603-18-dmitry.osipenko@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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. -- Best regards, Dmitry