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>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 11 Nov 2023 11:04:17 +0000
From:   Levi Yun <ppbuk5246@...il.com>
To:     Liam.Howlett@...cle.com
Cc:     maple-tree@...ts.infradead.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Levi Yun <ppbuk5246@...il.com>
Subject: [PATCH] maple_tree: remove mast_overflow.

mast_overflow is used only in mas_spanning_rebalance.
But when mast_sufficient is false, mast_overflow always returns false,
and when mast_suffictent is true, it never reaches to mast_overflow in
mas_spanning_rebalance.

Therefore, mast_overflow is dead code in mas_spanning_rebalance.
And there is no other usage of mast_overflow execpt
mas_spanning_rebalance, Remove mast_overflow.

Signed-off-by: Levi Yun <ppbuk5246@...il.com>
---
 lib/maple_tree.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index bb24d84a4922..1e591e71621e 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -2767,19 +2767,6 @@ static inline bool mast_sufficient(struct maple_subtree_state *mast)
 	return false;
 }
 
-/*
- * mast_overflow: Check if there is too much data in the subtree state for a
- * single node.
- * @mast: The maple subtree state
- */
-static inline bool mast_overflow(struct maple_subtree_state *mast)
-{
-	if (mast->bn->b_end >= mt_slot_count(mast->orig_l->node))
-		return true;
-
-	return false;
-}
-
 static inline void *mtree_range_walk(struct ma_state *mas)
 {
 	unsigned long *pivots;
@@ -2934,9 +2921,6 @@ static int mas_spanning_rebalance(struct ma_state *mas,
 		if (mast_sufficient(mast))
 			continue;
 
-		if (mast_overflow(mast))
-			continue;
-
 		/* May be a new root stored in mast->bn */
 		if (mas_is_root_limits(mast->orig_l))
 			break;
-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ