From 0a0d1e830b44dfde6e682adb1374a6a3bf5f8b58 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Fri, 5 Jan 2007 12:35:15 -0800 Subject: [PATCH] --- yaml --- r: 45429 b: refs/heads/master c: 0cefcf0bbc2d252eb48bff3289fb59c3817dd405 h: refs/heads/master i: 45427: d2732e2fd794f6e65085fe597c16a74a0b5407ac v: v3 --- [refs] | 2 +- trunk/drivers/infiniband/core/ucma.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index c8ee1e8fde9a..52eca8c3bf75 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 30a5ec982e4cfa955f93c454debaefc4d61d2da6 +refs/heads/master: 0cefcf0bbc2d252eb48bff3289fb59c3817dd405 diff --git a/trunk/drivers/infiniband/core/ucma.c b/trunk/drivers/infiniband/core/ucma.c index 9f30f9bffc61..e2e8d329b443 100644 --- a/trunk/drivers/infiniband/core/ucma.c +++ b/trunk/drivers/infiniband/core/ucma.c @@ -213,7 +213,17 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id, goto out; } ctx->backlog--; + } else if (!ctx->uid) { + /* + * We ignore events for new connections until userspace has set + * their context. This can only happen if an error occurs on a + * new connection before the user accepts it. This is okay, + * since the accept will just fail later. + */ + kfree(uevent); + goto out; } + list_add_tail(&uevent->list, &ctx->file->event_list); wake_up_interruptible(&ctx->file->poll_wait); out: