diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/llc/af_llc.c | 4 | ||||
-rw-r--r-- | net/llc/llc_core.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 233794435bb8..5a04db745c8d 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -187,8 +187,10 @@ static int llc_ui_release(struct socket *sock) | |||
187 | llc->laddr.lsap, llc->daddr.lsap); | 187 | llc->laddr.lsap, llc->daddr.lsap); |
188 | if (!llc_send_disc(sk)) | 188 | if (!llc_send_disc(sk)) |
189 | llc_ui_wait_for_disc(sk, sk->sk_rcvtimeo); | 189 | llc_ui_wait_for_disc(sk, sk->sk_rcvtimeo); |
190 | if (!sock_flag(sk, SOCK_ZAPPED)) | 190 | if (!sock_flag(sk, SOCK_ZAPPED)) { |
191 | llc_sap_put(llc->sap); | ||
191 | llc_sap_remove_socket(llc->sap, sk); | 192 | llc_sap_remove_socket(llc->sap, sk); |
193 | } | ||
192 | release_sock(sk); | 194 | release_sock(sk); |
193 | if (llc->dev) | 195 | if (llc->dev) |
194 | dev_put(llc->dev); | 196 | dev_put(llc->dev); |
diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c index ab0fcd32fd84..bd242a49514a 100644 --- a/net/llc/llc_core.c +++ b/net/llc/llc_core.c | |||
@@ -127,7 +127,6 @@ struct llc_sap *llc_sap_open(unsigned char lsap, | |||
127 | goto out; | 127 | goto out; |
128 | sap->laddr.lsap = lsap; | 128 | sap->laddr.lsap = lsap; |
129 | sap->rcv_func = func; | 129 | sap->rcv_func = func; |
130 | llc_sap_hold(sap); | ||
131 | llc_add_sap(sap); | 130 | llc_add_sap(sap); |
132 | out: | 131 | out: |
133 | write_unlock_bh(&llc_sap_list_lock); | 132 | write_unlock_bh(&llc_sap_list_lock); |