11 #include <linux/kernel.h>
15 #include <asm/uaccess.h>
25 static inline int get_compat_mq_attr(
struct mq_attr *
attr,
37 static inline int put_compat_mq_attr(
const struct mq_attr *
attr,
54 if (u_attr && oflag &
O_CREAT) {
57 memset(&attr, 0,
sizeof(attr));
60 if (get_compat_mq_attr(&attr, u_attr) ||
67 static int compat_prepare_timeout(
struct timespec __user * *
p,
82 const char __user *u_msg_ptr,
83 size_t msg_len,
unsigned int msg_prio,
88 if (compat_prepare_timeout(&u_ts, u_abs_timeout))
96 char __user *u_msg_ptr,
97 size_t msg_len,
unsigned int __user *u_msg_prio,
101 if (compat_prepare_timeout(&u_ts, u_abs_timeout))
109 const struct compat_sigevent __user *u_notification)
112 if (u_notification) {
133 memset(&mqstat, 0,
sizeof(mqstat));
136 if (get_compat_mq_attr(&mqstat, u_mqstat) ||
142 u_omqstat ? p + 1 : NULL);
147 put_compat_mq_attr(&mqstat, u_omqstat))