diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-10-30 09:50:04 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-10-31 07:10:32 -0800 |
commit | 7162a3e0db34e914a8bc5bf74bbae0b386310cf8 (patch) | |
tree | ffd7eba03f29dd2932dd32ac4adc2921bde7644b /drivers/infiniband/core/uverbs_cmd.c | |
parent | a20583a7c2e35d80b1dfc1f60c9729498838725e (diff) |
[IB] uverbs: Avoid NULL pointer deref on CQ async event
Userspace CQs that have no completion event channel attached end up
with their cq_context set to NULL. However, asynchronous events like
"CQ overrun" can still occur on such CQs, so add a uverbs_file member
to struct ib_ucq_object that we can follow to deliver these events.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_cmd.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 8c89abc8c764..63a74151c60b 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -602,6 +602,7 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file, uobj->uobject.user_handle = cmd.user_handle; uobj->uobject.context = file->ucontext; + uobj->uverbs_file = file; uobj->comp_events_reported = 0; uobj->async_events_reported = 0; INIT_LIST_HEAD(&uobj->comp_list); |