diff options
author | Faisal Latif <faisal.latif@intel.com> | 2008-11-22 05:50:46 +0300 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-12-05 22:00:08 +0300 |
commit | 183ecfa3091cd4cdda329a7fe89d9544088f517d (patch) | |
tree | 5cccb1b5b0fdfe7ec1dbaddbe0de04ce087f99a8 /drivers/infiniband/hw/nes/nes_cm.h | |
parent | 879e5bd5a1a0a317fb67fa4dc550db092a7bdcb0 (diff) | |
download | linux-183ecfa3091cd4cdda329a7fe89d9544088f517d.tar.xz |
RDMA/nes: Avoid race between MPA request and reset event to rdma_cm
In passive open, after indicating MPA request to rdma_cm, an incoming
RST would fire a reset event to rdma_cm causing it to crash, since the
current state is not connected. The solution is to wait for
nes_accept() or nes_reject() before firing the reset event. If
nes_accept() or nes_reject() is already done, then the reset event
will be fired when RST is processed.
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_cm.h')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.h b/drivers/infiniband/hw/nes/nes_cm.h index 282a9cbe508f..25e2493abc6a 100644 --- a/drivers/infiniband/hw/nes/nes_cm.h +++ b/drivers/infiniband/hw/nes/nes_cm.h @@ -76,6 +76,10 @@ enum nes_timer_type { NES_TIMER_TYPE_CLOSE, }; +#define NES_PASSIVE_STATE_INDICATED 0 +#define NES_DO_NOT_SEND_RESET_EVENT 1 +#define NES_SEND_RESET_EVENT 2 + #define MAX_NES_IFS 4 #define SET_ACK 1 @@ -295,6 +299,7 @@ struct nes_cm_node { struct list_head timer_entry; struct list_head reset_entry; struct nes_qp *nesqp; + atomic_t passive_state; }; /* structure for client or CM to fill when making CM api calls. */ |