Lines Matching refs:ucmsg
118 #define CMSG_COMPAT_OK(ucmlen, ucmsg, mhdr) \ argument
122 ((char __user *)(ucmsg) - (char __user *)(mhdr)->msg_control_user)))
141 struct compat_cmsghdr __user *ucmsg; in cmsghdr_from_user_compat_to_kern() local
152 ucmsg = CMSG_COMPAT_FIRSTHDR(kmsg); in cmsghdr_from_user_compat_to_kern()
153 while (ucmsg != NULL) { in cmsghdr_from_user_compat_to_kern()
154 if (get_user(ucmlen, &ucmsg->cmsg_len)) in cmsghdr_from_user_compat_to_kern()
158 if (!CMSG_COMPAT_OK(ucmlen, ucmsg, kmsg)) in cmsghdr_from_user_compat_to_kern()
161 tmp = ((ucmlen - sizeof(*ucmsg)) + sizeof(struct cmsghdr)); in cmsghdr_from_user_compat_to_kern()
164 ucmsg = cmsg_compat_nxthdr(kmsg, ucmsg, ucmlen); in cmsghdr_from_user_compat_to_kern()
181 ucmsg = CMSG_COMPAT_FIRSTHDR(kmsg); in cmsghdr_from_user_compat_to_kern()
182 while (ucmsg != NULL) { in cmsghdr_from_user_compat_to_kern()
184 if (copy_from_user(&cmsg, ucmsg, sizeof(cmsg))) in cmsghdr_from_user_compat_to_kern()
186 if (!CMSG_COMPAT_OK(cmsg.cmsg_len, ucmsg, kmsg)) in cmsghdr_from_user_compat_to_kern()
188 tmp = ((cmsg.cmsg_len - sizeof(*ucmsg)) + sizeof(struct cmsghdr)); in cmsghdr_from_user_compat_to_kern()
196 CMSG_COMPAT_DATA(ucmsg), in cmsghdr_from_user_compat_to_kern()
197 (cmsg.cmsg_len - sizeof(*ucmsg)))) in cmsghdr_from_user_compat_to_kern()
202 ucmsg = cmsg_compat_nxthdr(kmsg, ucmsg, cmsg.cmsg_len); in cmsghdr_from_user_compat_to_kern()