diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-06-08 17:00:54 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-12 11:56:27 +0400 |
commit | 72df935d985c1575ed44ad2c8c653b28147993fa (patch) | |
tree | f542a207e79b8d9fda9edf98f384d49ca87db126 /include/linux/if_team.h | |
parent | 76c455decbbad31de21c727edb184a963f42b40b (diff) | |
download | linux-72df935d985c1575ed44ad2c8c653b28147993fa.tar.xz |
team: move add to port list before port enablement
team_port_enable() adds port to port_hashlist. Reader sees port
in team_get_port_by_index_rcu() and returns it, but
team_get_first_port_txable_rcu() tries to go through port_list, where the
port is not inserted yet -> NULL pointer dereference.
Fix this by reordering port_list and port_hashlist insertion.
Panic is easily triggeable when txing packets and adding/removing port
in a loop.
Introduced by commit 3d249d4c "net: introduce ethernet teaming device"
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_team.h')
0 files changed, 0 insertions, 0 deletions