diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-03-21 00:28:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 00:28:11 -0500 |
commit | 2e1f47c74c26a591fc490eb339f1b3167361158b (patch) | |
tree | 3136b2bdfa2bc95f3672318d73f533ecf37f24c1 /net/llc/af_llc.c | |
parent | 2342c990bbd2c075d627720006f0e602134346a7 (diff) |
[LLC]: Fix sap refcounting
Thanks to Leslie Harlley Watter <leslie@watter.org> for reporting the
problem an testing this patch.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/llc/af_llc.c')
-rw-r--r-- | net/llc/af_llc.c | 4 |
1 files changed, 3 insertions, 1 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); |