diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2017-07-17 02:43:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-17 05:07:35 +0300 |
commit | aed20a53a7d91e45c6a8cb8920c77aaaa88f76ee (patch) | |
tree | 78bdb7167413d66c08f14ec1056cffd85fa0bc7d /lib/locking-selftest-rsem.h | |
parent | ce3dbe29749e3a3ef25540b394a68215e3113462 (diff) | |
download | linux-aed20a53a7d91e45c6a8cb8920c77aaaa88f76ee.tar.xz |
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>
Diffstat (limited to 'lib/locking-selftest-rsem.h')
0 files changed, 0 insertions, 0 deletions