[PATCH net-next 0/5] Introduce net_rwsem to protect net_namespace_list

2018-03-29 Thread Kirill Tkhai
of people, and I add all to CC. Note, that this patch is independent of "Close race between {un, }register_netdevice_notifier and pernet_operations": https://patchwork.ozlabs.org/project/netdev/list/?series=36495 Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com> --- Kirill Tkha

[PATCH net-next 4/5] ovs: Remove rtnl_lock() from ovs_exit_net()

2018-03-29 Thread Kirill Tkhai
Here we iterate for_each_net() and removes vport from alive net to the exiting net. ovs_net::dps are protected by ovs_mutex(), and the others, who change it (ovs_dp_cmd_new(), __dp_destroy()) also take it. The same with datapath::ports list. So, we remove rtnl_lock() here. Signed-off-by: Kirill

[PATCH net-next 5/5] net: Remove rtnl_lock() in nf_ct_iterate_destroy()

2018-03-29 Thread Kirill Tkhai
rtnl_lock() doesn't protect net::ct::count, and it's not needed for__nf_ct_unconfirmed_destroy() and for nf_queue_nf_hook_drop(). Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com> --- net/netfilter/nf_conntrack_core.c |2 -- 1 file changed, 2 deletions(-) diff --git a/net/net

[PATCH net-next 3/5] security: Remove rtnl_lock() in selinux_xfrm_notify_policyload()

2018-03-29 Thread Kirill Tkhai
net_namespace_list only, and we can remove it. Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com> --- security/selinux/include/xfrm.h |2 -- 1 file changed, 2 deletions(-) diff --git a/security/selinux/include/xfrm.h b/security/selinux/include/xfrm.h index 31d66431be1e..a0b465316292

[PATCH net-next 2/5] net: Don't take rtnl_lock() in wireless_nlevent_flush()

2018-03-29 Thread Kirill Tkhai
, that can change the order, but since skb can be queued in any order, it doesn't matter, how many threads do this in parallel. In case of several threads, this will be even faster. So, we can remove rtnl_lock() here, as it was used for iteration over net_namespace_list only. Signed-off-by: Kirill Tkhai

[PATCH net-next 1/5] net: Introduce net_rwsem to protect net_namespace_list

2018-03-29 Thread Kirill Tkhai
rtnl_lock() there are in next patches. Fine grained locks generally are better, then one big lock, so let's do that with net_namespace_list, while the situation allows that. Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com> --- drivers/infiniband/core/roce_gid_mgmt.c |2 ++ include

Re: [PATCH net-next 1/2] mac80211_hwsim: Make hwsim_netgroup IDA

2018-03-02 Thread Kirill Tkhai
On 01.03.2018 20:22, Benjamin Beichler wrote: > Am 01.03.2018 um 12:30 schrieb Kirill Tkhai: > >> Out of bounds of this patch, just as a report to wireless subsystem >> maintainer, destroy_radio() increaments hwsim_radios_generation >> without hwsim_radio_lock, so this

Re: KASAN: use-after-free Read in mac80211_hwsim_del_radio

2018-03-01 Thread Kirill Tkhai
Hi, 01.03.2018, 11:46, "syzbot" : > Hello, > > syzbot hit the following crash on upstream commit > f3afe530d644488a074291da04a69a296ab63046 (Tue Feb 27 22:02:39 2018 +) > Merge branch 'fixes-v4.16-rc4' of >

[PATCH net-next 2/2] net: Convert hwsim_net_ops

2018-03-01 Thread Kirill Tkhai
destroy_radio() work, and these work already may be executed in parallel with any pernet_operations (as it's a work :). So, we may mark these pernet_operations as async. Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com> --- drivers/net/wireless/mac80211_hwsim.c |1 + 1 file changed, 1 insertion(+)

[PATCH net-next 1/2] mac80211_hwsim: Make hwsim_netgroup IDA

2018-03-01 Thread Kirill Tkhai
as a report to wireless subsystem maintainer, destroy_radio() increaments hwsim_radios_generation without hwsim_radio_lock, so this may need one more patch to fix. Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com> --- drivers/net/wireless/mac80211_hwsim.c | 14 -- 1 file chan

[PATCH net-next 0/2] Converting pernet_operations (part #3) (wireless, mac80211_hwsim)

2018-03-01 Thread Kirill Tkhai
These series fixes ID overflow of hwsim_netgroup [1/2], and reviews and makes hwsim_net_ops as async [2/2]. The first pernet_operations requiring changes to make the converting safe! ([1/2] may be need to [net], but better people see it's really need). Thanks, Kirill --- Kirill Tkhai (2

rtl8723bs: rtnl_is_locked() misuse

2018-01-27 Thread Kirill Tkhai
Hi, I'm reporting you about misuse of rtnl_is_locked() in rtw_change_ifname() function. Note, that rtnl_is_locked() *does not mean* rtnl is locked on the *current cpu*. This primitive returns true in case of rtnl is locked somewhere in the system. So, it can't be used in the below code: if

wilc1000: rtnl_is_locked() misuse

2018-01-27 Thread Kirill Tkhai
Hi, I'm reporting you about misuse of rtnl_is_locked() in WILC_WFI_deinit_mon_interface() function. Note, that rtnl_is_locked() *does not mean* rtnl is locked on the *current cpu*. This primitive returns true in case of rtnl is locked somewhere in the system. So, it can't be used in the below