diff options
| author | Christian Göttsche <[email protected]> | 2025-03-18 08:33:30 +0000 |
|---|---|---|
| committer | Paul Moore <[email protected]> | 2025-04-11 20:29:51 +0000 |
| commit | e6fb56b2253d49d192d4fe790698462d5422c041 (patch) | |
| tree | 80a00d8a04d6f74e0ffed49ccbea27c1545aafe1 /security/selinux/netnode.c | |
| parent | selinux: contify network namespace pointer (diff) | |
| download | kernel-e6fb56b2253d49d192d4fe790698462d5422c041.tar.gz kernel-e6fb56b2253d49d192d4fe790698462d5422c041.zip | |
selinux: add likely hints for fast paths
In the network hashtable lookup code add likely() compiler hints in the
fast path, like already done in sel_netif_sid().
Signed-off-by: Christian Göttsche <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
Diffstat (limited to 'security/selinux/netnode.c')
| -rw-r--r-- | security/selinux/netnode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/netnode.c b/security/selinux/netnode.c index b7900d5ae557..8bb456d80dd5 100644 --- a/security/selinux/netnode.c +++ b/security/selinux/netnode.c @@ -253,7 +253,7 @@ int sel_netnode_sid(const void *addr, u16 family, u32 *sid) rcu_read_lock(); node = sel_netnode_find(addr, family); - if (node != NULL) { + if (likely(node != NULL)) { *sid = node->nsec.sid; rcu_read_unlock(); return 0; |
