[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAa=b7ff6xDGFjosX+RVp0=LCD5GHtg_O2gAkcha3OJMD2uaoQ@mail.gmail.com>
Date: Sat, 25 Jan 2020 09:12:11 -0500
From: Wenwen Wang <wenwen@...uga.edu>
To: David Miller <davem@...emloft.net>
Cc: Chas Williams <3chas3@...il.com>,
"moderated list:ATM" <linux-atm-general@...ts.sourceforge.net>,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
Wenwen Wang <wenwen@...uga.edu>
Subject: Re: [PATCH] firestream: fix memory leaks
On Sat, Jan 25, 2020 at 2:11 AM David Miller <davem@...emloft.net> wrote:
>
> From: Wenwen Wang <wenwen@...uga.edu>
> Date: Sat, 25 Jan 2020 05:11:34 +0000
>
> > @@ -922,6 +923,7 @@ static int fs_open(struct atm_vcc *atm_vcc)
> > if (((DO_DIRECTION(rxtp) && dev->atm_vccs[vcc->channo])) ||
> > ( DO_DIRECTION(txtp) && test_bit (vcc->channo, dev->tx_inuse))) {
> > printk ("Channel is in use for FS155.\n");
> > + kfree(vcc);
> > return -EBUSY;
> > }
> > }
> > --
>
> There is another case just below this line:
>
> tc, sizeof (struct fs_transmit_config));
> if (!tc) {
> fs_dprintk (FS_DEBUG_OPEN, "fs: can't alloc transmit_config.\n");
> return -ENOMEM;
> }
>
> Please audit the entire function and make sure your patch fixes all of these
> missing vcc free cases.
Thanks for your comment! I was planning to submit another patch as
this case has different semantics. But, since you have pointed out, I
will revise this patch.
Wenwen
>
> Thank you.
Powered by blists - more mailing lists