mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: akinobu.mita@gmail.com, linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 1/2] crypto: fix crypto_alloc_{tfm,base}() return value
Date: Mon, 9 Oct 2006 21:14:46 +1000	[thread overview]
Message-ID: <20061009111446.GA22020@gondor.apana.org.au> (raw)
In-Reply-To: <20061009085812.GA6020@localhost>

On Mon, Oct 09, 2006 at 05:58:12PM +0900, Akinobu Mita wrote:
> crypto_alloc_tfm() and crypto_alloc_base() are suppose to return error code
> as pointer on failures. But there are some cases where they return NULL
> (for example, crypto_alloc_tfm() returns NULL on kzalloc() failure)
> 
> This patch fixes that wrong return value, and also fixes tcrypt so that it can
> detect error code correctly.

Actually, crypto_alloc_tfm is an obsolete function which is supposed
to maintain its previous semantics of returning NULL or success.

I don't quite see where the problem with crypto_alloc_base is.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  parent reply	other threads:[~2006-10-09 11:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-09  8:58 Akinobu Mita
2006-10-09  9:01 ` [PATCH 2/2] crypto: delete duplicated code Akinobu Mita
2006-10-09 11:14 ` Herbert Xu [this message]
2006-10-09 11:55   ` [PATCH 1/2] crypto: fix crypto_alloc_{tfm,base}() return value Akinobu Mita
2006-10-10  3:53     ` 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=20061009111446.GA22020@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=akinobu.mita@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®