mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
net: qrtr: Detach socket from sock during release
There is a race between releasing a socket and a sock structure. Skbs still in flight may hold references to the sock structure, preventing it from being freed when the socket is released. Detach the socket in the release call to prevent references to that sockets resources. Change-Id: I44ac553cf73b3a2148ce50d7552c39b08f5e0f91 Signed-off-by: Chris Lew <clew@codeaurora.org>
This commit is contained in:
parent
967986251f
commit
0d116bcb6a
1 changed files with 1 additions and 1 deletions
|
|
@ -1252,7 +1252,7 @@ static int qrtr_release(struct socket *sock)
|
|||
if (!sock_flag(sk, SOCK_DEAD))
|
||||
sk->sk_state_change(sk);
|
||||
|
||||
sock_set_flag(sk, SOCK_DEAD);
|
||||
sock_orphan(sk);
|
||||
sock->sk = NULL;
|
||||
|
||||
if (!sock_flag(sk, SOCK_ZAPPED))
|
||||
|
|
|
|||
Loading…
Reference in a new issue