Re: [PATCH net] tipc: fix missing rtnl lock protection during setting link properties

2018-01-04 Thread David Miller
From: Ying Xue Date: Thu, 4 Jan 2018 15:30:52 +0800 > On 01/03/2018 11:48 PM, David Miller wrote: >> As soon as you drop the RTNL lock, the media or bearer entry can be >> removed from the tables. >> > > Thanks for the review. Yes, you are right. But even if we temporarily > release RTNL lock,

Re: [PATCH net] tipc: fix missing rtnl lock protection during setting link properties

2018-01-03 Thread Ying Xue
On 01/03/2018 11:48 PM, David Miller wrote: > As soon as you drop the RTNL lock, the media or bearer entry can be > removed from the tables. > Thanks for the review. Yes, you are right. But even if we temporarily release RTNL lock, it's still safe for us because when we set media/bearer propertie

Re: [PATCH net] tipc: fix missing rtnl lock protection during setting link properties

2018-01-03 Thread David Miller
From: Ying Xue Date: Mon, 1 Jan 2018 18:24:01 +0800 > diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c > index e48f0b2..0fb12a4 100644 > --- a/net/tipc/netlink_compat.c > +++ b/net/tipc/netlink_compat.c > @@ -720,17 +720,21 @@ static int tipc_nl_compat_link_set(struct > tipc_nl

[PATCH net] tipc: fix missing rtnl lock protection during setting link properties

2018-01-01 Thread Ying Xue
Currently when user changes link properties, TIPC first checks if user's command message contains media name or bearer name through tipc_media_find() or tipc_bearer_find() which is protected by rtnl lock. But when tipc_nl_compat_link_set() conducts the checking with the two functions, it doesn't ho