diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2013-08-01 11:49:53 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-08-13 14:21:32 -0400 |
commit | 73c40c616a33fcb7961b3c90a91b550813129b3e (patch) | |
tree | 6c9cc5b71a72c437ff97c3237c5126572e276f98 /include/rdma/ib_verbs.h | |
parent | 5c5f3f0a74740c8f7bca8255741291bb0d2ebe4b (diff) |
IB/core: Add locking around event dispatching on XRC target QPs
Fix a potential race when event occurrs on a target XRC QP and in the
middle of reporting that on its shared qps, one of them is destroyed
by user space application. Also add note for kernel consumers in
ib_verbs.h that they must not destroy the QP from within the handler.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r-- | include/rdma/ib_verbs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 645c3cedce9c..a84d3dfc4076 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -635,6 +635,12 @@ enum ib_qp_create_flags { | |||
635 | IB_QP_CREATE_RESERVED_END = 1 << 31, | 635 | IB_QP_CREATE_RESERVED_END = 1 << 31, |
636 | }; | 636 | }; |
637 | 637 | ||
638 | |||
639 | /* | ||
640 | * Note: users may not call ib_close_qp or ib_destroy_qp from the event_handler | ||
641 | * callback to destroy the passed in QP. | ||
642 | */ | ||
643 | |||
638 | struct ib_qp_init_attr { | 644 | struct ib_qp_init_attr { |
639 | void (*event_handler)(struct ib_event *, void *); | 645 | void (*event_handler)(struct ib_event *, void *); |
640 | void *qp_context; | 646 | void *qp_context; |