diff options
author | Stephen Smalley <stephen.smalley.work@gmail.com> | 2023-03-09 21:30:37 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-03-14 22:22:45 +0300 |
commit | e67b79850fcc4eb5816d69d34fd82aeda350aca7 (patch) | |
tree | ac2ab206d913dd36a95347b59bc739551651cafc /security/selinux/netport.c | |
parent | f62ca0b6e31d82e0622a8e31ce5562e80edf6c3c (diff) | |
download | linux-e67b79850fcc4eb5816d69d34fd82aeda350aca7.tar.xz |
selinux: stop passing selinux_state pointers and their offspring
Linus observed that the pervasive passing of selinux_state pointers
introduced by me in commit aa8e712cee93 ("selinux: wrap global selinux
state") adds overhead and complexity without providing any
benefit. The original idea was to pave the way for SELinux namespaces
but those have not yet been implemented and there isn't currently
a concrete plan to do so. Remove the passing of the selinux_state
pointers, reverting to direct use of the single global selinux_state,
and likewise remove passing of child pointers like the selinux_avc.
The selinux_policy pointer remains as it is needed for atomic switching
of policies.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202303101057.mZ3Gv5fK-lkp@intel.com/
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/netport.c')
-rw-r--r-- | security/selinux/netport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/netport.c b/security/selinux/netport.c index 8eec6347cf01..2e22ad9c2bd0 100644 --- a/security/selinux/netport.c +++ b/security/selinux/netport.c @@ -148,7 +148,7 @@ static int sel_netport_sid_slow(u8 protocol, u16 pnum, u32 *sid) return 0; } - ret = security_port_sid(&selinux_state, protocol, pnum, sid); + ret = security_port_sid(protocol, pnum, sid); if (ret != 0) goto out; new = kzalloc(sizeof(*new), GFP_ATOMIC); |