diff options
author | David S. Miller <davem@davemloft.net> | 2011-01-05 23:38:53 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-05 23:38:53 (GMT) |
commit | 3610cda53f247e176bcbb7a7cca64bc53b12acdb (patch) | |
tree | d780bc1e405116e75a194b2f4693a6f9bbe9f58f /net/core/sock.c | |
parent | 44b8288308ac9da27eab7d7bdbf1375a568805c3 (diff) | |
download | linux-fsl-qoriq-3610cda53f247e176bcbb7a7cca64bc53b12acdb.tar.xz |
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 <jeremy@goop.org>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/sock.c')
0 files changed, 0 insertions, 0 deletions