From: Ralph Campbell Date: Fri, 27 Feb 2009 22:44:32 +0000 (-0800) Subject: IB/mad: initialize mad_agent_priv before putting on lists X-Git-Tag: v2.6.30-rc1~665^2^6~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9620a4c82c61a91c9313f80ba951c902573c028;p=pandora-kernel.git IB/mad: initialize mad_agent_priv before putting on lists There is a potential race in ib_register_mad_agent() where the struct ib_mad_agent_private is not fully initialized before it is added to the list of agents per IB port. This means the ib_mad_agent_private could be seen before the refcount, spin locks, and linked lists are initialized. The fix is to initialize the structure earlier. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier --- Reading git-diff-tree failed