freebsd-nq/sys/dev/cxgbe/iw_cxgbe
Navdeep Parhar 017296dbb6 cxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets.
Sockets representing the TCP endpoints for iWARP connections are
allocated by the ibcore module.  Before this revision they were closed
either by the ibcore module or the iw_cxgbe hardware driver depending on
the state transitions during connection teardown.  This is error prone
and there were cases where both iw_cxgbe and ibcore closed the socket
leading to double-free panics.  The fix is to let ibcore close the
sockets it creates and never do it in the driver.

- Use sodisconnect instead of soclose (preceded by solinger = 0) in the
  driver to tear down an RDMA connection abruptly.  This does what's
  intended without releasing the socket's fd reference.

- Close the socket in ibcore when the iWARP iw_cm_id is destroyed.  This
  works for all kinds of sockets: clients that initiate connections,
  listeners, and sockets accepted off of listeners.

Reviewed by:	Steve Wise @ Open Grid Computing, hselasky@
MFC after:	3 days
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D9796
2017-02-28 19:27:41 +00:00
..
cm.c cxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets. 2017-02-28 19:27:41 +00:00
cq.c Store the offset of the KDOORBELL and GTS registers in the softc. 2016-08-01 22:39:51 +00:00
device.c cxgbe/iw_cxgbe: Minor changes for T6. 2017-02-23 19:02:40 +00:00
ev.c iw_cxgbe: Fix panic that occurs when c4iw_ev_handler tries to acquire 2016-06-01 18:46:54 +00:00
id_table.c
iw_cxgbe.h cxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets. 2017-02-28 19:27:41 +00:00
mem.c cxgbe/iw_cxgbe: Minor changes for T6. 2017-02-23 19:02:40 +00:00
provider.c cxgbe/iw_cxgbe: Minor changes for T6. 2017-02-23 19:02:40 +00:00
qp.c cxgbe/iw_cxgbe: Various fixes to the iWARP driver. 2016-08-26 17:38:13 +00:00
resource.c iw_cxgbe: Use vmem(9) to manage PBL and RQT allocations. 2016-05-27 21:26:26 +00:00
t4.h cxgbe/iw_cxgbe: Various fixes to the iWARP driver. 2016-08-26 17:38:13 +00:00
user.h iw_cxgbe/libcxgb4: Pull in many applicable fixes from the upstream Linux 2016-03-21 00:29:45 +00:00