Thread (6 messages) 6 messages, 2 authors, 2009-05-09

RE: bluetooth: module_refcount is not decreased when connection times out

flat view

From: Bing Zhao <hidden>
Date: 2009-05-09 00:01:00

Hi Bing,
=20
quoted
The module refcount is increased by hci_dev_hold() call in hci_conn_add=
() in hci_conn.c, and it is
decreased by hci_dev_put() call in "del_conn" (hci_sysfs.c).
quoted
In case connection timeout happens, hci_dev_put() is never called.
=20
can you test the attached patch for quickly. It should fix it.
=20
Regards
=20
Marcel

Hi Marcel,

It seems that hdev is "put" twice with the patch, if the connection fails.

# 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 0 (??)

# hcitool cc <non-exisiting bdaddr>		-> time out again
# lsmod | grep btusb				-> "used by" refcount =3D 4294967295 (??)


Thanks,

Bing
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help