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  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:	Thu, 21 May 2009 12:19:20 +0200
From:	Robert Olsson <robert@...ur.slu.se>
To:	davem@...emloft.net
Cc:	Robert Olsson <Robert.Olsson@...a.slu.se>,
	NetDEV list <netdev@...r.kernel.org>, andrei.popa@...eo.ro
Subject: Re: [oops] with FIB_TRIE [PATCH]


 Hi,

Andrei Popa:
 > clear ip bgp * soft"
 > when I have three full BGP sessions the kernel it oopses. 
 > with CONFIG_PREEMPT=y

 It seems we can fix this by disabling preemption while we re-balance the 
 trie. This is with the CONFIG_CLASSIC_RCU. It's been stress-tested at high 
 loads continuesly taking a full BGP table up/down via iproute -batch.
 A patch is below.

 Note. fib_trie is not updated for CONFIG_PREEMPT_RCU
 
 Cheers
					--ro

Signed-off-by: Robert Olsson <robert.olsson@....uu.se>

diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index ec0ae49..33c7c85 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -986,9 +986,12 @@ fib_find_node(struct trie *t, u32 key)
 static struct node *trie_rebalance(struct trie *t, struct tnode *tn)
 {
 	int wasfull;
-	t_key cindex, key = tn->key;
+	t_key cindex, key;
 	struct tnode *tp;
 
+	preempt_disable();
+	key = tn->key;
+
 	while (tn != NULL && (tp = node_parent((struct node *)tn)) != NULL) {
 		cindex = tkey_extract_bits(key, tp->pos, tp->bits);
 		wasfull = tnode_full(tp, tnode_get_child(tp, cindex));
@@ -1007,6 +1010,7 @@ static struct node *trie_rebalance(struct trie *t, struct tnode *tn)
 	if (IS_TNODE(tn))
 		tn = (struct tnode *)resize(t, (struct tnode *)tn);
 
+	preempt_enable();
 	return (struct node *)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