hfi1_file_ioctl(): execute HFI1_IOCTL_TID_INVAL_READ locally
This commit is contained in:
@@ -526,9 +526,18 @@ long hfi1_file_ioctl(void *private_data, unsigned int cmd,
|
|||||||
|
|
||||||
case HFI1_IOCTL_TID_INVAL_READ:
|
case HFI1_IOCTL_TID_INVAL_READ:
|
||||||
dkprintf("%s: HFI1_IOCTL_TID_INVAL_READ \n", __FUNCTION__);
|
dkprintf("%s: HFI1_IOCTL_TID_INVAL_READ \n", __FUNCTION__);
|
||||||
/* This function is only invovled with the tid mmu caching.
|
if (copy_from_user(&tinfo,
|
||||||
* It is a no-op for us. */
|
(struct hfi11_tid_info __user *)arg,
|
||||||
ret = 0;
|
sizeof(tinfo)))
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
|
ret = hfi1_user_exp_rcv_invalid(fd, &tinfo);
|
||||||
|
if (ret)
|
||||||
|
break;
|
||||||
|
addr = arg + offsetof(struct hfi1_tid_info, tidcnt);
|
||||||
|
if (copy_to_user((void __user *)addr, &tinfo.tidcnt,
|
||||||
|
sizeof(tinfo.tidcnt)))
|
||||||
|
ret = -EFAULT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HFI1_IOCTL_RECV_CTRL:
|
case HFI1_IOCTL_RECV_CTRL:
|
||||||
|
|||||||
Reference in New Issue
Block a user