summaryrefslogtreecommitdiff
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>2025-07-29 12:10:44 +0300
committerPaul Moore <paul@paul-moore.com>2025-08-11 18:59:11 +0300
commitd4e8dc8e8b34771b0a3d474d243bcfcbddef8612 (patch)
tree11a43d4f92165546d9454e2739a55a58f2a0c5a1 /security/selinux/hooks.c
parent5f9383bd4168eaf88a673d3eac5d8935a2202846 (diff)
downloadlinux-d4e8dc8e8b34771b0a3d474d243bcfcbddef8612.tar.xz
selinux: use a consistent method to get full socket from skb
In order to maintain code consistency and readability, skb_to_full_sk() is used to get full socket from skb. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index c95a5874bf7d..e474cd7398ef 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -5885,7 +5885,7 @@ static unsigned int selinux_ip_output(void *priv, struct sk_buff *skb,
/* we do this in the LOCAL_OUT path and not the POST_ROUTING path
* because we want to make sure we apply the necessary labeling
* before IPsec is applied so we can leverage AH protection */
- sk = sk_to_full_sk(skb->sk);
+ sk = skb_to_full_sk(skb);
if (sk) {
struct sk_security_struct *sksec;