diff options
author | Xin Long <lucien.xin@gmail.com> | 2021-10-25 02:31:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-25 16:17:32 +0100 |
commit | f7a1e76d0f608961cc2fc681f867a834f2746bce (patch) | |
tree | c754de5e6f4e009485b2abb2a92947a41158b58f /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 042b2046d0f05cf8124c26ff65dbb6148a4404fb (diff) |
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: e6dee9f3893c ("net-sysfs: add netdev_change_owner()")
Reported-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions