macvlan: fix memory hole in macvlan_dev
authorGirish Moodalbail <girish.moodalbail@oracle.com>
Fri, 8 Dec 2017 14:03:26 +0000 (06:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Dec 2017 19:51:46 +0000 (14:51 -0500)
Move 'macaddr_count' from after 'netpoll' to after 'nest_level' to pack
and reduce a memory hole.

Fixes: 88ca59d1aaf28c25 (macvlan: remove unused fields in struct macvlan_dev)
Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_macvlan.h

index bedf54b6f943f4eea069dfc1b467e602d1cec243..4cb7aeeafce03df846188fb936b6bd2ee6b0417f 100644 (file)
@@ -30,10 +30,10 @@ struct macvlan_dev {
        enum macvlan_mode       mode;
        u16                     flags;
        int                     nest_level;
+       unsigned int            macaddr_count;
 #ifdef CONFIG_NET_POLL_CONTROLLER
        struct netpoll          *netpoll;
 #endif
-       unsigned int            macaddr_count;
 };
 
 static inline void macvlan_count_rx(const struct macvlan_dev *vlan,