From: Casey Schaufler Date: Mon, 28 Feb 2022 23:45:32 +0000 (-0800) Subject: Fix incorrect type in assignment of ipv6 port for audit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=79dc407094308ce1ecd9abede396f3547738378c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Fix incorrect type in assignment of ipv6 port for audit [ Upstream commit a5cd1ab7ab679d252a6d2f483eee7d45ebf2040c ] Remove inappropriate use of ntohs() and assign the port value directly. Reported-by: kernel test robot Signed-off-by: Casey Schaufler Signed-off-by: Sasha Levin --- diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index a0e1b99212b2..fe070669dc18 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -2563,7 +2563,7 @@ static int smk_ipv6_check(struct smack_known *subject, #ifdef CONFIG_AUDIT smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); ad.a.u.net->family = PF_INET6; - ad.a.u.net->dport = ntohs(address->sin6_port); + ad.a.u.net->dport = address->sin6_port; if (act == SMK_RECEIVING) ad.a.u.net->v6info.saddr = address->sin6_addr; else