]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jun 2019 17:29:21 +0000 (10:29 -0700)
commitfb398d7e00702252eb9719789f4c9ddae85b9cb2
tree3b48e72c79b7c16b11ae80721bd9add3bce598fa
parent7a447d97ea1c739091a93c6241bc1c306cc87829
ipv6: use READ_ONCE() for inet->hdrincl as in ipv4

As it was done in commit 04aed8cf906e ("net: ipv4: fix for a race
condition in raw_sendmsg") and commit 74d85e2185e2 ("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>
net/ipv6/raw.c