LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Jesper Juhl <jj@chaosbits.net>
Cc: tadeusz.struk@intel.com, herbert@gondor.hengli.com.au,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
aidan.o.mahony@intel.com, gabriele.paoloni@intel.com,
adrian.hoban@intel.com
Subject: Re: [PATCH] rfc4106, Intel, AES-NI: Don't leak memory in rfc4106_set_hash_subkey().
Date: Fri, 11 Feb 2011 15:26:47 +0100 [thread overview]
Message-ID: <20110211142647.GA3920@ucw.cz> (raw)
In-Reply-To: <alpine.LNX.2.00.1102071922220.27796@swampdragon.chaosbits.net>
On Mon 2011-02-07 19:24:43, Jesper Juhl wrote:
> On Mon, 7 Feb 2011, tadeusz.struk@intel.com wrote:
>
> > From:
> > Date: Sun, 16 Jan 2011 16:41:11 +0000
> > Subject: RE: [PATCH] rfc4106, Intel, AES-NI: Don't leak memory in rfc4106_set_hash_subkey().
> >
> > Hi Jesper,
> > Thanks, but I think there is still a problem here. You don't want to kfree req_data
> > when the kmalloc failed. I think it should look as follows.
> > Are you ok with this?
> >
> Fine by me.
>
> I was aware of the kfree(NULL) thing, but desided to leave it as is for
> two reasons - 1) kfree(NULL) is harmless and this is an error path, so the
> extra function call doesn't matter much. 2) I wanted to preserve
> deallocations in the reverse order of the allocations. But sure, moving
> that kfree is a tiny optimization of the error path, so I'm fine with it.
I don't think such optimalization is worth doing... original code is
as good but shorter and less complex...
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2011-02-11 14:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 17:32 tadeusz.struk
2011-02-07 18:24 ` Jesper Juhl
2011-02-11 14:26 ` Pavel Machek [this message]
2011-02-11 14:38 ` Paoloni, Gabriele
2011-02-11 14:47 ` Jesper Juhl
2011-02-11 21:09 ` [PATCH](updated) " Jesper Juhl
2011-02-11 21:14 ` Jesper Juhl
2011-02-16 2:04 ` Herbert Xu
2011-02-07 21:09 ` [PATCH] " Herbert Xu
2011-02-10 18:47 ` Jesper Juhl
-- strict thread matches above, loose matches on Subject: below --
2011-02-08 8:59 tadeusz.struk
2011-01-16 14:38 Jesper Juhl
2011-01-19 16:02 ` Struk, Tadeusz
2011-02-06 19:43 ` Jesper Juhl
2011-02-06 20:34 ` Herbert Xu
2011-02-06 20:34 ` Jesper Juhl
2011-02-06 20:48 ` Herbert Xu
2011-02-06 21:33 ` Jesper Juhl
2011-01-23 7:56 ` Herbert Xu
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=20110211142647.GA3920@ucw.cz \
--to=pavel@ucw.cz \
--cc=adrian.hoban@intel.com \
--cc=aidan.o.mahony@intel.com \
--cc=gabriele.paoloni@intel.com \
--cc=herbert@gondor.hengli.com.au \
--cc=jj@chaosbits.net \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tadeusz.struk@intel.com \
--subject='Re: [PATCH] rfc4106, Intel, AES-NI: Don'\''t leak memory in rfc4106_set_hash_subkey().' \
/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).