file->ucontext   = ucontext; 
file->ucontext = ucontext; 
ssize_t ib_uverbs_get_context(struct ib_uverbs_file *file,			      const char __user *buf,			      int in_len, int out_len){	struct ib_uverbs_get_context      cmd;	struct ib_uverbs_get_context_resp resp;	struct ib_udata                   udata;	struct ib_device                 *ibdev = file->device->ib_dev;	struct ib_ucontext		 *ucontext;	struct file			 *filp;	int ret;	if (out_len < sizeof resp)		return -ENOSPC;	if (copy_from_user(&cmd, buf, sizeof cmd))		return -EFAULT;	down(&file->mutex);	if (file->ucontext) {		ret = -EINVAL;		goto err;	}	INIT_UDATA(&udata, buf + sizeof cmd,		   (unsigned long) cmd.response + sizeof resp,		   in_len - sizeof cmd, out_len - sizeof resp);	ucontext = ibdev->alloc_ucontext(ibdev, &udata);	if (IS_ERR(ucontext))		return PTR_ERR(file->ucontext);	ucontext->device = ibdev;	INIT_LIST_HEAD(&ucontext->pd_list);	INIT_LIST_HEAD(&ucontext->mr_list);	INIT_LIST_HEAD(&ucontext->mw_list);	INIT_LIST_HEAD(&ucontext->cq_list);	INIT_LIST_HEAD(&ucontext->qp_list);	INIT_LIST_HEAD(&ucontext->srq_list);	INIT_LIST_HEAD(&ucontext->ah_list);	resp.num_comp_vectors = file->device->num_comp_vectors;	filp = ib_uverbs_alloc_event_file(file, 1, &resp.async_fd);	if (IS_ERR(filp)) {		ret = PTR_ERR(filp);		goto err_free;	}	if (copy_to_user((void __user *) (unsigned long) cmd.response,			 &resp, sizeof resp)) {		ret = -EFAULT;		goto err_file;	}	file->async_file = filp->private_data;	INIT_IB_EVENT_HANDLER(&file->event_handler, file->device->ib_dev,			      ib_uverbs_event_handler);	ret = ib_register_event_handler(&file->event_handler);	if (ret)		goto err_file;	kref_get(&file->async_file->ref);	kref_get(&file->ref);	file->ucontext   = ucontext;	fd_install(resp.async_fd, filp);	up(&file->mutex);	return in_len;err_file:	put_unused_fd(resp.async_fd);	fput(filp);err_free:	ibdev->dealloc_ucontext(ucontext);err:	up(&file->mutex);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/70a30e16a8a9d22396a4d1e96af86e43594df584/uverbs_cmd.c/clean/drivers/infiniband/core/uverbs_cmd.c