LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dave Young <hidave.darkstar@gmail.com>
To: marcel@holtmann.org
Cc: tglx@linutronix.de, davem@davemloft.net,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] l2cap info_timer delete fix in hci_conn_del
Date: Mon, 3 Mar 2008 10:48:45 +0800 [thread overview]
Message-ID: <20080303024845.GA3197@darkstar.te-china.tietoenator.com> (raw)
When the l2cap info_timer is active the info_state will be set to
L2CAP_INFO_FEAT_MASK_REQ_SENT, and it will be unset after the timer
is deleted or timeout triggered.
Here in hci_conn_del only call del_timer_sync when the info_state
is set to L2CAP_INFO_FEAT_MASK_REQ_SENT.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
---
net/bluetooth/l2cap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -upr linux/net/bluetooth/l2cap.c linux.new/net/bluetooth/l2cap.c
--- linux/net/bluetooth/l2cap.c 2008-03-03 10:35:03.000000000 +0800
+++ linux.new/net/bluetooth/l2cap.c 2008-03-03 10:36:34.000000000 +0800
@@ -417,7 +417,8 @@ static void l2cap_conn_del(struct hci_co
l2cap_sock_kill(sk);
}
- del_timer_sync(&conn->info_timer);
+ if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT)
+ del_timer_sync(&conn->info_timer);
hcon->l2cap_data = NULL;
kfree(conn);
next reply other threads:[~2008-03-03 2:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 2:48 Dave Young [this message]
2008-03-03 10:59 ` Marcel Holtmann
2008-03-03 20:19 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080303024845.GA3197@darkstar.te-china.tietoenator.com \
--to=hidave.darkstar@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=tglx@linutronix.de \
--subject='Re: [PATCH] l2cap info_timer delete fix in hci_conn_del' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).