Skip to content

Commit

Permalink
x25: Use sock_orphan() instead of open-coded (and buggy) variant.
Browse files Browse the repository at this point in the history
It doesn't grab the sk_callback_lock, it doesn't NULL out
the sk->sk_sleep waitqueue pointer, etc.

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Jun 17, 2008
1 parent 0efffaf commit c751e4f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/x25/af_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,7 @@ static int x25_release(struct socket *sock)
break;
}

sock->sk = NULL;
sk->sk_socket = NULL; /* Not used, but we should do this */
sock_orphan(sk);
out:
return 0;
}
Expand Down

0 comments on commit c751e4f

Please sign in to comment.