These pernet_operations register and unregister net::nf::queue_handler
and /proc entry. The handler is accessed only under RCU, so this looks
safe to convert them.
Signed-off-by: Kirill Tkhai
---
net/netfilter/nfnetlink_queue.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net
These pernet_operations unregister net::ipv4::arptable_filter.
Another net/pernet_operations do not send arp packets to foreign
net namespaces. So, we mark them async.
Signed-off-by: Kirill Tkhai
---
net/ipv4/netfilter/arptable_filter.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net
These pernet_operations create per-net pktgen threads
and /proc entries. These pernet subsys looks closed
in itself, and there are no pernet_operations outside
this file, which are interested in the threads.
Init and/or exit methods look safe to be executed
in parallel.
Signed-off-by: Kirill
These pernet_operations unregister net::ipv4::iptable_mangle table.
Another net/pernet_operations do not send ipv4 packets to foreign
net namespaces. So, we mark them async.
Signed-off-by: Kirill Tkhai
---
net/ipv4/netfilter/iptable_mangle.c |1 +
1 file changed, 1 insertion(+)
diff --git
These pernet_operations unregister net::ipv4::nat_table table.
Another net/pernet_operations do not send ipv4 packets to foreign
net namespaces. So, we mark them async.
Signed-off-by: Kirill Tkhai
---
net/ipv4/netfilter/iptable_nat.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net
These pernet_operations unregister net::ipv4::iptable_raw table.
Another net/pernet_operations do not send ipv4 packets to foreign
net namespaces. So, we mark them async.
Signed-off-by: Kirill Tkhai
---
net/ipv4/netfilter/iptable_raw.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net
second one is just RO memory dereference.
So, these pernet_operations are safe to be marked as async.
Signed-off-by: Kirill Tkhai
---
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
b/net/ipv4
These pernet_operations are similar to ipv4_net_ops.
They are safe to be async.
Signed-off-by: Kirill Tkhai
---
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
b/net/ipv6/netfilter
These pernet_operations unregister net::ipv4::iptable_security table.
Another net/pernet_operations do not send ipv4 packets to foreign
net namespaces. So, we mark them async.
Signed-off-by: Kirill Tkhai
---
net/ipv4/netfilter/iptable_security.c |1 +
1 file changed, 1 insertion(+)
diff
On 07.03.2018 09:35, Saeed Mahameed wrote:
> From: Aviad Yehezkel
>
> Generally, FPGA IPSec commands must always complete.
> We want to wait for one minute for them to complete gracefully also
> when killing a process.
>
> Signed-off-by: Aviad Yehezkel
> Signed-off-by: Saeed Mahameed
> ---
>
On 07.03.2018 06:58, David Ahern wrote:
> ipv6_chk_addr_and_flags determines if an address is a local address. It
> is called by ip6_route_info_create to validate a gateway address is not a
> local address. It currently does not consider L3 domains and as a result
> does not allow a route to be add
On 07.03.2018 14:53, Kirill Tkhai wrote:
> On 07.03.2018 06:58, David Ahern wrote:
>> ipv6_chk_addr_and_flags determines if an address is a local address. It
>> is called by ip6_route_info_create to validate a gateway address is not a
>> local address. It currently does not co
..1000}; do unshare -n /bin/false;done
>
> Before : real 7m18.911s
> After : real 10.187s
>
> Fixes: 8571ab479a6e ("ip6mr: Make mroute_sk rcu-based")
> Signed-off-by: Eric Dumazet
> Reported-by: Kirill Tkhai
> Cc: Yuval Mintz
Reviewed-by: Kirill Tkhai
&
On 06.09.2018 11:30, Eric Dumazet wrote:
>
>
> On 09/06/2018 12:58 AM, Vlad Buslov wrote:
>
> ...
>
>> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
>> index 18e22a5a6550..239c73f29471 100644
>> --- a/include/net/sch_generic.h
>> +++ b/include/net/sch_generic.h
>> @@ -90,6
ace ip_ra_lock with per-net mutex")
> Cc: Kirill Tkhai
> Signed-off-by: Cong Wang
> ---
> net/core/net_namespace.c | 1 -
> net/ipv4/af_inet.c | 2 ++
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/core/net_namespace.c b/net/core/net_n
On 18.09.2018 23:17, Cong Wang wrote:
> On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai wrote:
>> In inet_init() the order of registration is:
>>
>> ip_mr_init();
>> init_inet_pernet_ops();
>>
>> This means, ipmr_net_ops pernet operations are b
On 20.09.2018 0:28, Cong Wang wrote:
> On Wed, Sep 19, 2018 at 1:25 AM Kirill Tkhai wrote:
>>
>> On 18.09.2018 23:17, Cong Wang wrote:
>>> On Mon, Sep 17, 2018 at 12:25 AM Kirill Tkhai wrote:
>>>> In inet_init() the order of registrat
This function does nothing, and since ops_exit_list()
checks for NULL ->exit method, we do not need stub here.
Signed-off-by: Kirill Tkhai
---
net/ipv4/af_inet.c |5 -
1 file changed, 5 deletions(-)
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 1fbe2f815474..f4ecbe0aa
This function just initializes locks and defaults.
Let register it before other pernet operation,
since some of them potentially may relay on that.
Signed-off-by: Kirill Tkhai
---
net/ipv4/af_inet.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/af_inet.c
This patch set makes several cleanups around inet_init_net().
---
Cong Wang (1):
ipv4: initialize ra_mutex in inet_init_net()
Kirill Tkhai (2):
net: Remove inet_exit_net()
net: Register af_inet_ops earlier
net/core/net_namespace.c |1 -
net/ipv4/af_inet.c | 13
f-by: Cong Wang
Acked-by: Kirill Tkhai
---
net/core/net_namespace.c |1 -
net/ipv4/af_inet.c |2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 670c84b1bfc2..b272ccfcbf63 100644
--- a/net/core/net_namespace.c
e
> held for read.
>
> Suggested-by: Kirill Tkhai
> Signed-off-by: Jakub Kicinski
> Reviewed-by: Quentin Monnet
Reviewed-by: Kirill Tkhai
> ---
> kernel/bpf/offload.c | 21 +
> 1 file changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/kern
idr_find() is safe under rcu_read_lock() and
maybe_get_net() guarantees that net is alive.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c |2 --
1 file changed, 2 deletions(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 6a4eab438221..a675f35a18ff 100644
igned-off-by: Kirill Tkhai
---
include/net/net_namespace.h |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 10f99dafd5ac..ff0e47471d5b 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -
it in wrong context.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c | 23 +++
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 60a71be75aea..6a4eab438221 100644
--- a/net/core/net_namesp
Hi, Eric,
On 21.12.2017 20:39, Eric W. Biederman wrote:
> Kirill Tkhai writes:
>
>> peernet2id_alloc() is racy without rtnl_lock() as atomic_read(&peer->count)
>> under net->nsid_lock does not guarantee, peer is alive:
>>
>
info will only need it partially. We will also
> be able to remove the waitqueue in following patches.
>
> Use struct rw_semaphore because map offload will require sleeping
> with the semaphore held for read.
>
> Suggested-by: Kirill Tkhai
> Signed-off-by: Jakub Kicinski
> Rev
larify the status or what I should do with the patchset
(because it's not clear for me)?
Thanks,
Kirill
On 22.12.2017 13:30, Kirill Tkhai wrote:
> Hi, Eric,
>
> On 21.12.2017 20:39, Eric W. Biederman wrote:
>> Kirill Tkhai writes:
>>
>>> peernet2id_alloc()
igned-off-by: Kirill Tkhai
---
include/net/net_namespace.h |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 10f99dafd5ac..ff0e47471d5b 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -
it in wrong context.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c | 23 +++
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 60a71be75aea..6a4eab438221 100644
--- a/net/core/net_namesp
idr_find() is safe under rcu_read_lock() and
maybe_get_net() guarantees that net is alive.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c |2 --
1 file changed, 2 deletions(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 6a4eab438221..a675f35a18ff 100644
On 29.12.2017 21:18, Eric W. Biederman wrote:
> Kirill Tkhai writes:
>
>> peernet2id_alloc() is racy without rtnl_lock() as atomic_read(&peer->count)
>> under net->nsid_lock does not guarantee, peer is alive:
>>
>
it in wrong context.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 60a71be75aea..497135f314ce 100644
--- a/net/core/net_namespace.c
+++ b
idr_find() is safe under rcu_read_lock() and
maybe_get_net() guarantees that net is alive.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c |2 --
1 file changed, 2 deletions(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 497135f314ce..5f9e18b31a1a 100644
igned-off-by: Kirill Tkhai
---
include/net/net_namespace.h |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 10f99dafd5ac..ff0e47471d5b 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -
On 09.01.2018 21:52, Eric Dumazet wrote:
> On Tue, 2018-01-09 at 18:00 +0300, Kirill Tkhai wrote:
>> Since people may mistakenly obtain destroying net
>> from net_namespace_list and from net::netns_ids
>> without checking for its net::counter, let's protect
>> ag
On 10.01.2018 12:58, Eric Dumazet wrote:
> On Wed, 2018-01-10 at 10:37 +0300, Kirill Tkhai wrote:
>> On 09.01.2018 21:52, Eric Dumazet wrote:
>>> On Tue, 2018-01-09 at 18:00 +0300, Kirill Tkhai wrote:
>>>> Since people may mistakenly obtain destroying net
>>>
and allmodconfig are OK.
Suggested-by: Eric Dumazet
Signed-off-by: Kirill Tkhai
---
include/net/net_namespace.h |8
net/core/net-sysfs.c |6 +++---
net/core/net_namespace.c |8
net/ipv4/inet_timewait_sock.c |4 ++--
net/ipv4/tcp_metrics.c
On 12.01.2018 18:53, Eric Dumazet wrote:
> On Fri, 2018-01-12 at 18:28 +0300, Kirill Tkhai wrote:
>> Since net could be obtained from RCU lists,
>> and there is a race with net destruction,
>> the patch converts net::count to refcount_t.
>>
>> This provid
use it in wrong context.
v2: Don't place refcount_read(&net->count) under net->nsid_lock
as suggested by Eric W. Biederman
v3: Rebase on top of net-next
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c | 13 +++--
1 file changed, 11 insertions(+), 2 deleti
idr_find() is safe under rcu_read_lock() and
maybe_get_net() guarantees that net is alive.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c |2 --
1 file changed, 2 deletions(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 3c77d84ad60d..1ccb953b3b09 100644
Hi, Illyas,
On 31.05.2018 11:43, Mansoor, Illyas wrote:
> We are facing mutex dead lock condition that we think might be related to a
> fix that you have provided in:
> Merge branch
> 'Close-race-between-un-register_netdevice_notifier-and-pernet_operations'
> commit b9a12601541eb55d07e00261a511
Hi, Paolo,
below is couple my thoughts about this.
On 06.06.2018 12:44, Paolo Abeni wrote:
> On Tue, 2018-06-05 at 18:06 +0200, Paolo Abeni wrote:
>> On Tue, 2018-06-05 at 08:35 -0700, Tom Herbert wrote:
>>> Paolo, thanks for looking into this! Can you try replacing
>>> __skb_dequeue in requeue_r
On 06.06.2018 16:16, Paolo Abeni wrote:
> KCM removes the packets from sk_receive_queue in requeue_rx_msgs()
>
> without acquiring any lock. Moreover, in R() when the MSG_PEEK
> flag is not present, the skb is peeked and dequeued with two
> separate, non-atomic, calls.
>
> The above create room f
ck trace snipped]
This patch gives more variability during choosing new name
of device and fixes the problem.
Signed-off-by: Kirill Tkhai
---
net/core/dev.c |4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 6e18242a1cae..6c9b9303ded6 1006
On 14.06.2018 20:11, David Ahern wrote:
> On 6/14/18 6:38 AM, Kirill Tkhai wrote:
>> The following script makes kernel to crash since it can't obtain
>> a name for a device, when the name is occupied by another device:
>>
>> #!/bin/bash
>> ifconfig eth0 do
On 17.06.2018 21:58, David Ahern wrote:
> On 6/15/18 3:44 AM, Kirill Tkhai wrote:
>> Hm, but is this a likely case, when real device is moved to net ns, so it
>> requires moving to init_net back? It seems the most devices moved to
>> !init_net
>> are virtual
On 18.06.2018 14:21, Kirill Tkhai wrote:
> On 17.06.2018 21:58, David Ahern wrote:
>> On 6/15/18 3:44 AM, Kirill Tkhai wrote:
>>> Hm, but is this a likely case, when real device is moved to net ns, so it
>>> requires moving to init_net back? It seems the most devi
On 10.01.2019 01:43, Pablo Neira Ayuso wrote:
> On Wed, Dec 26, 2018 at 12:16:25PM +0300, Kirill Tkhai wrote:
>> On 26.12.2018 06:50, Kangjie Lu wrote:
>>> When nla_parse fails, we should not use the results (the first
>>> argument). The fix checks if it fails, and if
On 11.01.2019 23:33, Eric W. Biederman wrote:
> zzoru writes:
>
>> net/core: BUG in copy_net_ns() (net_namespace.c)
>
> I don't understand this failure report at all.
>
> I don't see the connection to copy_net_ns(). And I don't see how the
> suggested patch short of covering up a memory stomp
Hi, Alexandre,
On 31.01.2019 16:20, alexandre.besn...@softathome.com wrote:
> From: Alexandre Besnard
>
> Device remaining references counter is get as a signed integer.
>
> When unregistering network devices, the loop waiting for this counter
> to decrement tests the 0 strict equality. Thus if
On 31.01.2019 18:14, Alexandre BESNARD wrote:
> Hi Kirill, and thanks for your time,
>
> On 31 Jan 19 14:49, Kirill Tkhai ktk...@virtuozzo.com wrote :
>
>> Hi, Alexandre,
>
>> On 31.01.2019 16:20, alexandre.besn...@softathome.com wrote:
>>> From: Alexan
On 31.01.2019 18:21, Eric Dumazet wrote:
>
>
> On 01/31/2019 07:15 AM, Eric Dumazet wrote:
>>
>>
>> On 01/31/2019 05:49 AM, Kirill Tkhai wrote:
>>>
>>> 2)Not related to your patch -- it looks like we have problem in existing
>>> code with
On 24.12.2018 04:42, Aditya Pakki wrote:
> In net_ns_init(), register_pernet_subsys() could fail while registering
> network namespace subsystems. The fix checks the return value and
> sends a panic() on failure.
>
> Signed-off-by: Aditya Pakki
Reviewed-by: Kirill Tkhai
&g
On 26.12.2018 06:50, Kangjie Lu wrote:
> When nla_parse fails, we should not use the results (the first
> argument). The fix checks if it fails, and if so, returns its error code
> upstream.
>
> Signed-off-by: Kangjie Lu
> ---
> net/netfilter/ipset/ip_set_core.c | 4 +++-
> 1 file changed, 3 ins
On 01.01.2019 09:42, Murali Krishna Policharla wrote:
> Store newly configured mtu settings in the netdevice after mtu
> configuration is successful to the dsa switch.
>
> Fixes: 2315dc91a5 ("net: make dev_set_mtu() honor notification return code")
> Signed-off-by: Murali Krishna Policharla
> Rev
Hi,
On 23.05.2018 14:15, Alexander Kurtz wrote:
> [Please keep me CC'ed; I'm not subscribed to the list]
>
> Hi!
>
> The program shown below (also available at [0]) does the following:
>
> * Create two sockets
> * Enable SO_REUSEADDR on both
> * Bind both sockets to [::1]:12345
> * Spawn tw
On 15.11.2017 19:29, Eric W. Biederman wrote:
> Kirill Tkhai writes:
>
>> On 15.11.2017 09:25, Eric W. Biederman wrote:
>>> Kirill Tkhai writes:
>>>
>>>> Curently mutex is used to protect pernet operations list. It makes
>>>> cleanup_net(
On 15.11.2017 19:29, Eric W. Biederman wrote:
> Kirill Tkhai writes:
>
>> On 15.11.2017 09:25, Eric W. Biederman wrote:
>>> Kirill Tkhai writes:
>>>
>>>> Curently mutex is used to protect pernet operations list. It makes
>>>> cleanup_net(
nit()->proc_net_init(),
which can't race with net_ns_init(), called from
initcall.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index b797832565d3..7
erations
from all the files in file alphabetical order. What do you
think about this? (Note, the patches has no such a problem
at the moment, as there are all in-kernel early core drivers).
Maybe there are another comments on the code.
---
Kirill Tkhai (25):
net: Assign net to net_namespace_lis
Line up destructors actions in the revers order
to constructors. Next patches will add more actions,
and this will be comfortable, if there is the such
order.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c | 20 +---
1 file changed, 9 insertions(+), 11 deletions
it's safe to move proc_net_ns_ops to pernet_sys list
and execute its methods in parallel with another pernet
operations.
Signed-off-by: Kirill Tkhai
---
fs/proc/proc_net.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
index a2bf
Move net_mutex to setup_net() and cleanup_net(), and
do not hold it, while sys sublist methods are executed.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c | 44 +++-
1 file changed, 35 insertions(+), 9 deletions(-)
diff --git a/net/core
emory allocation, which nobody else interested in,
and sysctl registration. So, we move it to pernet_sys
list.
Signed-off-by: Kirill Tkhai
---
net/netfilter/nf_log.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 8bb152a
/net_ns_net_init, methods use only
ida_simple_* functions, which are not need a synchronization.
So it's safe to execute them in parallel with any other
pernet_operations, and thus we convert net_ns_ops to pernet_sys type.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c |2 +-
1
t_sys list.
Signed-off-by: Kirill Tkhai
---
net/netlink/af_netlink.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index b9e0ee4e22f5..a4f1f5222b79 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
move
net_inuse_ops to pernet_sys list.
Signed-off-by: Kirill Tkhai
---
net/core/sock.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index 13719af7b4e3..be050b044699 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3081,7 +3081,7 @@ static s
Both of them create and initialize lists, which are not touched
by another foreing pernet_operations.
Signed-off-by: Kirill Tkhai
---
net/core/fib_notifier.c |2 +-
net/core/fib_rules.c|2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/fib_notifier.c b
which
nobody else is not interested in.
Signed-off-by: Kirill Tkhai
---
net/core/sock.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index be050b044699..ed12e115458b 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3349,7 +3
-by: Kirill Tkhai
---
net/sched/act_api.c |2 +-
net/sched/sch_api.c |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 4d33a50a8a6d..f1de2146e6e0 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -1470,7 +1470,7
This pernet_operations create and destroy net::genl_sock.
Foreign pernet_operations don't touch it.
Signed-off-by: Kirill Tkhai
---
net/netlink/genetlink.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index d444daf
pernet_sys list.
Signed-off-by: Kirill Tkhai
---
net/core/dev.c|2 +-
net/core/net-procfs.c |4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 8ee29f4f5fa9..b90a503a9e1a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
These pernet_operations register and destroy sysctl
directory, and it's not interested for foreign
pernet_operations.
Signed-off-by: Kirill Tkhai
---
net/core/sysctl_net_core.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/sysctl_net_core.c b/net
These pernet_operations initialize and purge net::wext_nlevents
queue, and are not touched by foreign pernet_operations.
Signed-off-by: Kirill Tkhai
---
net/wireless/wext-core.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/wext-core.c b/net/wireless/wext
, move it to pernet_sys.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 2e8295aa7003..7fc9d44c1817 100644
--- a/net/core/net_namespace.c
+++ b/net/core
pernet_operations
makes the socket disappear earlier from uevent_sock_list
on ->exit. As userspace can't be interested in broadcast
messages of dying net, and, as I see, no one in kernel
listen them, we may safely move uevent_net_ops to pernet_sys
list.
Signed-off-by: Kirill Tkhai
---
lib/kobject_
. The rest of the pernet_list are not interested
in the socket, so we move audit_net_ops to pernet_sys list.
Signed-off-by: Kirill Tkhai
---
kernel/audit.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index 227db99b0f19..bb4626d7e712 100644
rtnetlink_net_ops may be
safely moved to pernet_sys list.
Signed-off-by: Kirill Tkhai
---
net/core/rtnetlink.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index cb06d43c4230..d9cf13554e4d 100644
--- a/net/core/rtnetlink.c
+++ b/net
any other pernet_operations.
Signed-off-by: Kirill Tkhai
---
net/sysctl_net.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index 9aed6fe1bf1a..1b91db88e54a 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -103,7 +103,7 @@ __init int net_s
pernet_operations do not
interested in forein net::nf::hooks or proc entries,
so it's safe to move netfilter_net_ops to pernet list.
Signed-off-by: Kirill Tkhai
---
net/netfilter/core.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/core.c b/net/netfilter/c
the cycle.
Suggested-by: Eric W. Biederman
Signed-off-by: Kirill Tkhai
---
include/net/net_namespace.h |2 +
net/core/net_namespace.c| 75 ++-
2 files changed, 75 insertions(+), 2 deletions(-)
diff --git a/include/net/net_namespace.h b/inc
i-thread tests increase may be close to 4.6 multiplied
to number of threads.
This patch starts replacing net_mutex to net_sem. It adds rw_semaphore,
describes the variables it protects, and makes to use where appropriate.
net_mutex is still present, and next patches will kick it out step-by-step.
Signed
net_sem protects from pernet_list changing, while
ops_free_list() makes simple kfree(), and it can't
race with other pernet_operations callbacks.
So we may release net_mutex earlier then it was.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c |3 ++-
1 file changed, 2 inser
Currently we have first_device, and device and subsys
sublists. Next patches introduce one more sublist.
So, move the functionality, which will be repeating,
to the primitives.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c | 19 +++
1 file changed, 15 insertions
On 15.11.2017 19:31, Eric W. Biederman wrote:
> Kirill Tkhai writes:
>
>> On 15.11.2017 12:51, Kirill Tkhai wrote:
>>> On 15.11.2017 06:19, Eric W. Biederman wrote:
>>>> Kirill Tkhai writes:
>>>>
>>>>> On 14.11.2017 21:39, Cong Wang
On 17.11.2017 21:54, Eric W. Biederman wrote:
> Kirill Tkhai writes:
>
>> On 15.11.2017 19:29, Eric W. Biederman wrote:
>>> Kirill Tkhai writes:
>>>
>>>> On 15.11.2017 09:25, Eric W. Biederman wrote:
>>>>> Kirill Tkhai writes:
>>
On 17.11.2017 21:52, Eric W. Biederman wrote:
> Kirill Tkhai writes:
>
>> On 15.11.2017 19:31, Eric W. Biederman wrote:
>>> Kirill Tkhai writes:
>>>
>>>> On 15.11.2017 12:51, Kirill Tkhai wrote:
>>>>> On 15.11.2017 06:19, Eric W. Bieder
nit()->proc_net_init(),
which can't race with net_ns_init(), called from
initcall.
Signed-off-by: Kirill Tkhai
---
net/core/net_namespace.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index b797832565d3..7
This pernet_operations create and destroy net::genl_sock.
Foreign pernet_operations don't touch it.
Signed-off-by: Kirill Tkhai
---
net/netlink/genetlink.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index d444daf1ac04..a66fad4
These pernet_operations register and destroy sysctl
directory, and it's not interested for foreign
pernet_operations.
Signed-off-by: Kirill Tkhai
---
net/core/sysctl_net_core.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
These pernet_operations create and destroy sysctl,
which are not touched by anybody else.
Signed-off-by: Kirill Tkhai
---
net/ipv4/sysctl_net_ipv4.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 93e172118a94..89683d868b37
ble for another pernet_operations.
Signed-off-by: Kirill Tkhai
---
drivers/net/loopback.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 30612497643c..b97a907ea5aa 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -230,4 +
These pernet operations just create and destroy netlink
socket. The socket is pernet and else operations don't
touch it.
Signed-off-by: Kirill Tkhai
---
net/core/sock_diag.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c
index 217f4e3
dereference.
The same for default_device_exit_batch(). Similar unregisteration
may happen in any time on a system. Here several lists (like todo_list),
which are accessed under rtnl_lock(). After rtnl_unlock() and
netdev_run_todo() all the devices are flushed.
Signed-off-by: Kirill Tkhai
These pernet_operations (un)register sysctl, which
are not touched by anybody else.
So, it's safe to make them async.
Signed-off-by: Kirill Tkhai
---
net/ipv6/addrconf.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index a0ae1c9
These pernet_operations just create and destroy /proc entry,
and another operations do not touch it.
Also, nobody else are interested in foreign net::packet::sklist.
Signed-off-by: Kirill Tkhai
---
net/packet/af_packet.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net/packet
These pernet_operations are just create and destroy
/proc and sysctl entries, and are not touched by
foreign pernet_operations.
So, we are able to make them async.
Signed-off-by: Kirill Tkhai
---
net/unix/af_unix.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net/unix/af_unix.c b/net
of newly created net.
ipv4_mib_ops creates and destroys pernet percpu statistics.
raw_net_ops, tcp4_net_ops, udp4_net_ops, ping_v4_net_ops
and ip_proc_ops only create/destroy pernet /proc files.
ip4_frags_ops creates and destroys sysctl file.
So, it's safe to make the pernet_operations async.
Si
These pernet_operations initialize and purge net::wext_nlevents
queue, and are not touched by foreign pernet_operations.
Mark them async.
Signed-off-by: Kirill Tkhai
---
net/wireless/wext-core.c |1 +
1 file changed, 1 insertion(+)
diff --git a/net/wireless/wext-core.c b/net/wireless/wext
201 - 300 of 429 matches
Mail list logo