]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/ucma.c: Fix for events with wrong context on iWARP
authorTatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Fri, 3 Aug 2012 23:59:41 +0000 (23:59 +0000)
committerRoland Dreier <roland@purestorage.com>
Mon, 13 Aug 2012 20:08:35 +0000 (13:08 -0700)
commit05b8cd8b3f28f29d461f10999b9e61b35675bcb5
tree1472ed448d5ec116731480526b4bea2c1e0dfa91
parentdde762d5e7a1fb234d670e75ab8ffe3b4780e644
RDMA/ucma.c: Fix for events with wrong context on iWARP

It is possible for asynchronous RDMA_CM_EVENT_ESTABLISHED events to be
generated with ctx->uid == 0, because ucma_set_event_context() copies
ctx->uid to the event structure outside of ctx->file->mut.  This leads
to a crash in the userspace library, since it gets a bogus event.

Fix this by taking the mutex a bit earlier in ucma_event_handler.

Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Signed-off-by: Sean Hefty <Sean.Hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/core/ucma.c