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.38-rc1~476^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3610cda53f247e176bcbb7a7cca64bc53b12acdb;p=pandora-kernel.git af_unix: Avoid socket->sk NULL OOPS in stream connect security hooks. 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 --- Reading git-diff-tree failed