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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 Mar 2007 08:48:39 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Robert Olsson <Robert.Olsson@...a.slu.se>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	kaber@...sh.net, tgr@...g.ch, Jens.Laas@...a.slu.se,
	hans.liss@....uu.se
Subject: Re: [PATCH] fib_hash removal

On Fri, Mar 16, 2007 at 01:38:31PM +0100, Robert Olsson wrote:
> 
> Hello, Just discussed this Patrick...
> 
> We have two users of trie_leaf_remove, fn_trie_flush and fn_trie_delete 
> both are holding RTNL. So there shouldn't be need for this preempt stuff. 
> This is assumed to a leftover from an older RCU-take.

True enough!  One request -- would it be reasonable to add to
trie_leaf_remove()'s comment to state that RTNL must be held
by the caller?

						Thanx, Paul

> > Mhh .. I think I just remembered something - me incorrectly suggesting
> > to add it there while we were talking about this at OLS :) IIRC the
> > idea was to make sure tnode_free (which at that time didn't use
> > call_rcu) wouldn't free memory while still in use in a rcu read-side
> > critical section. It should have been synchronize_rcu of course,
> > but with tnode_free using call_rcu it seems to be completely
> > unnecessary. So I guess we can simply remove it.
> 
> Signed-off-by: Patrick McHardy <kaber@...sh.net>
> Signed-off-by: Robert Olsson <robert.olsson@....uu.se>
> 
> Cheers.
> 					--ro
> 
> 
> diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
> --- a/net/ipv4/fib_trie.c
> +++ b/net/ipv4/fib_trie.c
> @@ -1534,7 +1534,6 @@ static int trie_leaf_remove(struct trie 
>  	t->revision++;
>  	t->size--;
> 
> -	preempt_disable();
>  	tp = NODE_PARENT(n);
>  	tnode_free((struct tnode *) n);
> 
> @@ -1544,7 +1543,6 @@ static int trie_leaf_remove(struct trie 
>  		rcu_assign_pointer(t->trie, trie_rebalance(t, tp));
>  	} else
>  		rcu_assign_pointer(t->trie, NULL);
> -	preempt_enable();
> 
>  	return 1;
>  }
> 
> -
> 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
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ