]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv6: use READ_ONCE() for inet->hdrincl as in ipv4
authorOlivier Matz <olivier.matz@6wind.com>
Thu, 6 Jun 2019 07:15:18 +0000 (09:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2019 10:19:12 +0000 (12:19 +0200)
commitc64c725dac3ab53811b1b0c69f0f046e5c6ef66f
treed2b11c0dd35ef205f0ab3a07e172d6b69bed1d69
parent43ec962ddfc40070a0a9c3bbc8850bcad9bc1e19
ipv6: use READ_ONCE() for inet->hdrincl as in ipv4

[ Upstream commit 59e3e4b52663a9d97efbce7307f62e4bc5c9ce91 ]

As it was done in commit 8f659a03a0ba ("net: ipv4: fix for a race
condition in raw_sendmsg") and commit 20b50d79974e ("net: ipv4: emulate
READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()") for ipv4, copy the
value of inet->hdrincl in a local variable, to avoid introducing a race
condition in the next commit.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/raw.c