]> asedeno.scripts.mit.edu Git - linux.git/commit
net: create reusable function for getting ownership info of sysfs inodes
authorTyler Hicks <tyhicks@canonical.com>
Fri, 20 Jul 2018 21:56:53 +0000 (21:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Jul 2018 06:44:36 +0000 (23:44 -0700)
commitfbdeaed408cf2728c62640c10848ddb1b67e63d3
tree4c06f4a43d4516e7f1f83db877f4f4c49b01077f
parentb0e37c0d8a6abed0cd1b611314a7ebf50b0a8ed4
net: create reusable function for getting ownership info of sysfs inodes

Make net_ns_get_ownership() reusable by networking code outside of core.
This is useful, for example, to allow bridge related sysfs files to be
owned by container root.

Add a function comment since this is a potentially dangerous function to
use given the way that kobject_get_ownership() works by initializing uid
and gid before calling .get_ownership().

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/net_namespace.h
net/core/net-sysfs.c
net/core/net_namespace.c