struct ib_uverbs_event		*evt, *tmp;
ssize_t ib_uverbs_destroy_cq(struct ib_uverbs_file *file,			     const char __user *buf, int in_len,			     int out_len){	struct ib_uverbs_destroy_cq      cmd;	struct ib_uverbs_destroy_cq_resp resp;	struct ib_cq               	*cq;	struct ib_ucq_object        	*uobj;	struct ib_uverbs_event_file	*ev_file;	struct ib_uverbs_event		*evt, *tmp;	u64				 user_handle;	int                        	 ret = -EINVAL;	if (copy_from_user(&cmd, buf, sizeof cmd))		return -EFAULT;	memset(&resp, 0, sizeof resp);	down(&ib_uverbs_idr_mutex);	cq = idr_find(&ib_uverbs_cq_idr, cmd.cq_handle);	if (!cq || cq->uobject->context != file->ucontext)		goto out;	user_handle = cq->uobject->user_handle;	uobj        = container_of(cq->uobject, struct ib_ucq_object, uobject);	ev_file     = cq->cq_context;	ret = ib_destroy_cq(cq);	if (ret)		goto out;	idr_remove(&ib_uverbs_cq_idr, cmd.cq_handle);	down(&file->mutex);	list_del(&uobj->uobject.list);	up(&file->mutex);	if (ev_file) {		spin_lock_irq(&ev_file->lock);		list_for_each_entry_safe(evt, tmp, &uobj->comp_list, obj_list) {			list_del(&evt->list);			kfree(evt);		}		spin_unlock_irq(&ev_file->lock);		kref_put(&ev_file->ref, ib_uverbs_release_event_file);	}	spin_lock_irq(&file->async_file->lock);	list_for_each_entry_safe(evt, tmp, &uobj->async_list, obj_list) {		list_del(&evt->list);		kfree(evt);	}	spin_unlock_irq(&file->async_file->lock);	resp.comp_events_reported  = uobj->comp_events_reported;	resp.async_events_reported = uobj->async_events_reported;	kfree(uobj);	if (copy_to_user((void __user *) (unsigned long) cmd.response,			 &resp, sizeof resp))		ret = -EFAULT;out:	up(&ib_uverbs_idr_mutex);	return ret ? ret : in_len;}