From 358b838291f618278080bbed435b755f9b46748e Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Wed, 16 Nov 2011 11:09:09 +0000 Subject: team: replicate options on register Since multiple team instances are putting defined options into their option list, during register each option must be cloned before added into list. This resolves uncool memory corruptions when using multiple teams. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- include/linux/if_team.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/linux/if_team.h') diff --git a/include/linux/if_team.h b/include/linux/if_team.h index a6eac126a99a..828181fbad5d 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h @@ -140,11 +140,11 @@ static inline struct team_port *team_get_port_by_index_rcu(struct team *team, } extern int team_port_set_team_mac(struct team_port *port); -extern void team_options_register(struct team *team, - struct team_option *option, - size_t option_count); +extern int team_options_register(struct team *team, + const struct team_option *option, + size_t option_count); extern void team_options_unregister(struct team *team, - struct team_option *option, + const struct team_option *option, size_t option_count); extern int team_mode_register(struct team_mode *mode); extern int team_mode_unregister(struct team_mode *mode); -- cgit v1.2.3