Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net-sysfs: initialize uid and gid before calling net_ns_get_ownership
Currently in net_ns_get_ownership() it may not be able to set uid or gid if make_kuid or make_kgid returns an invalid value, and an uninit-value issue can be triggered by this. This patch is to fix it by initializing the uid and gid before calling net_ns_get_ownership(), as it does in kobject_get_ownership() Fixes: e6dee9f ("net-sysfs: add netdev_change_owner()") Reported-by: Paolo Abeni <[email protected]> Signed-off-by: Xin Long <[email protected]> Acked-by: Christian Brauner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information