alistair23-linux/net/rds
Sowmini Varadhan aed20a53a7 rds: cancel send/recv work before queuing connection shutdown
We could end up executing rds_conn_shutdown before the rds_recv_worker
thread, then rds_conn_shutdown -> rds_tcp_conn_shutdown can do a
sock_release and set sock->sk to null, which may interleave in bad
ways with rds_recv_worker, e.g., it could result in:

"BUG: unable to handle kernel NULL pointer dereference at 0000000000000078"
    [ffff881769f6fd70] release_sock at ffffffff815f337b
    [ffff881769f6fd90] rds_tcp_recv at ffffffffa043c888 [rds_tcp]
    [ffff881769f6fdb0] rds_recv_worker at ffffffffa04a4810 [rds]
    [ffff881769f6fde0] process_one_work at ffffffff810a14c1
    [ffff881769f6fe40] worker_thread at ffffffff810a1940
    [ffff881769f6fec0] kthread at ffffffff810a6b1e

Also, do not enqueue any new shutdown workq items when the connection is
shutting down (this may happen for rds-tcp in softirq mode, if a FIN
or CLOSE is received while the modules is in the middle of an unload)

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-16 19:07:35 -07:00
..
af_rds.c RDS: validate the requested traces user input against max supported 2017-01-06 22:14:26 -05:00
bind.c RDS: log the address on bind failure 2017-01-02 14:02:39 -08:00
cong.c
connection.c rds: cancel send/recv work before queuing connection shutdown 2017-07-16 19:07:35 -07: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 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-03-15 11:59:10 -07:00
ib_fmr.c rds: ib: unmap the scatter/gather list when error 2017-03-13 23:20:05 -07:00
ib_frmr.c RDS: IB: split the mr registration and invalidation path 2017-01-02 14:02:47 -08:00
ib_mr.h rds: ib: add the static type to the function 2017-03-13 23:20:05 -07:00
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 RDS: add receive message trace used by application 2017-01-02 14:02:59 -08:00
ib_ring.c
ib_send.c rds:Remove unnecessary ib_ring unalloc 2017-02-17 15:19:51 -05:00
ib_stats.c RDS: IB: add few useful cache stasts 2017-01-02 14:02:51 -08:00
ib_sysctl.c
info.c
info.h
Kconfig
loop.c
loop.h
Makefile
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 rds: remove dead code 2016-12-26 21:35:39 -05:00
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 RDS: RDMA: start rdma listening after init 2017-01-02 14:02:45 -08:00
rdma_transport.h
rds.h rds: cancel send/recv work before queuing connection shutdown 2017-07-16 19:07:35 -07: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: tcp: send handshake ping-probe from passive endpoint 2017-06-22 11:34:04 -04:00
stats.c
sysctl.c
tcp.c rds: cancel send/recv work before queuing connection shutdown 2017-07-16 19:07:35 -07:00
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: cancel send/recv work before queuing connection shutdown 2017-07-16 19:07:35 -07: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 RDS: add receive message trace used by application 2017-01-02 14:02:59 -08:00
tcp_send.c rds: cancel send/recv work before queuing connection shutdown 2017-07-16 19:07:35 -07:00
tcp_stats.c
threads.c rds: cancel send/recv work before queuing connection shutdown 2017-07-16 19:07:35 -07:00
transport.c rds: remove unnecessary returned value check 2017-03-03 09:51:22 -08:00