summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/team/team.c3
-rw-r--r--include/linux/if_team.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 343f4ff..dea2d8a 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)
return -EBUSY;
}
- port = kzalloc(sizeof(struct team_port), GFP_KERNEL);
+ port = kzalloc(sizeof(struct team_port) + team->mode->port_priv_size,
+ GFP_KERNEL);
if (!port)
return -ENOMEM;
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index d45fcd5..54af95f 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -61,6 +61,7 @@ struct team_port {
} orig;
struct rcu_head rcu;
+ long mode_priv[0];
};
struct team_mode_ops {
@@ -108,6 +109,7 @@ struct team_mode {
const char *kind;
struct module *owner;
size_t priv_size;
+ size_t port_priv_size;
const struct team_mode_ops *ops;
};