Source
62
62
*/
63
63
/*
64
64
* set the handle size to zero so we copy only
65
65
* non variable part of the file_handle
66
66
*/
67
67
handle_bytes = 0;
68
68
retval = -EOVERFLOW;
69
69
} else
70
70
retval = 0;
71
71
/* copy the mount id */
72
-
if (copy_to_user(mnt_id, &real_mount(path->mnt)->mnt_id,
73
-
sizeof(*mnt_id)) ||
72
+
if (put_user(real_mount(path->mnt)->mnt_id, mnt_id) ||
74
73
copy_to_user(ufh, handle,
75
74
sizeof(struct file_handle) + handle_bytes))
76
75
retval = -EFAULT;
77
76
kfree(handle);
78
77
return retval;
79
78
}
80
79
​
81
80
/**
82
81
* sys_name_to_handle_at: convert name to handle
83
82
* @dfd: directory relative to which name is interpreted if not absolute