spin_lock_irq(&file->async_file->lock); list_for_each_entry_safe(evt, tmp, &uobj->event_list, obj_list) { list_del(&evt->list); kfree(evt); } spin_unlock_irq(&file->async_file->lock); 
ib_uverbs_release_uevent(file, uobj); 
ssize_t ib_uverbs_destroy_qp(struct ib_uverbs_file *file,			     const char __user *buf, int in_len,			     int out_len){	struct ib_uverbs_destroy_qp      cmd;	struct ib_uverbs_destroy_qp_resp resp;	struct ib_qp               	*qp;	struct ib_uevent_object        	*uobj;	struct ib_uverbs_event		*evt, *tmp;	int                        	 ret = -EINVAL;	if (copy_from_user(&cmd, buf, sizeof cmd))		return -EFAULT;	memset(&resp, 0, sizeof resp);	down(&ib_uverbs_idr_mutex);	qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle);	if (!qp || qp->uobject->context != file->ucontext)		goto out;	uobj = container_of(qp->uobject, struct ib_uevent_object, uobject);	ret = ib_destroy_qp(qp);	if (ret)		goto out;	idr_remove(&ib_uverbs_qp_idr, cmd.qp_handle);	down(&file->mutex);	list_del(&uobj->uobject.list);	up(&file->mutex);	spin_lock_irq(&file->async_file->lock);	list_for_each_entry_safe(evt, tmp, &uobj->event_list, obj_list) {		list_del(&evt->list);		kfree(evt);	}	spin_unlock_irq(&file->async_file->lock);	resp.events_reported = uobj->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;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/70a30e16a8a9d22396a4d1e96af86e43594df584/uverbs_cmd.c/clean/drivers/infiniband/core/uverbs_cmd.c