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=-16.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 40E30C4338F for ; Tue, 10 Aug 2021 06:09:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B63761051 for ; Tue, 10 Aug 2021 06:09:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237729AbhHJGKS (ORCPT ); Tue, 10 Aug 2021 02:10:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:37798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230243AbhHJGKR (ORCPT ); Tue, 10 Aug 2021 02:10:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 32BFF60ED8; Tue, 10 Aug 2021 06:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628575795; bh=/nrVBz516xXg1+GxJ8fRvs9UDMO+EFBay4x+98pdHL0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WETrxmpOpkXlrF/yCynkhVq9kjd1EvF+Pa51SQ1JkO+aIY1Pt26pdYwjXA2gSsZJw m11l8uw1WnK2i3Z1JeytuAG1dzQrdeuzK7mljDUJVRtME7/FQds7+0IJZr5LJsxXCz ahDG14bC7aOoMzix9ZPHyBNrOyotYT/++BV9z3JU= Date: Tue, 10 Aug 2021 08:09:51 +0200 From: Greg Kroah-Hartman To: Dongliang Mu Cc: Samuel Iglesias Gonsalvez , Jens Taprogge , Aditya Srivastava , Randy Dunlap , Lv Yunlong , Zhouyang Jia , industrypack-devel@lists.sourceforge.net, linux-kernel Subject: Re: [PATCH v2 2/4] ipack: tpci200: fix memory leak in the tpci200_register Message-ID: References: <20210809143049.3531188-1-mudongliangabcd@gmail.com> <20210809143049.3531188-2-mudongliangabcd@gmail.com> 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 On Tue, Aug 10, 2021 at 07:09:15AM +0800, Dongliang Mu wrote: > On Mon, Aug 9, 2021 at 11:32 PM Greg Kroah-Hartman > wrote: > > > > On Mon, Aug 09, 2021 at 10:30:27PM +0800, Dongliang Mu wrote: > > > The error handling code in tpci200_register does not free interface_regs > > > allocated by ioremap and the current version of error handling code is > > > problematic. > > > > > > Fix this by refactoring the error handling code and free interface_regs > > > when necessary. > > > > > > Reported-by: Dongliang Mu > > > Fixes: 43986798fd50 ("ipack: add error handling for ioremap_nocache") > > > Signed-off-by: Dongliang Mu > > > --- > > > drivers/ipack/carriers/tpci200.c | 24 ++++++++++++++---------- > > > 1 file changed, 14 insertions(+), 10 deletions(-) > > > > Also for stable? > > Yes, it should. Then please resend it, and the other commits that you wish to see go to the stable tree, with the needed "cc: stable..." line in the signed-off-by area. thanks, greg k-h