af_unix: Avoid socket->sk NULL OOPS in stream connect security hooks.
[linux-flexiantxendom0-natty.git] / net / unix / af_unix.c
index 417d7a6..dd419d2 100644 (file)
@@ -1157,7 +1157,7 @@ restart:
                goto restart;
        }
 
-       err = security_unix_stream_connect(sock, other->sk_socket, newsk);
+       err = security_unix_stream_connect(sk, other, newsk);
        if (err) {
                unix_state_unlock(sk);
                goto out_unlock;