From: Sheng Yang Date: Thu, 14 Jan 2016 01:26:13 +0000 (-0800) Subject: target/user: Make sure netlink would reach all network namespaces X-Git-Tag: v4.1.12-105.0.20170622_2100~26 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=adfbf14e15b0564365ad81d324e6eaa1eaa33936;p=users%2Fjedix%2Flinux-maple.git target/user: Make sure netlink would reach all network namespaces The current code only allow netlink to reach the initial network namespace, which caused trouble for any client running inside container. This patch would make sure TCMU netlink would work for all network namespaces. Signed-off-by: Sheng Yang Acked-by: Andy Grover Signed-off-by: Nicholas Bellinger Orabug: 25395066 (cherry picked from commit 20c08b362f4b0c41103fe9d75c61ca348d021441) Signed-off-by: Kyle Fortin Reviewed-by: Shan Hai --- diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index ec2412b45876..08446dc44d9e 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -150,6 +150,7 @@ static struct genl_family tcmu_genl_family = { .maxattr = TCMU_ATTR_MAX, .mcgrps = tcmu_mcgrps, .n_mcgrps = ARRAY_SIZE(tcmu_mcgrps), + .netnsok = true, }; static struct tcmu_cmd *tcmu_alloc_cmd(struct se_cmd *se_cmd) @@ -838,7 +839,7 @@ static int tcmu_netlink_event(enum tcmu_genl_cmd cmd, const char *name, int mino genlmsg_end(skb, msg_header); - ret = genlmsg_multicast(&tcmu_genl_family, skb, 0, + ret = genlmsg_multicast_allns(&tcmu_genl_family, skb, 0, TCMU_MCGRP_CONFIG, GFP_KERNEL); /* We don't care if no one is listening */