From: Patrick McHardy Date: Tue, 21 Mar 2006 06:40:54 +0000 (-0800) Subject: [XFRM]: Fix aevent related crash X-Git-Tag: v2.6.17-rc1~1175^2~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be33690d8fcf40377f16193c463681170eb6b295;p=pandora-kernel.git [XFRM]: Fix aevent related crash When xfrm_user isn't loaded xfrm_nl is NULL, which makes IPsec crash because xfrm_aevent_is_on passes the NULL pointer to netlink_has_listeners as socket. A second problem is that the xfrm_nl pointer is not cleared when the socket is releases at module unload time. Protect references of xfrm_nl from outside of xfrm_user by RCU, check that the socket is present in xfrm_aevent_is_on and set it to NULL when unloading xfrm_user. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- Reading git-diff-tree failed