All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: G@thunk.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4 crypto: handle ENOKEY correctly
Date: Mon, 8 Jun 2015 11:55:35 -0400	[thread overview]
Message-ID: <20150608155535.GG19168@thunk.org> (raw)
In-Reply-To: <87bngz92c1.fsf@openvz.org>

On Mon, Jun 01, 2015 at 12:59:10PM +0300, Dmitry Monakhov wrote:
> Theodore Ts'o <tytso@mit.edu> writes:
> 
> > On Fri, May 29, 2015 at 04:44:29PM -0400, Theodore Ts'o wrote:
> >> I don't think that's the right way to go.  We should add checks to
> >> ext4_file_open, sure.  But the problem is that i_crypt_info can get
> >> set to NULL after the file is succesfully opened.  So we need to
> >> handle i_crypt_info being NULL everywhere.  So the BUG_ON() in
> >> ext4_get_crypto_ctx() needs to be replaced with:
> >> 
> >> 	if (ci == NULL)
> >> 		return ERR_PTR(-ENOKEY);
> >
> > This is what I had in mind....
> ACK. with one note, you forget to convert all callers of
> ext4_get_crypto_ctx() to new error convention. Please see patch below.

Thanks for pointing that out!  Fixed.

					- Ted

      reply	other threads:[~2015-06-08 15:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 16:39 [PATCH] ext4 crypto: handle ENOKEY correctly Dmitry Monakhov
2015-05-29 20:44 ` Theodore Ts'o
2015-05-31 15:03   ` Theodore Ts'o
2015-06-01  9:59     ` Dmitry Monakhov
2015-06-08 15:55       ` Theodore Ts'o [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=20150608155535.GG19168@thunk.org \
    --to=tytso@mit.edu \
    --cc=G@thunk.org \
    --cc=dmonakhov@openvz.org \
    --cc=linux-ext4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.