Re: [PATCH] netlink: switch net_ns only if net is not init_net

From: David Miller
Date: Sun Mar 09 2014 - 19:10:16 EST


From: Gu Zheng <guz.fnst@xxxxxxxxxxxxxx>
Date: Fri, 07 Mar 2014 18:47:30 +0800

> Many netlink users create netlink sock in the init_net, and the
> switching nes_ns(init_net-->net) is needless in this case. So here
> we add a pre-check to avoid this.
>
> Signed-off-by: Gu Zheng <guz.fnst@xxxxxxxxxxxxxx>

This check is more appropriately placed into sk_change_net() itself.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/