From: Ralph Campbell Date: Tue, 22 Jul 2008 21:18:33 +0000 (-0700) Subject: IB/sa_query: Check if sm_ah is NULL in ib_sa_remove_one() X-Git-Tag: v2.6.27-rc1~512^2^3~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64b784b583061ebfe1d484dd1fdc5a26c6d4293f;p=pandora-kernel.git IB/sa_query: Check if sm_ah is NULL in ib_sa_remove_one() If update_sm_ah() fails, it leaves the port's sm_ah as NULL. Then if the device or module is removed, ib_sa_remove_one() will dereference a NULL pointer when it calls kref_put(). Fix this by testing if sm_ah is NULL before dropping the reference. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier --- Reading git-diff-tree failed