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:	Fri, 03 Apr 2015 13:53:02 -0700
From:	Joe Perches <joe@...ches.com>
To:	Alexander Duyck <alexander.h.duyck@...hat.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: fib_trie: commit 95f60ea3e99a missing else?

Hello Alexander.

commit 95f60ea3e99a ("fib_trie: Add collapse() and should_collapse() to resize")
changed this block from:

	if (a && !b)
		...
	else if (!a && b)
		...

to:

	if (a && !b)
		...
	if (!a && b)
		... 

Was there a reason for the "else" removal?

I notice that object code size increases a bit (x86-64)
if the else is put back.

net/ipv4/fib_trie.c
[]
@@ -375,11 +388,11 @@ static void put_child(struct tnode *tn, unsigned long i, s
 
        BUG_ON(i >= tnode_child_length(tn));
 
-       /* update emptyChildren */
+       /* update emptyChildren, overflow into fullChildren */
        if (n == NULL && chi != NULL)
-               tn->empty_children++;
-       else if (n != NULL && chi == NULL)
-               tn->empty_children--;
+               empty_child_inc(tn);
+       if (n != NULL && chi == NULL)
+               empty_child_dec(tn);
 


--
To unsubscribe from this list: send the line "unsubscribe netdev" 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