diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/ucma.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 9f30f9bffc61..e2e8d329b443 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c | |||
@@ -213,7 +213,17 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id, | |||
213 | goto out; | 213 | goto out; |
214 | } | 214 | } |
215 | ctx->backlog--; | 215 | ctx->backlog--; |
216 | } else if (!ctx->uid) { | ||
217 | /* | ||
218 | * We ignore events for new connections until userspace has set | ||
219 | * their context. This can only happen if an error occurs on a | ||
220 | * new connection before the user accepts it. This is okay, | ||
221 | * since the accept will just fail later. | ||
222 | */ | ||
223 | kfree(uevent); | ||
224 | goto out; | ||
216 | } | 225 | } |
226 | |||
217 | list_add_tail(&uevent->list, &ctx->file->event_list); | 227 | list_add_tail(&uevent->list, &ctx->file->event_list); |
218 | wake_up_interruptible(&ctx->file->poll_wait); | 228 | wake_up_interruptible(&ctx->file->poll_wait); |
219 | out: | 229 | out: |