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 lets send events broadcastly not per net-namespace but per-VE.
Signed-off-by: Cyrill Gorcunov <[email protected]> CC: 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(+) Index: linux-pcs7.git/lib/kobject_uevent.c =================================================================== --- linux-pcs7.git.orig/lib/kobject_uevent.c +++ linux-pcs7.git/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 kobjec 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); Index: linux-pcs7.git/net/core/net_namespace.c =================================================================== --- linux-pcs7.git.orig/net/core/net_namespace.c +++ linux-pcs7.git/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
