summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2018-04-23 17:37:03 -0400
committerDavid S. Miller <davem@davemloft.net>2018-04-24 13:17:08 -0400
commita6361f0ca4b25460f2cdf3235ebe8115f622901e (patch)
treef57888c07419a06a85caa62d73717363d86b15b7 /include
parent9cf2f437ca5b39828984064fad213e68fc17ef11 (diff)
packet: fix bitfield update race
Updates to the bitfields in struct packet_sock are not atomic. Serialize these read-modify-write cycles. Move po->running into a separate variable. Its writes are protected by po->bind_lock (except for one startup case at packet_create). Also replace a textual precondition warning with lockdep annotation. All others are set only in packet_setsockopt. Serialize these updates by holding the socket lock. Analogous to other field updates, also hold the lock when testing whether a ring is active (pg_vec). Fixes: 8dc419447415 ("[PACKET]: Add optional checksum computation for recvmsg") Reported-by: DaeRyong Jeong <threeearcat@gmail.com> Reported-by: Byoungyoung Lee <byoungyoung@purdue.edu> Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions