From: "Liu, Changcheng" <changcheng.liu@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>, adrian.hunter@intel.com
Cc: linus.walleij@linaro.org, linux-mmc@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: [PATCH v2] mmc: block: fix logical error to avoid memory leak
Date: Mon, 18 Dec 2017 21:16:10 +0800 [thread overview]
Message-ID: <20171218131610.GA91929@sofia> (raw)
In-Reply-To: <CAPDyKFojyPB5QULubDVar1kqnHQ0SUeZn7kr=HWKfDiWmujQ6Q@mail.gmail.com>
Hi Uffe,
Thx for your guide. I'm on the way to work with community. I'll
follow your suggestion next time.
B.R.
Changcheng
On 21:05 Mon 18 Dec, Ulf Hansson wrote:
> On 16 December 2017 at 16:15, Liu, Changcheng <changcheng.liu@intel.com> wrote:
> > If the MMC_DRV_OP_GET_EXT_CSD request completes successfully, then
> > ext_csd must be freed, but in one case it was not. Fix that.
> >
> > Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
>
> Thanks, applied for next!
>
> Next time, you may please preserve acks from previous versions,
> especially if the reviewer (Adrian in this case) says so.
>
> Kind regards
> Uffe
>
> >
> > diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> > index ccfa98a..b737a95 100644
> > --- a/drivers/mmc/core/block.c
> > +++ b/drivers/mmc/core/block.c
> > @@ -2623,6 +2623,7 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
> >
> > if (n != EXT_CSD_STR_LEN) {
> > err = -EINVAL;
> > + kfree(ext_csd);
> > goto out_free;
> > }
> >
> > --
> > 2.7.4
prev parent reply other threads:[~2017-12-18 13:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 5:03 [PATCH] mm/block: logical error fix to avoid memory leak Liu, Changcheng
2017-12-15 14:34 ` Adrian Hunter
2017-12-16 15:15 ` [PATCH v2] mmc: block: fix logical error " Liu, Changcheng
2017-12-16 19:07 ` Linus Walleij
2017-12-18 13:05 ` Ulf Hansson
2017-12-18 13:16 ` Liu, Changcheng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171218131610.GA91929@sofia \
--to=changcheng.liu@intel.com \
--cc=adrian.hunter@intel.com \
--cc=akpm@linux-foundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox