Re: [PATCH 2/2] turn BUG_ON for out of bound in mb_cache_entry_find_first/mb_cache_entry_find_next

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

 



On Mon, 19 Jul 2010, shenghui wrote:

> Sorry. Will you recommend to me one mail client?
> I have been suffering reformat by client these days.
> Thanks,

Mutt, or Alpine will be a very good choice.

This can be also useful:

 Documentation/SubmittingPatches
 Documentation/email-clients.txt

Cheers
-Lukas

> 
> 
> Signed-off-by: Wang Sheng-Hui <crosslonelyover@xxxxxxxxx>
> ---
> fs/mbcache.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/mbcache.c b/fs/mbcache.c
> index 5697d9e..5f96b82 100644
> --- a/fs/mbcache.c
> +++ b/fs/mbcache.c
> @@ -614,7 +614,7 @@ mb_cache_entry_find_first(struct mb_cache *cache, int
> index,
> 	struct list_head *l;
> 	struct mb_cache_entry *ce;
> 
> -	mb_assert(index < mb_cache_indexes(cache));
> +	BUG_ON(!(index < mb_cache_indexes(cache)));
> 	spin_lock(&mb_cache_spinlock);
> 	l = cache->c_indexes_hash[index][bucket].next;
> 	ce = __mb_cache_entry_find(l, &cache->c_indexes_hash[index][bucket],
> @@ -652,7 +652,7 @@ mb_cache_entry_find_next(struct mb_cache_entry *prev, int
> index,
> 	struct list_head *l;
> 	struct mb_cache_entry *ce;
> 
> -	mb_assert(index < mb_cache_indexes(cache));
> +	BUG_ON(!(index < mb_cache_indexes(cache)));
> 	spin_lock(&mb_cache_spinlock);
> 	l = prev->e_indexes[index].o_list.next;
> 	ce = __mb_cache_entry_find(l, &cache->c_indexes_hash[index][bucket],
> 
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux