diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-11-16 06:09:09 -0500 |
---|---|---|
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 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, | |||
140 | } | 140 | } |
141 | 141 | ||
142 | extern int team_port_set_team_mac(struct team_port *port); | 142 | extern int team_port_set_team_mac(struct team_port *port); |
143 | extern void team_options_register(struct team *team, | 143 | extern int team_options_register(struct team *team, |
144 | struct team_option *option, | 144 | const struct team_option *option, |
145 | size_t option_count); | 145 | size_t option_count); |
146 | extern void team_options_unregister(struct team *team, | 146 | extern void team_options_unregister(struct team *team, |
147 | struct team_option *option, | 147 | const struct team_option *option, |
148 | size_t option_count); | 148 | size_t option_count); |
149 | extern int team_mode_register(struct team_mode *mode); | 149 | extern int team_mode_register(struct team_mode *mode); |
150 | extern int team_mode_unregister(struct team_mode *mode); | 150 | extern int team_mode_unregister(struct team_mode *mode); |