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 X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B760C07E95 for ; Tue, 20 Jul 2021 17:19:49 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B914560233 for ; Tue, 20 Jul 2021 17:19:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B914560233 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B3DF6E453; Tue, 20 Jul 2021 17:19:48 +0000 (UTC) Received: from mx1.smtp.larsendata.com (mx1.smtp.larsendata.com [91.221.196.215]) by gabe.freedesktop.org (Postfix) with ESMTPS id 07B226E453 for ; Tue, 20 Jul 2021 17:19:46 +0000 (UTC) Received: from mail01.mxhotel.dk (mail01.mxhotel.dk [91.221.196.236]) by mx1.smtp.larsendata.com (Halon) with ESMTPS id af1827e4-e97e-11eb-9082-0050568c148b; Tue, 20 Jul 2021 17:19:47 +0000 (UTC) Received: from ravnborg.org (80-162-45-141-cable.dk.customer.tdc.net [80.162.45.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sam@ravnborg.org) by mail01.mxhotel.dk (Postfix) with ESMTPSA id 2960A194B23; Tue, 20 Jul 2021 19:19:59 +0200 (CEST) Date: Tue, 20 Jul 2021 19:19:40 +0200 X-Report-Abuse-To: abuse@mxhotel.dk From: Sam Ravnborg To: Maxime Ripard Subject: Re: [PATCH 08/10] drm/panel: raspberrypi-touchscreen: Prevent double-free Message-ID: References: <20210720134525.563936-1-maxime@cerno.tech> <20210720134525.563936-9-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210720134525.563936-9-maxime@cerno.tech> 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: , Cc: Neil Armstrong , David Airlie , dri-devel@lists.freedesktop.org, Jonas Karlman , linux-kernel@vger.kernel.org, Robert Foss , Andrzej Hajda , Thierry Reding , Jernej Skrabec , Thomas Zimmermann , Daniel Vetter , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Maxime, On Tue, Jul 20, 2021 at 03:45:23PM +0200, Maxime Ripard wrote: > The mipi_dsi_device allocated by mipi_dsi_device_register_full() is > already free'd on release. > > Fixes: 2f733d6194bd ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.") > Signed-off-by: Maxime Ripard Reviewed-by: Sam Ravnborg I did a quick audit (as using grep mostly) to see if other panels had the same bug, but did not find others. This patch should be applied to drm-misc-fixes independent of the rest of the patches. Sam > --- > drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c > index 6f2ce3b81f47..462faae0f446 100644 > --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c > +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c > @@ -447,7 +447,6 @@ static int rpi_touchscreen_remove(struct i2c_client *i2c) > drm_panel_remove(&ts->base); > > mipi_dsi_device_unregister(ts->dsi); > - kfree(ts->dsi); > > return 0; > } > -- > 2.31.1