[PATCH 2/2] landlock: replace __sk_common struct sock field accesses
Mickaël Salaün
mic at digikod.net
Wed Jun 10 13:48:03 UTC 2026
On Wed, Jun 10, 2026 at 03:41:06PM +0200, Mickaël Salaün wrote:
> Thanks for the fixes, but can you please send a full v5 patch series?
Ok, these are not part of the UDP patch series, but this part of the
same thread, my bad... I'll pick them, thanks!
>
> 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