From: Jiri Pirko Date: Sat, 8 Jun 2013 13:00:54 +0000 (+0200) Subject: team: move add to port list before port enablement X-Git-Tag: v3.10-rc6~18^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72df935d985c1575ed44ad2c8c653b28147993fa;p=pandora-kernel.git 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 Signed-off-by: David S. Miller --- Reading git-diff-tree failed