[PATCH net-next] macvlan: fix memory hole in macvlan_dev

Subsystems: networking drivers, the rest

STALE3233d

2 messages, 2 authors, 2017-12-08 · open the first message on its own page

[PATCH net-next] macvlan: fix memory hole in macvlan_dev

From: Girish Moodalbail <hidden>
Date: 2017-12-08 14:36:41

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 <redacted>
---
 include/linux/if_macvlan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h
index bedf54b..4cb7aee 100644
--- a/include/linux/if_macvlan.h
+++ b/include/linux/if_macvlan.h
@@ -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,
-- 
1.8.3.1

Re: [PATCH net-next] macvlan: fix memory hole in macvlan_dev

From: David Miller <davem@davemloft.net>
Date: 2017-12-08 19:52:02

From: Girish Moodalbail <redacted>
Date: Fri,  8 Dec 2017 06:03:26 -0800
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 <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help