diff options
-rw-r--r-- | drivers/net/team/team.c | 3 | ||||
-rw-r--r-- | include/linux/if_team.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 343f4ffaf8f0..dea2d8afa2f4 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
@@ -793,7 +793,8 @@ static int team_port_add(struct team *team, struct net_device *port_dev) | |||
793 | return -EBUSY; | 793 | return -EBUSY; |
794 | } | 794 | } |
795 | 795 | ||
796 | port = kzalloc(sizeof(struct team_port), GFP_KERNEL); | 796 | port = kzalloc(sizeof(struct team_port) + team->mode->port_priv_size, |
797 | GFP_KERNEL); | ||
797 | if (!port) | 798 | if (!port) |
798 | return -ENOMEM; | 799 | return -ENOMEM; |
799 | 800 | ||
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index d45fcd5a188d..54af95f5d58b 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
@@ -61,6 +61,7 @@ struct team_port { | |||
61 | } orig; | 61 | } orig; |
62 | 62 | ||
63 | struct rcu_head rcu; | 63 | struct rcu_head rcu; |
64 | long mode_priv[0]; | ||
64 | }; | 65 | }; |
65 | 66 | ||
66 | struct team_mode_ops { | 67 | struct team_mode_ops { |
@@ -108,6 +109,7 @@ struct team_mode { | |||
108 | const char *kind; | 109 | const char *kind; |
109 | struct module *owner; | 110 | struct module *owner; |
110 | size_t priv_size; | 111 | size_t priv_size; |
112 | size_t port_priv_size; | ||
111 | const struct team_mode_ops *ops; | 113 | const struct team_mode_ops *ops; |
112 | }; | 114 | }; |
113 | 115 | ||