public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* bluetooth: module_refcount is not decreased when connection times out
@ 2009-05-08 22:59 Bing Zhao
  2009-05-08 23:20 ` Marcel Holtmann
  2009-05-08 23:27 ` Marcel Holtmann
  0 siblings, 2 replies; 6+ messages in thread
From: Bing Zhao @ 2009-05-08 22:59 UTC (permalink / raw)
  To: linux-bluetooth@vger.kernel.org; +Cc: Marcel Holtmann



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-09  1:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-08 22:59 bluetooth: module_refcount is not decreased when connection times out Bing Zhao
2009-05-08 23:20 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox