diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-11-16 11:09:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-16 18:16:38 -0500 |
commit | 358b838291f618278080bbed435b755f9b46748e (patch) | |
tree | b8203f872977fff505fcb8b1c7ce44deace9690b /include/linux/if_team.h | |
parent | 61dc3461b9549bc10a2f16d254250680cadafcce (diff) |
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 <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_team.h')
-rw-r--r-- | include/linux/if_team.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index a6eac126a99..828181fbad5 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); |