Re: [PATCH v2 2/4] ipack: tpci200: fix memory leak in the tpci200_register
From: Greg Kroah-Hartman
Date: Tue Aug 10 2021 - 02:09:59 EST
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
> <gregkh@xxxxxxxxxxxxxxxxxxx> 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 <mudongliangabcd@xxxxxxxxx>
> > > Fixes: 43986798fd50 ("ipack: add error handling for ioremap_nocache")
> > > Signed-off-by: Dongliang Mu <mudongliangabcd@xxxxxxxxx>
> > > ---
> > > 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