netfilter: nf_tables: add register parsing/dumping helpers
[firefly-linux-kernel-4.4.55.git] / net / compat.c
index f7bd286a82807148bed32622e5de2f975450c877..c4b6b0f43d5d4243d8c35274a4669333bd9f5f25 100644 (file)
@@ -79,6 +79,8 @@ ssize_t get_compat_msghdr(struct msghdr *kmsg,
        if (nr_segs > UIO_MAXIOV)
                return -EMSGSIZE;
 
+       kmsg->msg_iocb = NULL;
+
        err = compat_rw_copy_check_uvector(save_addr ? READ : WRITE,
                                           compat_ptr(uiov), nr_segs,
                                           UIO_FASTIOV, *iov, iov);
@@ -515,25 +517,25 @@ COMPAT_SYSCALL_DEFINE5(getsockopt, int, fd, int, level, int, optname,
 struct compat_group_req {
        __u32                            gr_interface;
        struct __kernel_sockaddr_storage gr_group
-               __attribute__ ((aligned(4)));
+               __aligned(4);
 } __packed;
 
 struct compat_group_source_req {
        __u32                            gsr_interface;
        struct __kernel_sockaddr_storage gsr_group
-               __attribute__ ((aligned(4)));
+               __aligned(4);
        struct __kernel_sockaddr_storage gsr_source
-               __attribute__ ((aligned(4)));
+               __aligned(4);
 } __packed;
 
 struct compat_group_filter {
        __u32                            gf_interface;
        struct __kernel_sockaddr_storage gf_group
-               __attribute__ ((aligned(4)));
+               __aligned(4);
        __u32                            gf_fmode;
        __u32                            gf_numsrc;
        struct __kernel_sockaddr_storage gf_slist[1]
-               __attribute__ ((aligned(4)));
+               __aligned(4);
 } __packed;
 
 #define __COMPAT_GF0_SIZE (sizeof(struct compat_group_filter) - \