LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Dongliang Mu <mudongliangabcd@gmail.com>
Cc: Corentin Labbe <clabbe.montjoie@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Eric Biggers <ebiggers@google.com>,
Xiang Chen <chenxiang66@hisilicon.com>,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Corentin Labbe <clabbe@baylibre.com>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Ard Biesheuvel <ardb@kernel.org>,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] crypto: sun8i-ce: fix multiple memory leaks in sun8i_ce_hash_run
Date: Thu, 12 Aug 2021 18:29:54 +0800 [thread overview]
Message-ID: <20210812102954.GA5569@gondor.apana.org.au> (raw)
In-Reply-To: <CAD-N9QWGgBBddi5kwTNANKVVdWaQRwagMHvaH592B5GDALpBrg@mail.gmail.com>
On Thu, Aug 12, 2021 at 06:24:25PM +0800, Dongliang Mu wrote:
> On Thu, Aug 12, 2021 at 6:05 PM Herbert Xu <herbert@gondor.apana.org.au> wrote:
> >
> > On Tue, Aug 03, 2021 at 02:31:38PM +0800, Dongliang Mu wrote:
> > >
> > > -theend:
> > > - kfree(buf);
> > > +err_result:
> > > kfree(result);
> > > - crypto_finalize_hash_request(engine, breq, err);
> > > +err_buf:
> > > + kfree(buf);
> > > +out:
> > > + if (!err)
> > > + crypto_finalize_hash_request(engine, breq, err);
> > > return 0;
> >
> > This does not look right. You're returning zero in case of an error
>
> Hi Herbert,
>
> Corentin Labbe said,
>
> For the error code, I am not sure it is needed, error code is already
> given to user via crypto_finalize_hash_request().
Yes but your patch changes this. You're now skipping the finalize
call and thus throwing away err if it's not zero.
If it's supposed to do this you need to explain it in your patch
submission.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2021-08-12 10:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 6:31 Dongliang Mu
2021-08-12 10:04 ` Herbert Xu
2021-08-12 10:24 ` Dongliang Mu
2021-08-12 10:29 ` Herbert Xu [this message]
2021-08-12 10:40 ` Dongliang Mu
2021-08-12 10:43 ` Herbert Xu
2021-08-16 13:21 ` Dongliang Mu
2021-09-23 0:54 ` Dongliang Mu
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=20210812102954.GA5569@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=chenxiang66@hisilicon.com \
--cc=clabbe.montjoie@gmail.com \
--cc=clabbe@baylibre.com \
--cc=davem@davemloft.net \
--cc=ebiggers@google.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mchehab+huawei@kernel.org \
--cc=mripard@kernel.org \
--cc=mudongliangabcd@gmail.com \
--cc=wens@csie.org \
--subject='Re: [PATCH v2] crypto: sun8i-ce: fix multiple memory leaks in sun8i_ce_hash_run' \
/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
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).