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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A7DAFC28B20 for ; Fri, 28 Mar 2025 08:48:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2013610E063; Fri, 28 Mar 2025 08:48:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.b="aNROWXAD"; dkim-atps=neutral Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 22D0A10E063 for ; Fri, 28 Mar 2025 08:48:39 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id 2D3B12047F; Fri, 28 Mar 2025 08:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1743151718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MFT7SMTIg6YlG+MnRcstSp1n0mAZWbvlA88+Ka5wf1E=; b=aNROWXADk37lK71/z15aMTrLXqCW7kKCQZzoI3D1GSqXGeddsOxZr1Q+1s0ZLibHN3vdEr 14bj8Vz/+AQVnM0O2gzXkoqjyMhh1Wt9G/fneYKrKxnWYwtxyL8oagkGeYaqDOx/+yetfU +TU2xgeBESO2lE+uANYbFI3edxBLkqiplFGtx4k0ZDytQ8UPzB14FDk5Rd6oiCF3axNZxV q0TPb55fq3DylYRGQJ+KVUT7sQt/p0As+dmjnXqXhD9f+pQtruAUPEs9LlwHfWW3AcDIb9 Dmw5xjDIl6Bc6vf/cJ750zq8tSmh+x+i+DS0/unqfis2Ef3yfgEtwmD87HaHDA== Date: Fri, 28 Mar 2025 09:48:35 +0100 From: Luca Ceresoli To: Anusha Srivatsa Cc: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/4] drm/panel: Add refcount support Message-ID: <20250328094835.502b3b4d@booty> In-Reply-To: <20250327-b4-panel-refcounting-v2-2-b5f5ca551f95@redhat.com> References: <20250327-b4-panel-refcounting-v2-0-b5f5ca551f95@redhat.com> <20250327-b4-panel-refcounting-v2-2-b5f5ca551f95@redhat.com> Organization: Bootlin X-Mailer: Claws Mail 4.3.1 (GTK 3.24.43; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddujedtkeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfgjfhhoofggtgfgsehtjeertdertddvnecuhfhrohhmpefnuhgtrgcuvegvrhgvshholhhiuceolhhutggrrdgtvghrvghsohhlihessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepgeelffefgfehhfdtvdefueefieevkefggfelkeeiudetkeektedvhedukefgvddvnecuffhomhgrihhnpegsohhothhlihhnrdgtohhmnecukfhppedvrgdtvdemieejtdemvddtvddtmegvrgdtudemsggvgedumeelhegvjeemfeegfeemledufegvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddvmeeijedtmedvtddvtdemvggrtddumegsvgegudemleehvgejmeefgeefmeeludefvgdphhgvlhhopegsohhothihpdhmrghilhhfrhhomheplhhutggrrdgtvghrvghsohhlihessghoohhtlhhinhdrtghomhdpnhgspghrtghpthhtohepuddtpdhrtghpthhtoheprghsrhhivhgrthhssehrvgguhhgrthdrtghomhdprhgtphhtthhopehnvghilhdrrghrmhhsthhrohhngheslhhinhgrrhhordhorhhgpdhrtghpthhtohepqhhuihgtpghjvghsshiihhgrnhesqhhui hgtihhntgdrtghomhdprhgtphhtthhopehmrggrrhhtvghnrdhlrghnkhhhohhrshhtsehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtohepmhhrihhprghrugeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepthiiihhmmhgvrhhmrghnnhesshhushgvrdguvgdprhgtphhtthhopegrihhrlhhivggusehgmhgrihhlrdgtohhmpdhrtghpthhtohepshhimhhonhgrsehffhiflhhlrdgthh X-GND-Sasl: luca.ceresoli@bootlin.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, 27 Mar 2025 10:55:40 -0400 Anusha Srivatsa wrote: > Allocate panel via reference counting. Add _get() and _put() helper > functions to ensure panel allocations are refcounted. Avoid use after > free by ensuring panel pointer is valid and can be usable till the last > reference is put. > > v2: Export drm_panel_put/get() (Maxime) > - Change commit log with better workding (Luca, Maxime) > - Change drm_panel_put() to return void (Luca) > - Code Cleanups - add return in documentation, replace bridge to > panel (Luca) > > Signed-off-by: Anusha Srivatsa With the added #include as per my comment on patch 1, you can add: Reviewed-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com