Re: [PATCH net] packet: fix bitfield update race

2018-04-24 Thread David Miller
From: Willem de Bruijn Date: Mon, 23 Apr 2018 17:37:03 -0400 > From: Willem de Bruijn > > 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 (excep

[PATCH net] packet: fix bitfield update race

2018-04-23 Thread Willem de Bruijn
From: Willem de Bruijn 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