From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFC02363C6C for ; Fri, 8 May 2026 07:29:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778225379; cv=none; b=jKKZ0O2tJERB6d0UWRsTxn20JhoBuKnvRSTN4aIlrcATVuywyOK3LXhJPLUVnvWUYe5BWLVpwCqupnH+PZn3erbKYTtd1ReAM/tirKyaUMb+RsroMAz4U9kIxxrQC7hIdMRKm3YfcE1WP9fNRkId+au020MCcLB55ieL5G/0mw4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778225379; c=relaxed/simple; bh=gCg/WSJJGydYaa2Rlqr9cStYlEm5yggRiD6WsW+nsZ0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mbGStbb26NYjtTnUh7VMjQJkOote0JZxGcRheclrO4joQTsDTN3Zo36onTBwi+OXtfM1BtglZ8VkE8Ns3/vVVPB0Rv4mEoOd5CV6iHe//V3QOV/y4sSuL/xQKyuwCNlLW0j372tuQPy5Q4kRNbwkr1ES0qsaZjO0fEnNWHqg1RA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=k6aY4Ax+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=wYklNYxi; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=k6aY4Ax+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=wYklNYxi; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="k6aY4Ax+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="wYklNYxi"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="k6aY4Ax+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="wYklNYxi" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B59E65CF25; Fri, 8 May 2026 07:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1778225371; h=from:from:reply-to: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:autocrypt:autocrypt; bh=4YT1mBb7pU7f4JmGGWQNLY8pwjW5TwwIzjaQDyppQjw=; b=k6aY4Ax+lckfp6BGcNkw7mpWgJ2vXekeTLh+Bnv4Wjbx312SXoXLwnA0n58giV3a5VFNJ4 HV1cu7k7jwAhbhbwzsu5bL8zcurN2/NnPZBKZzxt9h8AC/hNg6ksi5Aw4GQTR/nVyDt+dy /mltU9qa0lV18YqyRoYQTjHPAcpPJ5A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1778225371; h=from:from:reply-to: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:autocrypt:autocrypt; bh=4YT1mBb7pU7f4JmGGWQNLY8pwjW5TwwIzjaQDyppQjw=; b=wYklNYxiIQm6f2UNP0/CEWrqwLXSFc1GZaZewZKxTP2XWF/L/U/hIqI/TYscA05zUu30hb 7N+5J/XR+i4gc4CA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1778225371; h=from:from:reply-to: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:autocrypt:autocrypt; bh=4YT1mBb7pU7f4JmGGWQNLY8pwjW5TwwIzjaQDyppQjw=; b=k6aY4Ax+lckfp6BGcNkw7mpWgJ2vXekeTLh+Bnv4Wjbx312SXoXLwnA0n58giV3a5VFNJ4 HV1cu7k7jwAhbhbwzsu5bL8zcurN2/NnPZBKZzxt9h8AC/hNg6ksi5Aw4GQTR/nVyDt+dy /mltU9qa0lV18YqyRoYQTjHPAcpPJ5A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1778225371; h=from:from:reply-to: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:autocrypt:autocrypt; bh=4YT1mBb7pU7f4JmGGWQNLY8pwjW5TwwIzjaQDyppQjw=; b=wYklNYxiIQm6f2UNP0/CEWrqwLXSFc1GZaZewZKxTP2XWF/L/U/hIqI/TYscA05zUu30hb 7N+5J/XR+i4gc4CA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 52538593A7; Fri, 8 May 2026 07:29:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 5DvMEtuQ/Wl2GwAAD6G6ig (envelope-from ); Fri, 08 May 2026 07:29:31 +0000 Message-ID: Date: Fri, 8 May 2026 09:29:30 +0200 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 v2 00/10] drm/panel: Use refcounted allocation for remaining panel drivers To: Albert Esteve , Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> Content-Language: en-US From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= xsBNBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAHNJ1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPsLAjgQTAQgAOAIb AwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftODH AAoJEGgNwR1TC3ojx1wH/0hKGWugiqDgLNXLRD/4TfHBEKmxIrmfu9Z5t7vwUKfwhFL6hqvo l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reply-To: <20260508-drm_panel_init_rm-v2-0-0bd4ac429971@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Flag: NO X-Spam-Score: -4.30 X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWELVE(0.00)[12]; FREEMAIL_TO(0.00)[redhat.com,linaro.org,gmail.com,linux.intel.com,kernel.org,ffwll.ch,pengutronix.de,amarulasolutions.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid,suse.com:url] X-Spam-Level: For this series: Reviewed-by: Thomas Zimmermann Am 08.05.26 um 09:04 schrieb Albert Esteve: > 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. > > After this series, there are no remaining callers of drm_panel_init() > under drivers/gpu/drm/panel/, and drm_panel_init() is entirely removed > from the public API. > > [1] https://lore.kernel.org/all/20250331-b4-panel-refcounting-v4-0-dad50c60c6c9@redhat.com/ > [2] https://lore.kernel.org/all/20250710-b4-driver-convert-last-part-july-v1-0-de73ba81b2f5@redhat.com/ > > Signed-off-by: Albert Esteve > --- > Changes in v2: > - Remove drm_panel_init/alloc precedence mentions in kdocs > - Link to v1: https://lore.kernel.org/r/20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com > > --- > Albert Esteve (10): > drm/panel/visionox-g2647fb105: Use refcounted allocation in place of devm_kzalloc() > drm/panel/samsung-s6e63m0: Use refcounted allocation in place of devm_kzalloc() > drm/panel/novatek-nt37700f: Use refcounted allocation in place of devm_kzalloc() > drm/panel/lxd-m9189a: Use refcounted allocation in place of devm_kzalloc() > drm/panel/ilitek-ili9806e: Use refcounted allocation in place of devm_kzalloc() > drm/panel/tdo-tl070wsh30: Use refcounted allocation in place of devm_kzalloc() > drm/panel/sharp-ls043t1le01: Use refcounted allocation in place of devm_kzalloc() > drm/panel/truly-nt35597: Use refcounted allocation in place of devm_kzalloc() > drm/panel/startek-kd070fhfid015: Use refcounted allocation in place of devm_kzalloc() > drm/panel: Make drm_panel_init() static > > drivers/gpu/drm/display/drm_dp_helper.c | 2 -- > drivers/gpu/drm/drm_panel.c | 7 +++---- > drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c | 10 +++++----- > drivers/gpu/drm/panel/panel-lxd-m9189a.c | 11 ++++++----- > drivers/gpu/drm/panel/panel-novatek-nt37700f.c | 11 ++++++----- > drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 14 +++++++------- > drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 11 ++++++----- > drivers/gpu/drm/panel/panel-startek-kd070fhfid015.c | 12 ++++++------ > drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c | 14 +++++++------- > drivers/gpu/drm/panel/panel-truly-nt35597.c | 10 +++++----- > drivers/gpu/drm/panel/panel-visionox-g2647fb105.c | 13 ++++++------- > include/drm/drm_panel.h | 4 ---- > 12 files changed, 57 insertions(+), 62 deletions(-) > --- > base-commit: 74fe02ce122a6103f207d29fafc8b3a53de6abaf > change-id: 20260506-drm_panel_init_rm-3a4489701f10 > > Best regards, -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)