Re: [tipc-discussion] [PATCH net/tipc] Replace rcu_swap_protected() with rcu_replace_pointer()

2019-12-10 Thread Ying Xue
On 12/10/19 11:31 AM, Paul E. McKenney wrote: > This commit replaces the use of rcu_swap_protected() with the more > intuitively appealing rcu_replace_pointer() as a step towards removing > rcu_swap_protected(). > > Link: >

Re: [tipc-discussion] [net] tipc: fix use-after-free in tipc_disc_rcv()

2019-12-10 Thread Ying Xue
On 12/9/19 6:11 PM, Tuong Lien wrote: > In the function 'tipc_disc_rcv()', the 'msg_peer_net_hash()' is called > to read the header data field but after the message skb has been freed, > that might result in a garbage value... > > This commit fixes it by defining a new local variable to store the

Re: [tipc-discussion] [PATCH net/tipc] Replace rcu_swap_protected() with rcu_replace_pointer()

2019-12-10 Thread Ying Xue
On 12/11/19 6:38 AM, Paul E. McKenney wrote: > commit 4ee8e2c68b076867b7a5af82a38010fffcab611c > Author: Paul E. McKenney > Date: Mon Dec 9 19:13:45 2019 -0800 > > net/tipc: Replace rcu_swap_protected() with rcu_replace_pointer() > > This commit replaces the use of

Re: [tipc-discussion] [net 0/4] tipc: fix some issues

2019-12-10 Thread David Miller
From: Tuong Lien Date: Tue, 10 Dec 2019 15:21:01 +0700 > This series consists of some bug-fixes for TIPC. Series applied, thanks. ___ tipc-discussion mailing list tipc-discussion@lists.sourceforge.net

Re: [tipc-discussion] [PATCH net/tipc] Replace rcu_swap_protected() with rcu_replace_pointer()

2019-12-10 Thread Tuong Lien Tong
Hi Ying, Paul, Please see my comments inline. Thanks! BR/Tuong -Original Message- From: Ying Xue Sent: Wednesday, December 11, 2019 8:32 AM To: paul...@kernel.org Cc: net...@vger.kernel.org; linux-ker...@vger.kernel.org; mi...@kernel.org; tipc-discussion@lists.sourceforge.net;

Re: [tipc-discussion] [net-next 0/3] tipc: introduce variable window congestion control

2019-12-10 Thread David Miller
From: Jon Maloy Date: Tue, 10 Dec 2019 00:52:43 +0100 > We improve thoughput greatly by introducing a variety of the Reno > congestion control algorithm at the link level. Series applied, thanks Jon. ___ tipc-discussion mailing list

Re: [tipc-discussion] [PATCH net/tipc] Replace rcu_swap_protected() with rcu_replace_pointer()

2019-12-10 Thread Ying Xue
On 12/11/19 10:00 AM, Tuong Lien Tong wrote: >> >> /* Move passive key if any */ >> if (key.passive) { >> -tipc_aead_rcu_swap(rx->aead[key.passive], tmp2, >lock); >> +tmp2 = rcu_replace_pointer(rx->aead[key.passive], tmp2, > >lock); > The 3rd parameter should be

Re: [tipc-discussion] [PATCH net/tipc] Replace rcu_swap_protected() with rcu_replace_pointer()

2019-12-10 Thread Ying Xue
On 12/11/19 11:17 AM, Paul E. McKenney wrote: >> Acked-by: Ying Xue > As in the following? If so, I will be very happy to apply your Acked-by. Yes. Thanks! ___ tipc-discussion mailing list tipc-discussion@lists.sourceforge.net

[tipc-discussion] [net 1/4] tipc: fix name table rbtree issues

2019-12-10 Thread Tuong Lien
The current rbtree for service ranges in the name table is built based on the 'lower' & 'upper' range values resulting in a flaw in the rbtree searching. Some issues have been observed in case of range overlapping: Case #1: unable to withdraw a name entry: After some name services are bound, all

[tipc-discussion] [net 0/4] tipc: fix some issues

2019-12-10 Thread Tuong Lien
This series consists of some bug-fixes for TIPC. Tuong Lien (4): tipc: fix name table rbtree issues tipc: fix potential hanging after b/rcast changing tipc: fix retrans failure due to wrong destination tipc: fix use-after-free in tipc_disc_rcv() net/tipc/bcast.c | 24 +++--

[tipc-discussion] [net 2/4] tipc: fix potential hanging after b/rcast changing

2019-12-10 Thread Tuong Lien
In commit c55c8edafa91 ("tipc: smooth change between replicast and broadcast"), we allow instant switching between replicast and broadcast by sending a dummy 'SYN' packet on the last used link to synchronize packets on the links. The 'SYN' message is an object of link congestion also, so if that

[tipc-discussion] [net 3/4] tipc: fix retrans failure due to wrong destination

2019-12-10 Thread Tuong Lien
When a user message is sent, TIPC will check if the socket has faced a congestion at link layer. If that happens, it will make a sleep to wait for the congestion to disappear. This leaves a gap for other users to take over the socket (e.g. multi threads) since the socket is released as well. Also,

[tipc-discussion] [net 4/4] tipc: fix use-after-free in tipc_disc_rcv()

2019-12-10 Thread Tuong Lien
In the function 'tipc_disc_rcv()', the 'msg_peer_net_hash()' is called to read the header data field but after the message skb has been freed, that might result in a garbage value... This commit fixes it by defining a new local variable to store the data first, just like the other header fields'