mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
a20583a7c2
commit
7162a3e0db
3 changed files with 5 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue