The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at 
https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.11
------>
commit 9b6abc191188f227a19f0404e2709fe421d779a8
Author: Cyrill Gorcunov <[email protected]>
Date:   Tue Jun 9 13:27:46 2015 +0400

    ve/kobj: Send events per VE instead of all net-namespaces broadcasting
    
    Currently uevents are sending broadcastly to all net-namespaces present
    in the system which is leading to problem of C/R'ing systemd based
    containers (netlink socket sees data from the node and we can't dump
    until the data is read).
    So let's send broadcast events to net namespaces of the particular VE only.
    
    Signed-off-by: Cyrill Gorcunov <[email protected]>
    Acked-by: Andrey Vagin <[email protected]>
    
    CC: Vladimir Davydov <[email protected]>
    CC: Konstantin Khorenko <[email protected]>
    CC: Pavel Emelyanov <[email protected]>
---
 lib/kobject_uevent.c     | 4 ++++
 net/core/net_namespace.c | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 08da611..2ef1e15 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -27,6 +27,7 @@
 #include <net/sock.h>
 #include <net/net_namespace.h>
 
+#include <linux/ve.h>
 
 u64 uevent_seqnum;
 char uevent_helper[UEVENT_HELPER_PATH_LEN] = CONFIG_UEVENT_HELPER_PATH;
@@ -262,6 +263,9 @@ int kobject_uevent_env_one(struct kobject *kobj, enum 
kobject_action action,
                if (!netlink_has_listeners(uevent_sock, 1))
                        continue;
 
+               if (sock_net(uevent_sock)->owner_ve != get_exec_env())
+                       continue;
+
                /* allocate message with the maximum possible size */
                len = strlen(action_string) + strlen(devpath) + 2;
                skb = alloc_skb(len + env->buflen, GFP_KERNEL);
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 7a7a989..0ad9aa1 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -33,6 +33,9 @@ EXPORT_SYMBOL_GPL(net_namespace_list);
 
 struct net init_net = {
        .dev_base_head = LIST_HEAD_INIT(init_net.dev_base_head),
+#ifdef CONFIG_VE
+       .owner_ve = &ve0,
+#endif
 };
 EXPORT_SYMBOL(init_net);
 
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to