From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 88745363C59 for ; Mon, 11 May 2026 07:16:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778483789; cv=none; b=WCFMzTkkBijm/Ljocf/9+HN6Nbr6ilHOd8oXgPTEfwlNb/ao4+CFYXYFDFJPGVwoBAH3NQFz0wjPPwPSdGcwgFfHrna1VixkS/8VNyBznSMRlBZlxwSoIAngn7bIn9qzk3L9xZQkfw3uh/pOFDWFDPO5PMtGIGkQA5EPSKLlMas= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778483789; c=relaxed/simple; bh=s/p9ZMl4D1FgVG+KS700GxGxXD3Qwq6c7/WdOd497MA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LSFS0w5utm9fCJusjSIlcL2Jr/Y01EltwE2Civ5V/wPJBZw1w0yKXdjwhzUoputRSBc/7EEHhOCG40UUp8mfcEuxXB1TYCYtdtZV8wd76JODgHSzMmO5wUzvl7w18+5zHrPuDz+QWt9x8+FYp1vFBdl+cpUZ4SuVRPIOCnVZM6s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u4bsnOCC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="u4bsnOCC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFD1CC2BCB0; Mon, 11 May 2026 07:16:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778483789; bh=s/p9ZMl4D1FgVG+KS700GxGxXD3Qwq6c7/WdOd497MA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u4bsnOCCtJwXHFwT3ZFXUm20wRE2QWIonOu+VgXEWhjMkmrPVTSuHcFMJ4gdAiSmi 0gPzA1dfqsTG9ZSL661mMXvQyv8zSyR8Irl2jWFSpgVuXYk4ln0O8Y0SYPKbghaIk+ VoCfDbmk/xz/MdH4Y9XUyFZaqJXy78Y6B2pGRXklwmbborFNSR85pigIJm7dOagTWG o/fJrSLVjNwjH3xoua5k3qRz5IULtETLywNARx14qKIrT1+a2uxceUVPSQ4Q5LbC+t I56O5x51bfcgRAeHhfPStxo0sXJwmZu4ee0In1KNGruJ5Rb3eb5DdORyzQP8pJHTuP Q0v89iw07pmhA== From: Maxime Ripard To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi , Albert Esteve Cc: Maxime Ripard , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 00/10] drm/panel: Use refcounted allocation for remaining panel drivers Date: Mon, 11 May 2026 09:16:24 +0200 Message-ID: <177848377975.134076.3948751574253318426.b4-ty@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Fri, 08 May 2026 09:04:40 +0200, Albert Esteve wrote: > This series converts 9 remaining panel drivers from the deprecated > devm_kzalloc() + drm_panel_init() pattern to the refcounted > devm_drm_panel_alloc() API. This follows the work by Anusha Srivatsa > who introduced the refcounted panel allocation infrastructure [1] and > converted a first batch of drivers [2] (the last part of a 5 sub-series). > > Reasoning: > ---------- > The old allocation pattern is unsafe: when the panel device is > unbound, devm frees the context struct immediately, but the DRM > device may still hold a reference to the embedded drm_panel through > the panel bridge, leading to a use-after-free. devm_drm_panel_alloc() > wraps the allocation in a kref scheme, so the memory is only freed > when the last reference is dropped. > > [...] Applied to misc/kernel.git (drm-misc-next). Thanks! Maxime