diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-05-02 16:11:12 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-05-02 16:11:12 +0200 |
commit | 604a98f1df2897f9ea6ca6bdab8e1c2d6844be01 (patch) | |
tree | 99471700986d14cd5cace3e535dfcbd0e07464cb /net/llc/af_llc.c | |
parent | 1cfd904f16740df21b2df7b41c7a0dc00cbd434c (diff) | |
parent | 7dba33c6346c337aac3f7cd188137d4a6d3d1f3a (diff) | |
download | talos-op-linux-604a98f1df2897f9ea6ca6bdab8e1c2d6844be01.tar.gz talos-op-linux-604a98f1df2897f9ea6ca6bdab8e1c2d6844be01.zip |
Merge branch 'timers/urgent' into timers/core
Pick up urgent fixes to apply dependent cleanup patch
Diffstat (limited to 'net/llc/af_llc.c')
-rw-r--r-- | net/llc/af_llc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 01dcc0823d1f..cb80ebb38311 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -199,9 +199,19 @@ static int llc_ui_release(struct socket *sock) llc->laddr.lsap, llc->daddr.lsap); if (!llc_send_disc(sk)) llc_ui_wait_for_disc(sk, sk->sk_rcvtimeo); - if (!sock_flag(sk, SOCK_ZAPPED)) + if (!sock_flag(sk, SOCK_ZAPPED)) { + struct llc_sap *sap = llc->sap; + + /* Hold this for release_sock(), so that llc_backlog_rcv() + * could still use it. + */ + llc_sap_hold(sap); llc_sap_remove_socket(llc->sap, sk); - release_sock(sk); + release_sock(sk); + llc_sap_put(sap); + } else { + release_sock(sk); + } if (llc->dev) dev_put(llc->dev); sock_put(sk); |