From: Roland Dreier Date: Fri, 30 Jun 2006 20:40:13 +0000 (-0700) Subject: IB/uverbs: Set correct user handle for user SRQs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=146d26b2bf167f831d3b7442a01cfdc2b183cb0b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git IB/uverbs: Set correct user handle for user SRQs 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 --- diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index a908a7bdcd7f..bdf5d5098190 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -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);