diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index ed53bf5d2b68..af75c0a8238e 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -509,9 +509,11 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) goto out; /* hdrincl should be READ_ONCE(inet->hdrincl) - * but READ_ONCE() doesn't work with bit fields + * but READ_ONCE() doesn't work with bit fields. + * Doing this indirectly yields the same result. */ hdrincl = inet->hdrincl; + hdrincl = READ_ONCE(hdrincl); /* * Check the flags. */