linux/net/rds
Håkon Bugge e623a48ee4 rds: Make sure updates to cp_send_gen can be observed
cp->cp_send_gen is treated as a normal variable, although it may be
used by different threads.

This is fixed by using {READ,WRITE}_ONCE when it is incremented and
READ_ONCE when it is read outside the {acquire,release}_in_xmit
protection.

Normative reference from the Linux-Kernel Memory Model:

    Loads from and stores to shared (but non-atomic) variables should
    be protected with the READ_ONCE(), WRITE_ONCE(), and
    ACCESS_ONCE().

Clause 5.1.2.4/25 in the C standard is also relevant.

Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-20 15:33:01 -07:00
..
Kconfig
Makefile
af_rds.c
bind.c
cong.c
connection.c rds: tcp: set linger to 1 when unloading a rds-tcp 2017-06-22 11:34:04 -04:00
ib.c net, rds: convert rds_ib_device.refcount from atomic_t to refcount_t 2017-07-04 22:35:17 +01:00
ib.h net, rds: convert rds_ib_device.refcount from atomic_t to refcount_t 2017-07-04 22:35:17 +01:00
ib_cm.c
ib_fmr.c
ib_frmr.c
ib_mr.h
ib_rdma.c net, rds: convert rds_ib_device.refcount from atomic_t to refcount_t 2017-07-04 22:35:17 +01:00
ib_recv.c
ib_ring.c
ib_send.c
ib_stats.c
ib_sysctl.c
info.c
info.h
loop.c
loop.h
message.c net, rds: convert rds_message.m_refcount from atomic_t to refcount_t 2017-07-04 22:35:18 +01:00
page.c
rdma.c net, rds: convert rds_mr.r_refcount from atomic_t to refcount_t 2017-07-04 22:35:17 +01:00
rdma_transport.c
rdma_transport.h
rds.h net, rds: convert rds_message.m_refcount from atomic_t to refcount_t 2017-07-04 22:35:18 +01:00
rds_single_path.h
recv.c net, rds: convert rds_incoming.i_refcount from atomic_t to refcount_t 2017-07-04 22:35:17 +01:00
send.c rds: Make sure updates to cp_send_gen can be observed 2017-07-20 15:33:01 -07:00
stats.c
sysctl.c
tcp.c
tcp.h rds: tcp: set linger to 1 when unloading a rds-tcp 2017-06-22 11:34:04 -04:00
tcp_connect.c rds: tcp: set linger to 1 when unloading a rds-tcp 2017-06-22 11:34:04 -04:00
tcp_listen.c rds: tcp: use sock_create_lite() to create the accept socket 2017-07-08 11:16:16 +01:00
tcp_recv.c
tcp_send.c net: convert sock.sk_wmem_alloc from atomic_t to refcount_t 2017-07-01 07:39:08 -07:00
tcp_stats.c
threads.c rds: tcp: various endian-ness fixes 2017-06-16 12:45:15 -04:00
transport.c