.. | .. |
---|
1359 | 1359 | addr = arg + offsetof(struct hfi1_tid_info, tidcnt); |
---|
1360 | 1360 | if (copy_to_user((void __user *)addr, &tinfo.tidcnt, |
---|
1361 | 1361 | sizeof(tinfo.tidcnt))) |
---|
1362 | | - return -EFAULT; |
---|
| 1362 | + ret = -EFAULT; |
---|
1363 | 1363 | |
---|
1364 | 1364 | addr = arg + offsetof(struct hfi1_tid_info, length); |
---|
1365 | | - if (copy_to_user((void __user *)addr, &tinfo.length, |
---|
| 1365 | + if (!ret && copy_to_user((void __user *)addr, &tinfo.length, |
---|
1366 | 1366 | sizeof(tinfo.length))) |
---|
1367 | 1367 | ret = -EFAULT; |
---|
| 1368 | + |
---|
| 1369 | + if (ret) |
---|
| 1370 | + hfi1_user_exp_rcv_invalid(fd, &tinfo); |
---|
1368 | 1371 | } |
---|
1369 | 1372 | |
---|
1370 | 1373 | return ret; |
---|