Re: [PATCH] ext4 crypto: handle ENOKEY correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 01, 2015 at 12:59:10PM +0300, Dmitry Monakhov wrote:
> Theodore Ts'o <tytso@xxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux