[PATCH 2/2] landlock: replace __sk_common struct sock field accesses
Mickaël Salaün
mic at digikod.net
Wed Jun 10 13:41:03 UTC 2026
Thanks for the fixes, but can you please send a full v5 patch series?
On Tue, Jun 09, 2026 at 11:15:11PM +0200, Matthieu Buffet wrote:
> Use the proper macro to access __sk_common.skc_family like everywhere
> else.
>
> Signed-off-by: Matthieu Buffet <matthieu at buffet.re>
> ---
> security/landlock/net.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/landlock/net.c b/security/landlock/net.c
> index 111e58fd9325..fc2acf8bd898 100644
> --- a/security/landlock/net.c
> +++ b/security/landlock/net.c
> @@ -71,7 +71,7 @@ static int current_check_access_socket(struct socket *const sock,
> * The socket is not locked, so sk_family can change concurrently
> * due to e.g. setsockopt(IPV6_ADDRFORM).
> */
> - sock_family = READ_ONCE(sock->sk->__sk_common.skc_family);
> + sock_family = READ_ONCE(sock->sk->sk_family);
>
> switch (address->sa_family) {
> case AF_UNSPEC:
> --
> 2.47.3
>
>
More information about the Linux-security-module-archive
mailing list