From: Tianjia Zhang Date: Tue, 29 Jul 2025 09:10:44 +0000 (+0800) Subject: selinux: use a consistent method to get full socket from skb X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4e8dc8e8b34771b0a3d474d243bcfcbddef8612;p=thirdparty%2Fkernel%2Fstable.git 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 Acked-by: Stephen Smalley Signed-off-by: Paul Moore --- diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index c95a5874bf7d4..e474cd7398eff 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;