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 CD74BC433EF for ; Thu, 3 Feb 2022 21:32:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 32AD210ECBD; Thu, 3 Feb 2022 21:32:34 +0000 (UTC) Received: from mx2.smtp.larsendata.com (mx2.smtp.larsendata.com [91.221.196.228]) by gabe.freedesktop.org (Postfix) with ESMTPS id C9F8310ECC7 for ; Thu, 3 Feb 2022 21:32:32 +0000 (UTC) Received: from mail01.mxhotel.dk (mail01.mxhotel.dk [91.221.196.236]) by mx2.smtp.larsendata.com (Halon) with ESMTPS id eee9028c-8538-11ec-ac19-0050568cd888; Thu, 03 Feb 2022 21:33:31 +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 3C585194B5E; Thu, 3 Feb 2022 22:32:31 +0100 (CET) Date: Thu, 3 Feb 2022 22:32:28 +0100 X-Report-Abuse-To: abuse@mxhotel.dk From: Sam Ravnborg To: Daniel Vetter Message-ID: References: <20220131210552.482606-1-daniel.vetter@ffwll.ch> <20220131210552.482606-12-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Intel-gfx] [PATCH 11/21] fbcon: Extract fbcon_open/release helpers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Du Cheng , Tetsuo Handa , Greg Kroah-Hartman , Intel Graphics Development , LKML , DRI Development , Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi Daniel, > > > + kfree(ops->cursor_state.mask); > > + kfree(ops->cursor_data); > > + kfree(ops->cursor_src); > > + kfree(ops->fontbuffer); > > + kfree(oldinfo->fbcon_par); > > + oldinfo->fbcon_par = NULL; > These all look like candidates to stuff into fbcon_release() > That would drop the nice symmetry but make it more consistent. > > I think we miss freeing ops->cursor_data in fbcon_exit(), > but I did not follow all the code. We agree as I can see this was done in a later patch. Sam 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8829BC433FE for ; Sun, 6 Feb 2022 00:48:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381489AbiBFAsr (ORCPT ); Sat, 5 Feb 2022 19:48:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243808AbiBFAsq (ORCPT ); Sat, 5 Feb 2022 19:48:46 -0500 Received: from mx2.smtp.larsendata.com (mx2.smtp.larsendata.com [91.221.196.228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01EE8C061348 for ; Sat, 5 Feb 2022 16:48:45 -0800 (PST) Received: from mail01.mxhotel.dk (mail01.mxhotel.dk [91.221.196.236]) by mx2.smtp.larsendata.com (Halon) with ESMTPS id eee9028c-8538-11ec-ac19-0050568cd888; Thu, 03 Feb 2022 21:33:31 +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 3C585194B5E; Thu, 3 Feb 2022 22:32:31 +0100 (CET) Date: Thu, 3 Feb 2022 22:32:28 +0100 X-Report-Abuse-To: abuse@mxhotel.dk From: Sam Ravnborg To: Daniel Vetter Cc: linux-fbdev@vger.kernel.org, Du Cheng , Tetsuo Handa , Greg Kroah-Hartman , Intel Graphics Development , LKML , DRI Development , Claudio Suarez , Daniel Vetter Subject: Re: [PATCH 11/21] fbcon: Extract fbcon_open/release helpers Message-ID: References: <20220131210552.482606-1-daniel.vetter@ffwll.ch> <20220131210552.482606-12-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, > > > + kfree(ops->cursor_state.mask); > > + kfree(ops->cursor_data); > > + kfree(ops->cursor_src); > > + kfree(ops->fontbuffer); > > + kfree(oldinfo->fbcon_par); > > + oldinfo->fbcon_par = NULL; > These all look like candidates to stuff into fbcon_release() > That would drop the nice symmetry but make it more consistent. > > I think we miss freeing ops->cursor_data in fbcon_exit(), > but I did not follow all the code. We agree as I can see this was done in a later patch. Sam