[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200315215253.GG224162@linux.intel.com>
Date: Sun, 15 Mar 2020 23:52:53 +0200
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: Waiman Long <longman@...hat.com>
Cc: Eric Biggers <ebiggers@...nel.org>,
David Howells <dhowells@...hat.com>,
James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
Mimi Zohar <zohar@...ux.ibm.com>, keyrings@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org,
linux-integrity@...r.kernel.org,
Sumit Garg <sumit.garg@...aro.org>,
Jerry Snitselaar <jsnitsel@...hat.com>,
Roberto Sassu <roberto.sassu@...wei.com>,
Chris von Recklinghausen <crecklin@...hat.com>
Subject: Re: [PATCH v3 3/3] KEYS: Use kvmalloc() to better handle large
buffer allocation
On Fri, Mar 13, 2020 at 01:49:57PM -0400, Waiman Long wrote:
> >> if (!tmpbuf || unlikely(ret > tmpbuflen)) {
> >> if (unlikely(tmpbuf))
> >> - kzfree(tmpbuf);
> >> + __kvzfree(tmpbuf, tmpbuflen);
> > Both kzfree() and __kvzfree() handle a NULL pointer, so there's no need for the
> > NULL check first.
> >
> I would like to keep this one because of the unlikely annotation.
What (measurable) gain does it bring anyway?
/Jarkko
Powered by blists - more mailing lists