From: David S. Miller Date: Wed, 5 Jan 2011 23:38:53 +0000 (-0800) Subject: af_unix: Avoid socket->sk NULL OOPS in stream connect security hooks. X-Git-Tag: v2.6.37.1~135 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdbeaf1567cfb79e5fc5b471d4616afd1daa16c9;p=pandora-kernel.git af_unix: Avoid socket->sk NULL OOPS in stream connect security hooks. [ Upstream commit 3610cda53f247e176bcbb7a7cca64bc53b12acdb ] unix_release() can asynchornously set socket->sk to NULL, and it does so without holding the unix_state_lock() on "other" during stream connects. However, the reverse mapping, sk->sk_socket, is only transitioned to NULL under the unix_state_lock(). Therefore make the security hooks follow the reverse mapping instead of the forward mapping. Reported-by: Jeremy Fitzhardinge Reported-by: Linus Torvalds Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed