sock: convert sk_peek_offset functions to WRITE_ONCE
authorWillem de Bruijn <willemb@google.com>
Tue, 5 Apr 2016 16:41:14 +0000 (12:41 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Apr 2016 20:29:36 +0000 (16:29 -0400)
commitb9bb53f3836f4eb2bdeb3447be11042bd29c2408
treef1052dadfe3e5694c235c77c7447a75a7ec353c1
parente43d15c8d3c8680fbf142360e5958f2ddd437047
sock: convert sk_peek_offset functions to WRITE_ONCE

Make the peek offset interface safe to use in lockless environments.
Use READ_ONCE and WRITE_ONCE to avoid race conditions between testing
and updating the peek offset.

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h