From: Marek Vasut <marex@denx.de>
To: Kim Phillips <kim.phillips@freescale.com>
Cc: Cristian Stoica <cristian.stoica@freescale.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
linux-crypto@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v2] crypto: caam - fix memleak in caam_jr module
Date: Wed, 9 Jul 2014 22:31:47 +0200 [thread overview]
Message-ID: <201407092231.47266.marex@denx.de> (raw)
In-Reply-To: <20140703175406.548b5db8610cf286aa5e2cc9@freescale.com>
On Friday, July 04, 2014 at 12:54:06 AM, Kim Phillips wrote:
> On Thu, 3 Jul 2014 15:07:50 +0300
>
> Cristian Stoica <cristian.stoica@freescale.com> wrote:
> > This patch fixes a memory leak that appears when caam_jr module is
> > unloaded.
> >
> > Cc: <stable@vger.kernel.org> # 3.13+
> > Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
> > ---
> >
> > drivers/crypto/caam/jr.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
> > index 1d80bd3..e0b91fc 100644
> > --- a/drivers/crypto/caam/jr.c
> > +++ b/drivers/crypto/caam/jr.c
> > @@ -453,7 +453,7 @@ static int caam_jr_probe(struct platform_device
> > *pdev)
> >
> > int error;
> >
> > jrdev = &pdev->dev;
> >
> > - jrpriv = kmalloc(sizeof(struct caam_drv_private_jr),
> > + jrpriv = devm_kzalloc(jrdev, sizeof(struct caam_drv_private_jr),
> >
> > GFP_KERNEL);
>
> alignment. Also, why are we replacing a _m_alloc with a _z_alloc?
I am fine with replacing kmalloc with kzalloc in this context.
Best regards,
Marek Vasut
prev parent reply other threads:[~2014-07-09 21:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 7:52 [PATCH] crypto: caam - fix memleak in caam_jr module Vakul Garg
2014-07-03 12:07 ` [PATCH v2] " Cristian Stoica
2014-07-03 22:54 ` Kim Phillips
2014-07-09 20:31 ` Marek Vasut [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=201407092231.47266.marex@denx.de \
--to=marex@denx.de \
--cc=cristian.stoica@freescale.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kim.phillips@freescale.com \
--cc=linux-crypto@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).