Re: [PATCH net-next v2] mctp i2c: add sysfs control for mux child netdevs
From: Kenny Hsieh
Date: Thu Nov 05 2026 - 05:38:58 EST
Hi Matt,
Another thing I'd like to change in v3.
In v2 I kept the probe-time netns with get_net(), to handle your
same-namespace point from v1. But that reference pins the namespace as
long as the controller is bound. So if the controller got probed in a
container, the namespace and its netdevs hang around after the
container is gone, instead of the netdevs going back to init_net. It
also changed the devicetree path, which normally uses the caller's
namespace.
I'd like to just drop it and do the same as rtnetlink: create the netdev
in the writer's namespace and check CAP_NET_ADMIN there. That
lines up with the devicetree path, though it means there's no
same-namespace check anymore.
If you still want a restriction, I could only allow writes from init_net
for now. That doesn't need a stored namespace either. What do
you think?
BR,
Kenny