Lines Matching refs:kcmsg
145 struct cmsghdr *kcmsg, *kcmsg_base; in cmsghdr_from_user_compat_to_kern() local
154 kcmsg_base = kcmsg = (struct cmsghdr *)stackbuf; in cmsghdr_from_user_compat_to_kern()
178 kcmsg_base = kcmsg = sock_kmalloc(sk, kcmlen, GFP_KERNEL); in cmsghdr_from_user_compat_to_kern()
179 if (kcmsg == NULL) in cmsghdr_from_user_compat_to_kern()
183 memset(kcmsg, 0, kcmlen); in cmsghdr_from_user_compat_to_kern()
192 if ((char *)kcmsg_base + kcmlen - (char *)kcmsg < CMSG_ALIGN(tmp)) in cmsghdr_from_user_compat_to_kern()
194 kcmsg->cmsg_len = tmp; in cmsghdr_from_user_compat_to_kern()
195 kcmsg->cmsg_level = cmsg.cmsg_level; in cmsghdr_from_user_compat_to_kern()
196 kcmsg->cmsg_type = cmsg.cmsg_type; in cmsghdr_from_user_compat_to_kern()
198 if (copy_from_user(CMSG_DATA(kcmsg), in cmsghdr_from_user_compat_to_kern()
204 kcmsg = (struct cmsghdr *)((char *)kcmsg + tmp); in cmsghdr_from_user_compat_to_kern()
212 if ((char *)kcmsg - (char *)kcmsg_base != kcmlen) in cmsghdr_from_user_compat_to_kern()