lkml.org 
[lkml]   [2006]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/10] Convert ASSERT to BUG_ON
On Fri, May 26, 2006 at 09:21:48AM -0500, Mike Halcrow wrote:

> Use the kernel BUG_ON() macro rather than the eCryptfs ASSERT(). Note
> that this temporarily renders the CONFIG_ECRYPT_DEBUG build option
> unused. We certainly plan on using it in the future; for now, is it
> okay to leave it in fs/Kconfig, or would you like to remove it?
>...

Remove it as long as it deos nothing - re-adding it when it's actually
used will be trivial.

> --- a/fs/ecryptfs/keystore.c
> +++ b/fs/ecryptfs/keystore.c
> @@ -506,7 +506,7 @@ static int decrypt_session_key(struct ec
> auth_tok->session_key.encrypted_key_size);
> src_sg[0].page = virt_to_page(encrypted_session_key);
> src_sg[0].offset = 0;
> - ASSERT(auth_tok->session_key.encrypted_key_size < PAGE_CACHE_SIZE);
> + BUG_ON(auth_tok->session_key.encrypted_key_size > PAGE_CACHE_SIZE);
>...

What's with (auth_tok->session_key.encrypted_key_size == PAGE_CACHE_SIZE) ?

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-26 17:26    [W:0.085 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site