diff --git a/kernel/file_ops.c b/kernel/file_ops.c index 4be82f59..8f3acab0 100644 --- a/kernel/file_ops.c +++ b/kernel/file_ops.c @@ -526,9 +526,18 @@ long hfi1_file_ioctl(void *private_data, unsigned int cmd, case HFI1_IOCTL_TID_INVAL_READ: dkprintf("%s: HFI1_IOCTL_TID_INVAL_READ \n", __FUNCTION__); - /* This function is only invovled with the tid mmu caching. - * It is a no-op for us. */ - ret = 0; + if (copy_from_user(&tinfo, + (struct hfi11_tid_info __user *)arg, + 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; case HFI1_IOCTL_RECV_CTRL: