All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bing Zhao <bzhao@marvell.com>
To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Cc: Marcel Holtmann <marcel@holtmann.org>
Subject: bluetooth: module_refcount is not decreased when connection times out
Date: Fri, 8 May 2009 15:59:14 -0700	[thread overview]
Message-ID: <477F20668A386D41ADCC57781B1F704301E62956E5@SC-VEXCH1.marvell.com> (raw)



Hi,

The module refcount is increased by hci_dev_hold() call in hci_conn_add() i=
n hci_conn.c, and it is decreased by hci_dev_put() call in "del_conn" (hci_=
sysfs.c).

In case connection timeout happens, hci_dev_put() is never called.

Procedure to reproduce the issue:

# hciconfig hci0 up
# lsmod | grep btusb				-> "used by" refcount =3D 1

# hcitool cc <non-exisiting bdaddr>		-> will get timeout

# lsmod | grep btusb				-> "used by" refcount =3D 2
# hciconfig hci0 down
# lsmod | grep btusb				-> "used by" refcount =3D 1
# rmmod btusb					-> ERROR: Module btusb is in use


Regards,

Bing

             reply	other threads:[~2009-05-08 22:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08 22:59 Bing Zhao [this message]
2009-05-08 23:20 ` bluetooth: module_refcount is not decreased when connection times out Marcel Holtmann
2009-05-08 23:27 ` Marcel Holtmann
2009-05-09  0:01   ` Bing Zhao
2009-05-09  0:03     ` Marcel Holtmann
2009-05-09  1:08       ` Bing Zhao

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=477F20668A386D41ADCC57781B1F704301E62956E5@SC-VEXCH1.marvell.com \
    --to=bzhao@marvell.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.