lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4C438FA5.2050503@gmail.com>
Date:	Mon, 19 Jul 2010 07:35:01 +0800
From:	shenghui <crosslonelyover@...il.com>
To:	linux-fsdevel@...r.kernel.org, viro@...iv.linux.org.uk,
	linux-mm@...ck.org, linux-ext4 <linux-ext4@...r.kernel.org>,
	kernel-janitors <kernel-janitors@...r.kernel.org>,
	error27@...il.com
Subject: [PATCH 2/2] turn BUG_ON for out of bound in mb_cache_entry_find_first/mb_cache_entry_find_next

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


Signed-off-by: Wang Sheng-Hui <crosslonelyover@...il.com>
---
 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],
-- 
1.7.1.1



--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ