summaryrefslogtreecommitdiff
path: root/include/linux/if_team.h
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-11-16 15:09:09 +0400
committerDavid S. Miller <davem@davemloft.net>2011-11-17 03:16:38 +0400
commit358b838291f618278080bbed435b755f9b46748e (patch)
treeb8203f872977fff505fcb8b1c7ce44deace9690b /include/linux/if_team.h
parent61dc3461b9549bc10a2f16d254250680cadafcce (diff)
downloadlinux-358b838291f618278080bbed435b755f9b46748e.tar.xz
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.h8
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,
}
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);