]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB/uverbs: Set correct user handle for user SRQs
authorRoland Dreier <rolandd@cisco.com>
Fri, 30 Jun 2006 20:40:13 +0000 (13:40 -0700)
committerRoland Dreier <rolandd@cisco.com>
Fri, 30 Jun 2006 20:40:13 +0000 (13:40 -0700)
Store away the user handle passed in from userspace when creating an
SRQ, so that the kernel can return the correct handle when an SRQ
asynchronous event occurs.  (A 0 was incorrectly stored as the user
handle as part of the changes in 9ead190b, "IB/uverbs: Don't serialize
with ib_uverbs_idr_mutex")

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/uverbs_cmd.c

index a908a7bdcd7fb09d44dfe94b1d0bd171168cb283..bdf5d5098190b7f6e9a2bd6312fd5c413d97d6aa 100644 (file)
@@ -1963,7 +1963,7 @@ ssize_t ib_uverbs_create_srq(struct ib_uverbs_file *file,
        if (!obj)
                return -ENOMEM;
 
-       init_uobj(&obj->uobject, 0, file->ucontext);
+       init_uobj(&obj->uobject, cmd.user_handle, file->ucontext);
        down_write(&obj->uobject.mutex);
 
        pd  = idr_read_pd(cmd.pd_handle, file->ucontext);