Lines Matching refs:kcmsg
128 struct cmsghdr *kcmsg, *kcmsg_base; in cmsghdr_from_user_compat_to_kern() local
137 kcmsg_base = kcmsg = (struct cmsghdr *)stackbuf; in cmsghdr_from_user_compat_to_kern()
161 kcmsg_base = kcmsg = sock_kmalloc(sk, kcmlen, GFP_KERNEL); in cmsghdr_from_user_compat_to_kern()
162 if (kcmsg == NULL) in cmsghdr_from_user_compat_to_kern()
166 memset(kcmsg, 0, kcmlen); in cmsghdr_from_user_compat_to_kern()
174 if ((char *)kcmsg_base + kcmlen - (char *)kcmsg < CMSG_ALIGN(tmp)) in cmsghdr_from_user_compat_to_kern()
176 kcmsg->cmsg_len = tmp; in cmsghdr_from_user_compat_to_kern()
178 if (__get_user(kcmsg->cmsg_level, &ucmsg->cmsg_level) || in cmsghdr_from_user_compat_to_kern()
179 __get_user(kcmsg->cmsg_type, &ucmsg->cmsg_type) || in cmsghdr_from_user_compat_to_kern()
180 copy_from_user(CMSG_DATA(kcmsg), in cmsghdr_from_user_compat_to_kern()
186 kcmsg = (struct cmsghdr *)((char *)kcmsg + tmp); in cmsghdr_from_user_compat_to_kern()
194 if ((char *)kcmsg - (char *)kcmsg_base != kcmlen) in cmsghdr_from_user_compat_to_kern()